Anu
Anu

Reputation: 1

The xml file is rejected while using AWS Device farm for testing

Since am a beginner in AWS Device farm,the most blocker through my testing is ,AWS device farm executes all test cases in test directory.But i have given only specific testcases in the xml file.That is my project needs not all testcases to be run at that time.Can anybody helps me?

Upvotes: 0

Views: 350

Answers (1)

NikofTime
NikofTime

Reputation: 749

I work for the AWS Device Farm team. From your description it seems that you are using the TestNG framework.

  1. All your tests are supposed to be under src/test as you mentioned.

  2. Your testng.xml needs to be at the root of the tests.jar that gets created as per the steps mentioned in the documentation here

  3. If you are not aware on how to put the testng xml in the test jar one way is to have a target in your pom.xml like mentioned below

    <plugin>
        <groupId>org.apache.maven.plugin</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12</version>
        <configuration>
            <suiteXmlFiles>
                <suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
            </suiteXmlFiles>
        </configuration> 
    </plugin> 
    
  4. Not all the features like ordering of tests using testng.xml are supported right now but you can definitely tell which tests you want to run in the testing.xml which seems to be your primary requirement.

Upvotes: 1

Related Questions