How can I take advantage of Parallelizable tests while using the Order Attribute?
Nunit v3.9.0
I realize the amount of other posts related to this topic... but no ordering seems to work when ParallelScope.Self is used.
The reason I need to order my test execution. I am running Selenium tests on a remote EC2 and the ChromeDriver has a bug where it hangs. [Bug] [Bug] [Bug] [Bug]
I need to run some initial tests that can fail silently to ensure the ChromeDriver is running correctly... THEN I need the remainder of the tests to run in parallel.self to take advantage of the speed.
My "initiation tests" are very very basic. I run three of these in their own [TestFixture]
[TestFixture]
[Order(1)]
public class Initiate
{
[TestCase(TestName = "001")]
public void Initiate_ChromeDriver_2()
{
try
{
IWebDriver driver = new ChromeDriver();
driver.Navigate().GoToUrl(<url>);
driver.WaitForPageLoad();
driver.Quit();
driver.Dispose();
}
catch (Exception ex)
{
Assert.Inconclusive(ex.Message);
}
Assert.Pass();
}
}
*driver.WaitForPageLoad() is an extension.
Output:
But... the fixtures run in a completely random order under the Parallelizable assembly, which ignores the order attribute.
I've read so many posts. But I cannot seem to get my tests to order correctly.
I've tried:
- [Test, Order(1)] as per the documentation
- [Catagory("yada")] ref
- [TestCase(TestName = "001")]
- [TestFixture][Order(1)] added in v3.8
- Alphabetizing test names and fixture names
Thanks in advance!
EDIT:
This is a known issue: #2521
Any workarounds?
EDIT 2: Not an issue. Read Charlie's comments below.