Running the Network Suite, Jobs and Tasks

Applies to TestComplete 15.62, last modified on March 19, 2024
The Network Suite functionality is deprecated. We don’t recommend using it for distributed testing. Consider using a CI/CD system for managing distributed tests. See Migrating Distributed Tests to CI/CD Systems for details. In case you need to run web tests on multiple environments in parallel, you can also try using your project’s Execution Plan.

This topic describes how you can run and stop network suite, jobs and tasks.

Basic Concepts

With TestComplete, you can run the whole network suite, network suite jobs or individual tasks of a job:

  • Running of a task means that TestComplete runs a slave project on a remote computer. The target computer and the project are specified by the task properties.

  • Running of a job means that TestComplete runs all the tasks that belong to this job and are enabled.

    All the tasks of a job run concurrently. A job runs until all the enabled tasks are completed.

  • Running of a network suite means running of all active jobs that belong to this suite.

    TestComplete runs jobs one after another in the order they are listed in the Jobs editor (to view this editor, right-click the NetworkSuiteView > Jobs node in the Project Explorer panel and then click Edit).

    A network suite runs until all its active jobs are completed. Each job, in its turn, runs until all its enabled tasks are completed.

Before running a task, job or network suite, TestComplete will verify that the needed tasks can start, and if verification is successful, TestComplete will initiate the actual run. For detailed information, see Verifying Tasks, Jobs, Hosts and Network Suites.

Notes:

  • During distributed testing, TestComplete runs in silent mode on slave computers with the debugger turned off. As a result, it ignores  breakpoints in slave projects.

  • If the 64-bit version of TestComplete/TestExecute is available on a slave machine, it will be used to run tests. Otherwise, the 32-bit one will be used instead.

If your distributed test fails due to the “Cannot run the remote project” error, consider the following:
  • If your tasks execute projects or project suites, make sure that those projects or project suites are not empty and have at least one enabled test item. For more information on test items, see Test Items Page (Project Suite Editor) and Execution Plan Editor.
  • If your tasks run script routines, make sure that those script routines do not contain any syntax errors. For more information on script syntax, see Checking Syntax.

Requirements

In order for the test engine to run network suites, jobs and tasks on remote computers, these computers and slave projects must meet the requirements described in the Distributed Testing - Requirements topic. Please read this topic before running a network suite, job or task.

Running and Stopping Network Suite, Jobs and Tasks

You can run network suites, jobs and tasks --

As Test Items

  • Select View > Organize Tests from the main menu of TestComplete. This will open the project’s Execution Plan editor.

  • Drag the desired job or task node or the NetworkSuite node from the Project Explorer to the Execution Plan editor. This will add a new test item that runs that job, task or the entire network suite.

  • Select FileView > Save from the TestComplete main menu to save the changes.

When you run a project, TestComplete runs the selected job, task or the network suite.

Note: By default, TestComplete marks all the added test items as test cases and includes their results in the Summary report. However, although your network suite, jobs and tasks can also be marked as test cases, the results of the tests executed on remote computers will not affect the results of the test case in the Summary report.

From Keyword Tests and Scripts

You can start and stop the network suite, a job or a task from script code or keyword tests. Script routines and keyword tests let you implement more complex logic than normal top-to-bottom running. For instance, you can check the job or tasks state or change the job’s order according to specific conditions.

To run the network suite, or a job or a task from keyword tests, use the Run Test operation. When you add it to your test, TestComplete displays the dialog, in which you can choose the network suite or the desired job or task.

To run the network suite, jobs or tasks from script code, use the Run method of the NetworkSuite, Job or Task object. For more information on this, see Controlling Network Suites From Tests.

From the TestComplete Command Line

You can automate your distributed tests by running network suites, jobs and tasks from the TestComplete command line. To learn how to do this, see TestComplete Command Line.

From the TestComplete UI

To run the network suite

To run the network suite in the master project, right-click the NetworkSuite project item in the Project Explorer panel and select Run from the context menu. TestComplete will verify that all the needed tasks can be started and then initiates the run.

To run a job

Jobs are run when you execute a network suite. You can also run individual jobs. To do this:

  • Right-click the desired job in the Project Explorer panel and select Run from the context menu.

-- or --

  • Right-click the desired job in the Jobs editor and select Run from the context menu.

When you run an individual job these ways, TestComplete ignores the job’s Active property and always runs the job.

Note: You cannot run a job if a task of another job is running.
To run a task

Tasks are run when you execute the job to which these tasks belong. You can also run individual tasks. To do this:

  • Right-click the desired task in the Project Explorer panel and select Run from the context menu.

-- or --

  • Right-click the desired task in the Tasks editor and select Run from the context menu.

To run the tasks of a job in a series:

  • Right-click the desired job in the Project Explorer and choose Edit from the context menu. This will display the Tasks editor in the Workspace panel.

  • In the editor, select the desired tasks (use Ctrl-click or Shift-click for multi-selection) and then choose Run from the context menu.

When you run a task these ways, TestComplete ignores the task’s Active property and always runs the task.

Note: You cannot run a task of a job if a task of another job is running.

Stopping the Running Test

To stop the running test, select TestView > Stop from the TestComplete main menu.

You can also stop the tasks, jobs and network suite from script code by calling the Stop method of the appropriate scripting object (Task, Job or NetworkSuite).

To stop a task, job or the network suite from a keyword test, use the Run Code Snippet or Call Object Method operation that will call the Stop method of the appropriate object.

Monitoring the Run and Analyzing Results

To get information on the test execution, switch to the Run State page of the Network Suite editor. If the Activate the Run State page when running tasks option is enabled, TestComplete automatically activates the page after the run starts.

The Run State page displays the name of the current job and the list of its tasks that are being executed on the slave hosts. For each task, the page displays the remote desktop window of the slave host where the task is running and the task’s status. Thus, you can monitor the task execution directly from TestComplete.

All network suite run results are accumulated in the Test Log. For detailed information on this, see Network Suite Log.

See Also

Distributed Testing
Verifying Tasks, Jobs, Hosts and Network Suites
Distributed Testing - Requirements
Network Suite Editor - Run State Page

Highlight search results