Open zyou1986 opened 5 years ago
+1
Facing the same issue with:
this is because the evosuite depends on xtream 1.4.10, see in the file evosuite/pom.xml at line 424.
try to check your program, maybe it depends on the version lower than 1.4.10
facing same issue, can some one please help, this is urgent
master.log
[MASTER] 23:39:35.093 [main] ERROR TestGeneration - Not possible to access to clients. Clients' state: Terminated with exit status 1. Master registry port: 4810
[MASTER] 23:39:35.113 [main] ERROR SearchStatistics - No statistics has been saved because EvoSuite failed to generate any test case
[MASTER] 23:39:35.214 [main] ERROR TestGeneration - failed to write statistics data
client.log
[MASTER] 23:38:59.565 [main] ERROR ClientServices - Failed to register client services
java.rmi.ConnectException: Connection refused to host: 10.221.0.150; nested exception is:
java.net.ConnectException: Connection timed out: connect
at sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:619) ~[na:1.8.0_171]
at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:216) ~[na:1.8.0_171]
at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:202) ~[na:1.8.0_171]
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:338) ~[na:1.8.0_171]
at sun.rmi.registry.RegistryImpl_Stub.rebind(RegistryImpl_Stub.java:147) ~[na:1.8.0_171]
at org.evosuite.rmi.ClientServices.registerServices(ClientServices.java:67) ~[evosuite-master-1.0.6.jar:1.0.6]
at org.evosuite.ClientProcess.run(ClientProcess.java:82) [evosuite-master-1.0.6.jar:1.0.6]
at org.evosuite.ClientProcess.main(ClientProcess.java:203) [evosuite-master-1.0.6.jar:1.0.6]
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method) ~[na:1.8.0_171]
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79) ~[na:1.8.0_171]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_171]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_171]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_171]
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172) ~[na:1.8.0_171]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_171]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_171]
at java.net.Socket.connect(Socket.java:538) ~[na:1.8.0_171]
at java.net.Socket.
1.My question Some projects can generate test cases by evosuite, but some don't work(E.g: git@github.com:zyou1986/riskcontrol.git), I don't know where the problem is.
2.Error message: 2.1 in command line: (I guarantee that the .KieService file path is correct.)
mvn compile -DmemoryInMB=2000 -Dcores=2 -Dcuts=com.example.riskcontrol.service.KieService -DtargetFolder=src/test evosuite:generate evosuite:export
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building riskcontrol 0.0.1-SNAPSHOT [INFO] ------------------------------------------------------------------------ [WARNING] The POM for org.apache.httpcomponents:httpclient:jar:4.5.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for commons-lang:commons-lang:jar:2.6 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.httpcomponents:httpcore:jar:4.4.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.hamcrest:hamcrest-core:jar:1.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ riskcontrol --- [WARNING] The POM for commons-cli:commons-cli:jar:1.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 7 resources [INFO] [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ riskcontrol --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] >>> evosuite-maven-plugin:1.0.6:generate (default-cli) > compile @ riskcontrol >>> [INFO] [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ riskcontrol --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 1 resource [INFO] Copying 7 resources [INFO] [INFO] --- maven-compiler-plugin:3.3:compile (default-compile) @ riskcontrol --- [INFO] Nothing to compile - all classes are up to date [INFO] [INFO] <<< evosuite-maven-plugin:1.0.6:generate (default-cli) < compile @ riskcontrol <<< [INFO] [INFO] [INFO] --- evosuite-maven-plugin:1.0.6:generate (default-cli) @ riskcontrol --- [WARNING] The POM for commons-logging:commons-logging:jar:1.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] Going to generate tests with EvoSuite [INFO] Total memory: 2000mb [INFO] Time per class: 2 minutes [INFO] Number of used cores: 2 [INFO] Specified classes under test: com.example.riskcontrol.service.KieService [INFO] Target: /Users/mileszhou/Downloads/riskcontrol-master/target/classes [INFO] Basedir: /Users/mileszhou/Downloads/riskcontrol-master [INFO] Started spawn process manager on port 64926 [WARNING] The POM for org.apache.httpcomponents:httpclient:jar:4.3.5 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [WARNING] The POM for org.apache.httpcomponents:httpcore:jar:4.3.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details [INFO] SLF4J: Class path contains multiple SLF4J bindings. [INFO] SLF4J: Found binding in [jar:file:/Users/mileszhou/.m2/repository/org/evosuite/evosuite-master/1.0.6/evosuite-master-1.0.6.jar!/org/slf4j/impl/StaticLoggerBinder.class] [INFO] SLF4J: Found binding in [jar:file:/Users/mileszhou/.m2/repository/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 1.0.6 [INFO] Registered remote process from /127.0.0.1:64927 [INFO] Going to execute 1 jobs [INFO] Estimated completion time: 1 minutes, by 2018-12-06T19:52:20.676 [INFO] Going to start job for: com.example.riskcontrol.service.KieService. Expected to end in 60 seconds, by 2018-12-06T19:52:20.710 [INFO] Registered remote process from /127.0.0.1:64928 [INFO] Registered remote process from /127.0.0.1:64935 [INFO] Completed job. Left: 0 [INFO] Updating database to com.example.riskcontrol.service.KieService [INFO] === CTG run results === [INFO] Removed test suites: 0 [INFO] New test suites: 0 [INFO] WARN: failed to generate tests for com.example.riskcontrol.service.KieService [INFO] Stopping spawn process manager [INFO] [INFO] --- evosuite-maven-plugin:1.0.6:export (default-cli) @ riskcontrol --- [INFO] Exporting tests [INFO] Nothing to export [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------
2.1 in log: std_err_CLIENT.log: [MASTER] 19:51:23.288 [pool-2-thread-1] ERROR TestSuiteGenerator - Problem for com.example.riskcontrol.service.KieService. Full stack: java.lang.NoSuchMethodError: com.thoughtworks.xstream.XStream.setupDefaultSecurity(Lcom/thoughtworks/xstream/XStream;)V at org.evosuite.setup.InheritanceTreeGenerator.readJDKData(InheritanceTreeGenerator.java:444) at org.evosuite.setup.InheritanceTreeGenerator.createFromClassPath(InheritanceTreeGenerator.java:82) at org.evosuite.setup.DependencyAnalysis.initInheritanceTree(DependencyAnalysis.java:77) at org.evosuite.setup.DependencyAnalysis.analyzeClass(DependencyAnalysis.java:131) at org.evosuite.TestSuiteGenerator.initializeTargetClass(TestSuiteGenerator.java:110) at org.evosuite.TestSuiteGenerator.generateTestSuite(TestSuiteGenerator.java:130) at org.evosuite.rmi.service.ClientNodeImpl$1.run(ClientNodeImpl.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
std_err_MASTER.log: [MASTER] 19:51:23.449 [main] ERROR SearchStatistics - No statistics has been saved because EvoSuite failed to generate any test case [MASTER] 19:51:23.554 [main] ERROR TestGeneration - failed to write statistics data
std_out_MASTER.log: EvoSuite 1.0.6
3.dependency dependencie: