JUnit测试类未由Diffblue IntelliJ生成。

huangapple go评论90阅读模式
英文:

JUnit tests class not generated by diffblue intellij

问题

我在IntelliJ IDE中安装了Diffblue插件,并且有一个使用Java 11的Spring Boot项目。在这里,我尝试为一个服务类生成测试类/测试用例。

  1. @Service
  2. public class MyService {
  3. @Autowired
  4. OrderRepo orderRepo;
  5. @Autowired
  6. ProductRepo productRepo;
  7. @Transactional(rollbackFor = Exception.class)
  8. public Order mapping() throws Exception {
  9. Order order = new Order();
  10. order.setOrderDate(new Date());
  11. order.setTransaction(new Transaction(new Date(), 11.0, order));
  12. order.setOrderItems(Arrays.asList(new OrderItem(order), new OrderItem(order), new OrderItem(order)));
  13. Product p = productRepo.save(new Product(1, "P1"));
  14. Order o = orderRepo.save(order);
  15. boolean b = checkOrder(o);
  16. return o;
  17. }
  18. }

当尝试从Diffblue图标生成测试用例时,它没有生成,并显示以下消息:

  1. Tests written: 0
  2. Cover was unable to write any tests for the reasons listed below.
  3. Change what sort of tests Cover writes in **Change Settings**.
  4. Methods without tests: 1
  5. Diffblue AI was unable to find a test: 1

日志信息如下:

(以下内容因字数限制已删除)

是否需要特殊设置?我正在使用社区版。

请注意,Diffblue AI未能生成测试的原因可能涉及项目配置或Diffblue插件的设置。你可能需要检查Diffblue插件的设置,确保它与你的项目配置兼容。如果问题仍然存在,你可以查阅Diffblue AI的文档或寻求支持来解决问题。

英文:

I installed diffblue plugin in intelliJ IDE and have spring boot with java 11 project. Here I tried to generate test class/cases for one service class.

  1. @Service
  2. public class MyService {
  3. @Autowired
  4. OrderRepo orderRepo;
  5. @Autowired
  6. ProductRepo productRepo;
  7. @Transactional(rollbackFor = Exception.class)
  8. public Order mapping() throws Exception {
  9. Order order = new Order();
  10. order.setOrderDate(new Date());
  11. order.setTransaction(new Transaction(new Date(), 11.0, order));
  12. order.setOrderItems(Arrays.asList(new OrderItem(order), new OrderItem(order), new OrderItem(order)));
  13. Product p=productRepo.save(new Product(1, "P1"));
  14. Order o=orderRepo.save(order);
  15. boolean b=checkOrder(o);
  16. return o;
  17. }
  18. }

when trying to generate test case from diffblue icon its not generating. message as :

  1. Tests written: 0
  2. Cover was unable to write any tests for the reasons listed below.
  3. Change what sort of tests Cover writes in **Change Settings**.
  4. Methods without tests: 1
  5. Diffblue AI was unable to find a test: 1

log:

  1. --monitoring-service-port 54013 --debug-log
  2. 18:56:26.010 [INFO] [Creating] Server started. Waiting up to 300 seconds for a connection to be established...
  3. 18:56:42.979 [INFO] [Creating] Starting new remote monitor client
  4. 18:56:55.299 [INFO] [Creating] Attempting to start remote server.
  5. 18:56:58.951 [INFO] [Creating] Server started, listening on localhost/127.0.0.1:54028
  6. 18:57:00.046 [INFO] [Creating] Expect analyzer service to be listening on port 54028.
  7. 18:57:06.357 [INFO] [Creating] Started analyzer service and client retrieved.
  8. 18:58:04.361 [INFO] [Creating]
  9. ================================================================================
  10. = Creating tests for 'com.spring.controller.MyController.batchProcessing:()V' using 'SCo[SB] (sp, !fnm, df, !ris)'
  11. ================================================================================
  12. 19:03:08.041 [INFO] [Creating] Service shutdown due to watchdog timeout
  13. 19:03:08.215 [INFO] [Creating]
  14. == begin thread dump ==
  15. 27 threads
  16. Thread 1 'main':
  17. java.base@11.0.18/java.lang.Thread.dumpThreads(Native Method)
  18. java.base@11.0.18/java.lang.Thread.getAllStackTraces(Thread.java:1657)
  19. com.diffblue.cover.service.a.a.a.d(SourceFile:1164)
  20. com.diffblue.cover.service.a.a.b.a(SourceFile:151)
  21. com.diffblue.cover.service.analyzer.Main.main(SourceFile:46)
  22. java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  23. java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  24. java.base@11.0.18/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  25. java.base@11.0.18/java.lang.reflect.Method.invoke(Method.java:566)
  26. com.diffblue.cover.launcher.Launcher.invokeMainMethod(Launcher.java:116)
  27. com.diffblue.cover.launcher.Launcher.main(Launcher.java:72)
  28. Thread 2728 'ClassGraph-worker-15':
  29. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  30. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  31. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  32. java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
  33. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
  34. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  35. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  36. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  37. Thread 26 'grpc-default-executor-2':
  38. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  39. java.base@11.0.18/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
  40. java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:462)
  41. java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
  42. java.base@11.0.18/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937)
  43. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1053)
  44. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  45. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  46. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  47. Thread 2729 'grpc-default-executor-3':
  48. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  49. java.base@11.0.18/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
  50. java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:462)
  51. java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
  52. java.base@11.0.18/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937)
  53. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1053)
  54. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  55. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  56. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  57. Thread 2721 'ClassGraph-worker-8':
  58. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  59. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  60. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  61. java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
  62. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
  63. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  64. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  65. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  66. Thread 2723 'ClassGraph-worker-10':
  67. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  68. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  69. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  70. java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
  71. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
  72. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  73. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  74. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  75. Thread 16 'grpc-nio-worker-ELG-1-2':
  76. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
  77. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:357)
  78. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:182)
  79. java.base@11.0.18/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
  80. java.base@11.0.18/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
  81. io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SourceFile:68)
  82. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.select(SourceFile:813)
  83. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(SourceFile:460)
  84. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
  85. io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
  86. io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
  87. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  88. Thread 2727 'ClassGraph-worker-14':
  89. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  90. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  91. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  92. java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
  93. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
  94. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  95. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  96. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  97. Thread 11 'Common-Cleaner':
  98. java.base@11.0.18/java.lang.Object.wait(Native Method)
  99. java.base@11.0.18/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
  100. java.base@11.0.18/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:148)
  101. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  102. java.base@11.0.18/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134)
  103. Thread 2722 'ClassGraph-worker-9':
  104. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  105. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  106. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  107. java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
  108. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
  109. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  110. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  111. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  112. Thread 5 'Attach Listener':
  113. Thread 13 'logback-1':
  114. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  115. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  116. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  117. java.base@11.0.18/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
  118. java.base@11.0.18/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
  119. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
  120. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
  121. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  122. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  123. Thread 12 'Service log dispatcher':
  124. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.setWakeupSocket0(Native Method)
  125. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.setWakeupSocket(WindowsSelectorImpl.java:504)
  126. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.wakeup(WindowsSelectorImpl.java:625)
  127. io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.wakeup(SourceFile:73)
  128. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.wakeup(SourceFile:787)
  129. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.execute(SourceFile:857)
  130. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SourceFile:827)
  131. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.execute(SourceFile:817)
  132. io.grpc.netty.shaded.io.grpc.netty.NettyClientStream$TransportState.runOnTransportThread(SourceFile:321)
  133. io.grpc.internal.AbstractStream$TransportState.requestMessagesFromDeframer(SourceFile:245)
  134. io.grpc.internal.AbstractStream$TransportState.access$000(SourceFile:111)
  135. io.grpc.internal.AbstractStream.request(SourceFile:57)
  136. io.grpc.internal.ForwardingClientStream.request(SourceFile:32)
  137. io.grpc.internal.RetriableStream$1RequestEntry.runWith(SourceFile:574)
  138. io.grpc.internal.RetriableStream.delayOrExecute(SourceFile:529)
  139. io.grpc.internal.RetriableStream.request(SourceFile:578)
  140. io.grpc.internal.ClientCallImpl.request(SourceFile:440)
  141. io.grpc.stub.ClientCalls$UnaryStreamToFuture.onStart(SourceFile:550)
  142. io.grpc.stub.ClientCalls.startCall(SourceFile:342)
  143. io.grpc.stub.ClientCalls.asyncUnaryRequestCall(SourceFile:315)
  144. io.grpc.stub.ClientCalls.futureUnaryCall(SourceFile:227)
  145. com.diffblue.cover.service.a.b.a.a(SourceFile:1440)
  146. com.diffblue.cover.logging.RemoteLogAppender$a.run(SourceFile:204)
  147. Thread 17 'grpc-default-executor-0':
  148. java.base@11.0.18/java.lang.Object.wait(Native Method)
  149. java.base@11.0.18/java.lang.Thread.join(Thread.java:1305)
  150. java.base@11.0.18/java.lang.Thread.join(Thread.java:1379)
  151. com.diffblue.cover.sandbox.execution.WorkerThread.callWorkerThread(SourceFile:155)
  152. com.diffblue.cover.sandbox.a.a.a(SourceFile:61)
  153. com.diffblue.fuzztest.f.c.r(SourceFile:425)
  154. com.diffblue.fuzztest.f.c$$Lambda$389/0x00000001005a1440.call(Unknown Source)
  155. com.diffblue.cover.sandbox.execution.WrapExceptionsInBaseException.handleException(SourceFile:57)
  156. com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException.lambda$run$0(SourceFile:23)
  157. com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException$$Lambda$264/0x0000000100499440.call(Unknown Source)
  158. com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException.handleThrowable(SourceFile:34)
  159. com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException.run(SourceFile:23)
  160. com.diffblue.fuzztest.f.c.d(SourceFile:424)
  161. com.diffblue.fuzztest.f.t.d(SourceFile:136)
  162. com.diffblue.cover.analysis.a.b$a$$Lambda$388/0x00000001005a1040.get(Unknown Source)
  163. com.diffblue.cover.analysis.a.b$a.a(SourceFile:99)
  164. com.diffblue.cover.analysis.a.b$a.tryAdvance(SourceFile:246)
  165. com.diffblue.cover.service.analyzer.a.c$a.a(SourceFile:2037)
  166. com.diffblue.cover.service.analyzer.a.a.i$h.invoke(SourceFile:638)
  167. io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(SourceFile:182)
  168. io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(SourceFile:355)
  169. io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(SourceFile:867)
  170. io.grpc.internal.ContextRunnable.run(SourceFile:37)
  171. io.grpc.internal.SerializingExecutor.run(SourceFile:133)
  172. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  173. java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  174. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  175. Thread 2731 'TimedExecutor-9':
  176. java.base@11.0.18/java.lang.StackTraceElement.initStackTraceElements(Native Method)
  177. java.base@11.0.18/java.lang.StackTraceElement.of(StackTraceElement.java:526)
  178. java.base@11.0.18/java.lang.Throwable.getOurStackTrace(Throwable.java:828)
  179. java.base@11.0.18/java.lang.Throwable.getStackTrace(Throwable.java:820)
  180. org.mockito.internal.exceptions.stacktrace.StackTraceFilter.filterFirst(StackTraceFilter.java:109)
  181. org.mockito.internal.debugging.LocationImpl.computeStackTraceInformation(LocationImpl.java:50)
  182. org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:35)
  183. org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:26)
  184. org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:22)
  185. org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:56)
  186. org.mockito.internal.creation.bytebuddy.MockMethodInterceptor$DispatcherDefaultingToRealMethod.interceptAbstract(MockMethodInterceptor.java:161)
  187. org.mockito.codegen.ProductRepo$MockitoMock$iJkinF5x.save(Unknown Source)
  188. org.mockito.codegen.ProductRepo$MockitoMock$iJkinF5x.save(Unknown Source)
  189. com.spring.service.MyService.batchProcessing(MyService.java:89)
  190. com.spring.controller.MyController.batchProcessing(MyController.java:27)
  191. java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  192. java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  193. java.base@11.0.18/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  194. java.base@11.0.18/java.lang.reflect.Method.invoke(Method.java:566)
  195. org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
  196. org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
  197. org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
  198. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
  199. org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
  200. org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
  201. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
  202. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
  203. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
  204. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
  205. javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
  206. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
  207. org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:72)
  208. javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
  209. org.springframework.mock.web.MockFilterChain$ServletFilterProxy.doFilter(MockFilterChain.java:167)
  210. org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:134)
  211. org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:201)
  212. java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  213. java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  214. java.base@11.0.18/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  215. java.base@11.0.18/java.lang.reflect.Method.invoke(Method.java:566)
  216. com.diffblue.tir.a.h.a(SourceFile:78)
  217. com.diffblue.tir.a.a.e.a(SourceFile:741)
  218. com.diffblue.tir.a.f.a(SourceFile:421)
  219. com.diffblue.tir.a.f.b(SourceFile:80)
  220. com.diffblue.tir.d.e.a(SourceFile:38)
  221. com.diffblue.tir.a.g.a(SourceFile:221)
  222. com.diffblue.tir.a.g.b(SourceFile:88)
  223. com.diffblue.tir.a.g$$Lambda$1283/0x000000010094f040.call(Unknown Source)
  224. com.diffblue.cover.sandbox.execution.SafeTimedExecutor$$Lambda$654/0x000000010063b040.call(Unknown Source)
  225. com.diffblue.cover.sandbox.execution.TimedCallableExecutor$CallableFuture.executeTask(SourceFile:28)
  226. com.diffblue.cover.sandbox.execution.TimedExecutor$TaskQueueRunner.run(SourceFile:78)
  227. com.diffblue.cover.sandbox.execution.WorkerThread.run(SourceFile:216)
  228. Thread 18 'grpc-nio-boss-ELG-3-1':
  229. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
  230. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:357)
  231. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:182)
  232. java.base@11.0.18/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
  233. java.base@11.0.18/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
  234. io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SourceFile:68)
  235. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.select(SourceFile:813)
  236. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(SourceFile:460)
  237. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
  238. io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
  239. io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
  240. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  241. Thread 3 'Finalizer':
  242. java.base@11.0.18/java.lang.Object.wait(Native Method)
  243. java.base@11.0.18/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
  244. java.base@11.0.18/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176)
  245. java.base@11.0.18/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:170)
  246. Thread 2725 'ClassGraph-worker-12':
  247. java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
  248. java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
  249. java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
  250. **removed due to limit**
  251. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
  252. io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
  253. io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
  254. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  255. Thread 4 'Signal Dispatcher':
  256. Thread 15 'grpc-nio-worker-ELG-1-1':
  257. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
  258. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:357)
  259. java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:182)
  260. java.base@11.0.18/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
  261. java.base@11.0.18/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)
  262. io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SourceFile:62)
  263. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.select(SourceFile:817)
  264. io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(SourceFile:460)
  265. io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
  266. io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
  267. io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
  268. java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
  269. == end thread dump ==
  270. 19:03:10.150 [INFO] [Creating] Exiting service.
  271. 19:03:18.401 [INFO] [Creating] [1/1] com.spring.controller.MyController.batchProcessing
  272. 19:03:18.401 [INFO] [Creating] [1/1] Diffblue AI was unable to find a test
  273. 19:03:18.435 [INFO] [Creating] [1/1] com.spring.controller.MyController
  274. 19:03:18.435 [INFO] [Creating] [1/1] Tests created: 0
  275. 19:03:19.179 [INFO] [Reporting]
  276. 19:03:19.179 [INFO] [Reporting] Summary:
  277. 19:03:19.179 [INFO] [Reporting] --------
  278. 19:03:19.179 [INFO] [Reporting] Total: 1 method
  279. 19:03:19.180 [INFO] [Reporting]
  280. 19:03:19.180 [INFO] [Reporting] No tests created for: 1 method
  281. 19:03:28.675 [INFO] [Reporting] License doesn't allow multiple classes
  282. 19:03:28.693 [INFO] [Reporting] License doesn't allow creating report.json

any special settings required? I am using all community edition.

答案1

得分: 1

去设置中选择 junit 4 或 junit 5,并将测试类型设置为 Brief

英文:

Go to settings and choose the junit 4 OR junit 5 and set the test tyle Brief

huangapple
  • 本文由 发表于 2023年6月18日 22:24:22
  • 转载请务必保留本文链接:https://go.coder-hub.com/76501020.html
  • intellij-idea
  • intellij-plugin
  • java
  • spring-boot
  • spring-test

如何将MySQL表列作为变量放入 :?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定