Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Test the IBM Rational Insight Hourglass page with IBM Rational Performance Tester

Peng Peng Wang (wangpp@cn.ibm.com), : Software engineer, Software Test Specialist: Test Automation, IBM
Author photo
Peng Peng Wang, a performance engineer, works on the performance and reliability testing of Rational Insight. He has experience working with Rational Insight and Rational Performance Tester, and with determining tuning performance problems.
Zhi Cheng Liu (liuzc@cn.ibm.com), Staff Software Engineer, IBM
Author photo
Dr. Zhi Cheng Liu tests system verification for Rational products in the China Development Lab. He has taken part in system verification testing for several Rational products and has experience in performance and reliability test automation.

Summary:  In IBM® Rational® Insight, the Hourglass page is a complex and dynamic Web page. When IBM® Rational® Performance Tester runs tests for Rational Insight, the Hourglass page might cause problems. This article contains the best practices to handle the Hourglass page when you test the performance of Rational Insight.

Date:  19 Dec 2009
Level:  Intermediate
Also available in:   Portuguese  Spanish

Activity:  15544 views
Comments:  

Rational Insight is an enterprise reporting solution that is built on the IBM® Cognos® Business Intelligence (BI) server. When Rational Performance Tester simulates user activity and generates load against the Rational Insight report server, the Hourglass page, which indicates server activity, can cause problems for the following reasons:

  • In Rational Performance Tester, the record and playback mechanism that generates load against the server and the simple recorded scripts have insufficient loop control to handle the Hourglass page.
  • The behavior of the Rational Insight report server differs depending on the server workload, so Rational Performance Tester needs special scripts so handle the Hourglass page.
  • In Rational Performance Tester, the Content VPs mechanism for verifying response content statically cannot verify the dynamic content of the Hourglass page.

To handle the Hourglass page and process its dynamic content when you test the performance of Rational Insight, use the scripts and custom code in this article.

The Hourglass page in Rational Insight

The Rational Insight report server is a typical, three-layer B/S application with which users can generate reports through a Web browser.

When the server submits a new request from a user to run a report, an Hourglass page is returned (Figure 1). When you record with Rational Performance Tester, there is usually only one active user in the system, so the Rational Insight server is not busy and the Hourglass page is not recorded. However, when you play back the Rational Performance Tester script to simulate multiple users, considerable workload is generated for the Rational Insight server, which might respond to a user request with an Hourglass page. This activity causes a Rational Performance Tester script failure because there is not enough code to handle this condition.


Figure 1.Hourglass progress page
Hourglass progress showing busy Insight server

Two requests can generate an Hourglass page when the Rational Insight server is busy. One request is for the Prompt page; when the status for this request is complete, the Hourglass page is in the Prompting state. The second request is for the Report generation page; when the status for this request is complete, the Hourglass page is in the Complete state (Figure 2).


Figure 2. State transfer in Prompt page and Report Generation page
State transfer from start to complete or prompting

Larger view of Figure 2.


Handle the Hourglass page with Rational Performance Tester scripts and custom code

To enable the script to handle all conditions in which the Hourglass page might be displayed, you can use the returned status from the Rational Insight server to control the Rational Performance Tester script loops (Figure 3), regardless of how many loops the Hourglass page iterates.


Figure 3. Control flow of Hourglass page handling
Control flow of hourglass handling

A typical Rational Performance Tester script looks like the script in Figure 4. The custom code GetFirstStatus returns the first status from Rational Insight server. The returned status is used in an "If" clause to control whether to enter the loop. The infinite loop in the Rational Performance Tester script iterates the Hourglass page, and the custom code PromptLoopControl accesses the server status and uses the returned status to control whether to exit the loop.


Figure 4. Sample Rational Performance Tester scripts for handling the Hourglass page
Sample RPT script shows how to handle Hourglass

Because the status information that is returned from the server response is critical to control the Rational Performance Tester script loops, you must use the Rational Performance Tester custom code to extract status and other context information. Sample custom code is shown in Listing 1, where a technique called regular expression matching is adopted.


Listing 1. Custom code to extract status information from server response
Matcher matcher = Pattern.compile(".*"status": "(.*)",
"conversation": "(.*)", "tracking": 
"(.*)", "secondaryRequests".*"parameters":
 "(.*)"",Pattern.DOTALL).matcher(args[0]);

if (matcher.lookingAt()) {
    status = matcher.group(1);
}

The Rational Performance Tester API also provides a loop control function. In this case, the custom code checks the status, and if the status equals complete, it exits the loop by calling getLoopControl.breakLoop().


Listing 2. Custom code for loop control
private void loopControl(ITestExecutionServices tes, boolean error,
		String status) {
	String trans_result = error ? "abort" : "done";
	IDataArea userDataArea = tes.findDataArea(IDataArea.VIRTUALUSER);
	if (status.equals("error")) {
		//The attempted vp increased by 1
		vpNumAttempt.increment();
		//The failed vp increased by 1
		vpNumFailed.increment();
		tes.getTestLogManager().reportMessage(
			String.valueOf("VPFailed: " + vpNumFailed.value()));
		tes.getLoopControl().breakLoop();
	} else if (status.equals("complete")) {
		//The attempted vp increased by 1
		vpNumAttempt.increment();
		//The Passed vp increased by 1
		vpNumPass.increment();
		tes.getLoopControl().breakLoop();
	}
}


Rational Performance Tester verification points

To verify the expected behavior from specific page responses, you can use the Rational Performance Tester verification points (VPs): Page Title VPs, Response code VPs, Response size VPs, and Content VPs.

Page title VPs: Verify the expected page title of the primary request for a page. If the returned title is unexpected, the failed verification point counter increases by 1 and can be indicated in the Rational Performance Tester test reports.

Response code VPs: Verify that the response code matches an expected value. If returned response code is not 200, 201, 202, 204, 206, 301, 302, or 304, the failed verification point counter increases by 1 and can be indicated in the Rational Performance Tester test reports.

Response size VPs: Verify that the number of bytes returned in a response is what you expected. If the byte count does not match, the failed verification point counter increases by 1 and can be indicated in the Rational Performance Tester test reports. You can specify an exact response size or verify that the byte count is within a range.

Content VPs: Verify that the response contains an expected string. Verification can fail for two reasons: if at least one of checked string is found and if none of the checked strings are found.

After the test scheduler in Rational Performance Tester runs, you can view the results of the related Page Element VPs in the Page Element Summary (Figure 5). The Total Page Element VPs Passed [for Run] shows how many verification points passed. The Percent Page Element VPs Passed [for Run] shows the percentage of VPs. You can use these indicators to assess the state of the response content of key pages. If some verification points failed, you can check the test log to find the error message and pinpoint the root cause of the errors.


Figure 5. Verification points report
Default RPT report of verification points

Customize verification points for the Hourglass page

As the status transition flow (Figure 2) shows, the key verification point for the Hourglass page is the hourglass status value. If the hourglass status is complete, the Hourglass page has run successfully and the number of passed VPs increases. If something is wrong with server, the page response returns content with an error message, and the number of failed VPs increases. However, when the server is busy and the hourglass status is Working or Still Working, no verification points are measured.

The four types of verification points will not verify the dynamic response content for the Hourglass page. To verify that content, use custom code to create verification points that can filter and analyze the hourglass status from the dynamic content.

The typical processing for hourglass verification points is as follows:

  • The response content is processed and the status value is filtered by using a Java™ regular expression. The status value will be either completed, working, stillWorking, or error.
  • The verification point counter objects (vpNumPassed, vpNumFailed, and vpNumAttempted) are consumed by Rational Performance Tester to be displayed in reports.
  • The verification point counters are increased according to the status value. If the status equals completed, the verification points passed (vpNumPassed) increase by one. If the status equals error, the verification points failed (vpNumFailed) increase by one.

Listing 3. Sample code for custom verification points
String pageTitle = args[1].toString();
if (rootStat != null) {
	//Initialize and construct VP objects.
	String[] pathPass = { "Custom", "Verification Points",
	"All Custom VPs", "Pass", pageTitle + "_VPass" };
	String[] pathFail = { "Custom", "Verification Points",
	"All Custom VPs", "Fail", pageTitle + "_VPFailed" };
	String[] pathAttempt = { "Custom", "Verification Points",
	"All Custom VPs", "Attempt", pageTitle + "_VPAttempt" };
	vpNumAttempt = rootStat.getStatic(pathAttempt);
	vpNumPass = rootStat.getStatic(pathPass);
	vpNumFailed = rootStat.getStatic(pathFail);
}
Matcher matcher = Pattern.compile(".*"status": "(.*)",
"conversation": "(.*)", "tracking": 
"(.*)", "secondaryRequests".*"parameters":
 "(.*)"",Pattern.DOTALL).matcher(args[0]);

if (matcher.lookingAt()) {
    status = matcher.group(1);
}
if (status.equals("error")) {
	//The attempted vp increased by 1
	vpNumAttempt.increment();
	//The failed vp increased by 1
	vpNumFailed.increment();
	tes.getTestLogManager().reportMessage(
	String.valueOf("VPFailed: " + vpNumFailed.value()));
} else if (status.equals("complete")) {
	//The attempted vp increased by 1
	vpNumAttempt.increment();
	//The Passed vp increased by 1
	vpNumPass.increment();
}

With this custom code, when Rational Performance Tester runs a test, the custom verification point counters are recorded. However, the default Rational Performance Tester template does not show the custom counters. To see the custom verification points in a table or a trend line chart in a Rational Performance Tester report, drag the counters to the responding panels of the reports, as shown in Figure 6.


Figure 6. Summary of custom verification points
customized RPT Verification points

Summary

When you test the performance of the Rational Insight report server or other Cognos- and Rational Insight-based solutions, you can use the practices in this article to troubleshoot issues that you might encounter with the Hourglass page. You can use custom code in Rational Performance Tester to implement complex loop control, run simulations, and implement verification points.


Resources

Learn

Get products and technologies

Discuss

About the authors

Author photo

Peng Peng Wang, a performance engineer, works on the performance and reliability testing of Rational Insight. He has experience working with Rational Insight and Rational Performance Tester, and with determining tuning performance problems.

Author photo

Dr. Zhi Cheng Liu tests system verification for Rational products in the China Development Lab. He has taken part in system verification testing for several Rational products and has experience in performance and reliability test automation.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Rational
ArticleID=455656
ArticleTitle=Test the IBM Rational Insight Hourglass page with IBM Rational Performance Tester
publish-date=12192009
author1-email=wangpp@cn.ibm.com
author1-email-cc=robinw@us.ibm.com
author2-email=liuzc@cn.ibm.com
author2-email-cc=robinw@us.ibm.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.

Special offers