Test Case Definition
To define the test case follow the below given steps:
Select the Suite LoginAPPJ2SESuite from the Suites Tree.
Choose the menu item
New Test Case under the menu File. This opens the Performance Test
Case Creation screen.
Enter "PERF-SampleAPI-001"
in the Case ID field.
Enter "Sample API
testing case" in the Description
field.
Select the Severity
as "ShowStopper" from the combo box.
Enter the Description
for test run as "Sample API Run".
Enter the Maximum
Time Limit as "1800".
Ignore Application Control
Parameters.
Click Test
Conditions button and choose the tab Check
Condition.
Select the option
Collect Data after fixed time delay (WAIT)Wait Time as 20
and select the Agent Name as "M1"
and specify the
Click Commit
To List and click OK.
Click Next.
In the Data
Collection screen, choose the API
Performance Data Collector [API] option.
Click the Load
API option to load the API com.adventnet.testtools.common.util.FileUtil.
Set the required classpath
and click OK.
Select the Instance
Type as "Static".
Configure the method
arguments as follows:
Select the method
countOccurenceInFile(String, String)Configure
Arguments button. Specify the first string argument as "README.html"
and the second string argument as "QEngine". Click OK.
from the method list and click
Select the method
doesFileExists(String) from the
method list and click Configure Arguments
button. Specify the string argument as "README.html" and click
OK.
Select the method
getLinesInFile(String) from the
method list and click Configure Arguments
button. Specify the string argument as "README.html" and click
OK.
Select the method
getTimeStamp() from the method
list.
Select the method
isStringInFile(String, String)
from the method list and click Configure
Arguments button. Specify the first string argument as "README.html"
and the second string argument as "QEngine". Click OK.
Select the Agent Name
as "M1".
Enter Number
of Users as "1".
Enter Number
of Samples as "2".
Enter Sample
Interval as "10" seconds.
Click Commit
To List and click OK.
Click Finish
button. The automated test case PERF-SampleAPI-001 is added onto the Suites
Tree.