How to deploy ApexTestSuite from one org to other org?

Deploy ApexTestSuite: Are you working/running on same set of test classes by creating test suites and manually creating test suites in your dev, test and multiple environments? If you create you test suite, you can migrate it to multiple environments using metadata migration tool now. “ApexTestSuite” is the metadata name to migrate apex test suite.

<?xml version="1.0" encoding="UTF-8"?>

<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>       

        <members>TestSuite Name</members>

        <name>ApexTestSuite</name>

    </types>

    <version>38.0</version>

</Package>

Above script is sample package.xml script to migrate apex test suites. One you retrieve apex test suites, metadata components will be stored with .testSuite suffix and these files are stored in the testsuite folder.

If you are deploying new test classes along with test suite, then you have to add new apex classes to your package.xml

<?xml version="1.0" encoding="UTF-8"?>

<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>       

        <members>TestSuite Name</members>

        <name>ApexTestSuite</name>

    </types>

                <types>       

        <members>ApexClass Name</members>

        <name>ApexClass</name>

    </types>

    <version>38.0</version>

</Package>

 

Apextestsuite