ZJU-ACES-ISE/ChatUniTest_IDEA_Plugin

Unable to generate unit test via Chatunitest IDEA plugin

Closed this issue · 11 comments

On selecting "Chatunitest Generate Tests" for a method , I only see below notification from chatunitest but don't see the testoutput folder getting created under my project directory.
Selection_094

And even don't find any logs or info under my tmpoutput folder.

Please check if your project has been compiled, or you can select the option to compile with IntelliJ IDEA compiler as below shows
image
image
Moreover, you need to choose "parse the project" for the first time with the project to ensure that the parsing results are consistent with the project
image

Project is compiled manually and it was success. But I am getting notification on "Parse the project" by ChatUnitest.
[ChatUniTest] Parsing class info
[ChatUniTest] Project parse failed

And don't see any error details.

Could you please provide the structure of your project?

Selection_095

Project structure is something like above which is following parent-child project structure . Actual code is inside abc-core.
<dependency> <groupId>io.github.ZJU-ACES-ISE</groupId> <artifactId>chatunitest-starter</artifactId> <version>1.0.0</version> <type>pom</type> </dependency>
Chatunitest dependency is added in pom.xml of abc-core

Thanks.

Thanks for the question,this problem is caused by complex multi-modules,we have added support for multi-module projects in version 3.1 of the plugin, you can find the latest version of the plugin at the following ChatUniTest IDEA plugin or Jetbrain marketplace.

I think I have added the latest plugin only but I will reconfirm and update .
Pom.xml dependency should be same ryt what is given by me ?

I have updated the IDEA plugin to 3.1 and now the Parsing the project is completing but Test case generation is not completing but no error too.
Selection_098

Post the activity I can see /tmp folder getting created with class-map.json but testoutput folder is not created. I only see below notification in IDE.
Selection_097

I think there may be some problems with the parsing result. Can you check the parsing result of the "addToExecutionLog" method in tmp/class-info folder to find whether the result is correct

So there are 2 issues which I have observed. :

  1. There are multiple java files for which there is no details in /tmp/class-info due to which the generation of testcases struck with above screenshot in my last comment.
  2. For those java clases for which mapping in /tmp/classs-info is present ,
    a) Test generation failed due to all rounds get exhausted in fixing the tests but still there are errors in generated tests.
    b) There are some scenarios where I have got below notifications.
    Selection_163

But till I am not seeing test files generated under /project/chatunitest/ directory .

Sorry, it seems that there are still some problems with the parsing of the multi-module project, and it is expected that the improvement of this problem will be fixed next week.