"Test ignored" issue

2,087 views
Skip to first unread message

raj....@gmail.com

unread,
Nov 16, 2017, 3:44:53 PM11/16/17
to Illuminated Cloud General Discussion
I've run into the "Test ignored" issue again in Illuminated Cloud whenever I run any of my test classes. It was working fine up until a couple of days back.

My environment:

OS X 10.11.6
IDEA CE 2017.2.6
Illuminated Cloud: Ver 1.8.1.2 Build 20171031081708

Do I have to delete the connection and reestablish the same connection again? I am able to save and retrieve from my org, so the connection itself seems to be fine, I'm just not able to run tests at the moment. Tests themselves run fine when I execute them outside of Illuminated Cloud.

Thanks
Raj

sc...@illuminatedcloud.com

unread,
Nov 16, 2017, 3:56:12 PM11/16/17
to Illuminated Cloud General Discussion
Hi, Raj. Every time I've seen this it's because the org is in a bad compilation state. As a result, test execution fails silently...the test runner doesn't actually report failures for tests affected by the bad compilation state, hence the "ignored" result from IC. The easiest way to know what's going on is to go into the Setup UI where it lists Apex classes and click Compile All Classes. Unfortunately I can't integrate that into IC right now because there's no public API for it. However, that will show you the root cause which you can then address and this problem will go away.

I'm still trying to find some way to make this more obvious and easy to address from directly within the IDE.

Regards,
Scott Wells

raj....@gmail.com

unread,
Nov 16, 2017, 4:01:50 PM11/16/17
to Illuminated Cloud General Discussion
Thanks Scott, that was indeed the case. One of the classes had a compilation problem and fixing that took care of the issue.

Thanks for your prompt response and the amazing product that IC is :-)

Regards
Raj

sc...@illuminatedcloud.com

unread,
Nov 16, 2017, 4:06:58 PM11/16/17
to Illuminated Cloud General Discussion
Glad to hear that got you to a quick resolution, and glad to hear you're enjoying IC!

Best regards,
Scott

Miraloma

unread,
Jan 9, 2018, 2:38:29 PM1/9/18
to Illuminated Cloud General Discussion
Hey Scott,

Are there are causes for the "Test ignored" problem? I've done "compile all classes" and got a successful response. However, my test still won't run.

sc...@illuminatedcloud.com

unread,
Jan 9, 2018, 2:45:50 PM1/9/18
to Illuminated Cloud General Discussion
The other main reason is that you're asking to run a test class or method that doesn't exist in the org. The Salesforce Winter '18 release included an API enhancement that allowed you to run Apex tests by name instead of ID, but this means that you can request to run tests that don't exist in the org but do locally.

One way that you can get into this state is by using IC2's rename refactoring to rename a class or method that is included in a test run configuration. A bug was opened recently to include those references when renaming:


Either way the solution is to ensure that you're only trying to run test classes/methods that also exist in the org.

If you look into it and that's not it, please enable debug logging for unit test execution as documented here:


and email the resulting log to sup...@illuminatedcloud.com so I can take a look.

Regards,
Scott Wells

marco...@deliveryhero.com

unread,
Feb 12, 2018, 5:44:06 AM2/12/18
to Illuminated Cloud General Discussion
Hi guys,

just want to share my experience regarding this... Since I was going crazy.
As mentioned by Scott, one of the reason why this "error" occurs is when there's a class that is not compiling. Fun enough seems that Setup -> Apex Class -> Compile All classes is not a reliable tool to check if you have a broken reference in your code :\
One of my trigger was referencing a method that did not exist anymore but when trying to "Compile all classes" I was getting the message: "All classes compiled successful"... Really disturbing.
Enabling IlluminatedCloud log I was able to identify this issue, remove the broken reference in the trigger and now everything works fine.
In the meantime I opened a Case to SF support to explain me why the hell that happen ;)

Cheers,
Marco

Phil W

unread,
Feb 12, 2018, 6:10:45 AM2/12/18
to Illuminated Cloud General Discussion
Marco, thanks for that. That does sound fishy - I hope SF will look into your case (my company doesn't have the required level of support from SF so I can't raise developer cases :( ). The other scenario I've seen this is when I have done something like "run all tests" (using an All Tests configuration) from inside IDEA, then cancelled the execution (this would have been on IC 2.0.0.7 I think). An attempt to run tests again from inside IDEA would fail with "ignored" - by going onto the Setup console and looking at test executions I saw that my previous (cancelled) execution was actually still running, meaning that the second run attempts were ignored because there were test execution already queued.

I don't know if this is an IC bug (not cancelling the test execution correctly) or some Salesforce thing.

sc...@illuminatedcloud.com

unread,
Feb 12, 2018, 11:03:09 AM2/12/18
to Illuminated Cloud General Discussion
That's very interesting, Marco. Do you mind sharing the information from the IC log that helped diagnose the problem? If it's in the log I should be able to put it front-and-center for the user and hopefully save precious time.

Thanks!
Scott

marco...@deliveryhero.com

unread,
Feb 12, 2018, 11:09:34 AM2/12/18
to Illuminated Cloud General Discussion
Sure, no problem!

2018-02-12 10:51:30,908 [1175779]   INFO - .ApexUnitTestRunProcessHandler - Running unit tests synchronously.
2018-02-12 10:51:32,568 [1177439]   WARN - .ApexUnitTestRunProcessHandler - No Apex log ID found in test results:
{
 
"codeCoverage": [],
 
"codeCoverageWarnings": [],
 
"failures": [
   
{
     
"id": "01qw000000035FoAAI",
     
"message": "line 44, column 28: Method does not exist or incorrect signature: void populateCloseData(List\u003cOpportunity\u003e, Map\u003cId,Opportunity\u003e) from the type TrgOpportunityProcessor",
     
"name": "Opportunity_Trigger",
     
"seeAllData": true,
     
"time": -1.0,
     
"type": "Trigger"
   
}
 
],
 
"numFailures": 1,
 
"numTestsRun": 0,
 
"successes": [],
 
"totalTime": 0.0
}
2018-02-12 10:51:32,568 [1177439]   WARN - .ApexUnitTestRunProcessHandler - No log body available. Offline debugging will be skipped.
2018-02-12 10:51:32,569 [1177440]   WARN - ner.GeneralTestEventsProcessor - [Apex]: Trying to finish nonexistent node: TestSuiteFinishedEvent{name='Opportunity_Trigger', id='6'

As you can see in the message field there's the compilation issue that allowed me to find and fix the issue ;)

sc...@illuminatedcloud.com

unread,
Feb 12, 2018, 11:11:22 AM2/12/18
to Illuminated Cloud General Discussion
Thanks! I see the problem on the IC side...there's no test class/method to which to attach that error. I should be able to attach it to the test run itself, though. I'll update IC to do that and hopefully put a whole class of these issues to rest.

marco...@deliveryhero.com

unread,
Feb 12, 2018, 11:17:57 AM2/12/18
to Illuminated Cloud General Discussion
Cool, happy to help  :)

sc...@illuminatedcloud.com

unread,
Feb 12, 2018, 10:43:54 PM2/12/18
to Illuminated Cloud General Discussion
Very nice...using that I think I've finally plugged the last (major?!) hole where failures reported by the Salesforce test runner API weren't being shown front-and-center in the IC test runner. Now these failures are displayed clearly at the parent class level. I'll include the change in the next releases of both IC1 and IC2. Thanks again for providing the diagnostic info!
Reply all
Reply to author
Forward
0 new messages