Exemplo n.º 1
0
        public void OnTestEvent(string report)
        {
            var xmlNode = XmlHelper.CreateXmlNode(report);

            switch (xmlNode.Name)
            {
            case "start-run":
            {
                Reporter.RunStarted();
                break;
            }

            case "test-run":
            {
                Reporter.RunFinished();
                break;
            }

            case "start-test":
            {
                Reporter.TestStarted(TestRunHelper.GetTestRun(xmlNode));
                break;
            }

            case "test-case":
            {
                Reporter.TestFinished(TestRunHelper.GetTestRun(xmlNode));
                break;
            }
            }
        }
Exemplo n.º 2
0
        private ITestRun GetGhprTestRun(ITest nunitTest)
        {
            var testXml = nunitTest.ToXml(true).OuterXml;
            var xDoc    = new XmlDocument();

            xDoc.LoadXml(testXml);
            var testRun = TestRunHelper.GetTestRun(xDoc.DocumentElement);

            return(testRun);
        }
Exemplo n.º 3
0
        public void OnTestEvent(string report)
        {
            var xmlNode = XmlHelper.CreateXmlNode(report);

            switch (xmlNode.Name)
            {
            case "start-run":
            {
                _reporter.RunStarted();
                break;
            }

            case "test-run":
            {
                _reporter.RunFinished();
                break;
            }

            case "start-test":
            {
                _reporter.TestStarted(TestRunHelper.GetTestRun(xmlNode));
                break;
            }

            case "test-case":
            {
                _reporter.TestFinished(TestRunHelper.GetTestRun(xmlNode));
                break;
            }

            default:
            {
                //Log.Warning($"Unknown XML Node! Node name: '{xmlNode.Name}'");
                break;
            }
            }
        }