Hi
In ranorex report in 'system information' part there is an item called 'duration'. How does one make it work when writing tests in VS2010? It always shows 0ms for me.
'Duration' in Ranorex Report
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: 'Duration' in Ranorex Report
Hi,
http://www.ranorex.com/forum/how-to-mea ... t1682.html
http://www.ranorex.com/forum/capturing- ... t2299.html
Regards,
Peter
Ranorex Team
If you use a Ranorex Test Suite file, then this duration will be set automatically, because this property depends on how long the test suite run. So you have to use a rxtst file or you could use one of following solutions posted by our forum users:artur_gadomski wrote:In ranorex report in 'system information' part there is an item called 'duration'. How does one make it work when writing tests in VS2010? It always shows 0ms for me.
http://www.ranorex.com/forum/how-to-mea ... t1682.html
http://www.ranorex.com/forum/capturing- ... t2299.html
Regards,
Peter
Ranorex Team
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: 'Duration' in Ranorex Report
My code looks like this:
btw time is properly counted and reported for test modules.
Ranorex.Controls.ProgressForm.Show(); TestReport.Setup(ReportLevel.Debug, pathToReport, true); TestReport.BeginTestSuite("suite"); //my code including TestReport.BeginTestModule("Uninstall"); //and TestReport.EndTestModule(); TestReport.SaveReport(); Report.End();And even if I was to count the time myself, could I put it in this 'duration'?
btw time is properly counted and reported for test modules.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: 'Duration' in Ranorex Report
Hello,
the reporting of duration is part of the activity stack that is created while a test suite is run.
You would have to use that. Here is a sample:
Roland
Ranorex Support Team
the reporting of duration is part of the activity stack that is created while a test suite is run.
You would have to use that. Here is a sample:
TestReport.Setup(ReportLevel.Info, filename, false); using (new ActivityContext(new TestSuiteActivity("test suite report header"))) { using (new ActivityContext(new TestCaseActivity(("test case name")))) { using (new ActivityContext(new TestModuleActivity("test module name"))) { Report.Error("error message"); Report.Info("infor message"); } } } TestReport.SaveReport(); Report.End();Regards,
Roland
Ranorex Support Team
- artur_gadomski
- Posts: 207
- Joined: Mon Jul 19, 2010 6:55 am
- Location: Copenhagen, Denmark
- Contact:
Re: 'Duration' in Ranorex Report
I'd rather stay away from this using activity context, that's why I really like the startTestModule/Case and EndTestModule/Case methods. Why is there no EndTestSuite method?
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: 'Duration' in Ranorex Report
Hello,
sure, ActivityContext is just an IDisposable to allow using syntax. It does the same as BeginTest{Suite,Module,Case}/End{Module,Case}. EndTestSuite is not there, because it corresponds to the end of the report, and that you do when you do SaveReport().
Regards,
Roland
Ranorex Support Team
sure, ActivityContext is just an IDisposable to allow using syntax. It does the same as BeginTest{Suite,Module,Case}/End{Module,Case}. EndTestSuite is not there, because it corresponds to the end of the report, and that you do when you do SaveReport().
Regards,
Roland
Ranorex Support Team