Configuring unit testing tools for source control deliveries

You can configure the IBM® Engineering Workflow Management client for Microsoft Visual Studio IDE to run a unit test tool on Visual Studio projects before you deliver changes to a Engineering Workflow Management source control repository. You can set up your team's process to not allow source code delivery if the unit test fails.

About this task

The project administrator normally configures this precondition. You can set up the precondition to use the Microsoft MSTest tool or NUnit test tool.

Procedure

  1. In the Eclipse client, in the project area editor, click the Process Configuration tab.
  2. In the Configuration area, expand Team Configuration and click Operation Behavior.
  3. In the Operations area, expand Source Control and click Deliver (client).
  4. Select the Preconditions and follow-up actions are configured for this operation check box.
  5. Click Add.
  6. In the Add Preconditions dialog box, select Require Unit Test Run (Microsoft Visual Studio Client) and click OK.
  7. To use the Microsoft MSTest tool, complete the following steps:
    1. In the Select the Tool to run drop-down menu, select MSTest.
    2. In the Tool Home field, type the location of MSTest.exe. The location can be an environment variable, such as ${MSTEST_HOME}.
    3. In the File to load field, specify the path of the MSTest metadata file. The path can be an absolute path, a relative path, or an environment variable.
    4. In the Arguments field, type any additional arguments to pass to the MSTest.exe command.
  8. To use an NUnit tool, complete the following steps:
    1. In the Select the Tool to run drop-down menu, select NUnit.
    2. In the Tool Home field, type the location of nunit-console.exe. The location can be an environment variable, such as ${NUNITBIN_HOME}.
    3. In the File to load field, specify the path of the NUnit test suite project file. The path can be an absolute path, a relative path, or an environment variable.
    4. In the Arguments field, type any additional arguments to pass to the nunit-console.exe command.
  9. Click Apply changes.
  10. Click Save.

What to do next

When this precondition is set, before any change sets are delivered, the IBM Engineering Workflow Management client for Microsoft Visual Studio IDE runs the configured unit test tool. The results of the unit test run are displayed in the Team Advisor view. If the unit test runs without test failures, the delivery proceeds and no errors are displayed in the Team Advisor view. However, if the unit test runs with test failures, the results are displayed in the Team Advisor view and the delivery does not proceed.

The Team Advisor view includes a link to the results file.


video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki