Today I have written a test class, having only one test method into it. When I ran the test class to check for code coverage, I got a very strange error saying "could not run tests on <Id of test class>". Whereas it was showing that the test method run successfully with desired result in terms of code coverage. I further tried to update the test class and it again gave very strange error "java.lang.reflect.InvocationTargetException".
Initially I thought there is something wrong with my class and cross checked for syntax, identifier etc. After making sure that there is nothing wrong with class, I went to see if anyone faced same issue before. I found actually quite a few and below is solution to get rid of this:-
Go back to test class, try to run it or edit it and you shoule be able to do so.
Initially I thought there is something wrong with my class and cross checked for syntax, identifier etc. After making sure that there is nothing wrong with class, I went to see if anyone faced same issue before. I found actually quite a few and below is solution to get rid of this:-
- Go to App Setup >> Develop >> Apex Test Execution and click on "Options".
- Uncheck 'Disable Parallel Apex Testing' and click on Ok.
- Go to App Setup >> Develop >> Apex Test Execution and click on "View Test History".
- Click on 'Clear Test Results' button.
Go back to test class, try to run it or edit it and you shoule be able to do so.
Comments
Post a Comment