Ejemplo n.º 1
0
        private void StoreCalculations(List <MatchCollection> tempStats)
        {
            try
            {
                Stats = new TestStats
                {
                    totalTests   = GetValueForMatch(tempStats, "Total tests:"),
                    testsPassed  = GetValueForMatch(tempStats, "Passed:"),
                    testsFailed  = GetValueForMatch(tempStats, "Failed:"),
                    testsSkipped = GetValueForMatch(tempStats, "Skipped:")
                };

                UnitTestEvidence.FeatureRating = GetTestCountCheckRating();

                var featureImplemented = Stats.PercentagePassed >= 100 && Stats.totalTests > TestCountThreshold;
                if (featureImplemented)
                {
                    UnitTestEvidence.SetPassed(new SimpleEvidenceBuilder(StructuredOutput()));
                }
                else
                {
                    UnitTestEvidence.SetFailed(new SimpleEvidenceBuilder(StructuredOutput()));
                }
            }
            catch
            {
                UnitTestEvidence.SetInconclusive(new SimpleEvidenceBuilder("Error while getting tests from applicant's project"));
            }
        }
Ejemplo n.º 2
0
        private void ExecuteTheCheck()
        {
            var pr            = new ProcessDetails(processName, workingDir, arguments);
            var processOutput = new FeatureRunner().Execute(pr);


            if (processOutput.Output == null)
            {
                UnitTestEvidence.SetInconclusive(UnitTestEvidence.Evidence);
                return;
            }

            Output = processOutput.Output;

            ProcessResult(Output);
        }