/// <summary> /// Creates a report on tests coverage, according to user's choices /// </summary> /// <returns>The document created, or null</returns> public override Document BuildDocument() { Document retVal = new Document(); Log.Info("Creating test report"); retVal.Info.Title = "EFS Test report"; retVal.Info.Author = "ERTMS Solutions"; retVal.Info.Subject = "Test report"; TestsCoverageReport report = new TestsCoverageReport(retVal); Log.Info("..gathering requirement coverage"); report.CreateRequirementCoverageArticle(this); HashSet <DataDictionary.Rules.RuleCondition> activatedRules = new HashSet <DataDictionary.Rules.RuleCondition>(); if (TestCase != null) /* We generate a report for a selected test case */ { Log.Info("..creating test case report " + TestCase.Name); EFSSystem.Runner = new DataDictionary.Tests.Runner.Runner(TestCase.SubSequence); Dictionary = TestCase.Dictionary; report.CreateTestCaseSection(EFSSystem.Runner, TestCase, this, activatedRules, true); } else if (SubSequence != null) /* We generate a report of a selected sub sequence */ { Log.Info("..creating sub sequence report " + SubSequence.Name); Dictionary = SubSequence.Dictionary; report.CreateSubSequenceSection(SubSequence, this, activatedRules, true); } else if (Frame != null) /* We generate a report for a selected frame */ { Log.Info("..creating frame report " + Frame.Name); Dictionary = Frame.Dictionary; report.CreateFrameArticle(Frame, this, activatedRules); } else if (Dictionary != null) /* We generate a full report */ { Log.Info("..creating dictionary report "); foreach (Frame frame in Dictionary.Tests) { report.CreateFrameArticle(frame, this, activatedRules); } } return(retVal); }
/// <summary> /// Creates a report on tests coverage, according to user's choices /// </summary> /// <returns>The document created, or null</returns> public override Document BuildDocument() { Document retVal = new Document(); Log.Info("Creating test report"); retVal.Info.Title = "EFS Test report"; retVal.Info.Author = "ERTMS Solutions"; retVal.Info.Subject = "Test report"; TestsCoverageReport report = new TestsCoverageReport(retVal); Log.Info("..gathering requirement coverage"); report.CreateRequirementCoverageArticle(this); HashSet<RuleCondition> activatedRules = new HashSet<RuleCondition>(); if (TestCase != null) /* We generate a report for a selected test case */ { Log.Info("..creating test case report " + TestCase.Name); EFSSystem.Runner = new Runner(TestCase.SubSequence, false, false, true); Dictionary = TestCase.Dictionary; report.CreateTestCaseSection(EFSSystem.Runner, TestCase, this, activatedRules, true); } else if (SubSequence != null) /* We generate a report of a selected sub sequence */ { Log.Info("..creating sub sequence report " + SubSequence.Name); Dictionary = SubSequence.Dictionary; report.CreateSubSequenceSection(SubSequence, this, activatedRules, true); } else if (Frame != null) /* We generate a report for a selected frame */ { Log.Info("..creating frame report " + Frame.Name); Dictionary = Frame.Dictionary; report.CreateFrameArticle(Frame, this, activatedRules); } else if (Dictionary != null) /* We generate a full report */ { Log.Info("..creating dictionary report "); foreach (Frame frame in Dictionary.Tests) { report.CreateFrameArticle(frame, this, activatedRules); } } return retVal; }