Distributed Tests
To setup for the original method of distributed testing do the following:
1. Select 1 machine that will be the master on which you will develop the tests and Run: this will be your RepositoryHost and the other machines will be the slave load generating machines.
2. On EACH of your slave machines, configure the OpenSTA Name Server by right clicking on the name server icon in the task bar and selecting Configure. Set the 'Repository Host' to the IP/Name of your master(RepositoryHost).
3. On the master(RepositoryHost) machine, create a test. Add your script to the Task group. Set the 'Host' to the IP of one of your slave machines. Set the VU to the load you want that slave to generate. Set the 'Start' to a scheduled time.
4. Now right-click on the task you've added and select 'Duplicate Task Group'. Set the 'Host in the duplicated task to another slave's IP. Optionally, you can modify the load.
5. Repeat Step 4 for all the slaves.
1 Introduction
OpenSTA is a free and opensource load testing tool available through Sourceforge.
OpenSTA graphs both virtual user response times and resource utilization information from all Web Servers, Application Servers, Database Servers and Operating Platforms under test, so that precise performance measurements can be gathered during load tests and analysis on these measurements can be performed.
OpenSTA version 1.4.4 can be downloaded from http://opensta.org/download.html
2 Minimum System Requirements for Installation
1. Hardware Specifications
- Microsoft Windows NT 4.0 (with at least service pack 5) or later
- Windows Installer for Windows NT 1.1, instmsi.exe. This is not part of the basic installation of Windows NT 4.0. Instructions for downloading are available from http://OpenSTA.org/.
- An up-to-date HTML Help system, the update may be downloaded from msdn.microsoft.com; search for Microsoft HTML Help.
- OpenSTA also requires version 2.5, or later, of Microsoft Data Access Components MDAC_Typ.exe. Visit http://OpenSTA.org/ for download details.
When starting the application you might get some errors due to Firewall.
1. Click Start > Programs > OpenSTA > OpenSTA Commander.
The following screen will get displayed.
2. Right Click on ‘Scripts’ folder and select New Script->HTTP
3. Enter a name for the newly created script. Say ‘NEWSCRIPT1’.
4. Double click on the newly created script. Now the Script Modeler will be opened.
The desired browser can be set at Script Modeler->Options->Browser.
5. Click on the ‘Record’ button.
6. Now the Browser will be opened.
7. Select the URL from address bar or type in the address.
8. Do the specific action ( For eg:- Logging in and Logging out of the application).
9. Close the browser.
Now the script recorded will be displayed in Script Modeler.
10. Click on the ‘Syntax Check’ icon to check for any syntax errors in the script.
4 Creating Collectors
1. Right Click on ‘Collector’ folder and select New Collector->NT Performance.
2. Enter a name for the newly created collector.
3. Double click on the new collector. Now the ‘Edit Query’ Window will get opened up.
Enter a name for the collector.
4. Select ‘Browse Queries’ and the following window gets opened up. Here we can select the computer, performance objects and counters.
5. After selecting the counters, and clicking Ok button, the counters will be displayed in the NT performance queries. More counters can be added and removed using buttons at the top.
5 Creating a Test.
1. Right Click on ‘Tests’ folder and select New Test->Tests.
2. Enter a name for the test. Say TEST 1
3. Double click on the new test created. The following screen will be displayed.
4. Now expand the Scripts/Collector folder in the left tree
5. Drag and Drop the Script/Collector to the Task colum. For eg:-Drag and Drop ‘TEST’ to ‘Task 1’ column.
Similarly any no: of Scripts/Collector can be assigned to a task.
7. Task Termination, Iteration and delay can be set here.
8. Click on VU’s Column. Here we can set the no: of Virtual Users for running this task.
9. After making the desired settings, select the ‘Play’ button at the top.
Now we can see the task with status ‘Running’ in the grid.
10. You can also select the ‘Monitoring’ Tab to know the current status of the test.
11. Finally the results will be displayed on the ‘Results’ Tab. You get a lot of result reports you can watch.
12. The results can be exported to excel by right clicking on the Results window and selecting ‘Export to Excel’ Feature.
1. Open a script in Script Modeler.
2. Select Variable->Create option. The Variable Creation window will get displayed.
3. Enter Name, Scope, Order and Type.
4. Select ‘Next’. The following window will get displayed.
5. Select Generate Values. The following window is displayed.
6. Here we can generate variables. For eg:- Here I am generating 100 variable data, starting from User1, User2,…..User100 for 100 VU’s Login scenario.
7. Select OK button. Now we can see the generated values in the in the Values List.
8. Select Finish. Now the variables generated can be viewed in the script.
Similarly variables for Password can be also created. Here I have created a variable name PASSWORD using the above steps for 100 VU’s Login scenario. The variables for Password will be also displayed in the ‘Definitions’ section same as shown above.
9. Now paste the following Mutex elements in the definition section in the script.
CHARACTER*512 MY_USERNAME, SCRIPT
CHARACTER*512 MY_PASSWORD, SCRIPT
10. Also paste the following Mutex Commands before the PRIMARY POST URI entry.
ACQUIRE MUTEX "LOGIN"
NEXT USERNAME
NEXT PASSWORD
SET MY_USERNAME = USERNAME
SET MY_PASSWORD = PASSWORD
RELEASE MUTEX "LOGIN"
11. Now search for the values entered for User name and Password while creating the script.
12. Replace those values with the variable names set in Mutex commands(See Step 10). This may have to be replaced in more than 1 location.
13. Select Save. Now the script is ready to run with 100 VU’s each using distinct Username and Password.