I thought I would illustrate how to perform a manual check during the execution of an automated test.

This is could be of interest to QA teams testing applications that integrate with third party (not easily accessible) systems, business processes that produce an external result, e.g. a hard copy print, or kick off some kind of batch process in a back-end system.

Indeed, this article was sparked by a discussion with a QA team that needed to test a web-based application that integrates with external metering units. In these and other situations, it could be that the only option is for the tester to ‘eyeball’ the other system and to record the result. Ideally, the result of the manual validation would be recorded in the results report of the automated test for reference purposes and central storage.

OpenScript is the scripting utility of the Oracle Application Test Suite and enables a tester to record both functional and load testing scripts for use against web-based applications.

In this post I will describe how to implement such a script using a demo e-commerce application, and I will create a manual ‘eyeball’ step where the QA analyst will need to confirm the price of the product being bought by manually inputting the amount and this will be recorded in the results report at the end of the script execution.

1. In OpenScript create new Web Functional script

1new

2. Record the workflow as described by the test specification.

3. Add the import directive for Java Swing components.

import_swing

4. Locate the step in the script where you wish the manual validation to occur and insert the appropriate code into the Java Code view of the script. I am implementing a Java input dialog to prompt the analyst to perform the check and then to input the result. I have created a method called doManualTest() which I call at the required point in the script.

add_function

i) To add the function – right-click the Run section and select ‘Other’ -> Script Functions -> Add New Function -> click OK.

ii) Name the new function doManualTest and an empty function will be created.

iii) Add the following code to the new function –

add_code

iv) Add the call to the function after the required script step.

insert_method_call

5. When the script is executed the script will halt when the dialog appears and will wait for the tester to perform the check and to input the results. After confirming the dialog the script execution continues.

execute_script

6. The results report is produced and you will see the data that was recorded during the manual check in the report.

report