My solution does not use the recorder, but it does use the repository. Everything is custom implemented in classes using C#.
In the main method, my custom report is created and ended as follows:
Code: Select all
class Program
{
[STAThread]
public static int Main(string[] args)
{
string logFileName = string.Format("Test_Case_{0:yyyy-MM-dd_hh-mm-ss-tt}.rxlog", System.DateTime.Now);
Report.Setup(ReportLevel.Always, logFileName, true);
Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
int error = 0;
try
{
error = TestSuiteRunner.Run(typeof(Program), Environment.CommandLine);
}
catch (ImageNotFoundException e)
{
//code omitted
}
catch (RanorexException e)
{
//code omitted
}
catch (ThreadAbortException)
{
Report.Warn("AbortKey has been pressed");
Report.End();
Thread.ResetAbort();
error = -1;
}
catch (Exception e)
{
//code omitted
}
finally
{
try
{
//code omitted
error = -1;
Report.End();
}
catch (Exception e)
{
//code omitted
}
}
Report.End();
return error;
}
Please let me know, how I can keep my custom report, but disable the generation of the default report file.
Many thanks.