0

I am preparing an Ant package to move code to production. However, many of the existing orgs tests are very out of date and are failing. At this point, my only option is to select tests that cover the code that I'm deploying since I cannot fix all of the tests before going to production.

Is there a way using migration tool to enforce production-like test coverage rules without running all tests? My challenge is ensuring that the tests I manually select to run on deploy adequately cover the classes I am deploying.

2

To simulate the default behavior of production, use:

<sf:deploy testLevel="RunLocalTests" ... />

This will run all tests in your org's namespace, but not those from installed packages. You can read more about it in Deploying Changes to a Salesforce Org.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.