-
Notifications
You must be signed in to change notification settings - Fork 131
Selenium Parallel tests execution
Jakub Raczek edited this page May 21, 2016
·
16 revisions
Our framework supports parallel test execution, how to enable it in your test project depends on selected Unit framework:
you have to add the attribute to the test classes ParallelScope.Fixtures indicates that fixtures may be run in parallel with one another.
namespace Objectivity.Test.Automation.Tests.NUnit.Tests
{
using System.Collections.Generic;
using global::NUnit.Framework;
using Objectivity.Test.Automation.Common;
using Objectivity.Test.Automation.Tests.NUnit.DataDriven;
using Objectivity.Test.Automation.Tests.PageObjects.PageObjects.TheInternet;
[TestFixture]
[Parallelizable(ParallelScope.Fixtures)]
public class HerokuappTestsNUnit : ProjectTestBase
{
[Test]
public void BasicAuthTest()
{
var basicAuthPage =
new InternetPage(this.DriverContext).OpenHomePageWithUserCredentials().GoToBasicAuthPage();
Verify.That(
this.DriverContext,
() =>
Assert.AreEqual(
"Congratulations! You must have the proper credentials.",
basicAuthPage.GetCongratulationsInfo));
}
}
}
namespace Objectivity.Test.Automation.Tests.NUnit.Tests
{
using global::NUnit.Framework;
using Objectivity.Test.Automation.Tests.PageObjects.PageObjects.TheInternet;
[TestFixture]
[Parallelizable(ParallelScope.Fixtures)]
public class JavaScriptAlertsTestsNUnit : ProjectTestBase
{
[Test]
public void ClickJsAlertTest()
{
var internetPage = new InternetPage(this.DriverContext).OpenHomePage();
var jsAlertsPage = internetPage.GoToJavaScriptAlerts();
jsAlertsPage.OpenJsAlert();
jsAlertsPage.AcceptAlert();
Assert.AreEqual("You successfuly clicked an alert", jsAlertsPage.ResultText);
}
}
}
More info about NUnit Framework Parallel Test Execution. Please notice that currently only Fixtures may be run in parallel with NUnit 3.
how set parallel test execution depends on Visual Studio version you using or test runner version. More details can be find MsTest .runsettings .testsettings.
Please notice that Selenium IEDriver doesn't support test execution in parallel.
- Home
- Getting started
- Parallel tests execution
- MsTest DataDriven tests from Xml and CSV files
- NUnit DataDriven tests from Xml, CSV and Excel files
- Comparing files by NUnit DataDriven tests
- Visual Testing
- Screen shots: full desktop, selenium. PageSource saving
- Verify-asserts without stop tests
- Downloading files
- Helpers
- Override browser profile preferences, install browser extensions, Headless mode
- Debugging Test.Automation framework
- Logging
- Performance measures
- Webdriver Extends
- More common locators
- Selenium-Grid-support
- Advanced Browser Capabilities and Options
- AngularJS synchronization
- Update App.config or appsettings.json
- Cross browser parallel test execution with testing-Cloud-Providers\SeleniumGrid
- Verifying Javascript Errors from browser
- Enabling Performance Log for Chrome
- Azure DevOps Support
- Edge browser Support
- Downloading and running Selenium Grid with Powershell
- Run Ocaramba tests with Docker container
- HTTP auth in Internet explorer
- ExtentReports Support