Setting up Network Suite and understanding distributed testing

Distributed testing is applied against impossibilities to launch and to run tests on the same computer. For example, if the total working time of the scripts is up sky-high or it is necessary to test simultaneously via different configurations, the distributed testing is necessary.

In this recipe, we will consider an example of making the necessary customizations for the distributed testing.

How to do it...

To set the stage for distributed testing, it will take two computers: the local one (hereafter, the Master computer) and the remote one (later referred to as Slave):

  1. Install TestComplete or TestExecute on the Slave computer. The versions of the applications on the Master and Slave computers should be the same.
  2. Add the Network Suite element to the main project of the current Project Suite (right-click on the name of the project and select Add | New Item). The main project is highlighted in bold font in the Project Explorer tab.
  3. Add the new Host computer to the NetworkSuite element (expand the NetworkSuite element, right-click on the Hosts element, and select Add | New Item...). Now, click on OK.
  4. Double-click on the added host Host1 and input the parameters for the Slave computer in the right-hand side section of the TestComplete window:
    • Address: Enter the name of the computer or its IP address
    • Login Mode: Choose the [Manual] option from dropdown
    • Domain, User name, and Password: Enter account parameters for the Slave computer
    • Base Path: Enter the path on the Slave computer to clone the current project to
    How to do it...
  5. Right-click on the edited host and select the Copy Project to Slave option. The Slave computer is now ready to work. Let's get the Master computer customized for the launch.
  6. Right-click on the Jobs project element, select the Add | New Item... option, and, click on OK.
  7. Now, right-click on the Job1 created element, select the Add | New Item... option, and click on OK.
  8. Double-click on the created Task1 task and, in the right-hand side part of the TestComplete screen, input its parameters as follows:
    • Name: Enter the name of the task
    • Host: Enter the name of the earlier created host, Host1, in our example
    • Remote application: Enter the name of the application, installed on the Slave computer
    • Test: Enter the name of the test which is bring launched
    How to do it...
  9. Now, it is possible to launch the selected test on the Slave computer. To this end, on the Master computer, right-click on the Task1 element and select the Run option.
  10. In the result, the Slave computer will run the test items of the project and the generated report in the MHT format will be opened; the whole of the process will be controlled and displayed on the Master computer.

How it works...

In distributed testing, the two types of computers that participate are:

  • Master: This is the main computer that will launch and control all of the launches
  • Slave: These are the computers that have the tests performed on them

When cloning a local project onto the Slave computer, the project folder will get copied by default. If it's necessary to copy some other folder, you should signify the same in the Source path field of the host. If, by default, the Source path column is not visible, it can be added by right-clicking on the columns' names, having selected the Field Chooser option, and then dragging-and-dropping the name of the column onto the heading of the hosts' tables.

How it works...

Jobs is a list of tasks that are executed simultaneously on several computers. Besides the parameters considered earlier, each job is comprised of some additional parameters which are given as follows:

  • Copy remote log: This is a condition which specifies when the log from the Slave computer should be copied onto the Master computer (always, never, or in case of errors)
  • Action after run: This is the action upon the end of the launch (closing the application, reboot, or shut the Slave computer down)
  • Use previous instance: This is the action against attempts to launch the application (TestComplete or TestExecute) when it is already up-and-running (use the available one, re-launch the application, or notify of the error)

There's more...

In some cases, you might need to perform additional actions to be able to use Network Suite. For example, configure Windows Firewall if it is enabled or make changes to an antivirus program. You can find the requirements for Distributed Testing using this link: http://support.smartbear.com/viewarticle/27241/.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.148.103.210