private static string Discover(string[] dlls, Stream stream, string nunit3ConsoleExePath) { string discoveredTestsInJson = string.Empty; if (dlls != null && dlls.Length > 0) { var tests = new Discoverer(dlls, nunit3ConsoleExePath).Discover(); if (tests != null) discoveredTestsInJson = new JavaScriptSerializer().Serialize(tests); } return discoveredTestsInJson; }
private static void Discover(string[] args, NamedPipeClientStream stream) { if (args != null && args.Length > 0) { var tests = new Discoverer(args.Skip(1)).Discover(); string serialized = String.Empty; if (tests != null) { var jsSerializer = new JavaScriptSerializer(); serialized = jsSerializer.Serialize(tests); } Write(stream, serialized); } }
private static void Discover(string[] args, NamedPipeClientStream stream) { Log("In discovery"); if (args != null && args.Length > 0) { var dlls = args.Skip(1); Log("DLLS: " + dlls); var tests = new Discoverer(dlls).Discover(); Log("Tests" + tests ?? "Geen tests gevonden"); string serialized = String.Empty; if (tests != null) { var jsSerializer = new JavaScriptSerializer(); serialized = jsSerializer.Serialize(tests); } Log("Tests" + serialized); Write(stream, serialized); } }
public void ValidTestDLL_ShouldListAllTests() { var discoverer = new Discoverer(new string[] { @"D:\API\Olympus\Main\Source\Server\Build\Test\APISoftware.Navigator.Services.Test.dll" }); var sw = new System.Diagnostics.Stopwatch(); sw.Start(); var tests = discoverer.Discover(); int counter = 0; foreach (var test in tests) { foreach (var method in test.TestMethods) { counter++; Console.WriteLine(method.Name); } } sw.Stop(); Console.WriteLine(counter); Console.WriteLine(sw.ElapsedMilliseconds / 1024.0); }