Hi
I really like how the new report looks like, but since we're not using recordings and we co all out code in Visual Studio I was wondering if there is a way to achieve the same results with just coding.
using Ranorex.Core.Reporting;
//set up test report
TestReport.Setup(ReportLevel.Info, "report.rxlog", true);
TestReport.EnableTracingScreenshots = false;
TestReport.ReportWriteInterval = 0;
//show progress form
Ranorex.Controls.ProgressForm.Show();
//Shows Test Suite name and running test name in progress form
using (new ActivityContext(new TestSuiteActivity("TestSuiteName", "", 0, null, "", "")))
{
using (new ActivityContext(new TestCaseActivity("TestName", "", "", "", 0, 0, null, "", null)))
{
}
}
Report.Info("Hello");
TestReport.SaveReport();TestReport.Setup(ReportLevel.Debug, "report.rxlog", true);
TestReport.EnableTracingScreenshots = false;
TestReport.ReportWriteInterval = 0;
//show progress form
Ranorex.Controls.ProgressForm.Show();
using (new ActivityContext(new TestSuiteActivity("Test Suite Name", "", 0, null, "", "")))
{
using (new ActivityContext(new TestCaseActivity("Test Case Name", "", "", "", 0, 0, null, "", null)))
{
using (new ActivityContext(new TestModuleActivity("Test Module Name", "", "", ModuleType.UserCode)))
{
Report.Info("Message");
Report.Failure("Message");
}
Report.Failure(""); // Causes test case to have failure status.
}
}
TestReport.SaveReport();Users browsing this forum: No registered users and 0 guests