Here is my scenario --ranroex 3.3.2, ie7
I have a console prompt to enter groupid which contains around 10 scenarios, after enterring the groupid in console prompt- function query the groupid and scenarioid in sqldb then execute the scenario and write the result like company id to result table in sqldb,
The problem i am running into when anything breaks on script either object not found or apps got hung up or bad data, the test execution got stoppe and i have to kickoff manually from the beginning,
Please advise how can i handle the error to continue the test execution with the next scenario and abondon the scenario that causing the error
- i do have a column on resulttable that track which scenario and which script ahs last finished
Unattended execution
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unattended execution
Hi,
as already mentioned in the mail, can you please provide us your test project, or a sample project which sketches the behavior of your original project?
Without this information it’s very hard for us to provide useful suggestions for you.
You can either attach the solution to your next forum post, or send it via mail.
Regards,
Tobias
Ranorex Team
as already mentioned in the mail, can you please provide us your test project, or a sample project which sketches the behavior of your original project?
Without this information it’s very hard for us to provide useful suggestions for you.
You can either attach the solution to your next forum post, or send it via mail.
Regards,
Tobias
Ranorex Team
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: Unattended execution
Use try catch to catch any exceptions on one run, then clean up so that next run can be started (this is a tricky part as you don't know in what state your AUT was left, if you can just close AUT and open it again that's easier), run next scenario.
Re: Unattended execution
Thank you artur_gadomski, does try catch work even i do have validate.exist most of the functions, should i replace validate exist with try catch., i do have around 700 functions that runs in one scenarios.
Thank you again
Thank you again
Tipu
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: Unattended execution
I was more sugesting to make a general try catch around whole scenario. This would catch all exceptions and then you can clean up and prepare for next scenario. Technically every line that manipulates Ranorex Adapters like Button.Click() can throw exception if that button is not found or something else happens. When writing our code we try to be reasonable: make sure form exists, by checking form or a button on the form for existance, then we assume that all other controls on this form exist also. But that sometimes leaves us with unhandled exceptions, which we catch in general try catch around whole test.
Re: Unattended execution
Thank you again, it worked after using try catch before each method call and i changed error behavior continue with sibling
Tipu
Re: Unattended execution
when error catches it doesn't tell me where is the error happenned , how do i get that called, Thank you in advance
Tipu
Re: Unattended execution
Report the exception message to the log and it will tell you what happened.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...