The project has two modules,I generate unit tests for HomeService,but in demo-app 's test cases,How to solve it?
Hi @jamie
This could be due to your test resource folders marked incorrectly.
You can either directly mark the desired directory as the test directory by right clicking on the desired test directory > Mark directory > Test Sources Root (see below)
Alternatively, you can set this up for the project in the Project Structure settings, the Test Source Root should be src/test/java - to see this; click File > Project Structure > Modules > Sources
Let us know how this goes, or if you have any further questions don’t hesitate to ask
Kind regards,
Jane @ Diffblue
@Jane_Walls Thanks! The method you said is very useful !
- First, the original folder is excluded from marking the root of the test resource.
- Then mark the right test directory as a test resource
But it is better to mark in the gradle configuration, see https://youtrack.jetbrains.com/issue/IDEA-151925#comment=27-2355076
Thanks @jamie for the feedback!
I’m glad you got this working.
Kind regards,
Jane @ Diffblue