Thanks Vadim,
That works, I didnt think of spawning a process and using the console
execution, but it works
I was just curious though why the ReportToHtml of the AutoRunner class
couldnt be overloaded accept a
string parameter of path to where the report file will be written.
So then I would only have to do this:
class AutoExecute
{
static int Main(string[] args)
{
Assembly testAssembly = Assembly.Load("ToolUsage.Test");
using (AutoRunner runner = new AutoRunner(testAssembly))
{
runner.Load();
runner.Run();
runner.ReportToHtml(@"D;\TestReports");
return runner.ExitCode;
}
}
}
The overload could pick up the name of the dll to use as a test report
name so that only the path
is necessary in the ReportToHtml() or it could acknowledge the full
path of a specified file name by looking for a .html exenstion in the
path (if the user did not want to accept the default report name).
Is something like that possible?
In any case I am running again so my ernest thanks :-)
On Apr 5, 8:31 am, "Vadim" <[EMAIL PROTECTED]> wrote:
> You can try to do something like this. This shoud work.
>
> class AutoExecute
> {
> static void Main(string[] args)
> {
> System.Diagnostics.Process.Start(@"C:\Program Files\MbUnit
> \MbUnit.Cons.exe", @"/rf:E:\TestReports /rt:Html /v:+ C:\Projects
> \ToolUsageTests.dll");
> }
> }
>
> Vadim
>
> On Apr 4, 2:36 pm, "SteveM" <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have the following code that works well:
>
> > class AutoExecute
> > {
> > static int Main(string[] args)
> > {
> > Assembly testAssembly = Assembly.Load("ToolUsage.Test");
> > using (AutoRunner runner = new AutoRunner(testAssembly))
> > {
> > runner.Load();
> > runner.Run();
> > runner.ReportToHtml();
>
> > return runner.ExitCode;
> > }
> > }
> > }
>
> > When I execute the exe created using this code It runs my test and
> > then immediately opens an html window with the results. Thats good,
> > but what I need now is to be able to simply redirect that HTML
> > formated data into an .html file for review later. This way I can run
> > this executable autotest in a disconnected fashion (such as after a
> > nightly build) and then from anywhere bring up the HTML report. Is
> > there a way to do this?
>
> > Thanks
> > -SteveM- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---