private static ICoverageAnalysisResult AnalyseCoverage( ICoverageAnalyser coverageAnalyser, IOutputWriter outputWriter, Config config) { outputWriter.WriteLine("Test coverage analysis starting..."); var result = coverageAnalyser.AnalyseCoverage(config).Result; outputWriter.WriteLine($"Test coverage analysis complete."); return(result); }
public MutationTestProcess(MutationTestInput mutationTestInput, IReporter reporter, IMutationTestExecutor mutationTestExecutor, MutantOrchestrator <SyntaxNode> orchestrator = null, IFileSystem fileSystem = null, IMutantFilter mutantFilter = null, ICoverageAnalyser coverageAnalyser = null, IStrykerOptions options = null) { Input = mutationTestInput; _projectContents = mutationTestInput.ProjectInfo.ProjectContents; _reporter = reporter; _options = options; _mutationTestExecutor = mutationTestExecutor; _logger = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>(); _coverageAnalyser = coverageAnalyser ?? new CoverageAnalyser(_options, _mutationTestExecutor, Input); _mutationProcess = new CsharpMutationProcess(Input, fileSystem ?? new FileSystem(), _options, mutantFilter, _reporter, orchestrator); }
public MutationTestProcess(MutationTestInput mutationTestInput, IReporter reporter, IMutationTestExecutor mutationTestExecutor, IMutantOrchestrator orchestrator = null, IFileSystem fileSystem = null, StrykerOptions options = null, IMutantFilter mutantFilter = null, ICoverageAnalyser coverageAnalyser = null) { _input = mutationTestInput; _projectInfo = mutationTestInput.ProjectInfo.ProjectContents; _reporter = reporter; _options = options; _mutationTestExecutor = mutationTestExecutor; _orchestrator = orchestrator ?? new MutantOrchestrator(options: _options); _fileSystem = fileSystem ?? new FileSystem(); _logger = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>(); _coverageAnalyser = coverageAnalyser ?? new CoverageAnalyser(_options, _mutationTestExecutor, _input); SetupMutationTestProcess(mutantFilter); }
public MutationTestProcess(MutationTestInput mutationTestInput, IReporter reporter, IMutationTestExecutor mutationTestExecutor, BaseMutantOrchestrator <SyntaxNode> cSharpOrchestrator = null, BaseMutantOrchestrator <FSharpList <SynModuleOrNamespace> > fSharpOrchestrator = null, IFileSystem fileSystem = null, IMutantFilter mutantFilter = null, ICoverageAnalyser coverageAnalyser = null, StrykerOptions options = null) { Input = mutationTestInput; _projectContents = mutationTestInput.ProjectInfo.ProjectContents; _reporter = reporter; _options = options; _mutationTestExecutor = mutationTestExecutor; _fileSystem = fileSystem ?? new FileSystem(); _logger = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>(); _coverageAnalyser = coverageAnalyser ?? new CoverageAnalyser(_options, _mutationTestExecutor, Input); _language = Input.ProjectInfo.ProjectUnderTestAnalyzerResult.GetLanguage(); _orchestrator = cSharpOrchestrator ?? fSharpOrchestrator ?? ChooseOrchestrator(_options); SetupMutationTestProcess(mutantFilter); }
public MutationTestProcess(MutationTestInput mutationTestInput, IReporter reporter, IMutationTestExecutor mutationTestExecutor, IMutantOrchestrator orchestrator = null, ICompilingProcess compilingProcess = null, IFileSystem fileSystem = null, StrykerOptions options = null, IMutantFilter mutantFilter = null, ICoverageAnalyser coverageAnalyser = null) { _input = mutationTestInput; _reporter = reporter; _options = options; _mutationTestExecutor = mutationTestExecutor; _orchestrator = orchestrator ?? new MutantOrchestrator(options: _options); _compilingProcess = compilingProcess ?? new CompilingProcess(mutationTestInput, new RollbackProcess()); _fileSystem = fileSystem ?? new FileSystem(); _logger = ApplicationLogging.LoggerFactory.CreateLogger <MutationTestProcess>(); _coverageAnalyser = coverageAnalyser ?? new CoverageAnalyser(_options, _mutationTestExecutor, _input); _mutantFilter = mutantFilter ?? MutantFilterFactory .Create(options); }
/// <summary> /// Load the coverage analysis plugin /// </summary> /// <param name="dllPath">Path to the dll</param> /// <param name="className">Class Name of the dll</param> protected void LoadCoverageAnalyserPlugin(string dllPath, string className) { Type ObjType = null; if (File.Exists(dllPath)) { try { Assembly ass = null; ass = Assembly.LoadFile(dllPath); if (ass != null) { ObjType = ass.GetType(className); if (ObjType != null) { ICoverageAnalyser plugin = (ICoverageAnalyser)Activator.CreateInstance(ObjType); if (plugin != null) { plugin.registerCallBack(this); PluginList.Add(plugin); m_coverageAnalyser = plugin; plugin.Owner = this; plugin.Show(dockParent, WeifenLuo.WinFormsUI.Docking.DockState.DockRightAutoHide); evPluginLoaded(plugin); } else { //do nothing } } } } catch (Exception err) { MessageBox.Show(err.ToString()); } } }