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]

Load test FileNet Content Engine using IBM Rational Performance Tester

Venumadhav Vanagondi (venu.madhav@in.ibm.com), Software Performance Analyst, IBM
Photo of Venumadhav Vanagondi
Venumadhav Vanagondi has more than five years of experience as a software performance analyst. He has worked with several IBM customers in resolving performance problems and is proficient in using performance estimation, testing, and monitoring tools. He holds a master's degree in computer science from the Indian Institute of Technology Madras.
Sanjay Singh (sksingh6@in.ibm.com), Senior Software Architect, IBM
Photo of Sanjay Singh
Sanjay Singh has around 12 years of experience in designing and developing high-performance, scalable enterprise software in content management, telecom, and finance. He has been with IBM for last five years and is a senior member of the ECM team in the IBM India Software Lab. Sanjay has a B. Tech. degree from the Indian Institute of Technology Kanpur.
Sandeep Vedula (vedsande@in.ibm.com), Associate Software Engineer, IBM
Photo of Sandeep Vedula
Sandeep Vedula has around three years of experience in software development in content management, online learning, and supply chain management. He has been with IBM for the last two years, on the ECM team. Sandeep has a master’s degree in artificial intelligence from Central University, Hyderabad.

Summary:  This article explains how to configure IBM Rational Performance Tester to load test document editing functionality of the IBM FileNet Content Engine. This approach is based on the learning from a customer benchmark that targeted large volumes of content, where Rational Performance Tester was used for the first time to simulate document editing functionality. This article is particularly useful to software developers and testers who are trying to evaluate FileNet Content Engine performance.

Date:  17 Jan 2012
Level:  Introductory PDF:  A4 and Letter (711KB | 15 pages)Get Adobe® Reader®
Also available in:   Portuguese

Activity:  9378 views
Comments:  

Introduction to the process

IBM® FileNet® P8 software helps enterprises in storage and retrieval of content, business process automation and case management. FileNet Content Engine is the core component of the IBM FileNet ECM suite for enterprise-level content management. Of the many tasks that the FileNet P8 system performs, it works as a very robust document management system. A user interacts with FileNet Content Engine through Workplace, a Java Enterprise Edition (JEE) application that provides a web interface to the FileNet Content Engine.

In content management systems, document editing is one of the primary tasks. In the FileNet Content Engine, editing is performed through the following sequence of actions:

  1. Check out the document to a local file system from the server (analogous to document download).
  2. Edit and save the document using a document editor locally.
  3. Check the document back in to the Content Engine server (analogous to document upload).

In a content management system, check-in and checkout activity constitutes the bulk of the load on the system. Therefore, testing FileNet Content Engine for document check-in and checkout activity becomes critical in assessing the overall performance of the system.

In this article, we describe a method that configures IBM® Rational® Performance Tester to load-test FileNet P8 Content Engine.

The following steps are involved in configuring Rational Performance Tester for load testing the document editing process of the FileNet P8 Content Engine.

  1. Create the test script.
  2. Set test script parameters to add variability to the load test.
  3. Modify the test script for correct execution.
  4. Create a schedule and running the load test.

The sections that follow describe these steps in detail.


Create the test script

Create a test script in Rational Performance Tester:

  1. Open the Rational Performance Tester workbench.
  2. Create a new performance test project.

After creating the project, you will be prompted to create a new test script from a recording.

  1. In the pop-up window, select RPT HTTP Recording as the recorder type. Give an appropriate name to the test, and start the recording.

Rational Performance Tester will open the default browser, Microsoft Internet Explorer, to capture the requests.

  1. Access the Workplace application, perform the required actions in the browser, and stop recording by closing the browser.

This will generate the test script with the HTTP requests corresponding to these actions.

Tip:
Be sure to give meaningful names to HTTP requests in the test script. From Rational Performance Tester v8.1 onward, you can use the icon (white page with blue pencil, circled in Figure 1) in the Recorder Test Annotation toolbar to give appropriate names to requests while recording a test script.


Figure 1. Recorder Test Annotation toolbar
Toolbar view in Internet Explorer

Note:
Capture the actions related to checkout and check-in operations in the same test script. This approach makes it easier to incorporate the scripting logic that will ensure that a user is allowed to perform only a check-in operation on a document that he has already checked out.

The following actions should be carried out while recording the test script in Rational Performance Tester:

  1. Access Workplace by typing the relevant URL in the browser, for example:
    http://testhost:9080/Workplace
  2. Log in to Workplace with the relevant user credentials.
  3. Go to the folder containing the documents by selecting the relevant object store from the home page.
  4. To check out a document, select it and right-click to access the operations menu, and select the Check Out operation.
  5. In the new browser window that opens, download the checked-out document and close the window.
  6. Edit the downloaded document.
  7. To check in the modified document, select the checked-out document, right-click to access the operations menu, and select the Check In operation.
  8. In the check-in wizard that opens, perform these actions:
    1. In the Set Properties step, enable check-in as the major version and use the default values for all other properties.
    2. In the Set Security step, use the default security policies.
    3. In the Select File step, use the Local File option to browse and locate the modified document, and then click Finish.
    4. Click OK to confirm the changes. This will close the wizard and check in the document.
  9. Log out of Workplace.

Set test script parameters

You need to vary the version series ID in the checkout request to enable the test script to work with different documents.

The latest version of the document is always the one checked out. The test script will use the version series ID as a reference rather than the latest document version. The FileNet P8 Content Engine changes the reference from the version series ID to the latest doc version, and then checks that document out.

  1. Create a data pool in Rational Performance Tester with the version series IDs of different documents in the respective folder and object store.
  2. You can use the Java code snippet in Listing 1 to retrieve these values from the respective document objects by using the FileNet P8 Content Engine client API.

Listing 1. Code to retrieve the version series IDs
public Connection getConnection(String host, String port){
        //Build the FileNet connection URL
String filenetUrl = "http://" + host + ":" + port + "/wsi/FNCEWS40MTOM/";

 //Return the Connection to the caller 
 return Factory.Connection.getConnection(filenetUrl);
}

public void getDocAttributes(String host, String port, String userid,
 String passwd, String objStoreName, String folderPath)
{

 //FileNet P8 Admin user name and password
 String userName = userid;
 String password = passwd;
 boolean userPushed = false;

 try{
 /* Establish connection with the FileNet P8 Content Engine Server based
 * on host and port details
 */
 Connection conn = getConnection(host,port);
 Subject loginUser = UserContext.createSubject(conn,userName,
 password,"FileNetP8WSI");
 UserContext.get().pushSubject(loginUser);
 userPushed = true;

 //Access the Domain and ObjectStore information
 Domain gcd = Factory.Domain.fetchInstance(conn,null,null);
 String domainName = gcd.get_Name();
 ObjectStore objStore = Factory.ObjectStore.fetchInstance(gcd,objStoreName, null);

 /* Fetch the folder object that contains the documents
 * Get the document set in the folder and iterate
 */
 Folder folder = Factory.Folder.fetchInstance(objStore, folderPath, null);
 DocumentSet docSet = folder.get_ContainedDocuments();
 Iterator iter = docSet.iterator();
 Document currentDoc = null;
 String docTitle = null;
 String docId = null;
 String docVersionId = null;
 int majorVersion = -1;
 int minorVersion = -1;
 int versionStatus = -1;
 Versionable currentVersion = null;

 // versionid represents the version series id 
 System.out.println("doctitle,docid,versionid,majorversion,minorversion,
 versionstatus");

 //Retrieve the document properties from the current document object
 while (iter.hasNext()){
 currentDoc = (Document)iter.next();
 docTitle = currentDoc.get_Name();
 docId = currentDoc.get_Id().toString();
 currentVersion = currentDoc.get_CurrentVersion();
 majorVersion = currentVersion.get_MajorVersionNumber();
 minorVersion = currentVersion.get_MinorVersionNumber();
 docVersionId = currentVersion.get_VersionSeries().get_Id().toString();
 versionStatus = currentVersion.get_VersionStatus().getValue();
 System.out.println(docTitle + "," + docId + "," + docVersionId + ","+ 
 majorVersion + "," + minorVersion + "," + versionStatus);
 }
 }finally{
 if(userPushed)
 UserContext.get().popSubject();
 }
}

Figure 2 shows the checkout request in the test script that contains the version series ID.


Figure 2. Checkout request with the version series ID
jatarang.in.ibm.com:9080/Workplace/ooperations/...

In the checkout request, the vsId variable represents the version series ID (see Figure 3 the checkout request details).

  1. Substitute the value of this variable with the data pool that contains the version series IDs of different documents.

Figure 3. Checkout request details
Variable substitution in the checkout request

Tip:
To add more variation to the load tests, you can vary the values for user credentials, object store, and folder-related details in the test script.


Modify the test script

The check-in operation is always carried out on the reservation version of the document (The reservation version indicates a checked-out but not yet checked in version of a document.) For the check-in operation to work correctly, the document ID of the checked-out document should be used as an input to the check-in request. To ensure this, you can use the custom code feature in Rational Performance Tester to parse and retrieve the document ID from a URL in the response of the checkout request.

In the test script, the response of the checkout request that contains the argument to custom code is shown in Figure 4.


Figure 4. Checkout response containing the argument to the custom code
Response with argument to custom code

Listing 2 shows the URL that contains the document ID of the recently checked-out document in the response of the checkout request. This URL should be passed as an argument to the custom code.

Listing 2. URL details

http://jaltarang.in.ibm.com:9080/Workplace/getContent?mode=download&objectType=document&id={753DFAA1-3EE5-4C44-89E3-51DEFFB7E371}&objectStoreName=mcs1db2&returnUrl=http%3A%2F%2Fjaltarang.in.ibm.com%3A9080%2FWorkplace%2FWcmCloseWindow.jsp%3Fop%3Dcheckout%26refreshUrl%3Dhttp%253A%2F%2Fjaltarang.in.ibm.com%253A9080%2FWorkplace%2FBrowse.jsp%253FwindowId%253DmainWindow%26eventName%3DStateChanged

Listing 3 shows the custom code snippet to parse and retrieve the document ID.


Listing 3. Code to parse and retrieve the document ID
public String exec(ITestExecutionServices tes, String[] args)
{
 int startIndex = args[0].indexOf("id=") + 3;
 int endIndex = startIndex + 38;
 tes.getTestLogManager().reportMessage(args[0].substring(startIndex,endIndex));
 return args[0].substring(startIndex,endIndex);
}

The check-in request in the test script that contains the document ID is shown in Figure 5.


Figure 5. Check-in request with the document ID
Request in the test script with document ID

In the check-in request, the id variable represents the document ID (see Figure 6). The value of this variable should be substituted with the value returned by the custom code.


Figure 6. Check-in request details
Variable substitution in check-in request

Note:
To add more variety to the load tests, you can also vary the content of the document that gets checked in. Rational Performance Tester v8.1.1 and later has a built-in functionality to do this. See the IBM TechNote titled "Rational Performance Tester: Substituting request content from a file" (cited in the Resources section) for more information.


Create a schedule and run the load test

  1. After modifying the test script, create a schedule in Rational Performance Tester.
  2. Add the test script to this schedule.
  3. Specify the required number of users and the ramp-up rate, and run the test for the required duration.

Important:

It is important to run the cancel checkout operation on all of the relevant documents after running a load test. In most of the scenarios, when a load test finishes, the majority of virtual users would have exited without performing all of the actions in the test script. This results in a lot of documents being in the checked-out state. The next iteration of the load test will report a lot of errors if this clean-up activity is not carried out. You can use the Java code snippet shown in Listing 4 to automate running the cancel checkout operation on the documents.


Listing 4. Code to automate the cancel checkout operation
public void deleteReservation(String host, String port, String userid,
 String passwd, String objStoreName, String folderPath)
{
 //FileNet P8 Admin user name and password
 String userName = userid;
 String password = passwd;
 boolean userPushed = false;

 try{
 /* Establish Connection with the FileNet P8 Content Engine Server
 * based on host and port details
 */
 Connection conn = getConnection(host,port);
 Subject loginUser = UserContext.createSubject(conn,userName,
 password,"FileNetP8WSI");
 UserContext.get().pushSubject(loginUser);
 userPushed = true;

 Domain gcd = Factory.Domain.fetchInstance(conn,null,null);
 String domainName = gcd.get_Name();

 //Fetch Object store, Folder and document set in the folder
 ObjectStore objStore = Factory.ObjectStore.fetchInstance(gcd,objStoreName, null);
 Folder folder = Factory.Folder.fetchInstance(objStore, folderPath, null);
 DocumentSet docSet = folder.get_ContainedDocuments();
 Iterator iter = docSet.iterator();
 Document currentDoc = null;

 /* Iterate through the document set, run cancel check out on the documents
 * and save the changes
 */
 while (iter.hasNext())
        {
currentDoc = (Document)iter.next();
 docTitle = currentDoc.get_Name();
 VersionSeries vs = currentDoc.get_VersionSeries();
 if(vs.get_IsReserved ())
 {
 Document resv = (Document) vs.get_Reservation();
 Versionable versionable = resv.cancelCheckOut();
 ((Document)versionable).save(RefreshMode.NO_REFRESH);
 System.out.println("reservation deleted for docTitle:" + docTitle);
 }
 }
 }finally{
 if(userPushed)
 UserContext.get().popSubject();
 }
}


Use this process with other applications

The article walked you through the steps to configure IBM Rational Performance Tester to load test the document editing functionality of FileNet Content Engine. Although it focused on Rational Performance Tester, the key concepts and the artifacts included in this article can be used with other load-testing tools.


Resources

Learn

Get products and technologies

Discuss

About the authors

Photo of Venumadhav Vanagondi

Venumadhav Vanagondi has more than five years of experience as a software performance analyst. He has worked with several IBM customers in resolving performance problems and is proficient in using performance estimation, testing, and monitoring tools. He holds a master's degree in computer science from the Indian Institute of Technology Madras.

Photo of Sanjay Singh

Sanjay Singh has around 12 years of experience in designing and developing high-performance, scalable enterprise software in content management, telecom, and finance. He has been with IBM for last five years and is a senior member of the ECM team in the IBM India Software Lab. Sanjay has a B. Tech. degree from the Indian Institute of Technology Kanpur.

Photo of Sandeep Vedula

Sandeep Vedula has around three years of experience in software development in content management, online learning, and supply chain management. He has been with IBM for the last two years, on the ECM team. Sandeep has a master’s degree in artificial intelligence from Central University, Hyderabad.

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=784601
ArticleTitle=Load test FileNet Content Engine using IBM Rational Performance Tester
publish-date=01172012

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