Hi,
I have C# code running tests, which call Ranorex Repository items and uses Ranorex 3 logging. During the test, I run one test suite few times and generate files with different names each time.
The problem is that those files contain all information that happened before the file, too. For example, in the beginning of the suite I call TestReport.Setup(*parameters*) and in the end I call Report.End() and TestReport.SaveReport(). Then, suite starts again and it starts with Setup call with different file name. But once the whole test is done, the second report contains information from first and second tests, the third one contains information from first, second and third and so on.
Is there any way to prevent this? it doesn't seem like Report.End() does anything here...
I'm running on Ranorex 3.0.4, VS 2010, Windows 7 x64.
Kind regards,
Elena
multiple reports per run
Re: multiple reports per run
In short, this is the code I'm running:
static void Main(string[] args) { TestReport.Setup(ReportLevel.Debug, "file1.rxlog", true); TestReport.BeginTestSuite("My test suite 1"); TestReport.BeginTestModule("Test module - pre test case"); TestReport.EndTestModule(); TestReport.BeginTestCase("My test case 1"); TestReport.BeginTestModule("test module - in test case"); TestReport.EndTestModule(); TestReport.EndTestCase(); TestReport.BeginTestModule("Test module - post test case"); TestReport.EndTestModule(); TestReport.SaveReport(); Report.End(); TestReport.Setup(ReportLevel.Debug, "file2.rxlog", true); TestReport.BeginTestSuite("My test suite 1"); TestReport.BeginTestModule("Test module - pre test case"); TestReport.EndTestModule(); TestReport.BeginTestCase("My test case 2"); TestReport.BeginTestModule("test module - in test case"); TestReport.EndTestModule(); TestReport.EndTestCase(); TestReport.BeginTestModule("Test module - post test case"); TestReport.EndTestModule(); TestReport.SaveReport(); }
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: multiple reports per run
Hi,
to reset your report you can use following line of code:
Kind regards,
Tobias
Support Team
to reset your report you can use following line of code:
Code: Select all
ActivityStack.Clear()
Tobias
Support Team