예제 #1
0
        public void MarkTestsByStatus()
        {
            if (TestEnvironment.AreTestsRunningLocally())
            {
                return;
            }

            if (TestCaseId == 0)
            {
                return;
            }

            var status = TestContext.CurrentContext.Result.Outcome.Status;

            switch (status)
            {
            case TestStatus.Failed:
                MarkAsRetest(TestCaseId);
                break;

            case TestStatus.Passed:
            case TestStatus.Inconclusive:
                MarkAsPassed(TestCaseId);
                break;
            }
        }
예제 #2
0
        public void TestInitialize()
        {
            var dir = Path.GetDirectoryName(typeof(SetUpTests).Assembly.Location);

            Directory.SetCurrentDirectory(dir);

            TestRailClient = new TestRailAPIClient(_testRailUrl,
                                                   TestUserData.GetTestrailUser().Username, TestUserData.GetTestrailUser().Password);

            if (!TestEnvironment.AreTestsRunningLocally())
            {
                TestRailClient.CreateTestRun("Test run " + DateTime.Now);
            }
        }
예제 #3
0
        public void TestInitialize()
        {
            var dir = Path.GetDirectoryName(typeof(SetUpTests).Assembly.Location);

            Directory.SetCurrentDirectory(dir);

            TestRailClient = new TestRailAPIClient(_testRailUrl,
                                                   TestUserData.GetTestrailUser().Username, TestUserData.GetTestrailUser().Password);
            var asm     = Assembly.GetExecutingAssembly();
            var path    = System.IO.Path.GetDirectoryName(asm.Location) + "/ProtonVpn.exe";
            var version = Assembly.LoadFile(path).GetName().Version.ToString();

            version = version.Substring(0, version.Length - 2);
            if (!TestEnvironment.AreTestsRunningLocally())
            {
                TestRailClient.CreateTestRun(version + " test run " + DateTime.Now);
            }
        }