Assuming that you are aware of test data parameterization in OpenScript using databank, in case you are not aware, request you to go through the following article
Openscript test data parameterization with databanks
Now when we execute scripts for multiple iterations, it is highly possible that one of the test data iteration might fail / one of the child script might fail when there were bunch of child scripts called from a parent script.
Depending on the situation, some wants the entire execution to stop and report the error, but in most scenarios, you wish to skip the failed iteration / child script and continue the execution with next iteration or next child script.
Now lets see how we can make OpenScript skip the failure of current iteration or current child script and continue with next iteration / next child script.
There is an error recovery setting in OpenScript, which will help you to skip the current iteration and then move to next.
Steps to perform are as below:
- Navigate to View > OpenScript Preferences
- Under Playback > Error Recovery
- On the right of the window you see a section by name General , which has a setting for “Child Script Failed” , Select option “Report Error and Continue”
- Click Apply, Ok buttons and close the window.
Now when you execute the parameterized script with Iterate Playback, even if the script fails for 1 iteration, it would continue from next iteration till the end of all iterations.
I hope this will help you. In case of any queries, please do revert to us in form of comments, we would try our best 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 )
- 100 demos
- Designed pricing models.
- Trained more than 50 members.
- Built more than 100 re-usable functions.
Worked with tools:
Here, we are setting Report Error and Continue in tool level(in Error Recovery Widget).
It is better to keep in the script level(Parent/master script). If we keep at tool level, every time we have check where setting is there or not.
We can add below code/statement in the parent/master script.
Thanks & Regards,
You are absolutely right Ramesh.. thanks for bringing this up.
Is there any way to stop the script execution as soon as a failure is encountered?
Will it hold good for OTM aswell?
As discussed with you, if you are using master driver script, one of the options is to have a global variable declared as false and in every child script @ initialize method set it to false and in the finish method set it to true.
So in the master driver when you try to call each child script check if the global variable is true or not, otherwise you can skip execution of the script.
Hope it helps, there can be other ways too.
Can you please tell me, how to get value from databank and store it in a variable?
Thank you so much for reaching out to us, it is quite interesting and easy, request you to go through the following article Test Data Parameterization with databanks in OATS
I also, recommend another step, once you go through all the steps in this article, do click on “Code View” and you should be able to see the equivalent code, if you have to write any custom code based on your requirement.
Please do revert to us in case of any further queries.
Thank you for your help.However,I could still see that Firefox version(45.0.esr) which was installed yesterday with Addons are disappeared but I could able to record and playback the Oracle forms now without any issues.I am wondering how is that possible as the OpenScript WebDOM is not verified again.
Secondly,I was using Databank with a csv file with a list of order numbers to query and found that when I play the script,it skips one everytime and execute.Say for eg,if I have 6 orders to be queried,it displays only 1st ,4th and 6th skipping the other 3.
That is great to know that you are able to record and playback the script.
Regarding data bank I would request you to refer to script parameterization through databank and if you still have issue, we can discuss further