HomeOATS

How to add Verification Point to Web Services script using OATS

Like Tweet Pin it Share Share Email

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
Web Services Test script Tree view
Web Services Test script Tree view

Text Matching Test Test Data With only United States

  • 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.
Add Other Step in Openscript IDE
Add Other Step in Openscript IDE
  • 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.
Text Matching Test
Text Matching Test
  • You will now be presented with “Text Matching Test” Dialog Window.
Text Matching Test Dialog Window
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
Test Name
Test Name
  • Enter “Chicago” without the double quotes in “Text to Match” Free text field
Add Text to Match
Add Text to Match
  • 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.
List of sources
List of sources
  • 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.
List of Options as when to pass
List of Options as when to pass
  • For the “Match” Field, there are options as what kind of text comparison to be done between expected value and actual value.
List of comparison types
List of comparison types
  • You can now see an additional instruction that gets auto added to both Tree View and Java Code view
Text Matching Test Tree View Verification Point
Text Matching Test Tree View Verification Point
  • 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

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”

Verify Only Never Fail
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.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *