Assign Selenium NUnit Tests

Applies to QAComplete�14.4, last modified on August 06, 2024

You can use the NUnit (Selenium) Test Agent to automate running of both Selenium NUnit tests and ordinary NUnit unit tests that do not use Selenium modules. The procedure of assigning tests to Test Library tests is the same for both test types.

This instruction demonstrates how to assign a Selenium NUnit test to the Test Library test. Use the same procedure to assign an ordinary NUnit unit test to a test.

1. Configure the Test Agent

On the test host that will run the test, do the following:

  • Launch the Test Agent Settings tool in Start > All Programs > SmartBear > TestAgent > Test Agent Settings.

  • Click Advanced Settings.

  • Specify the path to the NUnit executable (nunit-console.exe).

2. Prepare your Selenium NUnit test

  • If needed, zip up your Selenium NUnit test project (together will all libraries and files the project uses).

  • Make a note of where the project or the archive (.zip file) is located.

    You can place the project (or the ZIP file containing the project) on a local folder on the test host where it will run or in a shared network folder. Make sure that the project can access all need test files. Alternatively, you can upload the archive file to the server (see below).

3. Prepare your Test Library test

  • In the Test Library, open an existing test for the NUnit test or add a new test.

  • Select a default host. If you skip this step, after you assign an automated test and click Save, the system will remind you that the Test Host is missing.

  • Save the changes.

4. Assign the Selenium NUnit test

  • On the Automations tab, click Add New to add an automated test.

    The Automations tab

    Click the image to enlarge it.

  • In the Agent drop-down list, select NUnit (Selenium).

    Note: If the default host assigned to the test does not support the selected automated testing tool, the test will not run.
  • You can leave the Title field blank, and the system will use the name of the attached Selenium test, or you can enter a meaningful title.

  • The value of the Timeout field tells the test runner how long to let the test run. Enter the timeout value in seconds. If the test takes longer than the given timeout, the test runner will stop running.

  • In Url, UNC or local path, enter the path to your NUnit project (.nunit) or to the archive (.zip) that contains your project.

    Below are examples of possible values:

    Value Description
    C:\MyTests\MyNUnitTest.nunit
    -- or --
    file:///C:\MyTests\MyNUnitTest.nunit
    The NUnit project (.nunit) located in the local folder on the test host.
    C:\MyTests\
    -- or --
    file:///C:\MyTests\
    The local folder on the test host where the NUnit project is located.
    Note: If there is more than one project in the folder, an error will occur.
    C:\MyTests\MyNUnitTest.zip
    -- or --
    file:///C:\MyTests\MyNUnitTest.zip
    The archive (ZIP) file that contains the NUnit project and is located in a local folder on the test host.
    \\Tests-PC\SharedFolder\MyNUnitTest.nunit
    -- or --
    file:///Tests-PC\SharedFolder\MyNUnitTest.nunit
    The NUnit project (.nunit) located in a shared folder on a computer in your network.
    \\Tests-PC\SharedFolder\
    -- or --
    file:///Tests-PC\SharedFolder\
    A shared network folder where the NUnit project is located.
    Note: If there is more than one project in the folder, an error will occur.
    \\Tests-PC\SharedFolder\MyNUnitTest.zip
    -- or --
    file:///Tests-PC\SharedFolder\MyNUnitTest.zip
    The archive (ZIP) file that contains the NUnit project and is located in a shared network folder.
    http://downloads/mytests.com/MyNUnitTest.zip A website URL path to the archive (ZIP) file that contains the NUnit project.
    Note: If the path you enter is incorrectly formatted, QAComplete will highlight the path in red.

    Alternatively, upload your zipped files using File Attachments. Click Browse and navigate to the zipped Selenium test files.

  • The Run Mode drop-down list specifies how the Test Agent will get your Selenium test files and run the test.

    • To copy test files to the test host and run the test in a temporary folder there, choose Copy the test project to and run it in a temporary folder in Run Mode.

    • To run the test directly in the folder where the test files are located, choose Run the test project in place (if possible) in Run Mode. If the test files are located in a shared network folder or in a local folder on the test host, the test agent will run the test directly in that folder.

  • To run a specific test case, test fixture, or namespace, enter its full name in Test Case, Test Fixture or Namespace.

  • Click Submit.

See Also

Assign Selenium JUnit Tests
Assign Selenium TestNG Tests

Highlight search results