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

Not generating tests with Java 17 and Maven 3.9.4 #350

Open
albertRzad opened this issue Sep 4, 2024 · 3 comments
Open

Not generating tests with Java 17 and Maven 3.9.4 #350

albertRzad opened this issue Sep 4, 2024 · 3 comments

Comments

@albertRzad
Copy link

albertRzad commented Sep 4, 2024

Im working with java 17, junit 5 and maven 3.9.4, when i'm trying to generate tests with LLM the proccess stars but no tests are generated. No warnings or bugs. Is it compatibile with this versions? I'm using TestSpark 0.2.1. Im confused because of :
'''
LLM-based test generation
For this type of test generation, TestSpark sends request to different Large Language Models. Also, it automatically checks if tests are valid before presenting it to users.

This feature needs a token from OpenAI platform or the AI Assistant platform.

Supports Java (any version).
Generates unit tests for capturing failures.
Generate tests for Java classes, methods, and single lines.
'''

java.lang.NullPointerException
at org.jetbrains.research.testspark.tools.llm.generation.PromptManager.createClassRepresentation(PromptManager.kt:128)
at org.jetbrains.research.testspark.tools.llm.generation.PromptManager.createClassRepresentation(PromptManager.kt:138)
at org.jetbrains.research.testspark.tools.llm.generation.PromptManager.generatePrompt$lambda$4(PromptManager.kt:59)
at com.intellij.openapi.application.impl.RwLockHolder.runReadAction(RwLockHolder.kt:271)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:845)
at org.jetbrains.research.testspark.tools.llm.generation.PromptManager.generatePrompt(PromptManager.kt:53)
at org.jetbrains.research.testspark.tools.llm.generation.LLMProcessManager.runTestGenerator(LLMProcessManager.kt:93)
at org.jetbrains.research.testspark.tools.Pipeline$runTestGeneration$1.run(Pipeline.kt:92)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:477)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$6(CoreProgressManager.java:528)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:250)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:100)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:221)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:46)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:220)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$13(CoreProgressManager.java:660)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:735)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:691)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:659)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:202)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:100)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:250)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:500)
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)
@albertRzad albertRzad reopened this Sep 4, 2024
@Vladislav0Art
Copy link
Collaborator

Can you edit the comment to make the stack trace formated as a code snippet?

@albertRzad
Copy link
Author

Can you edit the comment to make the stack trace formated as a code snippet?

Done, sorry.

@albertRzad
Copy link
Author

Update, now im getting
image

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