Esempio n. 1
0
 public override void WriteReport(MutationTestingReport report, string fileName)
 {
     using (var streamWriter = File.CreateText(fileName))
     {
         new XmlSerializer(typeof(MutationTestingReport)).Serialize(streamWriter, report);
     }
 }
 public void MergeMutationTestReport(MutationTestingReport report)
 {
     if (!report.TestsFound)
     {
         _methodsWithNoTest.Add(report.MethodFullname);
     }
     _mutantsCount       += report.MutantsCount;
     _mutantsKilledCount += report.MutantsKilledCount;
     MergeSourceFileReport(report);
 }
Esempio n. 3
0
        private List <MethodReference> MethodDiscovery()
        {
            _method = ValidateMethod();
            _module.LoadDebugInformation();
            var matchingMethods = new List <MethodReference>();

            AddMethod(_method, matchingMethods);
            FindAlternativeMethodsFromNUnitAssembly(_testAssembly, matchingMethods);
            _originalOffsets = _method.Body.Instructions.Select(i => i.Offset).ToArray();
            _report          = new MutationTestingReport(_method);
            return(matchingMethods);
        }
 private void MergeSourceFileReport(MutationTestingReport report)
 {
     foreach (var sourceFile in report.SourceFiles)
     {
         if (sourceFile.SequencePoints.All(sp => sp.AppliedMutants.All(am => am.Killed)))
         {
             continue;
         }
         var matchingSourceFile = _survivingMutantsSources.FirstOrDefault(sf => sf.Url == sourceFile.Url);
         if (matchingSourceFile == null)
         {
             _survivingMutantsSources.Add(new SourceFileReportSummary(sourceFile));
         }
         else
         {
             matchingSourceFile.MergeSequencePoints(sourceFile);
         }
     }
 }
Esempio n. 5
0
 public override void WriteReport(MutationTestingReport report, string fileName)
 {
 }
Esempio n. 6
0
 public abstract void WriteReport(MutationTestingReport report, string fileName);