JUnit report empty--interference from previous steps?
Posted: Thu Nov 09, 2017 8:48 pm
I am executing our tests with a command-line specifying run configuration and report file name, e.g./z.B.:
Additionally, in the test suite the second-to-last (penultimate/vorletzte) step in the test suite Teardown is to call the ReportToPDFModule with the following parameters:
(The reason for "failed" is because I want to email the PDF to our team with any failures readily visible--otherwise the PDF is too big and too detailed)
After the call to ReportToPDFModule, the final step in the test suite is to execute a user code module to save the report and export a couple stats to some files--this is simply so my batch file can grab these numbers and put them into the team email for quick overview. The code is:
The problem:
I wish to generate JUnit reports so I can import them into a DB for tracking and reporting. However, whether I try the command-line parameter "/junit" or check "Create a jUnit compatible copy of the report" in the Test Suite Properties, the XML file is generated (e.g., TESTAUTOWIN10_2017_11_09_11_10_SelectedTest.rxlog.junit.xml), but it is blank.
So I'm doing several things here:
Rather than potentially spend a lot of time sorting through the various factors here to see what the culprit may be, I'd like to ask the Ranorex team if there is a known issue generating a JUnit report with any of these actions? Thank you--
Code: Select all
JobCreator.exe /rc:SelectedTest /reportfile:\Test\Reports\TESTAUTOWIN10_2017_11_09_11_10_SelectedTest.rxlog
Code: Select all
PDFName RanorexResults
Details failed
After the call to ReportToPDFModule, the final step in the test suite is to execute a user code module to save the report and export a couple stats to some files--this is simply so my batch file can grab these numbers and put them into the team email for quick overview. The code is:
Code: Select all
Ranorex.Core.Reporting.TestReport.SaveReport();
var suiteActivity = Ranorex.Core.Reporting.TestReport.CurrentTestSuiteActivity;
int casesSucceeded = suiteActivity.TotalSuccessTestCaseCount;
int casesFailed = suiteActivity.TotalFailedTestCaseCount;
StreamWriter suiteSucceeded = new StreamWriter("Succeeded", false);
suiteSucceeded.WriteLine(casesSucceeded.ToString());
suiteSucceeded.Close();
StreamWriter suiteFailed = new StreamWriter("Failed", false);
suiteFailed.WriteLine(casesFailed.ToString());
suiteFailed.Close();
I wish to generate JUnit reports so I can import them into a DB for tracking and reporting. However, whether I try the command-line parameter "/junit" or check "Create a jUnit compatible copy of the report" in the Test Suite Properties, the XML file is generated (e.g., TESTAUTOWIN10_2017_11_09_11_10_SelectedTest.rxlog.junit.xml), but it is blank.
So I'm doing several things here:
- Running a specific run-configuration
Specifying a custom name for the report file
Exporting (only "failed") report to PDF file via Automation Helper
Saving the report in user code explicitly
Rather than potentially spend a lot of time sorting through the various factors here to see what the culprit may be, I'd like to ask the Ranorex team if there is a known issue generating a JUnit report with any of these actions? Thank you--