Monday, 27 January 2020

Behaviour of testNG annotations when they have some test case with "priority = 0" and in some there is no priority


@Test(priority =0)
public void NewTest()
{
}

@Test
public void SecondTest()
{
}

@Test
public void ThirdTest()
{
}

In above mentioned scenarios this will be gonna run on the same order. Like NewTest will be running first and after that SecondTest and then ThirdTest will be going to run.

The execution order for above mentioned scenarios is in the Alphabetical orders(Ascii Values). By default priority for test cases is 0. If we don't have mentioned priority in some test cases then it will take as priority = 0 and then will run it on Alphabetical orders(Ascii Values).

No comments:

Post a Comment