This tool can be used to record browser activity using Selenium IDE, drive the recorded script with a csv file (users,passwords, etc ...) and run the same test as functional and load.
download from here
Steps:
Run PushToTest
Select Tools > Designer menu item
Select Script Type: Selenium from TestObject Window
Click on Record - enter a URL, select Firefox browser, and click OK
Perform your Browser actions
Click on 'End Record' when you're done
To drive from a csv file, select the Data Icon in the middle of the TestObject Window (looks like a book, to the right of the light bulb icon)
Select the 'Get Next Row' radio button
Select a .csv file, where the first line contains variable names:
EMAIL,PASSWORD
you@email.com,passwd9
The CSV file, when loaded, is presented in the Data tab in the bottom of the TestObjectWindow
Click and Drag a field from the CSV (in the Data tab) to a Value field in the Action window above - the value already there will be replaced by "$EMAIL" (for example)
Click the Play Icon to replay the recording and make sure it works
Select File > Save to save your recording (will be saved as a .ds file)
To Convert this functional test into a Load Test:
From PushToTest Main Window, select File > New Load Test
this brings up another Window - the PushToTest TestMaker Editor
Select the Use Cases tab
for 'Resource', Browse to select the .ds file you just saved
for 'Test Type', select 'Designer Script'
for 'Test Name', name your test
for 'Command Language', 'sahi'
for 'Browser', 'SahiHtmlUnit'
for 'Instance', you can leave this blank
Click on the 'Add DPL' link
for 'Data Source', browse for your .csv file
for 'DPL Type', select 'Hash DPL' (the default)
for 'DPL Name', give it a name or leave as untitled
for 'Action' select 'Get Next Row of Data'
Click on the 'General' Tab
Add Virtual Users Levels, e.g.
begin with one level for 1 user for 1 minute
add another level with 2 users for 1 minute
add another level with 4 users for 1 minute
etc ...
Click on the Save icon in the Left pane - (will be saved as a .scenario file)
Click on the Play icon in the left pane (to the right of the Save icon) to run the test
When the test is done, another Window pops up with all sorts of graphs and charts
Re-Open and explore other scenario options
Open the Scenario from the Main PushToTest Window through the Tools > Editor menu item
No comments:
Post a Comment