This is a migrated thread and some comments may be shown as answers.

Is it possible to know which step or line throws exception (System.TimeoutException: Wait for condition has timed out)?

4 Answers 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ray Lin
Top achievements
Rank 1
Ray Lin asked on 15 Jun 2010, 07:16 PM

Hi, I have a question.

Sometimes my test cases pass, but sometimes my test cases fail due to the following error.

System.TimeoutException: Wait for condition has timed out

I believe it is the network speed issue. I would like to customize the error message, but I find it seems not possible for me to do it. Is it possible for me to know which step or line throws this exception?  I can increase the sleep time.

 Thanks,

Ray

4 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 15 Jun 2010, 10:59 PM
Hi Ray Lin,

In what way do you want to customize the error message? If you know which step is failing you can enter any text you want in the LogMessageOnFailure property. The text you enter in this property will be added to the log if/when that step fails.

Greetings,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Ray Lin
Top achievements
Rank 1
answered on 16 Jun 2010, 12:17 AM
Because I use MSTest to exeucte test cases, how can we add LogMessageOnFailure in the test case? Could you please show me the sample? :)

Thanks,
Ray
0
Ray Lin
Top achievements
Rank 1
answered on 16 Jun 2010, 06:32 PM

I find most of the test cases fail due to the following error even I set the sleep time longer. Some test cases don't have this issue.
Any idea?? :)

Thanks,

 
Ray

at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr, Boolean waitOnElement, Int32 timeout)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](XamlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](String[] clauses)

0
Cody
Telerik team
answered on 16 Jun 2010, 09:22 PM
Hi Ray Lin,

The LogMessageOnFailure is a test step property. You can see it in the logmessageonfailureqa screenshot. When you run the test via MSTest you can see your custom message in the output log as shown in the logmessageonfailuretestresults screenshot.

No I'm sorry I don't have any ideas regarding the CheckResult. I'd have to see your application and your test before I can figure out what's going on. Do you want to show it to me via GoToMeeting? Let me know what timezone you are in and your availability and I'll setup the meeting. I'm located in Austin, TX which is Central Daylight Time (GMT -6).

Best wishes,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Ray Lin
Top achievements
Rank 1
Answers by
Cody
Telerik team
Ray Lin
Top achievements
Rank 1
Share this question
or