How to run tests with gallio via code

29 views
Skip to first unread message

hema latha

unread,
Aug 11, 2015, 1:08:47 AM8/11/15
to gallio-user
Hi,
I have used the below code to execute tests by code (C#). But tests are not getting executed.
Can someone please help me on this?

ILogger logger = (ILogger)new RichConsoleLogger(NativeConsole.Instance);
            var setup = new Gallio.Runtime.RuntimeSetup();
            setup.AddPluginDirectory(@"C:\Program Files\Gallio\bin");
            RuntimeBootstrap.Initialize(setup, logger);

            var launcher = new TestLauncher()
            {
                Logger = logger,
                ProgressMonitorProvider = NullProgressMonitorProvider.Instance
            };
            launcher.RuntimeSetup = setup;
            //Assembly assembly = this.GetType().Assembly;
            
            //FileInfo assemblyInfo = new FileInfo(assembly.Location);
            Assembly assembly = typeof(ITestRunner).Assembly;
            launcher.TestProject.TestRunnerFactoryName = StandardTestRunnerFactoryNames.Local;

            FileInfo assemblyInfo = new FileInfo(assembly.Location);
            launcher.AddFilePattern(assembly.Location);
            launcher.AddFilePattern(@"D:\Ladbrokes\NelsonWorkingDirectory\ICE\Ladbrokes_Nelson\_output\SCSuite.dll");
            launcher.DoNotRun = false;
            launcher.Run();
Thanks.

Ed

unread,
Aug 11, 2015, 4:45:40 PM8/11/15
to galli...@googlegroups.com
Hi Hema,

The best I can tell no one is supporting nor updating MbUnit and Gallio. I loved using these tools but it seems it's time to move on to other tools.

You might want to consider switching to another test framework and
test runner tool.

I use NUnit at NUnit.org for my test framework to define what code modules are tests.

I use NCrunch at NCrunch.net to run my tests.

NCrunch is a fantastic tool. It makes my testing work easier and quicker and more enjoyable. I highly recommend it.

Thanks, Ed

--
You received this message because you are subscribed to the Google Groups "gallio-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallio-user...@googlegroups.com.
To post to this group, send email to galli...@googlegroups.com.
Visit this group at http://groups.google.com/group/gallio-user.
For more options, visit https://groups.google.com/d/optout.


Reply all
Reply to author
Forward
0 new messages