How do I append generated Cumulative Load Timings with in TimeforTestInstructions block to a Dataset
This command demonstrates to create the data set with the values saved in the "timerForTestInstructionsBlockStart" and "timerForTestInstructionsBlockEnd" block. In the data definition it is mandatory to have the one column with name "response time" to store the response times that are generated in the "timerStart-End" block.
In the solution shown below, you will see how to Capture the Response timings for set of Instructions with in "TimeforTestInstructions" block to a Dataset.
Solution:
# | Command | Target | Value |
---|---|---|---|
Create a DataSet in Memory |
|||
1 | ddCreateDataset |
AppendResponseTime |
CapturePerformance(W) |
Add a specified number of rows to the dataset in memory | |||
2 | ddAddRows |
AppendResponseTime |
1 |
This command is the start of block commands for calculating the time it took to executing the commands until the "timerForTestInstructionsBlockEnd" is encountered | |||
3 | timerForTestInstructionsBlockStart |
#{LogLevel} (Get the Value from the UDV) |
MS |
Launch the Application |
|||
4 | open |
https://ww.eureqatest.com/training /insurancecal/prod.html |
|
Verify the Visibility of a Header Logo |
|||
5 | waitForVisible |
//div[@id="pageheadersection"]/h1 |
|
This command creates the data set with the values saved in the "timerForTestInstructionsBlockStart" and "timerForTestInstructionsBlockEnd" block |
|||
6 | ddAppendInstructionBlockTimingToDataSet |
AppendResponseTime |
ResponseTime |
This command indicates the end of the Block | |||
7 | timerForTestInstructionsBlockEnd |
||
To Persist the modified data set to the Data File |
|||
8 | ddPersistDatasetToDataFile |
AppendResponseTime |
CapturePerformance(W) |
Tips, Tricks, Gotchas & Best Practices:
- Creating a DataSet is mandatory.
- You should use the same DataSet name which is created by using "ddCreateDataSet" command.
- The value of log level can be any number between 1-7 (ALL -1 , DEBUG - 2, INFO -3, WARN -4, ERROR -5, FATAL -6, OFF -7).
- For the command "timerForTestInstructionsBlockStart", in the value field you need to provide the time unit as : M - Minutes/ S - Seconds/ MS - MilliSeconds/ H - Hours.
- For the command "timerForTestInstructionsBlockStart", In the data definition it is mandatory to have the one column with name "ResponseTime" to store the response times that are generated in the timerStart-End block. AttributeName in the value field should match with attribute name of the data definition that the dataset is mapped to.