Recording a monitoring script

With HCL DevOps Test Embedded for Eclipse IDE (Test Embedded for Eclipse IDE), you can monitor a cyclic executive application that is running on a target computer and connected to Test Embedded for Eclipse IDE. You can apply user actions while you monitor the application and see the results in a dynamic graph.

Before you begin

Before you can monitor, complete the following tasks:

Procedure

  1. Open the C/C++ perspective.
  2. In the Project explorer view, right-click your project file and select Open Monitoring to open the Monitoring view.
    Important: The Open Monitoring menu is available only if you have a .mnt file that was created when you built your project. If you can't see this menu, build your project.
    Note: In the Monitoring view, you can view all the global variables of your application that are not arrays. It is directly connected to the application that is running in background.
  3. Right-click your application .exe file in the Project Explorer view and select Run As > Instrumented Application to start your application.
  4. Click Reconnect in the Monitoring view, under Application to connect to your application.
    Note: You can stop the application whenever you want by clicking the Stop button but you must always restart your application before clicking Reconnect.
  5. Select the variable values that must be monitored in your application:
    • In the Read value column, select the variables that the application must read and click Read.

      By clicking Read, the variable value displays in the Read Value column.

    • In Recorded value, select the variables that must be read cyclically in the application and click Record. You can change the read process frequency in the Record list. The selected value is a multiplier factor that applies to the cyclic read frequency.
      Note: The Recorded value column is displayed only if you set the Cyclic read allowed option to Yes in the variable monitoring build settings. If the cyclic read is not allowed, the Record is disabled. For more details, see Configuring the build and the monitoring settings.
    • In the Write value column, enter new values and select the variables that the application must read and click Write.

      By clicking Write, the variable value displays in the Read Value column.

      Note:
      • Some write values can't be modified if you enabled the bit fields. In this case, the values are presented in gray.
      • A control check applies to the write values. The column cell turns red if you enter a value with an invalid format, it turns yellow if the length of the value exceeds the size that is defined for the type of value.
    A graph view is displayed when you click Record so that you can examine the variable values usage in real-time in your application while the script is recording. You can work with the different menus that are available in the toolbar of the Graph view to change the graph format. In the Outline view, you can select the variables that are displayed in the graph. You can also change the color of the curves in the graph.
  6. Click Stop Recording to stop the recording of the monitoring script.
    When you stop the monitoring process, the graph is saved in a .test_mnt file in your project.
  7. Click Add/Remove and in the Add/Remove dialog box that opens, select the variable values to add or remove from the monitoring view.
    Note: The default values that are displayed in the Monitoring view are the global variables. You can remove the values that are not used or add values of an array to monitor, see how to proceed in step 8.
  8. In the Add/Remove dialog box, click New Element and enter the element number of the array in the New Element dialog box. Then click OK to add it to the Monitoring view.
    The variable is added to the Variable column of the Monitoring view and is labeled with the following name: <arrayname>[<index>].
  9. If your application is rebuilt and the list of global variables changes, the variables in the Monitoring view might be inaccurate, so click Reload to update the Monitoring view.
    All the initial selections are lost, you must select the variables and enter their values again.
  10. Double-click the .test_mnt file in the graph editor or right-click the file and select Open with > Text editor to see all the variable values that the application read or wrote during the monitoring process.
    Monitoring view

Results

All the completed actions and the updated values in the Monitoring view are automatically saved in a monitoring script .test_mnt file that can be modified and replayed.

What to do next

You can modify and run the monitoring script to compare the data received from the application with the reference data in your script. See Modifying the recorded data in a monitoring script.