You need to sign in to do that
Don't have an account?
Matthew P Craig
What is the default value of @isTest(isParallel) and impact on settings.
I see that we can set Apex unit test with an annotation of @isTest(isParallel=true). That is awesome. However I'm requesting some clarification on its functionality.
Thanks in advance.
- What is the default value? (I assume false... but don't like to assume)
- If I select a group of tests and indicate to SF that I want those tests to run in parallel, do I have to explicity set that to FALSE inorder to preform specific tests in serial? (or do they all run in parallel because I requested it)
- If I select a group of tests and indicate I want them run in serial, if isParallel set to TRUE does it over ride and still run in parallel?
Thanks in advance.
You are right,
the default for that value is really false.
As it is a new feature I have not seen it in action, but I will share my experience with big projects and parallel test execution:
Pain.
What I realized from the documentation, this annotation overrides the default org setting (when parallell execution of tests is turned off).
This way we can specify which test classes are safe for parallell processing. What we usually get on big implementation is the UNABLE_TO_LOCK_ROW for testclasses that uses the same objects.
This will enable to have some testclasses that are marked as " safe" to actually run in parallell and the others will be executed sequentially.
If anyone has more info on that will be helpful :)
Best Regards!
To your point "Run all tests in parallel, except the few that cannot, and run those in serial."
- No this won't be helpful, if you do "Run All Tests" through ANT script then it won't work.
Hi Matthew P Craig,
Please refer the Link.It will helpfull for you.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_annotation_isTest.htm
It is helpfull for you please mark my answer.
Thanks!..