TestingBot provides an online grid of browsers and mobile devices to run Automated tests on via Selenium WebDriver. This example demonstrates how to use NUnit to run a test in parallel across several browsers.
-
Global Dependencies
- MS Visual Studio 2022 or later.
- Install the NUnit and NUnit3TestAdapter packages through NuGet
-
TestingBot Credentials
- Add your TestingBot Key and Secret as environmental variables. You can find these in the TestingBot Dashboard.
$ export TESTINGBOT_KEY=<your TestingBot Key> $ export TESTINGBOT_SECRET=<your TestingBot Secret>
-
Setup
- Clone the repo
- Open the solution
NUnit-TestingBot-Sample.sln
in Visual Studio 2022 or higher - Build the solution
Click Run Unit Tests, you will see the test result in the TestingBot Dashboard
There's an example on how to perform parallel testing. This will run two or more tests simultaneously, shortening the total test duration. To run the Parallel test, please use this command:
dotnet test --filter "Parallel"