2

我已按照站点中给出的步骤配置 maven 插件。当我给出“mvn evosuite:generate”时,它会在控制台中挂起以下详细信息。

[INFO] 开始工作:com.emirates.gws.service.grouprequest.GroupRequestServiceImpl。

以下是环境细节 Windows 7 maven-3.2.1 jdk1.7.0_72

以下是控制台中显示的详细信息

 [INFO] --- evosuite-maven-plugin:0.2.0:generate (default-cli) @ gws-grouprequest-implementation ---
[WARNING] The POM for org.slf4j:slf4j-api:jar:1.7.12 is missing, no dependency information available
[WARNING] The POM for org.ow2.asm:asm-all:jar:5.0.4 is missing, no dependency information available
[WARNING] The POM for dk.brics.automaton:automaton:jar:1.11-8 is missing, no dependency information available
[WARNING] The POM for com.googlecode.gentyref:gentyref:jar:1.2.0 is missing, no dependency information available
[WARNING] The POM for net.sf.jgrapht:jgrapht:jar:0.8.3 is missing, no dependency information available
[WARNING] The POM for commons-cli:commons-cli:jar:1.3 is missing, no dependency information available
[WARNING] The POM for org.kohsuke:graphviz-api:jar:1.1 is missing, no dependency information available
[INFO] Going to generate tests with EvoSuite
[INFO] Total memory: 800mb
[INFO] Time per class: 2 minutes
[INFO] Number of used cores: 1
[INFO] Target: D:\EGIT\Projects\GWS\Source\gws-project-MICE\gws-grouprequest\gws-grouprequest-implementation\target\classes
[INFO] Basedir: D:\EGIT\Projects\GWS\Source\gws-project-MICE\gws-grouprequest\gws-grouprequest-implementation
[INFO] SLF4J: Class path contains multiple SLF4J bindings.
[INFO] SLF4J: Found binding in [jar:file:/D:/EGIT/Projects/GWS/M2_REPO/org/evosuite/evosuite-master/0.2.0/evosuite-master-0.2.0.jar!/org/slf4j/impl/S
taticLoggerBinder.class]
[INFO] SLF4J: Found binding in [jar:file:/D:/EGIT/Projects/GWS/M2_REPO/org/evosuite/evosuite-runtime/0.2.0/evosuite-runtime-0.2.0.jar!/org/slf4j/impl
/StaticLoggerBinder.class]
[INFO] SLF4J: Found binding in [jar:file:/D:/EGIT/Projects/GWS/M2_REPO/ch/qos/logback/logback-classic/1.1.3/logback-classic-1.1.3.jar!/org/slf4j/impl
/StaticLoggerBinder.class]
[INFO] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
[INFO] SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
[INFO] * EvoSuite
[INFO] [MASTER] 21:49:11.703 [main] WARN  ProjectAnalyzer - Cannot handle com.emirates.gws.service.payments.PaymentServiceImpl due to: class java.lan
g.ClassNotFoundException Method code too large!
[INFO] Going to execute 32 jobs
[INFO] Going to start job for: com.emirates.gws.service.grouprequest.GroupRequestServiceImpl
4

1 回答 1

2

从您的设置来看,您使用 1 个核心,每节课 2 分钟,并尝试为 32 节课生成测试:这意味着最多需要 64 分钟才能完成。但是,每次完成新课程时(大约每 2 分钟一次),您应该在日志中获得一个新条目。

顺便说一句,您似乎只使用了 800MB 的内存。以防万一,最好多使用一些,例如 1-1.5GB

以下有点令人担忧:

[INFO] [MASTER] 21:49:11.703 [main] WARN  ProjectAnalyzer - Cannot handle com.emirates.gws.service.payments.PaymentServiceImpl due to: class java.lan
g.ClassNotFoundException Method code too large!

Java 确实对方法的大小有限制。EvoSuite 需要在字节码上添加一些工具才能工作,这可能会导致超出限制:(

于 2015-09-09T05:58:26.370 回答