In continuation to previous articles: How to create a web services test script using Oracle Application Testing Suite & How to parametrize test data for web services script, In this article you will learn how to add a verification point to the Web Services script using Openscript IDE of Oracle Application Testing Suite.
There are couple of ways to add verification or check points to a script, in this article you will learn how to add a “Text Matching Test” verification point using the Openscript IDE of Oracle Application Testing Suite.
Once you are ready with the test data parametrized script by following the step by step instructions, you should be able to add “Text Matching Test” verification point.
Step by step instructions to add “Text Matching Test” in web services script using OATS / Oracle Application Testing Suite.
- Go to Tree View
- Expand the node till the place where we have the url of the web service
- Open the data bank file which was added to the script, as per the article How to create web services test script using OATS and have test data for one row and keep the test data as “United States” and click Save.
- Come back to Tree view of the script and right click on the tree node where the url is present and navigate to Add > Other menu items.
- In the “Add” Dialog window, search for “Text Matching Test” by typing text in the free text field of the “Add” Dialog window
- Select “Text Matching Test” under “HTTP Tests” and click OK button.
- You will now be presented with “Text Matching Test” Dialog Window.
- In this window, you can give a name to this verification or assertion step to the script, for this example give “Check if city Chicago exists?” in Name Field of “Text Matching Test” Dialog Window
- Enter “Chicago” without the double quotes in “Text to Match” Free text field
- Leave “Raw Html” for the Source Field, this is basically you are informing OATS as where to check this verification point is it in the Raw HTML response or the response header or any other options in the list box.
- For the “Pass When”, as per the requirement you can either chose Pass if Present / Fail if present, this will indicate whether this verification point need to fail or pass if the text you are giving is present in the source provided in earlier step.
- For the “Match” Field, there are options as what kind of text comparison to be done between expected value and actual value.
- You can now see an additional instruction that gets auto added to both Tree View and Java Code view
- Now the script is ready with the capability of verifying if “Chicago” is present in the response and give the test result.
- Click on play back icon of Openscript IDE and wait for the execution to complete.
- You can now see an additional test step in the result with Pass or Fail status. For this example you can see a pass result.
Text Matching Test Result Step
You can also direct Openscript whether it has to continue execution of remaining part of the script irrespective of the verification point passes / fails by checking the check box “Verify Only, Never Fail”
For the purpose of exploring, try giving data which may not be present as part of the web service response and script should fail accordingly.
Please do share your queries through form of comments, I would be more than happy to help you out.
Founder of TestingTools.co, constantly shares knowledge on different test automation tools. Has experience in building proof of concepts, solutions, frameworks, platforms & implementation of test automation projects.
In pursuit of building a platform with inbuilt framework and reusable components for Oracle Cloud applications ( Oracle HCM, CX, SCM, Financials clouds, Salesforce and other cloud applications )
Major accomplishments in his career:
Product architect and development manager for test automation platforms
Oracle Flow Builder @ Oracle
CloudTestr @ Suneratech
2 times to oracle open world
More than 20 successful POCs ( Proof of concepts )
Designed pricing models.
Trained more than 50 members.
Built more than 100 re-usable functions.
Worked with tools: