Example: Logging measurements to the results database
In this example, you use a background test and the log measurement action to act as a custom probe for the system under test.
This example gathers data about the bytes sent and received by the system. While this data can also be gathered by a probe, this example shows you how to gather the information manually.
Creating a measurement test
- From the Test Factory perspective, create a test that is named byteMonitor ().
-
Add a Run Command action to the test and open it.
-
Switch to the Store tab and store the two numbers into separate tags that are called
BytesSentandBytesReceived. - Close the test action.
-
Check that the test is working as expected. Add a normal Log action, and use that action to log the values that are captured in the
BytesReceivedandBytesSenttags to the console. Then, run the test, and check that it works. If it does not, check the preceding steps to make sure that everything was entered correctly.
Logging measurements to the results database
- From the Test Factory, delete or disable the Log action. Then, add a Log Measurement action () after the Run Command.
-
Now set up the Log Measurement action. First, you indicate what data you want to capture. Click Add in the Counters section to add a value to monitor. A new empty row is added to the table of data values.
-
Save and close the
byteMonitorTest.




