I have created a Test suite (for use with a CI system) that will interrogate multiple log files and pass this nicely out the other side of the Ranorex reporting engine. (There are about 20 log files)
In order to get 1 Ranorex report per log file I have edited the Program.cs file of the project as follows:
public static int Main(string[] args) { Keyboard.AbortKey = System.Windows.Forms.Keys.Pause; int error = 0; string current = System.IO.Directory.GetCurrentDirectory(); string[] files = System.IO.Directory.GetFiles(current,"*.log"); string filename; string testname; foreach( string file in files) { filename = System.IO.Path.GetFileName(file); testname = System.IO.Path.GetFileNameWithoutExtension(file); try { error = TestSuiteRunner.Run(typeof(Program), "/pa:varFileName=" + filename + " /rul:" + testname + " /rf:" + testname + ".html /rl:Info"); } catch (Exception e) { Report.Error("Unexpected exception occurred: " + e.ToString()); error = -1; } } return error; }Example output report - https://www.screencast.com/t/OTceg91IJkq
Report 1 is as expected, Report 2 includes the Rulelabel of report 1, shows 2 lots of 'TestData' and now includes double the test cases. Report 3 everything is tripled etc.
Is there anyway to make this work from within my project or do I just need to call the testsuiterunner externally from some kind of wrapper instead?
I anyone can offer any suggestions or advice I would be very grateful.
Many thanks
Ben