Creating a system test

The System Testing Wizard helps you create a new System Testing test node in your project.

Basically, a System Testing node contains a .pts test script as well as a set of Virtual Testers for message-based testing.
Note: System Testing for C does not support paths or file names which contain spaces. When naming files or directories, make sure that these do not contain any spaces.
To create a System Testing node:
  1. Enter the name of the new System Testing test node.
  2. On the Test Script Selection (1/7)page, select the source files that are used to build your application among the source files that are currently in your workspace.
    1. Select whether you want to create a new .pts test script file, or if you want to reuse an existing test script. In both cases you will need to enter a name for the .pts test script.
    2. Next, use the Add and Remove buttons to build a list of interface files. The Interface Files List must contain .h header files that define the message structures used by your application.
    3. Click Next to continue.
  3. On the Include Directories List (2/7) page, specify the directories that contain include files that can be required by the interface files and the messaging API.
    1. Use the Add and Remove buttons to build a list of include directories. These are the directories that contain files that are included by your application's source code. If necessary, you can use the Up and Down buttons to indicate the order in which they are searched.
    2. Click Next to continue. If you chose to use an existing .pts test script, this brings you straight to step 5.
  4. If you chose to create a new .ptstest script, on theGenerate New Test Script (3/7) page, specify the message type to be used by the test.
    1. Message type: Select the type definition that will be used for messages.
    2. If you want to use an existing .hts adaptation layer file choose Select an adaptation layer file and add your .hts files to the list.
    3. If you want to create a new messaging API for the test, select Create a messaging APIand enter the following information:
      • Generate with INSTANCE blocks: Select this option if you want INSTANCE statements to be created in the .pts test for a multi-process or multi-threaded test driver.
      • Base filename: Specify the name of the generated API files. The wizard generates .c, .h and .hts files based on this filename.
      • Directory: Specify the location where the API files will be generated.
    4. Click Next to continue.
  5. On theGenerate New Test Script (4/7) page, change the configuration settings of the test node or clickNext.
  6. On the Virtual Tester Driver Creation (5/7) page, you can create a set of virtual testers.
    1. Use the New button to create and name a new virtual tester. You can create and duplicate several virtual testers. You can also skip this page and decide to create your virtual testers later on.
    2. When a virtual tester is selected, in the General tab, specify an instance and target deployment port for the virtual tester.
      • VT Name: This is the name of the selected virtual tester. This must be a standard C identifier.
      • Implemented INSTANCE: Use this box to assign an INSTANCE statement, defined in the .pts test script, to the selected virtual tester. This information is used to deploy the virtual tester. Select Default to manually specify the instance during deployment.
      • Target: Select the Target Deployment Port that will be used for the selected Virtual Tester.
    3. In the Scenario tab, select one or several scenarios as defined in the .pts test script. During execution, the Virtual Tester plays the selected scenarios.
    4. In the Family tab, select one or several families as defined in the .pts test script. During execution, the Virtual Tester plays the selected families.
    5. If necessary, click the Configure Settings button to change the configuration settings for the selected virtual tester.
    6. The API source files list displays the generated messaging API source files. Use the Add or Remove buttons to modify this list if your messaging API requires more files.
    7. Click Next to continue.
  7. On theDeploy Configuration (6/7)page, specify how to deploy the virtual testers onto host and target computers. Use the Add, Remove buttons to modify the list. Each line represents one or several parallel executions of a virtual tester assigned to an instance, target host, and other parameters.
    • Number of Occurrences: Specifies the number of simultaneous executions of the current line.
    • Virtual Tester Name: Specifies one of the previously created virtual testers.
    • INSTANCE: Specifies the instances assigned to this virtual testers. If an instance was specifically assigned in the Virtual Tester Configuration box, this cannot be changed. Select <default> only if no INSTANCE is defined in the test script.
    • Network Node: This defines the target host on which the current line is to be deployed. You can enter a machine name or an IP address. Leave this field blank if you want to use the IP address specified in the Host Configuration section of the General Settings.
      Note: If the IP address line in the Host Configuration settings is blank, then the Virtual Tester Deployment Table retrieves the IP address of the local machine when generating the deployment script.
  8. Click the Advanced Options button to add the following columns to the Virtual Tester Deployment Table, and to add the Rendezvous... button.
    • Agent TCP/IP Port: This specifies the port used by the System Testing Agents to communicate with HCL OneTest Embedded.
    • By default, System Testing uses port 10000.
    • Delay: This allows you to set a delay between the execution of each line of the table.
    • First Occurrence ID: This specifies the unique occurrence ID identifier for the first Virtual Tester executed on this line. The occurrence ID is automatically incremented for each number of instances of the current line. See Communication Between Virtual Testers for more information.
    • RIO filename: This specifies the name of the .rio file containing the Virtual Tester output, for use in multi-threaded or RTOS environments.
    • If necessary, click the Rendezvous Configuration button to set up any rendezvous members.
    • Click Next to continue.
  9. Review the options in theTest Generation Summary (7/7)page and use theBack button if necessary to make any changes.
    • Test Script File: indicates the name of the .pts test script.
    • Interface Files:lists the interface files defining the communication routines of your application.
    • Included Directories:lists the directories containing files included by your application.
    • Virtual Testers:lists the virtual testers that are to be deployed by the test.
  10. Click the Finish button to launch the generation of the System Testing node with the corresponding virtual testers.

The wizard creates a test node with the associated test scripts. The test node appears in the Project Explorer.

If you chose to create a new .pts test script, you can now complete the generated System Testing test script in the Text Editor and then configure and deploy your virtual testers.

Refer to the System Testing language reference for information about the System Testing script language.

Related Topics

Activity Wizards | Configuring Virtual Testers | Deploying Virtual Testers | Setting Up Rendezvous Members | INSTANCE | SCENARIO | FAMILY | System Testing settings | System Testing supervisor |