Multiple Suites per Report

Bug reports.
User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Multiple Suites per Report

Post by artur_gadomski » Thu Jun 21, 2012 7:50 am

Hi
Our Automation is running data based tests, with mode of the test defined in test data. One of the modes requires all reports to be combined into one. We have managed it by setting up report for each data row using the same name, setting up a suite and not clearing activity stack. Something like this:

Code: Select all

foreach (var row in rows) {
if (mode.combined) { reportName = notchanged} 
else {reportName = generateUniqueName();}
Test.Report.Setup(ReportLevel.Debug, reportName, true);
TestReport.BeginTestSuite(title);

//tests

TestReport.SaveReport();
if (!mode.combined)
{
    TestReport.SaveReport();
    ActivityStack.Clear();
}
}
That worked great for Ranorex 3.2 although as I now look at the reports created a nested test suite activities. But even with incorrect structure RanorexReport3.xsl was able to deal with that and display report correctly. With change to Ranorex 3.3 this bug was fixed :(. Reports now can not open nested test cases.

I have tried adding a line:
TestReport.CurrentTestSuiteActivity.End(ActivityStatus.Success);
But it seems this does nothing. Test suites are still nested.
So...
Starting multiple test suites (even with ending test suites activities) produces report like this:

Code: Select all

<activity testsuitename...>
    <activity testcasename...>
    </activity>
    <activity testsuitename...>
        <activity testcasename...>
        </activity>
        <activity testsuitename...>
            <activity testcasename...>
            </activity>
        </activity>
    </activity>
</activity>
This report works with xsl file from 3.2 but not 3.3.
Fixing this manually works with both xsl files.

The important bug is End on current test suite activity doesn't work.

I have since fixed the code so that test suite is only created once for combined report mode, which of course works.
Attachments
RanorexReports.rar
Examples
(230.35 KiB) Downloaded 241 times

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Multiple Suites per Report

Post by Support Team » Fri Jun 22, 2012 12:45 pm

Hi,

you can overcome this issue by simply calling
ActivityStack.End(ActivityStatus.Success);
instead of
TestReport.CurrentTestSuiteActivity.End(ActivityStatus.Success);
Regards,
Tobias
Ranorex Team
.
Image