Page 1 of 1

Create Test Case from code Module

Posted: Tue May 13, 2014 3:35 pm
by skhanpara
I wrote a function for testing policies which has similar steps and its working fine
Is there anyway i can give heading to my individual test run

when we create a new Test case in test suite.it gets a heading in report

similar stuff i want to do in code module

is it possible???

Re: Create Test Case from code Module

Posted: Wed May 14, 2014 3:35 pm
by Support Team
Hi,

When I got the question correctly you want to create your own report structure in code, right?
If so, this can be handled by using the methods of the TestReport class.
Here is a small sample about how you can create a test case with a module in code:
TestReport.Setup(ReportLevel.Debug, "MyReport.rxlog", true);
TestReport.BeginTestSuite("My TestSuit");
TestReport.BeginTestCase("My TestCase");
TestReport.BeginTestModule("My Test Module");
...
// Your actions can come here
...
TestReport.EndTestModule();
TestReport.EndTestCase();
TestReport.SaveReport();
For more information about the TestReport class please see: TestReport Class.

Regards,
Markus