Sie sind auf Seite 1von 6

OpenSTA quick start guide

Monday, 25 May 2009 09:35 Ajay Majgaonkar Software Testing - Test Automation Four years ago, I was given a task of setting up performace testing lab for one of the projects. I had no clue about performace testing. So I stated with the basics, I read through the documentation I can get my hand on. Next task was to suggest a tool we would use for performace testing of a web based application. After trying numerous free tools, I settled on OpenSTA as it offered me what I was looking for. I was looking for customizable and smart script. It is little difficult to script in OpenSTA initially but once I got a hand, it went real smooth. Here is a quick start guide I have prepared on OpenSTA. I have taken most of the documentation from OpenSTA.org documentation

This article covers


Commander Creating scripts Script modeler Recording and Modeling scripts Creating and editing Tests Result Analysis

OpenSTA as we all know is a Load and performance monitoring tool for web application environment. It works on http/s requests and not on UI, like many other free tools as well as big guns. OpenSTA has two sub components you should be aware of

OpenSTA Commander OpenSTA Script Modeler

Per OpenSTA documentation, HTTP/S Load is an ideal tool for performance testing Web Application Environments (WAEs). It supplies versatile software that enables you to create and run HTTP/S load Tests and production monitoring Tests to help evaluate target systems. Use it to assess the performance of WAEs before launch or after modifications to Web services. HTTP/S Load enables you to run Tests against the same target system within both load testing and production monitoring scenarios. Tests can include an HTTP/S load element to help you evaluate the performance of WAEs during development. Tests can also be used to monitor and collect performance data from WAEs after they go live within a production scenario. Results data is collected during Test-runs and can be displayed for analysis during or after a Test-run, enabling you to directly compare the performance of a target system within these two environments. Having a reliable Web site is an absolute requirement to compete in the e-market place and the only way to ensure this is to thoroughly test it before launch. HTTP/S Load provides you with a versatile solution to this requirement.

OpenSTA Commander

Collectors SNMP collector An SNMP Collector allows an SNMP Server(s) to be queried regularly (at specified time intervals) throughout the run of your test for specified numerical counter data it is exporting. The data collected is monitorable during the test and stored as part of that Tests result set to provide comparisons and a better overall picture of what is happening to the various systems involved in your Test. NT Performance An NT Performance Collector allows Windows NT Performance monitoring statistics to be queried regularly (at specified time intervals) throughout the run of your test for specified numerical counter data. The data collected is monitorable during the test and stored as part of that Tests result set to provide comparisons and a better overall picture of what is happening to the various systems involved in your Test. Scripts This part contains the actual scripts developed. We can add these scripts to the tests Tests This defines the test configuration. We can add scripts and collectors to the test. The no of iterations for the test, virtual users for the test can be set in the test An OpenSTA Test is a set of user controlled definitions that specify which Scripts and Collectors are included and the settings that apply when the Test is run. Scripts define the test conditions that will be simulated when the Test is run. Scripts and Collectors are the building blocks of a Test which can be incorporated by reference into many different Tests. Creating Scripts

In Commander select File > New Script > HTTP. Or: In the Repository Window, rightclick Scripts, and select New Script > HTTP. After you have created an empty Script it appears in the Repository Window, Scripts folder. Double-click the new Script FINDBYNAME , to launch Script Modeler.

Modeler

Script pane When you record Web activity using Script Modeler a .HTP file and a .ALL file are produced. The .HTP file, or Script, is displayed in the Script Pane and represents the browser requests recorded during the Web session. It contains the HTTP/S data written in SCL that is designed to be modeled and incorporated into a Web performance Test. Use the Script Pane to view and model the HTTP/S traffic recorded in your Scripts. The recorded HTTP/S traffic is represented using SCL which gives the recorded data structure and enables you to model the Script if required. A Script records HTTP/S requests issued by a browser during a Web session. It is dynamically linked to the HTML information represented in the Query Results Pane which records the WAE responses, the Web pages that are returned, in a .ALL file. Query result pane The Query Results Pane displays HTML and other data relating to the current Script that is stored in a .ALL file. This file is created at the same time and is directly related to, the corresponding Script, which is saved as a .HTP file during the original Web session recording. Some of the HTML information it contains, including Structure, Document Object Model (DOM) and Server Header are dynamically linked to the Script, which enables additional modeling capabilities. The data is organized into five categories represented by tabs at the bottom of the pane. Click on a tab to view the data corresponding to a selected URL command. The five categories are:

The HTML tab presents a browser view. It displays the Web page that corresponds to the URL command you selected in the Script Pane. The Structure tab displays the structure the selected Web page, including links, frames, images and other components which make up the page. The DOM tab displays Document Object Model, information URL composition and structure of a Web page. It presents a more detailed structural display of the diverse elements that comprise a Web page. The Server Header tab displays the HTTP/S response header fields sent from a WAE to the browser. Including the date the HTTP/S information was recorded, the kind of connection used and which Web pages were contacted. The Client Header tab displays the HTTP/S request header fields sent by the browser to a WAE.

Output pane The Output Pane is used to display results of Script compilation and to report the progress during the replay and compilation of a Script. This includes any errors and other status messages. Output Pane information is organized into four categories which are represented by the Query Pane Tabs at the bottom of the pane. Click on the tabs to view the information they contain. The categories are:

Check: This tab displays compilation progress and results. Replay: Click replay , in the Capture/Replay Toolbar to replay a Script. The replay progress is displayed here. Replay data is retained until you close the Script file. During this time you can view the replay data at any time by clicking on the Replay tab. Find In Files: Displays search results generated after using the Find In FIles button , in the Standard Toolbar.

Recording scripts Click the Record button , in the Capture/Replay Toolbar, or select Capture > Record, to begin the HTTP/S capture process. After you have completed the browser session, either close the browser window to end the recording, or switch back to Script Modeler and click the Stop button , in the Capture/Replay Toolbar.

Modeling script After creating a Script you can model it by using variables to more accurately simulate the behavior of real users when the Test that references the Script is run. Test pane Use the Test Pane to create and edit a Test, then apply the Task Group settings you require to control how they behave during a Test-run. Run and monitor the Test-run then display your results for analysis.

Result Pane

1 2 3 4 5

( 1 Vote )

Das könnte Ihnen auch gefallen