Panagiotis Tsiakos
Panagiotis Tsiakos

Reputation: 41

Run a specific TestNG testng.xml suite file in aws-device farm

I want to run a TestNG xml suite file in aws-device farm. After investigation I concluded that the way that the aws-device farm execute the TestNG tests is that run all the tests that are annotated with a TestNG annotation (in the zip file project that is uploaded to device farm) with random order. This is not applicable in my project since all the tests use parameters declared in my xml suite file and also the suite file declares the sequence in which the tests should run. Therefore I am not able to run any tests, since the first time a test try to use a parameter value that is declared in testng.xml file, it is not available and an exception is thrown

Upvotes: 4

Views: 1129

Answers (1)

jmp
jmp

Reputation: 2375

Here is a new document which shows how to include the testng.xml file

https://aws.amazon.com/premiumsupport/knowledge-center/xml-file-tests-jar-file-device-farm/

Note: In Device Farm's standard environment only a subset of features are supported for the testng.xml file. If priority, the include tag, the exclude tag, complex grouping, or using parameters from the testng.xml file are required for the project, then use the custom environments.

https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html

HTH

-James

Upvotes: 1

Related Questions