nunit: Parallelizable(ParallelScope.) doesn't work on a SetUpFixture

Hello. Please, advice. I want to run TestFirstGroup and TestSecondGroup in parallel but they are executed consistently.

I have next autotests structure:

Class for Authorization:

namespace TestAutomation
{
  public class Authorization
    {
        [OneTimeSetUp]
        public void CreateUser()
        {
        }

        [OneTimeTearDown]
        public void DeleteUser()
        {
        }
}

First namespace with autotests:

namespace TestAutomation.TestsGUI.TestFirstGroup
{
 [SetUpFixture, Parallelizable]
    public class TestGroupOneSetupFixture
    {
        [OneTimeSetUp]
        public void RunBeforeAnyTests()
        {
        }
        [OneTimeTearDown]
        public void RunAfterAnyTests()
        {
        }
    }

[TestFixture]
 BaseTestFirstGroup : Authorization
{
   [OneTimeSetUp]
        public void RunBeforeTests()
        {
        }

        [OneTimeTearDown]
        public void RunAfterTests()
        {
        }

}

  public class FirstGroupTestFixtureOne :  BaseTestFirstGroup
{
        [Test]
        public void TestOne(){}
        [Test]
        public void TestTwo(){}
}

  public class FirstGroupTestFixtureTwo : BaseTestFirstGroup
{
        [Test]
        public void TestOne(){}
        [Test]
        public void TestTwo(){}
}
}

Second namespace with autotests:

namespace TestAutomation.TestsGUI.TestSecondGroup
{
 [SetUpFixture, Parallelizable]
    public class TestGroupSecondSetupFixture
    {
        [OneTimeSetUp]
        public void RunBeforeAnyTests()
        {
        }
        [OneTimeTearDown]
        public void RunAfterAnyTests()
        {
        }
    }

[TestFixture]
BaseTestSecondGroup : Authorization
{
   [OneTimeSetUp]
        public void RunBeforeTests()
        {
        }

        [OneTimeTearDown]
        public void RunAfterTests()
        {
        }

}

  public class SecondGroupTestFixtureOne : BaseTestSecondGroup
{
        [Test]
        public void TestOne(){}
        [Test]
        public void TestTwo(){}
}

  public class SecondGroupTestFixtureTwo : BaseTestSecondGroup
{
        [Test]
        public void TestOne(){}
        [Test]
        public void TestTwo(){}
}
}

and other autotests.

NUnit version: 3.10.1 NUnit.ConsoleRunner version: 3.8.0 NUnit3TestAdapter version :3.10.0

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 18

Most upvoted comments