JUnit测试类未由Diffblue IntelliJ生成。

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

JUnit tests class not generated by diffblue intellij

问题

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

@Service
public class MyService {
    @Autowired
    OrderRepo orderRepo;
    @Autowired
    ProductRepo productRepo;

    @Transactional(rollbackFor = Exception.class)
    public Order mapping() throws Exception {
        Order order = new Order();
        order.setOrderDate(new Date());
        order.setTransaction(new Transaction(new Date(), 11.0, order));
        order.setOrderItems(Arrays.asList(new OrderItem(order), new OrderItem(order), new OrderItem(order)));

        Product p = productRepo.save(new Product(1, "P1"));
        Order o = orderRepo.save(order);
        boolean b = checkOrder(o);
        return o;
    }
}

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

Tests written: 0
Cover was unable to write any tests for the reasons listed below.
Change what sort of tests Cover writes in **Change Settings**.
Methods without tests: 1
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.

    @Service
    public class MyService {
    	@Autowired
    	OrderRepo orderRepo;
    	@Autowired
    	ProductRepo productRepo;
	
	
	@Transactional(rollbackFor = Exception.class)
	public Order mapping() throws Exception {
		Order order = new Order();
		order.setOrderDate(new Date());
		order.setTransaction(new Transaction(new Date(), 11.0, order));
		order.setOrderItems(Arrays.asList(new OrderItem(order), new OrderItem(order), new OrderItem(order)));

		Product p=productRepo.save(new Product(1, "P1"));
		Order o=orderRepo.save(order);
		boolean b=checkOrder(o);
		return o;
	}
}

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

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

log:

--monitoring-service-port 54013 --debug-log
18:56:26.010 [INFO]  [Creating] Server started. Waiting up to 300 seconds for a connection to be established...
18:56:42.979 [INFO]  [Creating] Starting new remote monitor client
18:56:55.299 [INFO]  [Creating] Attempting to start remote server.
18:56:58.951 [INFO]  [Creating] Server started, listening on localhost/127.0.0.1:54028
18:57:00.046 [INFO]  [Creating] Expect analyzer service to be listening on port 54028.
18:57:06.357 [INFO]  [Creating] Started analyzer service and client retrieved.
18:58:04.361 [INFO]  [Creating] 
================================================================================
= Creating tests for 'com.spring.controller.MyController.batchProcessing:()V' using 'SCo[SB] (sp, !fnm, df, !ris)'
================================================================================
19:03:08.041 [INFO]  [Creating] Service shutdown due to watchdog timeout
19:03:08.215 [INFO]  [Creating] 
== begin thread dump ==
27 threads
Thread 1 'main':
java.base@11.0.18/java.lang.Thread.dumpThreads(Native Method)
java.base@11.0.18/java.lang.Thread.getAllStackTraces(Thread.java:1657)
com.diffblue.cover.service.a.a.a.d(SourceFile:1164)
com.diffblue.cover.service.a.a.b.a(SourceFile:151)
com.diffblue.cover.service.analyzer.Main.main(SourceFile:46)
java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base@11.0.18/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base@11.0.18/java.lang.reflect.Method.invoke(Method.java:566)
com.diffblue.cover.launcher.Launcher.invokeMainMethod(Launcher.java:116)
com.diffblue.cover.launcher.Launcher.main(Launcher.java:72)
Thread 2728 'ClassGraph-worker-15':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 26 'grpc-default-executor-2':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:462)
java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
java.base@11.0.18/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1053)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 2729 'grpc-default-executor-3':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(SynchronousQueue.java:462)
java.base@11.0.18/java.util.concurrent.SynchronousQueue$TransferStack.transfer(SynchronousQueue.java:361)
java.base@11.0.18/java.util.concurrent.SynchronousQueue.poll(SynchronousQueue.java:937)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1053)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 2721 'ClassGraph-worker-8':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 2723 'ClassGraph-worker-10':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 16 'grpc-nio-worker-ELG-1-2':
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:357)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:182)
java.base@11.0.18/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
java.base@11.0.18/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SourceFile:68)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.select(SourceFile:813)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(SourceFile:460)
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 2727 'ClassGraph-worker-14':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 11 'Common-Cleaner':
java.base@11.0.18/java.lang.Object.wait(Native Method)
java.base@11.0.18/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
java.base@11.0.18/jdk.internal.ref.CleanerImpl.run(CleanerImpl.java:148)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
java.base@11.0.18/jdk.internal.misc.InnocuousThread.run(InnocuousThread.java:134)
Thread 2722 'ClassGraph-worker-9':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.18/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 5 'Attach Listener':
Thread 13 'logback-1':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
java.base@11.0.18/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1170)
java.base@11.0.18/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 12 'Service log dispatcher':
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.setWakeupSocket0(Native Method)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.setWakeupSocket(WindowsSelectorImpl.java:504)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.wakeup(WindowsSelectorImpl.java:625)
io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.wakeup(SourceFile:73)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.wakeup(SourceFile:787)
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.execute(SourceFile:857)
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.execute0(SourceFile:827)
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.execute(SourceFile:817)
io.grpc.netty.shaded.io.grpc.netty.NettyClientStream$TransportState.runOnTransportThread(SourceFile:321)
io.grpc.internal.AbstractStream$TransportState.requestMessagesFromDeframer(SourceFile:245)
io.grpc.internal.AbstractStream$TransportState.access$000(SourceFile:111)
io.grpc.internal.AbstractStream.request(SourceFile:57)
io.grpc.internal.ForwardingClientStream.request(SourceFile:32)
io.grpc.internal.RetriableStream$1RequestEntry.runWith(SourceFile:574)
io.grpc.internal.RetriableStream.delayOrExecute(SourceFile:529)
io.grpc.internal.RetriableStream.request(SourceFile:578)
io.grpc.internal.ClientCallImpl.request(SourceFile:440)
io.grpc.stub.ClientCalls$UnaryStreamToFuture.onStart(SourceFile:550)
io.grpc.stub.ClientCalls.startCall(SourceFile:342)
io.grpc.stub.ClientCalls.asyncUnaryRequestCall(SourceFile:315)
io.grpc.stub.ClientCalls.futureUnaryCall(SourceFile:227)
com.diffblue.cover.service.a.b.a.a(SourceFile:1440)
com.diffblue.cover.logging.RemoteLogAppender$a.run(SourceFile:204)
Thread 17 'grpc-default-executor-0':
java.base@11.0.18/java.lang.Object.wait(Native Method)
java.base@11.0.18/java.lang.Thread.join(Thread.java:1305)
java.base@11.0.18/java.lang.Thread.join(Thread.java:1379)
com.diffblue.cover.sandbox.execution.WorkerThread.callWorkerThread(SourceFile:155)
com.diffblue.cover.sandbox.a.a.a(SourceFile:61)
com.diffblue.fuzztest.f.c.r(SourceFile:425)
com.diffblue.fuzztest.f.c$$Lambda$389/0x00000001005a1440.call(Unknown Source)
com.diffblue.cover.sandbox.execution.WrapExceptionsInBaseException.handleException(SourceFile:57)
com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException.lambda$run$0(SourceFile:23)
com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException$$Lambda$264/0x0000000100499440.call(Unknown Source)
com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException.handleThrowable(SourceFile:34)
com.diffblue.cover.sandbox.execution.WrapThrowableInBaseException.run(SourceFile:23)
com.diffblue.fuzztest.f.c.d(SourceFile:424)
com.diffblue.fuzztest.f.t.d(SourceFile:136)
com.diffblue.cover.analysis.a.b$a$$Lambda$388/0x00000001005a1040.get(Unknown Source)
com.diffblue.cover.analysis.a.b$a.a(SourceFile:99)
com.diffblue.cover.analysis.a.b$a.tryAdvance(SourceFile:246)
com.diffblue.cover.service.analyzer.a.c$a.a(SourceFile:2037)
com.diffblue.cover.service.analyzer.a.a.i$h.invoke(SourceFile:638)
io.grpc.stub.ServerCalls$UnaryServerCallHandler$UnaryServerCallListener.onHalfClose(SourceFile:182)
io.grpc.internal.ServerCallImpl$ServerStreamListenerImpl.halfClosed(SourceFile:355)
io.grpc.internal.ServerImpl$JumpToApplicationThreadServerStreamListener$1HalfClosed.runInContext(SourceFile:867)
io.grpc.internal.ContextRunnable.run(SourceFile:37)
io.grpc.internal.SerializingExecutor.run(SourceFile:133)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
java.base@11.0.18/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 2731 'TimedExecutor-9':
java.base@11.0.18/java.lang.StackTraceElement.initStackTraceElements(Native Method)
java.base@11.0.18/java.lang.StackTraceElement.of(StackTraceElement.java:526)
java.base@11.0.18/java.lang.Throwable.getOurStackTrace(Throwable.java:828)
java.base@11.0.18/java.lang.Throwable.getStackTrace(Throwable.java:820)
org.mockito.internal.exceptions.stacktrace.StackTraceFilter.filterFirst(StackTraceFilter.java:109)
org.mockito.internal.debugging.LocationImpl.computeStackTraceInformation(LocationImpl.java:50)
org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:35)
org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:26)
org.mockito.internal.debugging.LocationImpl.<init>(LocationImpl.java:22)
org.mockito.internal.creation.bytebuddy.MockMethodInterceptor.doIntercept(MockMethodInterceptor.java:56)
org.mockito.internal.creation.bytebuddy.MockMethodInterceptor$DispatcherDefaultingToRealMethod.interceptAbstract(MockMethodInterceptor.java:161)
org.mockito.codegen.ProductRepo$MockitoMock$iJkinF5x.save(Unknown Source)
org.mockito.codegen.ProductRepo$MockitoMock$iJkinF5x.save(Unknown Source)
com.spring.service.MyService.batchProcessing(MyService.java:89)
com.spring.controller.MyController.batchProcessing(MyController.java:27)
java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base@11.0.18/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base@11.0.18/java.lang.reflect.Method.invoke(Method.java:566)
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:117)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:895)
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:808)
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1072)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:965)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1006)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:898)
javax.servlet.http.HttpServlet.service(HttpServlet.java:529)
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:883)
org.springframework.test.web.servlet.TestDispatcherServlet.service(TestDispatcherServlet.java:72)
javax.servlet.http.HttpServlet.service(HttpServlet.java:623)
org.springframework.mock.web.MockFilterChain$ServletFilterProxy.doFilter(MockFilterChain.java:167)
org.springframework.mock.web.MockFilterChain.doFilter(MockFilterChain.java:134)
org.springframework.test.web.servlet.MockMvc.perform(MockMvc.java:201)
java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
java.base@11.0.18/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
java.base@11.0.18/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
java.base@11.0.18/java.lang.reflect.Method.invoke(Method.java:566)
com.diffblue.tir.a.h.a(SourceFile:78)
com.diffblue.tir.a.a.e.a(SourceFile:741)
com.diffblue.tir.a.f.a(SourceFile:421)
com.diffblue.tir.a.f.b(SourceFile:80)
com.diffblue.tir.d.e.a(SourceFile:38)
com.diffblue.tir.a.g.a(SourceFile:221)
com.diffblue.tir.a.g.b(SourceFile:88)
com.diffblue.tir.a.g$$Lambda$1283/0x000000010094f040.call(Unknown Source)
com.diffblue.cover.sandbox.execution.SafeTimedExecutor$$Lambda$654/0x000000010063b040.call(Unknown Source)
com.diffblue.cover.sandbox.execution.TimedCallableExecutor$CallableFuture.executeTask(SourceFile:28)
com.diffblue.cover.sandbox.execution.TimedExecutor$TaskQueueRunner.run(SourceFile:78)
com.diffblue.cover.sandbox.execution.WorkerThread.run(SourceFile:216)
Thread 18 'grpc-nio-boss-ELG-3-1':
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:357)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:182)
java.base@11.0.18/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
java.base@11.0.18/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:141)
io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SourceFile:68)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.select(SourceFile:813)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(SourceFile:460)
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 3 'Finalizer':
java.base@11.0.18/java.lang.Object.wait(Native Method)
java.base@11.0.18/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:155)
java.base@11.0.18/java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:176)
java.base@11.0.18/java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:170)
Thread 2725 'ClassGraph-worker-12':
java.base@11.0.18/jdk.internal.misc.Unsafe.park(Native Method)
java.base@11.0.18/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
java.base@11.0.18/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
**removed due to limit**
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
Thread 4 'Signal Dispatcher':
Thread 15 'grpc-nio-worker-ELG-1-1':
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:357)
java.base@11.0.18/sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:182)
java.base@11.0.18/sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:124)
java.base@11.0.18/sun.nio.ch.SelectorImpl.select(SelectorImpl.java:136)
io.grpc.netty.shaded.io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SourceFile:62)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.select(SourceFile:817)
io.grpc.netty.shaded.io.netty.channel.nio.NioEventLoop.run(SourceFile:460)
io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SourceFile:997)
io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(SourceFile:74)
io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(SourceFile:30)
java.base@11.0.18/java.lang.Thread.run(Thread.java:834)
== end thread dump ==
19:03:10.150 [INFO]  [Creating] Exiting service.
19:03:18.401 [INFO]  [Creating]     [1/1] com.spring.controller.MyController.batchProcessing
19:03:18.401 [INFO]  [Creating]     [1/1]   Diffblue AI was unable to find a test
19:03:18.435 [INFO]  [Creating] [1/1] com.spring.controller.MyController
19:03:18.435 [INFO]  [Creating] [1/1]   Tests created: 0
19:03:19.179 [INFO]  [Reporting] 
19:03:19.179 [INFO]  [Reporting] Summary:
19:03:19.179 [INFO]  [Reporting] --------
19:03:19.179 [INFO]  [Reporting] Total:                                               1 method
19:03:19.180 [INFO]  [Reporting] 
19:03:19.180 [INFO]  [Reporting] No tests created for:                                1 method
19:03:28.675 [INFO]  [Reporting] License doesn't allow multiple classes
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
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定