Skip to main content
Tony White ha fatto una domanda in #Apex
I am currently trying to debug a test class and have found that when you select just a single test method from the class it does not run the setup methods.  I need to run the code as various users, I am setting up the users in a @testSetup method, and then querying for that user in the first line of the test method.

When I run all tests in the class, it gets past this first line.

If I select just a single test method (so can focus on the errors it is producing) then it fails on the first line.

There is no option when you select the test methods to run to include the testSetup methods...

Anyone else seeing this?  Until I found this issue I thought the new feature was fantastic cause I no longer would have to comment out the other test methods to be able to just get debug for a single test method.  I see no metion of the test setup not running, in the release notes.

Thanks

Tony
2 risposte
  1. 14 set 2015, 22:22
    Also finding if you use rerun then it does not run the setup methods either...
0/9000