A few weeks ago, I put together a small demonstration showing the possible impact of external sources (in this case an LDAP server) on the performance of secured ADF applications. The demonstration was a fairly simple one – showing the impact of a single request on network resources. A ‘real’ systems test will be more extensive than a simple demonstration, including:
- Functionalty Testing: making sure that the application works as expected over time, often through automated testing.
- Load Testing: Testing the performance of overall systems and integrated components.
Both types of testing typically involve different toolsets. For functionalty testing in web applications, there are tools like Selenium for automated functional testing. There are also shared approaches to functional and load testing, such as Apache JMeter. JMeter has been used successfully to test ADF applications – Chris Muir recently recorded a demonstration of setting up JMeter for ADF Testing. (As a side note, JMeter can also be used to test the performance of LDAP Servers…)
However, JMeter has often been difficult to use with session-based Java applications (not just ADF apps!) because of session parameters and cookie tracking. Fortunately, Oracle has a solution that is designed for functional and load testing of ADF applications (among others) packaged as part of the Oracle Application Testing Suite (OATS). OATS is a relatively large tool, so I’ll break up some of my own learning of OATS over a number of posts, beginning with the “language” of OATS – Oracle OpenScript.
First Steps With Open Script: Functional Testing

OpenScript is less of a language than it is a combination of tools that can be used to create tests. First, we’ll need to install the OpenScript – which is part of either the full install, or the “micro” install for Windows. (Note: while the load testing environments and agents are avaialble for Linux platforms, the OpenScript development environment is Windows only, due to the Windows services used to record scripts.)
Once the OATS package has been installed, there will be an “Open Script” program installed in the Windows Start Menu. The Open Script editor is based on the Eclipse Java development environment – so you’ll be immediately familar with the layout of the editor if you have experience with Eclipse. What is different is the use of Windows services to record scripts. Let’s take a look at recording a simple script.

Recording A Script
First, we need to identify the type of script that we are creating. When creating a script, we’ll be prompted to select the type of test that we want to create. We’ll create a functional test, but the dialog also gives us a view of the types of tests that we can create with OpenScript.

Once we choose “Functional Script”, we’ll be asked to add the script as part of a script library (you’ll be guided through creating a new library if one does not exist) and given a new test harness for the test we would like to create.

Before we record a script, we can note that in the editor we are shown two views of our script – the “Tree View”, or a “Java Code” view. If we take a quick look at the Java Code view we can see that our test is essentially a Java class with several dependency injections that interface with other services and modules in the Application Testing Suite.

While our script will be a Java class that interfaces with these services, creating our script is not primarily Java coding, but rather using the OpenScript services to record actions taken in a web application. First, press the “record” button – this should start the OpenScript recorder; note the popup of the OpenScript toolbar and a menu bar in the browser itself (by default, Internet Explorer) indicating that a script is being recorded.

In the browser, follow a course of action that you would like to test. There are a full suite of tests available that allow you to test on any number of actions – such as mouse clicks, tab navigations, and even functions to allow you to test for certain sections of text and critera to ensure that your pages are also generating expected data.
When finished, the tool will have created a script with the steps that were followed in the recording. This script can now be played back in the OpenScript environment by using the ‘play’ button in the toolbar.

NOTE: If you are having trouble recording scripts, there is a handy option in the ‘Help’ menu called the OpenScript Diagnosis Tool that will run a check of your system to make sure that the required Windows services are running and that all browser plugins (required in the supported Internet Explorer and Firefox browsers) have been properly installed.

I also recorded a quick video (with no audio!) of recording and playing back a simple test script: