Open shuqing1 opened 2 years ago
Hello, This is my second problem with EvoSuite, and I would like your guidance to solve them. Looking forward to your reply. Thank you! measured class: ASFB.zip
and main as follow:
log: "C:\Program Files\Java\jdk1.8.0_321\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3\lib\idea_rt.jar=57003:C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_321\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\rt.jar;D:\a\evosuite-master\master\target\classes;D:\a\evosuite-master\runtime\target\classes;D:\maven\repository\org\mockito\mockito-core\3.12.4\mockito-core-3.12.4.jar;D:\maven\repository\net\bytebuddy\byte-buddy\1.11.13\byte-buddy-1.11.13.jar;D:\maven\repository\net\bytebuddy\byte-buddy-agent\1.11.13\byte-buddy-agent-1.11.13.jar;D:\maven\repository\org\objenesis\objenesis\3.2\objenesis-3.2.jar;D:\maven\repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;D:\maven\repository\org\ow2\asm\asm\9.2\asm-9.2.jar;D:\maven\repository\org\ow2\asm\asm-commons\9.2\asm-commons-9.2.jar;D:\maven\repository\org\ow2\asm\asm-tree\9.2\asm-tree-9.2.jar;D:\maven\repository\org\ow2\asm\asm-analysis\9.2\asm-analysis-9.2.jar;D:\maven\repository\org\ow2\asm\asm-util\9.2\asm-util-9.2.jar;D:\maven\repository\javax\xml\ws\jaxws-api\2.3.1\jaxws-api-2.3.1.jar;D:\maven\repository\javax\xml\soap\javax.xml.soap-api\1.4.0\javax.xml.soap-api-1.4.0.jar;D:\maven\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\maven\repository\junit\junit\4.13.2\junit-4.13.2.jar;D:\maven\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\maven\repository\com\opencsv\opencsv\5.5.2\opencsv-5.5.2.jar;D:\maven\repository\org\apache\commons\commons-text\1.9\commons-text-1.9.jar;D:\maven\repository\commons-beanutils\commons-beanutils\1.9.4\commons-beanutils-1.9.4.jar;D:\maven\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\maven\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\maven\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;D:\maven\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;D:\maven\repository\com\googlecode\gentyref\gentyref\1.2.0\gentyref-1.2.0.jar;D:\maven\repository\net\sf\jgrapht\jgrapht\0.8.3\jgrapht-0.8.3.jar;D:\maven\repository\com\thoughtworks\xstream\xstream\1.4.18\xstream-1.4.18.jar;D:\maven\repository\io\github\x-stream\mxparser\1.2.2\mxparser-1.2.2.jar;D:\maven\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;D:\maven\repository\org\kohsuke\graphviz-api\1.1\graphviz-api-1.1.jar;D:\maven\repository\oro\oro\2.0.8\oro-2.0.8.jar;D:\maven\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter\5.8.0\junit-jupiter-5.8.0.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter-params\5.8.0\junit-jupiter-params-5.8.0.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter-engine\5.8.0\junit-jupiter-engine-5.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-engine\1.8.0\junit-platform-engine-1.8.0.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter-api\5.8.0\junit-jupiter-api-5.8.0.jar;D:\maven\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;D:\maven\repository\org\junit\platform\junit-platform-commons\1.8.0\junit-platform-commons-1.8.0.jar;D:\maven\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;D:\maven\repository\org\junit\platform\junit-platform-runner\1.8.0\junit-platform-runner-1.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-launcher\1.8.0\junit-platform-launcher-1.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-suite-api\1.8.0\junit-platform-suite-api-1.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-suite-commons\1.8.0\junit-platform-suite-commons-1.8.0.jar;D:\a\evosuite-master\client\target\classes;D:\maven\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\maven\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\maven\repository\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar;D:\maven\repository\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;D:\maven\repository\commons-cli\commons-cli\1.4\commons-cli-1.4.jar;D:\maven\repository\com\sun\xml\bind\jaxb-core\2.3.0\jaxb-core-2.3.0.jar;D:\maven\repository\com\sun\xml\bind\jaxb-impl\2.3.0\jaxb-impl-2.3.0.jar;D:\maven\repository\javax\xml\bind\jaxb-api\2.3.0\jaxb-api-2.3.0.jar;D:\maven\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar" org.evosuite.EvoSuite
EvoSuite
Going to generate test cases for class: tutorial.ASFB
Starting Client-0
Connecting to master process on port 3355
Analyzing classpath:
Finished analyzing classpath
Generating tests for class tutorial.ASFB
Test criteria:
Setting up search algorithm for whole suite generation
Total number of test goals:
Starting evolution [Progress:==============================100%] [Cov:=================> 50%]
Search finished after 61s and 45202 generations, 0 statements, best individual has fitness: 226.97826086956522
Minimizing test suite
Going to analyze the coverage criteria
Coverage analysis for criterion LINE
Coverage of criterion LINE: 0%
Total number of goals: 45
Number of covered goals: 0
Coverage analysis for criterion BRANCH
Coverage of criterion BRANCH: 0%
Total number of goals: 30
Coverage analysis for criterion EXCEPTION
Coverage of criterion EXCEPTION: 100% (no goals)
Coverage analysis for criterion WEAKMUTATION
Coverage of criterion WEAKMUTATION: 0%
Total number of goals: 63
Coverage analysis for criterion OUTPUT
Coverage of criterion OUTPUT: 100% (no goals)
Coverage analysis for criterion METHOD
Coverage of criterion METHOD: 100% (no goals)
Coverage analysis for criterion METHODNOEXCEPTION
Coverage of criterion METHODNOEXCEPTION: 100% (no goals)
Coverage analysis for criterion CBRANCH
Coverage of criterion CBRANCH: 0%
Generated 0 tests with total length 0
Resulting test suite's coverage: 50% (average coverage for all fitness functions)
Generating assertions
Resulting test suite's mutation score: 0%
Compiling and checking tests
Writing tests to file
Writing JUnit test case 'ASFB_ESTest' to evosuite-tests
Done!
Computation finished
Process finished with exit code 0
result:
I read this article, but I still didn't find a way to do it: https://www.evosuite.org/wp-content/papercite-data/pdf/icst17_mocking.pdf
Hello, This is my second problem with EvoSuite, and I would like your guidance to solve them. Looking forward to your reply. Thank you! measured class: ASFB.zip![image](https://user-images.githubusercontent.com/9458106/160089242-49e192cf-be6d-4b72-8f0b-a2bb35a40ee6.png)
and main as follow:![image](https://user-images.githubusercontent.com/9458106/160088333-f06a3f8c-ce8d-4a77-a0f1-b50390c7c54c.png)
log: "C:\Program Files\Java\jdk1.8.0_321\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3\lib\idea_rt.jar=57003:C:\Program Files\JetBrains\IntelliJ IDEA 2021.1.3\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_321\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunmscapi.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\sunpkcs11.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\ext\zipfs.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\javaws.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jce.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jfr.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jfxswt.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\management-agent.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\plugin.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\resources.jar;C:\Program Files\Java\jdk1.8.0_321\jre\lib\rt.jar;D:\a\evosuite-master\master\target\classes;D:\a\evosuite-master\runtime\target\classes;D:\maven\repository\org\mockito\mockito-core\3.12.4\mockito-core-3.12.4.jar;D:\maven\repository\net\bytebuddy\byte-buddy\1.11.13\byte-buddy-1.11.13.jar;D:\maven\repository\net\bytebuddy\byte-buddy-agent\1.11.13\byte-buddy-agent-1.11.13.jar;D:\maven\repository\org\objenesis\objenesis\3.2\objenesis-3.2.jar;D:\maven\repository\org\slf4j\slf4j-api\1.7.32\slf4j-api-1.7.32.jar;D:\maven\repository\org\ow2\asm\asm\9.2\asm-9.2.jar;D:\maven\repository\org\ow2\asm\asm-commons\9.2\asm-commons-9.2.jar;D:\maven\repository\org\ow2\asm\asm-tree\9.2\asm-tree-9.2.jar;D:\maven\repository\org\ow2\asm\asm-analysis\9.2\asm-analysis-9.2.jar;D:\maven\repository\org\ow2\asm\asm-util\9.2\asm-util-9.2.jar;D:\maven\repository\javax\xml\ws\jaxws-api\2.3.1\jaxws-api-2.3.1.jar;D:\maven\repository\javax\xml\soap\javax.xml.soap-api\1.4.0\javax.xml.soap-api-1.4.0.jar;D:\maven\repository\javax\annotation\javax.annotation-api\1.3.2\javax.annotation-api-1.3.2.jar;D:\maven\repository\junit\junit\4.13.2\junit-4.13.2.jar;D:\maven\repository\org\hamcrest\hamcrest-core\1.3\hamcrest-core-1.3.jar;D:\maven\repository\com\opencsv\opencsv\5.5.2\opencsv-5.5.2.jar;D:\maven\repository\org\apache\commons\commons-text\1.9\commons-text-1.9.jar;D:\maven\repository\commons-beanutils\commons-beanutils\1.9.4\commons-beanutils-1.9.4.jar;D:\maven\repository\commons-logging\commons-logging\1.2\commons-logging-1.2.jar;D:\maven\repository\commons-collections\commons-collections\3.2.2\commons-collections-3.2.2.jar;D:\maven\repository\org\apache\commons\commons-collections4\4.4\commons-collections4-4.4.jar;D:\maven\repository\dk\brics\automaton\automaton\1.11-8\automaton-1.11-8.jar;D:\maven\repository\com\googlecode\gentyref\gentyref\1.2.0\gentyref-1.2.0.jar;D:\maven\repository\net\sf\jgrapht\jgrapht\0.8.3\jgrapht-0.8.3.jar;D:\maven\repository\com\thoughtworks\xstream\xstream\1.4.18\xstream-1.4.18.jar;D:\maven\repository\io\github\x-stream\mxparser\1.2.2\mxparser-1.2.2.jar;D:\maven\repository\xmlpull\xmlpull\1.1.3.1\xmlpull-1.1.3.1.jar;D:\maven\repository\org\kohsuke\graphviz-api\1.1\graphviz-api-1.1.jar;D:\maven\repository\oro\oro\2.0.8\oro-2.0.8.jar;D:\maven\repository\org\apache\commons\commons-exec\1.3\commons-exec-1.3.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter\5.8.0\junit-jupiter-5.8.0.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter-params\5.8.0\junit-jupiter-params-5.8.0.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter-engine\5.8.0\junit-jupiter-engine-5.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-engine\1.8.0\junit-platform-engine-1.8.0.jar;D:\maven\repository\org\junit\jupiter\junit-jupiter-api\5.8.0\junit-jupiter-api-5.8.0.jar;D:\maven\repository\org\opentest4j\opentest4j\1.2.0\opentest4j-1.2.0.jar;D:\maven\repository\org\junit\platform\junit-platform-commons\1.8.0\junit-platform-commons-1.8.0.jar;D:\maven\repository\org\apiguardian\apiguardian-api\1.1.2\apiguardian-api-1.1.2.jar;D:\maven\repository\org\junit\platform\junit-platform-runner\1.8.0\junit-platform-runner-1.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-launcher\1.8.0\junit-platform-launcher-1.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-suite-api\1.8.0\junit-platform-suite-api-1.8.0.jar;D:\maven\repository\org\junit\platform\junit-platform-suite-commons\1.8.0\junit-platform-suite-commons-1.8.0.jar;D:\a\evosuite-master\client\target\classes;D:\maven\repository\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\maven\repository\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\maven\repository\org\apache\commons\commons-lang3\3.12.0\commons-lang3-3.12.0.jar;D:\maven\repository\commons-io\commons-io\2.11.0\commons-io-2.11.0.jar;D:\maven\repository\commons-cli\commons-cli\1.4\commons-cli-1.4.jar;D:\maven\repository\com\sun\xml\bind\jaxb-core\2.3.0\jaxb-core-2.3.0.jar;D:\maven\repository\com\sun\xml\bind\jaxb-impl\2.3.0\jaxb-impl-2.3.0.jar;D:\maven\repository\javax\xml\bind\jaxb-api\2.3.0\jaxb-api-2.3.0.jar;D:\maven\repository\javax\activation\javax.activation-api\1.2.0\javax.activation-api-1.2.0.jar" org.evosuite.EvoSuite
EvoSuite
Going to generate test cases for class: tutorial.ASFB
Starting Client-0
Connecting to master process on port 3355
Analyzing classpath:
Finished analyzing classpath
Generating tests for class tutorial.ASFB
Test criteria:
Setting up search algorithm for whole suite generation
Total number of test goals:
Starting evolution [Progress:==============================100%] [Cov:=================> 50%]
Search finished after 61s and 45202 generations, 0 statements, best individual has fitness: 226.97826086956522
Minimizing test suite
Going to analyze the coverage criteria
Coverage analysis for criterion LINE
Coverage of criterion LINE: 0%
Total number of goals: 45
Number of covered goals: 0
Coverage analysis for criterion BRANCH
Coverage of criterion BRANCH: 0%
Total number of goals: 30
Number of covered goals: 0
Coverage analysis for criterion EXCEPTION
Coverage of criterion EXCEPTION: 100% (no goals)
Coverage analysis for criterion WEAKMUTATION
Coverage of criterion WEAKMUTATION: 0%
Total number of goals: 63
Number of covered goals: 0
Coverage analysis for criterion OUTPUT
Coverage of criterion OUTPUT: 100% (no goals)
Coverage analysis for criterion METHOD
Coverage of criterion METHOD: 100% (no goals)
Coverage analysis for criterion METHODNOEXCEPTION
Coverage of criterion METHODNOEXCEPTION: 100% (no goals)
Coverage analysis for criterion CBRANCH
Coverage of criterion CBRANCH: 0%
Total number of goals: 30
Number of covered goals: 0
Generated 0 tests with total length 0
Resulting test suite's coverage: 50% (average coverage for all fitness functions)
Generating assertions
Resulting test suite's mutation score: 0%
Compiling and checking tests
Writing tests to file
Writing JUnit test case 'ASFB_ESTest' to evosuite-tests
Done!
Computation finished
Process finished with exit code 0
result:
![image](https://user-images.githubusercontent.com/9458106/160089166-ad7feb65-6b5d-4422-b66f-6c3e62c83f4d.png)
I read this article, but I still didn't find a way to do it: https://www.evosuite.org/wp-content/papercite-data/pdf/icst17_mocking.pdf