unloggedio / intellij-java-plugin Goto Github PK
View Code? Open in Web Editor NEWIntelliJ plugin with java language support
Home Page: https://unlogged.io
License: Apache License 2.0
IntelliJ plugin with java language support
Home Page: https://unlogged.io
License: Apache License 2.0
On trying to save a candidate that throws an exception, stack trace can't be asserted.
The actual trace is serialized on candidate hover, but on save assertions aren't created.
Return type seems to be considered void.
An assertion for the stack trace or part of it to be possible.
No response
When response strings contain "<" in them, these symbols are excluded in string previewed during candidate save.
This also affects replay cases when saved and run.
getSortedIdOrder
from StreamOpsController
from unlogged-spring-maven-demo
"<" should be included and saved cases should pass.
No response
A method with return type Map<Boolean,List> (from unlogged-spring-maven-demo
) doesn't serialize properly.
This results in no assertions being generated when trying to save the candidate.
unlogged-spring-maven-demo
with SDK 0.6.2
partitionBy
in StreamOpsController
Map<Boolean,List> should get serialized properly and proper assertions should get generated when trying to save a candidate for this method.
No response
On DirectInvoking a method that calls a 2nd method that generates enough candidates at once for it to be automatically excluded (from the same class), the filters are always set to exclude the current class. This will prevent candidates from other methods from the same class from showing up.
Example :
DirectInvokeunlogged-spring-maven-demo
-> RecursionController
-> getFibonacciSeries()
.
Candidates for getFibonacciSeries
will be excluded on clicking the inlay hint above the method due to the 109 candidates from fibonacci
method. (input 10). Removing the entry in excluded class manually is necessary for this candidate to show up.
https://github.com/unloggedio/intellij-java-plugin/assets/68552461/00b66be5-934b-4396-aa6b-b9ee48a24e9a
unlogged-spring-maven-demo
RecursionController
-> getFibonacciSeries
getFibonacciSeries
The spam filter should ideally only filter out only the spammy method from that class and not all the methods from that class.
No response
On trying to change the return type of a method the following exception is thrown from a balloon notification.
This was observed on changing a Boolean return type method to List without changing the name or body of the method.
No Exceptions to popup on method signature change.
Stack trace -
java.lang.ArrayIndexOutOfBoundsException: Index 0 out of bounds for length 0
at com.insidious.plugin.util.ClassTypeUtils.getDottedToDescriptorName(ClassTypeUtils.java:195)
at com.insidious.plugin.util.ClassTypeUtils.getDottedToDescriptorName(ClassTypeUtils.java:846)
at com.insidious.plugin.pojo.atomic.MethodUnderTest.buildMethodSignature(MethodUnderTest.java:88)
at com.insidious.plugin.pojo.atomic.MethodUnderTest.fromPsiCallExpression(MethodUnderTest.java:162)
at com.insidious.plugin.inlay.InsidiousInlayHintsCollector.collect(InsidiousInlayHintsCollector.java:197)
at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:91)
at com.intellij.codeInsight.hints.InlayHintsPass.doCollectInformation$lambda$0(InlayHintsPass.kt:46)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:142)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1133)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:98)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:61)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:110)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:91)
at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
Show the list of available mocks even without saving the mock definitions.
The following exception trace was sent by a user ->
Exception trace -
2024-07-30 17:25:41,957 [3243372] WARN - #com.insidious.plugin.client.SessionInstance - processing [3263] events from [2] log files: 2432009
2024-07-30 17:25:41,959 [3243374] WARN - #com.insidious.plugin.client.SessionEventReader - Finished reading events [2] log files in [43 ms ]
2024-07-30 17:25:42,023 [3243438] INFO - STDERR - java.lang.NullPointerException: Cannot invoke "com.insidious.plugin.pojo.dao.MethodCallExpression.getCallTimeNano()" because "methodCallExpression" is null
2024-07-30 17:25:42,035 [3243450] INFO - STDERR - at com.insidious.plugin.client.SessionInstance.processLogFile(SessionInstance.java:3526)
2024-07-30 17:25:42,035 [3243450] INFO - STDERR - at com.insidious.plugin.client.SessionInstance.processPendingThreadFiles(SessionInstance.java:2467)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at com.insidious.plugin.client.SessionInstance.scanDataAndBuildReplay(SessionInstance.java:2379)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at com.insidious.plugin.client.SessionInstance.run(SessionInstance.java:4161)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
2024-07-30 17:25:42,036 [3243451] INFO - STDERR - at java.base/java.lang.Thread.run(Thread.java:833)
2024-07-30 17:25:42,039 [3243454] WARN - #com.insidious.plugin.client.SessionInstance - Exception in scan and build session
java.lang.NullPointerException: Cannot invoke "com.insidious.plugin.pojo.dao.MethodCallExpression.getCallTimeNano()" because "methodCallExpression" is null
at com.insidious.plugin.client.SessionInstance.processLogFile(SessionInstance.java:3526)
at com.insidious.plugin.client.SessionInstance.processPendingThreadFiles(SessionInstance.java:2467)
at com.insidious.plugin.client.SessionInstance.scanDataAndBuildReplay(SessionInstance.java:2379)
at com.insidious.plugin.client.SessionInstance.run(SessionInstance.java:4161)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:833)
2024-07-30 17:25:42,198 [3243613] WARN - #com.insidious.plugin.factory.UsageInsightTracker - RecordEvent [SESSION_CORRUPT]
2024-07-30 17:25:42,411 [3243826] INFO - #com.insidious.plugin.client.ZipConsumer - open archive [/home/./.unlogged/sessions/selogger-output-20240730-074646486/index-00079-1722340480938.zip] last modified=[1722340542393], lastChecked = [1722340540603]
To be Identified.
...
For Scan to not break.
Logs : https://drive.google.com/file/d/1lR9wn--gJRG13Zoc4T9T9HpLXGIGxWzT/view?usp=sharing
On triggering custom filters, candidates for "doFilter" won't show up on the liveView timeline.
The InlayHints for the methods update correctly (count), but candidates never load.
unlogged-spring-maven-demo
GlobalFilter
, you will see inlayhints with correct call counts for both methods here, but candidates for the doFilter method will not load.Example curls -
curl --location 'http://localhost:8080/perf/ping'
curl --location 'http://localhost:8080/future/futureResult'
For the candidate for "doFilter" to show up in liveLive timeline.
No response
I should be able to specify that this particular mock should return after a latency of 75ms with some variability of +/-10ms
This should be when replaying tests
If the system you are using unlogged with has low available memory and you try to cancel the decompilation phase (before seeing the confirm option), it will not cancel. This leaves the user stuck, in need of force quitting Idea.
For there to be no UI blocker if the user wants to cancel.
No response
The issue I'm encountering involves a visibility problem with the "Save Replay" button, specifically related to color.
The current color scheme of button and text color used for the button is causing the text within it to be indiscernible or difficult to read. This lack of contrast or visibility is impeding my ability to perceive the text on the button, making it challenging to identify or interact with the "Save Replay" option. I believe addressing the color issue with the button's design or adjusting the text color could enhance the overall user experience and make the functionality more accessible.
please refer the following attachment
button color issue.pdf
1.Install Unlogged plugin in Intellij IDEA and add unlogged dependency based on your Java version.
2.Add Unlogged annotation above your main method of your project.
3.Run "mvn clean" command and start your application.
4.Click on direct invoke and pass the required parameters and get the response
5. The text of the 'save replay' button is obscured by the same button colour. This button navigates to the assertion and mock data tabs
color scheme of the "Save Replay" button to be modified in a way that improves visibility and contrast. This adjustment should make the text within the button more discernible and easier to read. Users should be able to clearly identify and interact with the "Save Replay" option without facing challenges related to text visibility.
No response
Mocks are not deleted from the Library tab via the delete button (toolbar).
multimodule-demo-1
getCustomer
from CustomerController
These mocks should be removed (also no longer injected) when an attempt to delete is made.
No response
This can be reproduced on -
unlogged-spring-webflux-demo
main
or main-archive
BulkHeadController
fib
[sdk 0.6.4 and plugin 2024.2.11]
For a Junit template with dummy data to be generated for this method.
Exception -
stackOverflowException.txt
On starting a process with the sdk through docker on windows for the 2nd time will cause a few issues.
To recreate -
Start an application with sdk on windows through docker.
Stop process and DO NOT delete sessions manually.
Start the process again/start another process. New candidates from your current session will not show up.
This can be observed easily in the frequency logging UI test in the test
branch on UI testrun.
unlogged-spring-maven-demo
on windows with docker (ui-test-clean
)Alternative
For the older session to be deleted and candidates from only the current session to be seen.
No response
This Exception has been seen on 2 occasions. The following are the 2 traces seen -
[sdk 0.6.9
]
Trace 1 -
"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.15","methodName":"reportInterruptAfterWait","fileName":"AbstractQueuedSynchronizer.java","lineNumber":2056,"className":"java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject","nativeMethod":false},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"11.0.15","methodName":"await","fileName":"Abstr
Trace 2 -
{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"17.0.11","methodName":"await","fileName":"AbstractQueuedSynchronizer.java","lineNumber":1640,"nativeMethod":false,"className":"java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject"},{"classLoaderName":null,"moduleName":"java.base","moduleVersion":"17.0.11","methodName":"take","fileName":"ArrayBlockingQueue.java","l
To be idetified.
For session corrupt to not occur and candidates to load correctly.
No response
If a project is inside a path with /test/
string in it, then Junit test generation will not happen.
Video Demo is here. The stack trace is:
Failed to generate test case
java.lang.RuntimeException: java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "c" is null
at com.insidious.plugin.ui.stomp.StompComponent.lambda$generateTestCaseSingle$22(StompComponent.java:1113)
at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$0(DumbService.java:112)
at com.intellij.openapi.project.DumbService.lambda$runReadActionInSmartMode$1(DumbService.java:156)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:889)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:69)
at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:149)
at com.intellij.openapi.project.DumbService.runReadActionInSmartMode(DumbService.java:112)
at com.intellij.openapi.project.DumbService.tryRunReadActionInSmartMode(DumbService.java:129)
at com.insidious.plugin.ui.stomp.StompComponent.generateTestCaseSingle(StompComponent.java:1107)
at com.insidious.plugin.ui.stomp.StompComponent.onGenerateJunitTestCaseRequest(StompComponent.java:1067)
at com.insidious.plugin.ui.stomp.StompComponent.lambda$createJunitFromSelected$6(StompComponent.java:430)
at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:281)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:429)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:114)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$9(CoreProgressManager.java:513)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$new$0(ProgressRunner.java:84)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$3(ProgressRunner.java:252)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:186)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:173)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:252)
at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "c" is null
at java.base/java.util.ArrayList.addAll(ArrayList.java:670)
at com.insidious.plugin.factory.testcase.TestCaseService.buildTestCaseUnit(TestCaseService.java:274)
at com.insidious.plugin.ui.stomp.StompComponent.lambda$generateTestCaseSingle$22(StompComponent.java:1109)
... 32 more
~/test/unlogged-spring-maven-demo
Junit test case should have generated
No response
Running the full UI test suite on windows will cause the IDE window to freeze and become unresponsive by the end of test case 31
.
On closing the IDE and reopening without clean the following exception is seen -
[Doesn't happen if case is run in isolation, seen twice at the same point if the whole suite is run].
Freeze for 178 seconds
IDE KILLED! Sampled time: 152000ms, sampling rate: 100ms, GC time: 2134ms (1%), Class loading: 0%, cpu load: 2%
The stack is from the thread that was blocking EDT
com.intellij.diagnostic.Freeze
at [email protected]/jdk.internal.misc.Unsafe.park(Native Method)
at [email protected]/java.util.concurrent.locks.LockSupport.park(LockSupport.java:211)
at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:715)
at [email protected]/java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireSharedInterruptibly(AbstractQueuedSynchronizer.java:1047)
at [email protected]/java.util.concurrent.CountDownLatch.await(CountDownLatch.java:230)
at com.insidious.plugin.client.NetworkSessionInstanceClient.getClassMethodAggregates(NetworkSessionInstanceClient.java:1111)
at com.insidious.plugin.factory.InsidiousService.getClassMethodAggregates(InsidiousService.java:1564)
at com.insidious.plugin.inlay.InsidiousInlayHintsCollector.collect(InsidiousInlayHintsCollector.java:176)
at com.intellij.codeInsight.hints.CollectorWithSettings.collectHints(InlayHintsUtils.kt:92)
at com.intellij.codeInsight.hints.InlayHintsPass.doCollectInformation$lambda$0(InlayHintsPass.kt:47)
at com.intellij.codeInsight.hints.InlayHintsPass$$Lambda$4276/0x0000000102106bf8.process(Unknown Source)
at com.intellij.concurrency.ApplierCompleter.execAndForkSubTasks(ApplierCompleter.java:136)
at com.intellij.concurrency.ApplierCompleter$$Lambda$7461/0x0000000102ee7668.run(Unknown Source)
at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1111)
at com.intellij.concurrency.ApplierCompleter.lambda$wrapInReadActionAndIndicator$1(ApplierCompleter.java:92)
at com.intellij.concurrency.ApplierCompleter$$Lambda$4286/0x0000000102109d40.run(Unknown Source)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:604)
at com.intellij.openapi.progress.impl.CoreProgressManager$$Lambda$813/0x0000000100981590.compute(Unknown Source)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:679)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:635)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:603)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
at com.intellij.concurrency.ApplierCompleter.wrapInReadActionAndIndicator(ApplierCompleter.java:104)
at com.intellij.concurrency.ApplierCompleter.compute(ApplierCompleter.java:86)
at [email protected]/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:754)
at [email protected]/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
at [email protected]/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
at [email protected]/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
at [email protected]/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
at [email protected]/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
For the UI freeze to not occur and the cases to proceed without issue.
On trying to save a candidate for a method that returns false
(of type boolean
/Boolean
), there are no assertions generated for that method.
This does not happen for true
, assertions will be generated for true
.
Example method :
unlogged-spring-maven-demo
RecursionController
getIsPalindrome
boolean
-> false
value.For an assertion to be created on trying to save candidates with boolean false return values.
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.