Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

按照操作对service层代码进行单元测试生成,后运行报错 #9

Closed
BensonMax opened this issue Dec 22, 2022 · 2 comments
Closed

Comments

@BensonMax
Copy link

Context

Please provide below a detailed introduction to the issue itself, and describe what you were doing when the issue happened. Or, what do you want to achieve?

按照操作对service层代码进行单元测试生成,后运行报错

D:\PlayGround\sql-father-backend-public>java -jar ./smartut.jar -target target\classes\com\yupi\sqlfather\service

  • SmartUt 1.1.0
  • Found 10 matching classes in target target\classes\com\yupi\sqlfather\service
  • Analyzing classpath (generating inheritance tree)
    • target/classes
    • target/dependency/accessors-smart-2.4.8.jar
    • target/dependency/android-json-0.0.20131108.vaadin1.jar
    • target/dependency/animal-sniffer-annotations-1.17.jar
    • target/dependency/annotations-13.0.jar
    • target/dependency/apiguardian-api-1.1.2.jar
    • target/dependency/asm-9.1.jar
    • target/dependency/aspectjweaver-1.9.7.jar
    • target/dependency/assertj-core-3.22.0.jar
    • target/dependency/automaton-1.11-8.jar
    • target/dependency/byte-buddy-1.12.12.jar
    • target/dependency/byte-buddy-agent-1.12.12.jar
    • target/dependency/cache-api-1.1.1.jar
    • target/dependency/checker-compat-qual-2.5.2.jar
    • target/dependency/classgraph-4.8.83.jar
    • target/dependency/classmate-1.5.1.jar
    • target/dependency/commons-codec-1.15.jar
    • target/dependency/commons-collections4-4.4.jar
    • target/dependency/commons-compress-1.19.jar
    • target/dependency/commons-csv-1.8.jar
    • target/dependency/commons-lang3-3.12.0.jar
    • target/dependency/commons-math3-3.6.1.jar
    • target/dependency/curvesapi-1.06.jar
    • target/dependency/datafaker-1.6.0.jar
    • target/dependency/druid-1.2.12.jar
    • target/dependency/easyexcel-3.1.1.jar
    • target/dependency/easyexcel-core-3.1.1.jar
    • target/dependency/easyexcel-support-3.1.1.jar
    • target/dependency/ehcache-3.10.0.jar
    • target/dependency/error_prone_annotations-2.2.0.jar
    • target/dependency/evosuite-standalone-runtime-1.0.6.jar
    • target/dependency/failureaccess-1.0.1.jar
    • target/dependency/freemarker-2.3.31.jar
    • target/dependency/generex-1.0.2.jar
    • target/dependency/gson-2.9.1.jar
    • target/dependency/guava-27.0.1-android.jar
    • target/dependency/hamcrest-2.2.jar
    • target/dependency/HikariCP-4.0.3.jar
    • target/dependency/hutool-all-5.8.8.jar
    • target/dependency/istack-commons-runtime-3.0.12.jar
    • target/dependency/j2objc-annotations-1.1.jar
    • target/dependency/jackson-annotations-2.13.3.jar
    • target/dependency/jackson-core-2.13.3.jar
    • target/dependency/jackson-databind-2.13.3.jar
    • target/dependency/jackson-dataformat-yaml-2.13.3.jar
    • target/dependency/jackson-datatype-jdk8-2.13.3.jar
    • target/dependency/jackson-datatype-jsr310-2.13.3.jar
    • target/dependency/jackson-module-parameter-names-2.13.3.jar
    • target/dependency/jakarta.activation-1.2.2.jar
    • target/dependency/jakarta.activation-api-1.2.2.jar
    • target/dependency/jakarta.annotation-api-1.3.5.jar
    • target/dependency/jakarta.xml.bind-api-2.3.3.jar
    • target/dependency/javassist-3.25.0-GA.jar
    • target/dependency/jaxb-runtime-2.3.6.jar
    • target/dependency/json-path-2.7.0.jar
    • target/dependency/json-smart-2.4.8.jar
    • target/dependency/jsonassert-1.5.1.jar
    • target/dependency/jsqlparser-4.4.jar
    • target/dependency/jsr305-3.0.2.jar
    • target/dependency/jul-to-slf4j-1.7.36.jar
    • target/dependency/junit-jupiter-5.8.2.jar
    • target/dependency/junit-jupiter-api-5.8.2.jar
    • target/dependency/junit-jupiter-engine-5.8.2.jar
    • target/dependency/junit-jupiter-params-5.8.2.jar
    • target/dependency/junit-platform-commons-1.8.2.jar
    • target/dependency/junit-platform-engine-1.8.2.jar
    • target/dependency/knife4j-annotations-3.0.3.jar
    • target/dependency/knife4j-core-3.0.3.jar
    • target/dependency/knife4j-spring-3.0.3.jar
    • target/dependency/knife4j-spring-boot-autoconfigure-3.0.3.jar
    • target/dependency/knife4j-spring-boot-starter-3.0.3.jar
    • target/dependency/knife4j-spring-ui-3.0.3.jar
    • target/dependency/kotlin-stdlib-1.6.21.jar
    • target/dependency/kotlin-stdlib-common-1.6.21.jar
    • target/dependency/kotlin-stdlib-jdk7-1.6.21.jar
    • target/dependency/kotlin-stdlib-jdk8-1.6.21.jar
    • target/dependency/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
    • target/dependency/log4j-api-2.17.2.jar
    • target/dependency/log4j-to-slf4j-2.17.2.jar
    • target/dependency/logback-classic-1.2.11.jar
    • target/dependency/logback-core-1.2.11.jar
    • target/dependency/lombok-1.18.24.jar
    • target/dependency/mapstruct-1.3.1.Final.jar
    • target/dependency/mockito-core-4.5.1.jar
    • target/dependency/mockito-junit-jupiter-4.5.1.jar
    • target/dependency/mybatis-3.5.9.jar
    • target/dependency/mybatis-plus-3.5.2.jar
    • target/dependency/mybatis-plus-annotation-3.5.2.jar
    • target/dependency/mybatis-plus-boot-starter-3.5.2.jar
    • target/dependency/mybatis-plus-core-3.5.2.jar
    • target/dependency/mybatis-plus-extension-3.5.2.jar
    • target/dependency/mybatis-spring-2.0.7.jar
    • target/dependency/mybatis-spring-boot-autoconfigure-2.2.2.jar
    • target/dependency/mybatis-spring-boot-starter-2.2.2.jar
    • target/dependency/mysql-connector-java-8.0.29.jar
    • target/dependency/objenesis-3.2.jar
    • target/dependency/opentest4j-1.2.0.jar
    • target/dependency/poi-4.1.2.jar
    • target/dependency/poi-ooxml-4.1.2.jar
    • target/dependency/poi-ooxml-schemas-4.1.2.jar
    • target/dependency/slf4j-api-1.7.36.jar
    • target/dependency/snakeyaml-1.30.jar
    • target/dependency/SparseBitSet-1.2.jar
    • target/dependency/spring-aop-5.3.22.jar
    • target/dependency/spring-beans-5.3.22.jar
    • target/dependency/spring-boot-2.7.2.jar
    • target/dependency/spring-boot-autoconfigure-2.7.2.jar
    • target/dependency/spring-boot-configuration-processor-2.7.2.jar
    • target/dependency/spring-boot-devtools-2.7.2.jar
    • target/dependency/spring-boot-starter-2.7.2.jar
    • target/dependency/spring-boot-starter-aop-2.7.2.jar
    • target/dependency/spring-boot-starter-freemarker-2.7.2.jar
    • target/dependency/spring-boot-starter-jdbc-2.7.2.jar
    • target/dependency/spring-boot-starter-json-2.7.2.jar
    • target/dependency/spring-boot-starter-logging-2.7.2.jar
    • target/dependency/spring-boot-starter-test-2.7.2.jar
    • target/dependency/spring-boot-starter-tomcat-2.7.2.jar
    • target/dependency/spring-boot-starter-web-2.7.2.jar
    • target/dependency/spring-boot-test-2.7.2.jar
    • target/dependency/spring-boot-test-autoconfigure-2.7.2.jar
    • target/dependency/spring-context-5.3.22.jar
    • target/dependency/spring-context-support-5.3.22.jar
    • target/dependency/spring-core-5.3.22.jar
    • target/dependency/spring-expression-5.3.22.jar
    • target/dependency/spring-jcl-5.3.22.jar
    • target/dependency/spring-jdbc-5.3.22.jar
    • target/dependency/spring-plugin-core-2.0.0.RELEASE.jar
    • target/dependency/spring-plugin-metadata-2.0.0.RELEASE.jar
    • target/dependency/spring-test-5.3.22.jar
    • target/dependency/spring-tx-5.3.22.jar
    • target/dependency/spring-web-5.3.22.jar
    • target/dependency/spring-webmvc-5.3.22.jar
    • target/dependency/springfox-bean-validators-3.0.0.jar
    • target/dependency/springfox-boot-starter-3.0.0.jar
    • target/dependency/springfox-core-3.0.0.jar
    • target/dependency/springfox-data-rest-3.0.0.jar
    • target/dependency/springfox-oas-3.0.0.jar
    • target/dependency/springfox-schema-3.0.0.jar
    • target/dependency/springfox-spi-3.0.0.jar
    • target/dependency/springfox-spring-web-3.0.0.jar
    • target/dependency/springfox-spring-webflux-3.0.0.jar
    • target/dependency/springfox-spring-webmvc-3.0.0.jar
    • target/dependency/springfox-swagger-common-3.0.0.jar
    • target/dependency/springfox-swagger2-3.0.0.jar
    • target/dependency/swagger-annotations-1.5.22.jar
    • target/dependency/swagger-annotations-2.1.2.jar
    • target/dependency/swagger-core-1.5.22.jar
    • target/dependency/swagger-models-1.5.22.jar
    • target/dependency/swagger-models-2.1.2.jar
    • target/dependency/tomcat-embed-core-9.0.65.jar
    • target/dependency/tomcat-embed-el-9.0.65.jar
    • target/dependency/tomcat-embed-websocket-9.0.65.jar
    • target/dependency/txw2-2.3.6.jar
    • target/dependency/validation-api-2.0.1.Final.jar
    • target/dependency/xmlbeans-3.1.0.jar
    • target/dependency/xmlunit-core-2.9.0.jar
    • target\classes\com\yupi\sqlfather\service
  • Skipping interface: DictService
  • Skipping interface: FieldInfoService
  • Current class: impl.DictServiceImpl
  • Going to generate test cases for class: impl.DictServiceImpl
  • Starting Client-0
  • Properties loaded from D:\PlayGround\sql-father-backend-public\smartut-files\smartut.properties
  • Connecting to master process on port 6409
  • Analyzing classpath:
    [MASTER] 11:36:35.014 [logback-1] WARN TestSuiteGenerator - initializeTargetClass start!
  • Inheritance tree loaded from C:\Users\ASUS\AppData\Local\Temp\ES_inheritancetree831980620130679995.xml.gz
  • Error while initializing target class: impl/DictServiceImpl (wrong name: com/yupi/sqlfather/service/impl/DictServiceImpl)
    [MASTER] 11:36:38.207 [logback-2] ERROR TestSuiteGenerator - Problem for impl.DictServiceImpl. Full stack:
    java.lang.ClassNotFoundException: impl/DictServiceImpl (wrong name: com/yupi/sqlfather/service/impl/DictServiceImpl)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:164)
    at org.smartut.instrumentation.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:132)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.smartut.testcase.statements.MethodStatement$1.execute(MethodStatement.java:262)
    at org.smartut.testcase.statements.AbstractStatement.exceptionHandler(AbstractStatement.java:177)
    at org.smartut.testcase.statements.MethodStatement.execute(MethodStatement.java:225)
    at org.smartut.testcase.execution.TestRunnable.executeStatements(TestRunnable.java:296)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:201)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:54)
    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)
    Caused by: java.lang.NoClassDefFoundError: impl/DictServiceImpl (wrong name: com/yupi/sqlfather/service/impl/DictServiceImpl)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:157)
    ... 17 common frames omitted
  • Computation finished
    [MASTER] 11:36:40.835 [main] ERROR SearchStatistics - No statistics has been saved because SmartUt failed to generate any test case
    [MASTER] 11:36:40.945 [main] ERROR TestGeneration - failed to write statistics data
  • Current class: impl.FieldServiceImpl
  • Going to generate test cases for class: impl.FieldServiceImpl
  • Starting Client-0
  • Properties loaded from D:\PlayGround\sql-father-backend-public\smartut-files\smartut.properties
  • Connecting to master process on port 21066
  • Analyzing classpath:
    [MASTER] 11:36:42.105 [logback-1] WARN TestSuiteGenerator - initializeTargetClass start!
  • Inheritance tree loaded from C:\Users\ASUS\AppData\Local\Temp\ES_inheritancetree831980620130679995.xml.gz
  • Error while initializing target class: impl/FieldServiceImpl (wrong name: com/yupi/sqlfather/service/impl/FieldServiceImpl)
    [MASTER] 11:36:45.334 [logback-2] ERROR TestSuiteGenerator - Problem for impl.FieldServiceImpl. Full stack:
    java.lang.ClassNotFoundException: impl/FieldServiceImpl (wrong name: com/yupi/sqlfather/service/impl/FieldServiceImpl)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:164)
    at org.smartut.instrumentation.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:132)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.smartut.testcase.statements.MethodStatement$1.execute(MethodStatement.java:262)
    at org.smartut.testcase.statements.AbstractStatement.exceptionHandler(AbstractStatement.java:177)
    at org.smartut.testcase.statements.MethodStatement.execute(MethodStatement.java:225)
    at org.smartut.testcase.execution.TestRunnable.executeStatements(TestRunnable.java:296)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:201)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:54)
    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)
    Caused by: java.lang.NoClassDefFoundError: impl/FieldServiceImpl (wrong name: com/yupi/sqlfather/service/impl/FieldServiceImpl)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:157)
    ... 17 common frames omitted
  • Computation finished
    [MASTER] 11:36:47.940 [main] ERROR SearchStatistics - No statistics has been saved because SmartUt failed to generate any test case
    [MASTER] 11:36:48.051 [main] ERROR TestGeneration - failed to write statistics data
  • Current class: impl.ReportServiceImpl
  • Going to generate test cases for class: impl.ReportServiceImpl
  • Starting Client-0
  • Properties loaded from D:\PlayGround\sql-father-backend-public\smartut-files\smartut.properties
  • Connecting to master process on port 15172
  • Analyzing classpath:
    [MASTER] 11:36:49.200 [logback-1] WARN TestSuiteGenerator - initializeTargetClass start!
  • Inheritance tree loaded from C:\Users\ASUS\AppData\Local\Temp\ES_inheritancetree831980620130679995.xml.gz
  • Error while initializing target class: impl/ReportServiceImpl (wrong name: com/yupi/sqlfather/service/impl/ReportServiceImpl)
    [MASTER] 11:36:52.362 [logback-2] ERROR TestSuiteGenerator - Problem for impl.ReportServiceImpl. Full stack:
    java.lang.ClassNotFoundException: impl/ReportServiceImpl (wrong name: com/yupi/sqlfather/service/impl/ReportServiceImpl)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:164)
    at org.smartut.instrumentation.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:132)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.smartut.testcase.statements.MethodStatement$1.execute(MethodStatement.java:262)
    at org.smartut.testcase.statements.AbstractStatement.exceptionHandler(AbstractStatement.java:177)
    at org.smartut.testcase.statements.MethodStatement.execute(MethodStatement.java:225)
    at org.smartut.testcase.execution.TestRunnable.executeStatements(TestRunnable.java:296)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:201)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:54)
    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)
    Caused by: java.lang.NoClassDefFoundError: impl/ReportServiceImpl (wrong name: com/yupi/sqlfather/service/impl/ReportServiceImpl)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:157)
    ... 17 common frames omitted
  • Computation finished
    [MASTER] 11:36:55.026 [main] ERROR SearchStatistics - No statistics has been saved because SmartUt failed to generate any test case
    [MASTER] 11:36:55.137 [main] ERROR TestGeneration - failed to write statistics data
  • Current class: impl.TableInfoServiceImpl
  • Going to generate test cases for class: impl.TableInfoServiceImpl
  • Starting Client-0
  • Properties loaded from D:\PlayGround\sql-father-backend-public\smartut-files\smartut.properties
  • Connecting to master process on port 11247
  • Analyzing classpath:
    [MASTER] 11:36:56.283 [logback-1] WARN TestSuiteGenerator - initializeTargetClass start!
  • Inheritance tree loaded from C:\Users\ASUS\AppData\Local\Temp\ES_inheritancetree831980620130679995.xml.gz
  • Error while initializing target class: impl/TableInfoServiceImpl (wrong name: com/yupi/sqlfather/service/impl/TableInfoServiceImpl)
    [MASTER] 11:36:59.478 [logback-2] ERROR TestSuiteGenerator - Problem for impl.TableInfoServiceImpl. Full stack:
    java.lang.ClassNotFoundException: impl/TableInfoServiceImpl (wrong name: com/yupi/sqlfather/service/impl/TableInfoServiceImpl)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:164)
    at org.smartut.instrumentation.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:132)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.smartut.testcase.statements.MethodStatement$1.execute(MethodStatement.java:262)
    at org.smartut.testcase.statements.AbstractStatement.exceptionHandler(AbstractStatement.java:177)
    at org.smartut.testcase.statements.MethodStatement.execute(MethodStatement.java:225)
    at org.smartut.testcase.execution.TestRunnable.executeStatements(TestRunnable.java:296)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:201)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:54)
    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)
    Caused by: java.lang.NoClassDefFoundError: impl/TableInfoServiceImpl (wrong name: com/yupi/sqlfather/service/impl/TableInfoServiceImpl)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:157)
    ... 17 common frames omitted
  • Computation finished
    [MASTER] 11:37:02.102 [main] ERROR SearchStatistics - No statistics has been saved because SmartUt failed to generate any test case
    [MASTER] 11:37:02.212 [main] ERROR TestGeneration - failed to write statistics data
  • Current class: impl.UserServiceImpl
  • Going to generate test cases for class: impl.UserServiceImpl
  • Starting Client-0
  • Properties loaded from D:\PlayGround\sql-father-backend-public\smartut-files\smartut.properties
  • Connecting to master process on port 11964
  • Analyzing classpath:
    [MASTER] 11:37:03.377 [logback-1] WARN TestSuiteGenerator - initializeTargetClass start!
  • Inheritance tree loaded from C:\Users\ASUS\AppData\Local\Temp\ES_inheritancetree831980620130679995.xml.gz
  • Error while initializing target class: impl/UserServiceImpl (wrong name: com/yupi/sqlfather/service/impl/UserServiceImpl)
    [MASTER] 11:37:06.617 [logback-2] ERROR TestSuiteGenerator - Problem for impl.UserServiceImpl. Full stack:
    java.lang.ClassNotFoundException: impl/UserServiceImpl (wrong name: com/yupi/sqlfather/service/impl/UserServiceImpl)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:164)
    at org.smartut.instrumentation.InstrumentingClassLoader.loadClass(InstrumentingClassLoader.java:132)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.smartut.testcase.statements.MethodStatement$1.execute(MethodStatement.java:262)
    at org.smartut.testcase.statements.AbstractStatement.exceptionHandler(AbstractStatement.java:177)
    at org.smartut.testcase.statements.MethodStatement.execute(MethodStatement.java:225)
    at org.smartut.testcase.execution.TestRunnable.executeStatements(TestRunnable.java:296)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:201)
    at org.smartut.testcase.execution.TestRunnable.call(TestRunnable.java:54)
    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)
    Caused by: java.lang.NoClassDefFoundError: impl/UserServiceImpl (wrong name: com/yupi/sqlfather/service/impl/UserServiceImpl)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:635)
    at org.smartut.instrumentation.InstrumentingClassLoader.instrumentClass(InstrumentingClassLoader.java:157)
    ... 17 common frames omitted
  • Computation finished
    [MASTER] 11:37:09.478 [main] ERROR SearchStatistics - No statistics has been saved because SmartUt failed to generate any test case
    [MASTER] 11:37:09.586 [main] ERROR TestGeneration - failed to write statistics data
  • Skipping interface: ReportService
  • Skipping interface: TableInfoService
  • Skipping interface: UserService

Steps to Reproduce

Please break down here below all the needed steps to reproduce the issue.
[If possible, please upload an example of the project you are generating tests for.]

SmartUt Arguments

Please provide the whole SmartUt commmand you executed (if relevant)

Current Result

Please describe here below the current result you got (if relevant)
[if relevant, include a screenshot]

Expected result

Please describe here below what should be the expected behaviour (if relevant)

Additional info

Please add any information of interest here below

@MinhaoGo
Copy link
Collaborator

impl.UserServiceImpl这个类是全称么,从报错看应该是com.yupi.sqlfather.service.impl.UserServiceImpl

@BensonMax
Copy link
Author

使用IDEA插件,问题解决

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants