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:
- Create or import a project that contains the source code file of an application written in the C language. You can optionally use the sample project that is delivered with Test Embedded for Eclipse IDE to get started with the monitoring feature. For more information, see Importing DevOps Test Embedded examples.
- Enable monitoring in your application. See Enabling monitoring in your application.
- Enable the monitoring feature and configured the build settings. See Configuring the build and the monitoring settings
- Build your project. For more information, see Building a project for monitoring.
- Start your application.
Procedure
- Open the C/C++ perspective.
-
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.
- Right-click your application .exe file in the Project Explorer view and select to start your application.
-
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.
-
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. - In the Read value column, select the variables
that the application must read and click
Read.
-
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.
-
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.
-
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>].
-
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.
-
Double-click the .test_mnt file in the graph editor or
right-click the file and select Text editor to see all the variable values
that the application read or wrote during the monitoring process.