Data-driven-test mit exception in the first iteration
Posted: Wed Jun 04, 2014 8:02 am
Hi,
I'm absolutly sure there is already a solution for my question in this forum but I can't find it.
We have a special problem with a data-driven-test handling an exception in the first iteration. Just to explain the behaviour the iteration looks like this:
- Iteration
+ Dialog 1 (this dialog is not displayed in the first iteration)
+ Dialog 2
+ Dialog 3
We decided to add some user code like shown in the Code Examples (.../support/user-guide-20/test-automation-code-examples.html#c3203 - sadly I cannot post URL's) to validate if this particular repository item exists or not:
Works great but the tests waits for 30 seconds to continue (without fail). So we tried to set a SearchTimeOut for 100 milliseconds like written in the API (.../Documentation/Ranorex/html/P_Ranorex_Core_Repository_RepoItemInfo_SearchTimeout.htm):
Here is our code-snippet:
Looks like we are doing something wrong because Ranorex still waits for 30 seconds:
So our question is:
How can we minimize the SearchTimeout only for this repository item?
And:
Perhaps our solution is not the best, maybe there is a much easier way to solve this test-design? And probably without warning?
I'm absolutly sure there is already a solution for my question in this forum but I can't find it.
We have a special problem with a data-driven-test handling an exception in the first iteration. Just to explain the behaviour the iteration looks like this:
- Iteration
+ Dialog 1 (this dialog is not displayed in the first iteration)
+ Dialog 2
+ Dialog 3
We decided to add some user code like shown in the Code Examples (.../support/user-guide-20/test-automation-code-examples.html#c3203 - sadly I cannot post URL's) to validate if this particular repository item exists or not:
Code: Select all
// Validate 'Enabled' attribute of button 'Delete'
Validate.Attribute(repo.MyApp.Buttons.ButtonDeleteInfo,"Enabled",false);
Code: Select all
public Duration SearchTimeout { get; set; }
Code: Select all
repo.Positionserfassung.ButtonNeuInfo.SearchTimeout = 100;
Report.Info("Taste 'F2 - Neu' fehlt beim ersten Durchlauf - Timeout: " + repo.Positionserfassung.ButtonNeuInfo.SearchTimeout.ToString());
if (Validate.Exists(repo.Positionserfassung.ButtonNeu, "Prüfe Existenz von Taste '{0}'", false)) repo.Positionserfassung.ButtonNeu.Click();
How can we minimize the SearchTimeout only for this repository item?
And:
Perhaps our solution is not the best, maybe there is a much easier way to solve this test-design? And probably without warning?