Rational Performance Testing Essay Example
Rational Performance Testing Essay Example

Rational Performance Testing Essay Example

Available Only on StudyHippo
  • Pages: 18 (4908 words)
  • Published: August 16, 2018
  • Type: Essay
View Entire Sample
Text preview

The text below is a tutorial in the Hello World series introducing IBM Rational Performance Tester and its basic features. The tutorial covers recording automated performance tests, using data-driven techniques for randomization, replaying tests, and analyzing real-time performance reports. By the end of the tutorial, you will have the skills to identify the root causes of performance issues in your applications using Rational Performance Tester. This series is tailored for beginner developers who want a comprehensive hands-on introduction to IBM software products. Each tutorial includes simple exercises and detailed instructions to familiarize yourself with a specific product's components and usage.

After finishing a tutorial in the Hello World series, you will have acquired enough knowledge about the product to start exploring and using it independently. This tutorial incorporates hands-on exercises to help you get familiar with Rat

...

ional Performance Tester. ; Copyright IBM Corporation 1994, 2008. All rights reserved. Page 1 of 26 developerWorks; ibm.

com/developerWorks Tester is a tutorial that offers an in-depth guide on recording and automating performance tests, enhancing them with data-driven techniques, integrating them into performance schedules, and analyzing real-time reports to identify performance issues. The estimated duration of the tutorial is three hours. Its main goals are to familiarize testers who are new to test automation and Rational Performance Tester with the basic features of the tool and empower them to effectively detect and assess performance problems in applications.

If you have access to the required environment, you can practice the steps while taking the tutorial. However, if you don't have access, you can still read the tutorial and watch the animated demos. Keep in mind that without access to the required environment, yo

View entire sample
Join StudyHippo to see entire essay

won't be able to try the steps on your own.

The most convenient way to access the tutorial environment is through the Rational Performance Tester online trial system designed specifically for this tutorial.

Alternatively stated:
You can practice the steps while taking the tutorial if you have access to the required environment. If not, you can still read and watch demos but won't be able to try them yourself. The most convenient way to access is through a dedicated online trial system for this tutorial.The trial system uses the Citrix Access Platform to connect your workstation with a remote server. This server runs Rational Performance Tester, WebSphere Application Server 6.0, and the sample application being tested.

If you want to set up the tutorial environment on your own computer, use the Hello World: Rational Performance Tester (for downloadable trial code) version of this tutorial designed for that purpose.

To watch animated demos for this tutorial, make sure JavaScript is enabled in your browser and install Macromedia Flash Player 6 or a newer version.

The text states that developerWorks tutorials offer animated demos, which visually demonstrate the tutorial steps. To access these demos, users can click on the "Show me" link, which will open a new browser window. The demos feature a navigation bar at the bottom of the screen, allowing users to pause, exit, rewind or fast-forward through the demo. This information is intended for first-time users of these animated demos.

All rights reserved. ibm.com/developerWorks developerWorks® The demos require a screen resolution of 800 x 600 pixels. If your screen resolution is lower or if it is the same but your screen size is smaller, you will need to scroll

to view some parts of the demo. Also, please make sure that JavaScript is enabled in your browser and that you have Macromedia Flash Player 6 or a newer version installed to properly view the demos.

The text provides an overview of IBM Rational Performance Tester, also known as Performance Tester. This tool is used for creating, executing, and analyzing performance tests of Web-based applications. Its main purpose is to help development teams ensure the scalability and reliability of their applications before deployment. Performance Tester offers features specifically designed for beginner load testers and supports testing with multiple web browsers like Internet Explorer, Mozilla, and Firefox. Test results can be recorded on both Windows and Linux operating systems. The tests are organized in a tree-based editor that can display underlying details when necessary. Test scripts are grouped together in various combinations to simulate the user population.

At execution time, you have the option to specify the number of simulated system users. Throughout the test run, real-time reports are provided that are easy to read and update. These reports highlight any bottlenecks that may exist based on metrics like round-trip performance, transaction rates, and system diagnostics. Performance Tester can also be used to identify the root cause of poor performance problems, from the hardware- or software-component level, through advanced resource monitoring and response-time tracking. This tutorial primarily focuses on testing a J2EE, Web-based application, but Performance Tester can be used to test any Web-based application. Additionally, Performance Tester can be extended to test the performance of other application types such as Siebel, SAP, and Citrix. (see Resources).

Setting up the tutorial environment Rational Performance Tester © Copyright IBM Corporation

1994, 2008. All rights reserved. Page 3 of 26 developerWorks® ibm. com/developerWorks As previously mentioned, the easiest way to access this tutorial is through the online trial system developed using the Citrix Access Platform.

The trial system allows you to use Performance Tester, WebSphere Application Server 6.0, and the Adventure Builder sample application for free. It also reduces the time needed for installation and configuration in the tutorial. Once you have registered for the online trial system, installed the Citrix Metaframe Presentation Server, and logged into the server, you can start using it. Performance Tester will open in a Citrix client session and will look like it is running on your computer. You can interact with it as if it was installed locally. The countdown clock on the Rational Test Drive Environment Web page will show how much time you have left in your session.

You will need to install and configure Rational Performance Tester and WebSphere Application Server 6.0 on your workstation if you decide to set up the tutorial environment locally. Please note that the Adventure Builder sample application used in this tutorial is only compatible with WebSphere Application Server 6.0, not 6.1.

In order to start, you should allocate extra time to create and set up a project to store your test artifacts. The tutorial assumes that you are using the online trial system. Performance Tester and Eclipse Performance Tester are built on the open-source Eclipse platform. Eclipse offers a comprehensive work environment for various tools, both open source and commercial, including Rational Software Delivery Platform's offerings like Rational Software Architect, Rational Application Developer for WebSphere Software, and Rational Functional Tester (see Resources). This ensures

a consistent user experience for tooling throughout the software development life cycle.

These tools are all based on Eclipse and often share the same shell, meaning that each tool's capabilities are presented as a new perspective within the same shell. A perspective is a collection of tools and views centered around a specific task. The Test perspective is the perspective for Performance Tester, providing views necessary for testing a software application or system. If you are using the online trial system, Performance Tester will be connected to a pre-configured workspace along with tutorial projects.

A workspace is a directory where you store your work. In this case, your workspace has two projects. The first project is the Adventure Builder Application, which contains the source code for a sample application that you will be testing. The application has already been deployed to WebSphere Application Server on the online trial system. The project is included in your workspace for Rational Performance Tester purposes.

All rights reserved. ibm. com/developerWorks developerWorks® Performance Tester allows you to navigate to the source code later when trying to identify the root cause of a performance bottleneck. The second project, Adventure Builder Performance Tests, serves as a test project for storing your tests, datapools, schedules, and results. Upon expanding the project, you will find several folders that help organize your test assets.

You can customize folders according to your preferences by adding, deleting, and personalizing them. Currently, there is not much analysis material in this project. However, you will be able to examine it more closely once you have recorded a test (Figure 1).

A Performance Tester workspace viewed in the Test Navigator Section

3. Record a test scenario Performance tests are often created by recording manual interactions with the system under test. In this tutorial section, you will use the automated HTTP recorder to capture the scenario of interacting with the Adventure Builder sample application to create and purchase a vacation package. The Adventure Builder application is currently running in the online trial environment. To connect to it through a web browser while the recorder is engaged, you just need to use a web browser that supports SOCKS proxies, like Internet Explorer in this tutorial.

Performance Tester has the ability to automatically launch Internet Explorer, Mozilla, and Firefox. This feature is provided by Rational Performance Tester, which is copyrighted by IBM Corporation from 1994 to 2008. All rights are reserved. This information can be found on page 5 of the 26-page document on developerWorks® ibm.com/developerWorks. If you would like a demonstration of these steps, there is an animated demo available. To start the recorder, simply click on "Create a Test from Recording" on the toolbar.

The Create New Test From Recording window is opened. In Figure 2, you can see the Create New Test From Recording window. To proceed, choose HTTP Recording and then click Next.

Rational Performance Tester Page 6 of 26 © Copyright IBM Corporation 1994, 2008. All rights reserved. ibm. com/developerWorks developerWorks®

3.4. On the next page of the wizard, select Adventure Builder Performance Tests > Tests as the location to create the file.

Enter PurchaseIslandAdventure as the test-file name and click Finish. Figure 3. The Create New Test From Recording window, page 2 5. The recorder is engaged and Internet Explorer is launched to the "Welcome to Performance Testing"

page. Clear the cache of temporary files by selecting Internet Explorer Tools > Internet Options ....

To clear the Temporary Internet Files, click on Delete Cookies and confirm the deletion. Next, click on Delete Files. Make sure to mark the option to delete all offline content, then confirm by clicking OK. Finally, dismiss the Internet Options window by clicking OK.

6. Rational Performance Tester © Copyright IBM Corporation 1994, 2008.
All rights reserved. Page 7 of 26 developerWorks® ibm. com/developerWorks 7.

To launch the Adventure Builder application, click on the Adventure Builder button in the Internet Explorer Links toolbar. Figure 4 shows the process of launching the application. If you want a demonstration, click on the Animated demo link. Once the recorder is activated, navigate the application as usual. To start, click on Island Adventures in the left navigation area of the page.

Figure 5. Island Adventures link 2: A more extensive selection of island adventure trips is shown here. To access the Maui Survival Adventure, click on the submenu located on the Available Adventure Packages page. Figure 6.

Maui Survival Adventure link Rational Performance Tester Page 8 of 26 © Copyright IBM Corporation 1994, 2008. All rights reserved. ibm. com/developerWorks eveloperWorks® 3.

This page displays the choices for the selected package. To access the Package Options page, click Select Package on the Adventure Package Details page's right side. On the Package Options page, you have the option to customize your vacation package by modifying parameters such as the number of people, start date, and duration. To proceed with the default options, simply click Set Package Options. To indicate that you will arrange your own transportation, select I Will Provide My

Own Transportation on the Adventure Package Details page.

To proceed with your purchase, first click on "Checkout" on the Adventure Package page. Then, on the Sign On page, select "Sign In" if you are a returning customer. Once signed in, scroll down to the bottom of the Enter Order Details page and click on "Submit". After a brief wait, you will be redirected to the Checkout page where you should see your order ID (Figure 7).

The link for the Order ID can be found on Checkout pages 4, 5, 6, 7, and 8.

Rational Performance Tester
© Copyright IBM Corporation 1994, 2008. All rights reserved. Page 9 of 26
developerWorks® ibm.com/developerWorks
Please note that your order ID may not match the one shown here exactly since it is unique. Once the checkout page finishes loading, please wait a few seconds and then click on the Order ID link to check your order status.

Once the Order Tracking Results page is loaded, close the browser. This will prompt Performance Tester to generate the test using the captured traffic. In section 4, you can review and customize the test Performance Tester creates based on the recorded HTTP traffic.

The test is not only an HTTP trace log but also a comprehensive, flexible, and easy to maintain test created by Performance Tester. In this section, we will analyze the generated test and customize it with distinct data. The Test Editor view allows you to inspect the test in a tree format. Each main node in the tree represents a visited web page during the recording session, named after the corresponding web page.

Figure 8. The Test Contents

tree view Rational Performance Tester Page 10 of 26 ; Copyright IBM Corporation 1994, 2008. All rights reserved. ibm.com/developerWorks developerWorks; 1.

Expand the node Welcome to the Adventure Builder Reference application to view all the transaction details of the page. The first element, highlighted in blue, represents the primary request for the page's HTML contents. Refer to Figure 9 for the expanded page in the Test Contents tree view 2.

Click on the Protocol Data view in the bottom portion of the window, then Rational Performance Tester © Copyright IBM Corporation 1994, 2008. All rights reserved. Page 11 of 26 developerWorks® ibm.com/developerWorks click on the primary request highlighted in blue in the tree.

The Request, Response Headers, and Response Content tabs of the Protocol Data view display the details of the request and its corresponding response. The selected element's contents are rendered in the Browser tab. Figure 10 illustrates the Browser tab in the Protocol Data view. In addition, the Test Editor view's right-hand portion provides detailed information about the selected element. If necessary, you can edit this data to modify the host, URL, request header values, or any other field.

Automatic data correlation Animated demo Would you like to see these steps demonstrated for you? me Show Web applications often have a high level of dynamism. In the scenario you recorded, you made an order for a vacation package and received a unique order ID. Subsequently, you utilized that order ID to verify the status of your purchase. During test play-back, a new order will be placed by Performance Tester and a different order ID will be provided. It is necessary for Performance Tester to verify the status

of this new order ID instead of the one recorded previously.

Performance Tester performs automatic data correlation by examining the data parameters sent to the server and matching them with previous response data. It is simple to access the correlated data. Rational Performance Tester Page 12 of 26 © Copyright IBM Corporation 1994, 2008. All rights reserved.

ibm.com/developerWorks
developerWorks® 1. Highlight the Order Tracking Results node in the Test Contents area of the Performance Test view. Now right-click inside the Test Data area to the right and select Show References.

Within the given , it should be observed that the orderId field is being replaced with information obtained from a previous response. Refer to Figure 11 to view the data correlation references. By double-clicking on "orderId," the user will be directed to the URL pertaining to the specific request made for that page. This can be visualized in Figure 12.

The URL of a request contains correlated data. By right-clicking the highlighted string and selecting "Go To", you can directly access the orderId value in the response text of the Checkout request. During test playback, Performance Tester will replace the orderId value received in this response with the orderId in the request for order tracking.

Figure 13. Correlated data in the prior response Granted, you now have a lot more knowledge about data correlation than you probably wanted to have. However, that is what makes Performance Tester so great: it handles all of this for you without requiring any hand coding or additional effort on your end. Would you like to watch a demo that showcases these steps? Show me Animated demo In performance testing, it is crucial

to be able to randomize the data being transmitted to the server.

Modern Web applications utilize multiple layers of caching to improve performance. However, this presents a challenge when testing the application with multiple emulated users. Due to caching, if the first user performs a transaction, all subsequent users will retrieve the information from the cache, resulting in atypical performance behavior. To address this issue, performance test engineers often spend a significant amount of time configuring tests to ensure that each emulated user utilizes unique information by pulling random data from a "datapool". Performance Tester simplifies this process by identifying potential datapool access points and allowing you to associate these fields with the data sources you provide.

Select the Enter Adventure Package Details page node in the test contents. Observe the start_month, start_year, and start_day parameters in the Test Data area. These parameters were the default values in the Options page and were sent back to the server upon clicking the Set Package Options button.

Figure 14. Datapool candidates 2, 3, 4.

Establish a datapool to randomize the values utilized by your virtual users during playback of this test. In the Test Data section, choose start_month. Then, below the Test Data area, click on Substitute From. Finally, select Datapool Value....

Figure 15. Replace the start_month with the datapool variable in Rational Performance Tester. Page 14 of 26 © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks® 5.6.

7. To add an association to an existing datapool to this test, click on Add Datapool in the "Select datapool" column window. Select the already existing VacationStartDates datapool and click on Select. In the "Select datapool" column window, choose start_month and click

on Use Column. Observe that the "Substituted with" column next to the start_month variable now contains a reference to the datapool column.

Select the start_year in the Test Data area and repeat the process. This time, there is no need to add the datapool reference. Just select start_year and click Use Column. Repeat the procedure mentioned above for start_day. The three variable rows should be highlighted in green, indicating that they are being substituted from the datapool, and they should show references in the "Substituted with" column. Refer to Figure 16.

Variables replaced with datapool variables 8, 9, and 10. Remember to press Ctrl-S to save the test once you're done.

Rational Performance Tester is copyrighted by IBM Corporation, with all rights reserved. This information is found on page 15 of 26 on the developerWorks website. One important aspect of a successful performance test is the accurate modeling of the expected system workload.

Software systems usually have different types of users who perform different tasks. The Performance Tester tool offers a graphical interface that allows you to model your user activities. You can create a schedule and watch an animated demo of the steps involved. If you want to see the steps demonstrated, follow these instructions: Expand the Schedules folder and double-click on the AdventureBuilderLoadTest schedule to open it in the Schedule Editor view.

This is a partially completed schedule for Figure 17: AdventureBuilderLoadTest in Test Navigator view. Two user groups have been defined in this schedule. The annotations on the Schedule Contents show that browsers account for 20% of emulated users, while buyers account for 80%.

The Schedule Contents on Page 16 of Rational Performance Tester depict defined user

groups. It includes information about the Browsers user group and all its contained elements. © Copyright IBM Corporation 1994, 2008. All rights reserved.
ibm.com/developerWorks developerWorks® advises expanding the Browsers user group and all its contained elements in the Schedule Contents.

Figure 19. Details of the Browsers user group Performance Tester offers numerous advanced constructs to assist with testing the impact of a realistic load on your system. The hierarchy under the Browsers user group can be interpreted as follows: Each browser will browse through three adventure packages. Browsers will randomly choose between looking at mountain adventures or western adventures, but there is a higher probability of them looking at mountain adventures. The act of browsing the adventure category is simulated by tests that were recorded in a similar manner to how you recorded your test.

After examining each category, the browser will pause for 1000 milliseconds before navigating to another category. Additionally, the Buyers group has not been finished. You can utilize the test you previously recorded as a means of implementing the Buyers test. Simply click on the Buyers user group.

Click the "Add ; Test" button and choose "PurchaseIslandAdventure" from the "Select Performance Tests" window. Save the "AdventureBuilderLoadTest" schedule. Section 6: Run an automated performance test using Rational Performance Tester © Copyright IBM Corporation 1994, 2008.

All rights reserved. Page 17 of 26 developerWorks® ibm. com/developerWorks In this section you will learn how to execute your test against the Adventure Builder application and monitor the results. Launch the test Animated demo Would you like to see these steps demonstrated for you? me Show 1. Select the topmost node in the Schedule Contents -- that is, the AdventureBuilderLoadTest

node.

The Performance Schedule Editor view offers several options for execution. On the right-hand side, there are tabs where you can find these options. In the General tab, you can specify the number of users to emulate by entering a value in the Number of users field. The user groups in this schedule are defined in percentages, so Performance Tester automatically adjusts them whenever you modify the schedule size. It is recommended to keep the Number of users set to 5.

Clicking on the Run button on the toolbar will launch your performance test in the online trial environment. However, it is important to note that this environment is only configured to support a maximum of five emulated users. If you attempt to run the test with more users, you will encounter a license error. Refer to Figure 20 for a visual representation.

Click on the run button on the toolbar to start the test. Watch the animated demo to see these steps in action. Do you want to see a demonstration? Show it to me. While your test is running, you can keep track of its progress in almost real-time. The Overall tab of the Performance Report view will display the test progress in a bar at the top. The bar graph will indicate the success rate of status codes for pages and elements. Both should indicate a 100% success rate.

While the test is running, you can browse the different tabs on the report to observe the ongoing activities. To begin, choose the Summary tab located at the bottom of the report. This tab provides basic statistics regarding the test run, including information about pages and page

elements. It is important to note that these statistics will continuously update until the test run has finished. Rational Performance Tester Page 18 of 26 © Copyright IBM Corporation 1994, 2008.

The Page Performance tab should be selected on ibm.com/developerWorks developerWorks® 2 to ensure that all rights are reserved.

The tab displays a bar graph showing the average page response time for the top 10 pages with the longest times. You can also navigate through other report pages to acquire more information. The initial presentation is user-friendly and provides quick performance insights for the Adventure Builder application. Please note that the Resources tab will not contain any information, which is intentional.

After completing the test (by observing the progress bar on the Overall tab), return to the Page Performance tab. You will see that the Checkout page is significantly slower compared to other pages.

Section 7: Analyzing the root cause

By utilizing Performance Tester, you have successfully identified a performance issue in your application.

The next question you will ask yourself is, "What is causing the problem?" To get to the bottom of this question, you will use Performance Tester's Root Cause Analysis facilities. In this section, you will re-run your test with additional data collection tools engaged. The additional information will help you determine if you are facing a hardware or software issue and drill down to the root cause of the performance bottleneck. Engage resource monitoring Animated demo Would you like to see these steps demonstrated for you? me Show 1.

2. 3. To revisit the AdventureBuilderLoadTest schedule in the Test Navigator view, double-click it. Make sure to start by selecting the top node of

the Schedule Contents again. Then, go to the Schedule Element Details area and select the Resource Monitoring tab.

Resource monitoring allows Performance Tester to record system parameters from Windows perfmon, Unix or Linux rstatd, or Tivoli Monitoring.

com/developerWorks 4. 5. Enable resource monitoring. Add New...

To create a new server for resource monitoring, scroll down the Performance Schedule view until you see the button. In the Resource Monitoring window, input "localhost" as the host name. Ensure that Windows Performance Monitor is selected. It's important to note that in this trial setup, the Web server, application server, and Performance Tester system are all running on the same machine called localhost. However, this is not a realistic scenario.

When setting up a genuine performance testing environment, you have the ability to specify any machines that may be included in your application or test system. To do this, go to the Resources tab. After a short delay, you will be presented with a comprehensive list of available counters. For simplicity, uncheck all counters except for Memory ; Pages/sec and Processor ; % Processor Time.

Click OK to close the Resource Monitoring window. 6. 7. 8.

Engage Response Time Breakdown

1. 2. 3. 4. 5. 6.

Access the Performance Schedule and go to the Schedule Element Details area. From there, choose the Response Time Breakdown tab. Enable the collection of response time data by checking the corresponding option. This will activate Performance Tester's response-time data collection infrastructure. Since the only test that visits the Checkout page is PurchaseIslandAdventure, only select that specific test. In the Options area, adjust the Detail level to High. Finally, save the schedule by pressing Ctrl-S.

Click the Run button on the toolbar again

to launch Performance Tester. This time, resource monitoring and response-time breakdown collection are enabled. While the performance schedule is executing, select the Resources tab to examine resource-utilization data.

On the Performance Report, developerWorks® on ibm.com presents data for the chosen resources collected according to the schedule. Figure 21 shows the Resources tab on the Performance Report.

The displayed data is accurate but not an accurate representation of a typical load test. In this trial environment, the load generation by Performance Tester, the Web server, application server, and database server are all on a single machine. Normally, you would monitor resources on each tier of your application. Furthermore, the duration of the load test you just conducted is very short.

Typically, performance tests are much longer and allow systems to stabilize. However, the trial system provides an idea of the ease of tracking resource usage during a performance test. If there are concerns, one can go to the Response vs. Time Detail tab and add/remove performance counters to overlay resource counters onto page response data by right-clicking on the graph.

This allows you to easily associate any increases in resource usage with page activity. Rational Performance Tester Ⓒ Copyright IBM Corporation 1994, 2008. All rights reserved. Page 21 of 26 developerWorks® ibm.com/developerWorks 3.

Since the performance issue with Adventure Builder does not seem to be caused by hardware, analyze the response-time breakdown data to determine if it is related to software. To do this, follow these steps:

  1. Select the Page Performance tab in the Performance Report.
  2. Investigate what happened during the Checkout page by delving deeper.
  3. Right-click on the bar representing the Checkout page in the graph and

select Display Response Time Breakdown Statistics.

Select the /ab/checkout.do URL from the Selection Wizard and click Finish. The Response Time Breakdown Statistics view provides a listing of methods that were invoked on the server tiers of the Adventure Builder application. There are multiple approaches to analyzing this data. To switch to the Tree Layout view, use the Layout button located in the top-right corner of the view.

Figure 22 shows the Tree Layout view 3. 4. In order to sort by descending cumulative time, click twice on the Cumulative Time column header.

Identify the main cause of the issue. The first node, labeled rationaltd, represents the machine that is being trialed. In this specific trial, all components of the system-under-test and test-harness are running on a single machine. However, in a real-world scenario, there may be multiple machines listed. The second-level node, labeled J2EE/WebSphere..., specifically pertains to the WebSphere application server component.

By analyzing the provided information, it becomes evident that the Servlet facet of the J2EE type consumes the majority of the total time. To gain more insights, expand the Servlet node and the com.sun.j2ee.

Blueprints, WAF, controller, web package, and the Rational Performance Tester (Page 22 of 26)

All rights reserved. ibm.com/developerWorks developerWorks® MainServlet class nodes. This indicates that the four invocations of the doPost method in the MainServlet class consumed 42.

113 seconds. Note that your actual values will probably differ. Figure 23. Response time of the doPost method of MainServlet 2.

Right-click the doPost method and choose Open Source. Surprise! You have found the source of your performance issue. Figure 24 showcases a sleep st

Get an explanation on any task
Get unstuck with the help of our AI assistant in seconds
New