Can't run unit tests in IC

432 views
Skip to first unread message

David Cheng

unread,
Jul 9, 2017, 8:11:36 PM7/9/17
to Illuminated Cloud General Discussion
Hello.  I'm new to Intellij / IC (coming from Sublime and Mavensmate) and I'm having trouble understanding how to run unit tests and view the results.  I'm in the trial period of IC.

1.  When I try to run a particular unit test class, nothing happens.  When I go to View > Tool Windows, the Run is greyed out.  Do I need to set up a configuration for the unit test class?

2.  When I go to Edit Configurations, I see a Run/Debug Configurations window.  I select Apex Unit Test and click the + icon, but I can't save the log levels or test classes that I selected in the main section of the window.

Thanks
David
Screen Shot 2017-07-09 at 5.08.09 PM.png
Screen Shot 2017-07-09 at 5.08.19 PM.png

David Cheng

unread,
Jul 9, 2017, 8:21:55 PM7/9/17
to Illuminated Cloud General Discussion
I should add that I disabled the JavaFX plugin and Kotlin plugin since I'm only using Intellij for Salesforce coding.  Are there any plugins that need to be enabled to allow full functionality for Salesfore-related things like unit tests?  Thanks.

sc...@illuminatedcloud.com

unread,
Jul 9, 2017, 8:31:45 PM7/9/17
to Illuminated Cloud General Discussion
Hi, David.  Sorry you're having issues.  The only other plugin that needs to be enabled is the Coverage plugin, so please verify that's enabled properly.  I had a verification check for that, but apparently a recent IntelliJ IDEA update changed something so that the verification doesn't fire properly.  I'll remedy that in the next build or two.

You can run tests in two ways: 1) right-click on a test class or method name and run it from the context menu; 2) do as you've tried and create a new run configuration with the classes/methods you want to execute, click OK, and then execute that as a run configuration.

Please let me know if this guidance doesn't take care of the issue and I'll help get this working properly for you.

Best regards,
Scott Wells

David Cheng

unread,
Jul 9, 2017, 9:16:49 PM7/9/17
to Illuminated Cloud General Discussion
I had Coverage disabled, so I enabled it and the unit test runs now.  Thanks for your quick response, looking forward to trying out the other great features I've seen in your videos.

sc...@illuminatedcloud.com

unread,
Jul 9, 2017, 9:38:56 PM7/9/17
to Illuminated Cloud General Discussion
Glad to hear!  Yeah, I heard that the verification for that wasn't working properly just a week or so back.  I'll get that back into healthy shape since it helps everyone avoid confusion and frustration.  Don't hesitate to let me know if you have any other questions as you give it a whirl!

Regards,
Scott

shil...@gmail.com

unread,
Jun 12, 2020, 9:58:09 AM6/12/20
to Illuminated Cloud General Discussion
Hello,  

I'm new to Intellij/Illuminated Cloud and I'm having trouble understanding how to run unit tests and view the results.  I have Illuminated Cloud 2.0 set up. 

1.  How do I set up a configuration for the unit test class? Under Apex Unit Tests - Test Classes when I click All option nothing shows up. I am unable select a particular test class

I have the Coverage Plugin enabled.

Regards,
SHilpa

Scott Wells

unread,
Jun 12, 2020, 10:33:38 AM6/12/20
to Illuminated Cloud General Discussion, shil...@gmail.com
Hi, Shilpa. When you check All Tests, that creates a run configuration that will always include all tests even as things evolve over time. Uncheck that and it should show all test classes and methods from which you can select the subset you wish to include. If you want to run a specific test class or method, you can also right-click on the class/method name and click any of the following context menu options:


Those actions are also available in the gutter to the left of the class/method:


and can be invoked using Alt+Enter (Windows/Linux) or Opt+Enter (Mac).

Please let me know if that doesn't provide what you need.

Regards,
Scott Wells

Scott Wells

unread,
Jun 12, 2020, 10:35:18 AM6/12/20
to Illuminated Cloud General Discussion, Scott Wells, shil...@gmail.com
Hmmm...evidently that didn't include the images for some reason. Not sure why given this new Google Groups interface. I'll tinker with that, but please let me know if you can't figure it out and I'll provide the more detailed response that I originally intended.

Victoria Clodfelter

unread,
Sep 23, 2020, 5:27:45 PM9/23/20
to Illuminated Cloud General Discussion, sc...@illuminatedcloud.com, shil...@gmail.com
Hi Scott, 

Hope you're well! I've run into a similar issue with the latest updates for IC/Illuminated Cloud where the testing ability is no longer available. I can't find where the coverage plugin lives to check if it's enabled. Can you point me in the right direction?

Thanks!
Victoria
Reply all
Reply to author
Forward
0 new messages