Tuesday, October 8, 2013

How to Configure Scripts to use Databanks in OATS

This article is one of the Oracle Application Test Suite (OATS)[1] series on Xml and More, which began with the following articles:
In this article, we will show you:
  • How to set up databanks in OpenScript[4]
  • How to configure scripts to use databanks

Databanks


Databanks are used to hold input data that can be automatically fed into your Web application during Load Testing[5].  In this article, we have created a new script in OpenScript using ADF Load Test Module for the load testing of CRM FUSE (i.e., Fusion CRM with FUSE interface).
At the login step (i.e., step 2), we have used the following credentials:
  • SALESREPUSER00001 /Welcome1
during script recording in OpenScript.  To do load testing, we need to use different users to drive our Web application .  In the following, we will show you how to achieve that.

Substitute Variables


After clicking the Post Data node, list of parameters used in HTTP Post is displayed.  As you can see that the value of userid was recorded as SALESREPUSER00001.  So, we need to configure it to use a databank.
After clicking on Edit..., it brings up the Parameter message box.  Let's click on the second Substitute button next to the Value field.

This brings up Substitue Variable window.  Next we need to add new databank before we can use it for variable substitution.

Note that before we started OpenScript, we have copied an existing databank named UserName.csv in the the subfolder of our workspace (i.e., FUSE_Saleopty_oct07_wrk).  Therefore, you have seen it appearing in the right panel.  For our script, we have chosen to store our databank "Relative to current script".

If you open the databank, you can see different user names are stored in it.  Note that all users will use the same password in our case.

After adding new databank, the value of userid has been updated to:

Finishing variable substitution, a new node (i.e., GetNextDatabankRecord) was shown next to "Run" node.


You can click on the new node to edit it.  But, the default (i..e, Next Record) works for us.


After we have configured our script to use databank, we can test it using "Iterate" playback.


Clicking on the Iterate button, this allows you to specify how many iterations you want to test.  In the following example, we have set it to be three times.


Next Steps


After testing our script running OK in the OpenScript (which runs on Windows only), we proceed with the following steps:
  • Export script to a ZIP archive (i.e., FUSE_Saleopty_oct08_wrk.zip)
  • Copy the ZIP archive file to the Oracle Load Testing (OLT) server (which runs on Linux)
  • In OLT, we have imported the OpenScript ZIP to a scenario.
  • After setting up Autopilot, we have run load testings using the databank to feed CRM FUSE with different users.
A new article describing the above steps will be posted in the future given time permitted.

1 comment:

Blogger said...

BlueHost is ultimately one of the best web-hosting provider for any hosting services you might need.