"No unit tests found" when trying to execute unit tests for specific class or configuration

Issue #2610 resolved
Paweł Iwanowicz created an issue

Hi Scott,

I’ve recently updated IntelliJ Idea and Illuminated Cloud to the newest version and it seems I can no longer run unit tests. Before the update, everything was working fine but now I’m constantly getting “No unit tests found for configuration” when I’m running tests for a specific apex class. I’ve tried to run “All tests” and strangely enough, it works fine. After some checking, it seems that the configuration for apex classes isn’t valid (see attached screenshot - the unit tests aren’t checked). Even if I try to create my own, the changes in the configuration aren’t saved.

Comments (11)

  1. Scott Wells repo owner
    • changed status to open

    I have no idea how I missed this in testing, but it's easily reproducible. I suspect it's due to the change to have tests execution respect .forceignore and am confirming that suspicion now. I will issue a patch this morning as soon as I figure out what's going on and have completed a fix. Sincere apologies for the regression!

  2. Scott Wells repo owner

    Well, at first glance it doesn’t seem to be due to the .forceignore changes. I noticed that the stored run configurations had lost their configured classes/methods, even ones that I hadn’t run in the recent past. That makes me think that perhaps it was something with the 2024.2 IDE upgrade. Has everyone who has experienced this issue also upgraded to 2024.2? If you edit the affected run configurations and restore the original classes/methods, is the problem effectively gone or does it return?

  3. Scott Wells repo owner

    Nope, it’s removing the configuration info each time I close/reopen the project. Further investigation required…

  4. Paweł Iwanowicz reporter

    Hi Scott,

    I’ve installed Intellij Idea 2024.1.6 to see if the problem is related to the new version of IDE, but it’s also happening for the older version.

    I’ve tested it on both 2024.1.6 and 2024.2 with IC 2.3.2.4

  5. Scott Wells repo owner

    My pleasure. I’m just embarrassed that I let something like that slip through the cracks. I can see how it did given how the problem manifests, but I also saw the opportunity to adjust the testing approach to ensure it doesn’t happen again.

  6. Log in to comment