Restart current testcase

Class library usage, coding and language questions.
User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Restart current testcase

Post by odklizec » Wed Mar 09, 2016 8:49 am

Hi,

In my opinion, it's not recommended to restart the testcase like this because it may break the test flow and hence the report is most probably not written? But I can be wrong and you just found a bug in Ranorex? Anyway, I never saw using code like this to restart the TC and there were couple of discussions on that subject in the past.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Jeff
Posts: 9
Joined: Mon Oct 10, 2016 2:51 pm

Re: Restart current testcase

Post by Jeff » Wed Oct 19, 2016 5:06 pm

Hi,

This post is very old but for thus like me who wanted to know the response to the question.
In order to add the logs to write in the report when you start manually a test case, add:
TestReport.BeginTestCase("you test case");
test_case.Run(test_case.DataContext, false); 
TestReport.EndTestcase();
TestReport.SaveReport();
Regards,
jeff