0

I want to run a specific test class before running other tests in the same package using testng xml.

test_package ------------- testclass1 testclass2 testclass3 

I want testclass3 to run first.

<test name="Tests"> <packages> <package name="tests.*"/> </packages> </test>--> 

There are multiple classes inside the package but i want selected test class to run ahead of all.

Edit: Selenium grid is being used. I want longer tests to run first so that other tests will run parallelly. Currently the longer test runs at last and other nodes are idle making the test duration longer

5
  • @Nexevis No, I want to run test class in specific order and i am using testng. Commented Aug 22, 2019 at 13:01
  • Duplicate of this one then. Also whoever thought naming something "testng" is cruel, that so easy to misread as "testing". Commented Aug 22, 2019 at 13:03
  • Nexevis i've got too many classes and want to make use of package Commented Aug 22, 2019 at 13:08
  • FYI, if the success or failure of your tests depends on the order they are being run in, there's a large chance your tests aren't written properly. If, however, this is just to run fast tests before slow ones to avoid long debug cycles that's alright. Commented Aug 22, 2019 at 13:26
  • @cameron1024 Selenium grid is being used. I want longer tests to run first so that other tests will run parallelly. Currently the longer test runs at last and other nodes are idle making the test duration longer. Commented Aug 23, 2019 at 3:36

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.