Giter Club home page Giter Club logo

paralleltestrunner's Introduction

ParallelTestRunner

Parallel test runner for Visual Studio tests. It allows to control how the tests are executed in parallel by providing different options and TestGroupAttribute (see Additional Info).

For simple Visual Studio parallel tests run you can use this suggestion.

Description

Allows parallel run of Visual Studio tests from the command line. Primary usage is to speed up slow tests (for ex Selenium UI tests) during Continuous Integration process. It is possible for example to write Selenium UI tests using Visual Studio testing framework and scale them by using ParallelTestRunner and Selenium Grid. Basically this tool runs several Visual Studio VSTest.Console.exe processes and executes one [TestClass] or [TestMethod] in each of them. The tool generates result.trx file by merging all test results.

Usage

ParallelTestRunner.exe [options] [assembly]...

Options:
  provider:        specifies which version of VSTest.Console.exe to use: VSTEST_2012, VSTEST_2013, ...
  threadcount:     specifies the number of parallel processes, default is 4
  root:            the working directory where the temporary files will be generated
  out:             resulting trx file, can be absolute path or relative to the working directory
  plevel:          specifies what should be run in parallel: TestClass, TestMethod. Default is TestClass
  
assembly           the list of assemblies which contain visual studio tests

Examples:
  ParallelTestRunner.exe provider:VSTEST_2013 root:TestResults ./UITests/SeleniumUI.Tests.dll
  ParallelTestRunner.exe provider:VSTEST_2013 root:TestResults threadcount:10 out:result.trx plevel:TestMethod ./UITests/SeleniumIntegration.Tests.dll

Download

See releases. Build was created with the help of AppVeyor Continuous Integration tool

Changelog

See Changelog

Issues

Feel free to open an issue if the tool needs to be enhanced or you have found a bug

Additional Information

By default all TestClasses are executed in parallel. TestMethods inside each TestClass are executed consecutively unless you specify plevel:TestMethod option. There is a possibility to group several TestClasses or TestMethods in order to execute them consecutively.

Create the following class in your test project and apply it to test class or method:

    public class TestGroupAttribute : Attribute
    {
        public TestGroupAttribute()
        {
        }

        public TestGroupAttribute(string name)
        {
            Name = name;
        }

        public TestGroupAttribute(string name, bool exclusive)
            : this(name)
        {
            Exclusive = exclusive;
        }

        public string Name { get; set; }
        
        public bool Exclusive { get; set; }
    }

In the below example two groups are defined to be executed in parallel. ClassA and ClassB tests will be executed consecutively.

[TestGroup("FirstGroup")]
ClassA { ... }

[TestGroup("FirstGroup")]
ClassB { ... }

[TestGroup("SecondGroup")]
ClassC { ... }

Specify attribute parameter Exclusive = true if there is a need to run some tests exclusively. This will ensure that no other tests are run in parallel at that time.

[TestGroup("ExclusiveGroup", Exclusive = true)]
ClassExclusive { ... }

Requirements

.Net Framework 4.5 or higher

paralleltestrunner's People

Contributors

sscobici avatar naveen-rajamohan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.