예제 #1
0
        private void FinishTest(TestResult.ResultType result)
        {
            m_TestsProvider.FinishTest(currentTest);
            var testResult = m_ResultList.Single(t => t.GameObject == currentTest.gameObject);

            testResult.resultType = result;
            testResult.duration   = Time.time - m_StartTime;
            testResult.messages   = m_TestMessages;
            testResult.stacktrace = m_Stacktrace;
            TestRunnerCallback.TestFinished(testResult);
            currentTest = null;

#if UNITY_4_6 || UNITY_4_7 || UNITY_5_0 || UNITY_5_1 || UNITY_5_2
            var loadedLevelName = Application.loadedLevelName;
#else
            var loadedLevelName = UnityEditor.SceneManagement.EditorSceneManager.GetActiveScene().name;
#endif

            if (!testResult.IsSuccess &&
                testResult.Executed &&
                !testResult.IsIgnored)
            {
                k_ResultRenderer.AddResults(loadedLevelName, testResult);
            }
        }
예제 #2
0
 private void FinishTest(TestResult.ResultType result)
 {
     testToRun.Find(results => results == currentTest).resultType = result;
     if (currentTest.go != null)
     {
         currentTest.go.gameObject.SetActive(false);
     }
     currentTest.isRunning  = false;
     currentTest.duration   = Time.time - startTime;
     currentTest.messages   = testMessages;
     currentTest.stacktrace = stacktrace;
     TestRunnerCallback.TestFinished(currentTest);
     currentTest = null;
 }
예제 #3
0
        private void FinishTest(TestResult.ResultType result)
        {
            Debug.Log("FinishTest");
            m_TestsProvider.FinishTest(currentTest);
            TestResult testResult = m_ResultList.Single((TestResult t) => t.GameObject == currentTest.gameObject);

            testResult.resultType = result;
            testResult.duration   = (double)Time.time - m_StartTime;
            testResult.messages   = m_TestMessages;
            testResult.stacktrace = m_Stacktrace;
            TestRunnerCallback.TestFinished(testResult);
            currentTest = null;
            if (!testResult.IsSuccess && testResult.Executed && !testResult.IsIgnored)
            {
                k_ResultRenderer.AddResults(SceneManager.GetActiveScene().name, testResult);
            }
        }
예제 #4
0
        private void FinishTest(TestResult.ResultType result)
        {
            m_TestsProvider.FinishTest(currentTest);
            var testResult = m_ResultList.Single(t => t.GameObject == currentTest.gameObject);

            testResult.resultType = result;
            testResult.duration   = Time.time - m_StartTime;
            testResult.messages   = m_TestMessages;
            testResult.stacktrace = m_Stacktrace;
            TestRunnerCallback.TestFinished(testResult);
            currentTest = null;
            if (!testResult.IsSuccess &&
                testResult.Executed &&
                !testResult.IsIgnored)
            {
                k_ResultRenderer.AddResults(Application.loadedLevelName, testResult);
            }
        }
예제 #5
0
        private void FinishTest(TestResult.ResultType result)
        {
            FindObjectOfType <PlayerController> ().PlayerReset();
            m_TestsProvider.FinishTest(currentTest);
            var testResult = m_ResultList.Single(t => t.GameObject == currentTest.gameObject);

            testResult.resultType = result;
            testResult.duration   = Time.time - m_StartTime;
            testResult.messages   = m_TestMessages;
            testResult.stacktrace = m_Stacktrace;
            TestRunnerCallback.TestFinished(testResult);
            currentTest = null;
            if (!testResult.IsSuccess &&
                testResult.Executed &&
                !testResult.IsIgnored)
            {
                k_ResultRenderer.AddResults(SceneManager.GetActiveScene().name, testResult);
            }
        }
예제 #6
0
        private void FinishTest(TestResult.ResultType result)
        {
            testsProvider.FinishTest(currentTest);
            var testResult = testToRun.Single(t => t.isRunning);

            testResult.resultType = result;
            testResult.isRunning  = false;
            testResult.duration   = Time.time - startTime;
            testResult.messages   = testMessages;
            testResult.stacktrace = stacktrace;
            TestRunnerCallback.TestFinished(testResult);
            currentTest = null;
            if (!testResult.IsSuccess &&
                testResult.Executed &&
                !testResult.IsIgnored)
            {
                resultRenderer.AddResults(Application.loadedLevelName, testResult);
            }
        }
예제 #7
0
        private void FinishTest(TestResult.ResultType result)
        {
            // Hot-swap can cause the test provider to be lost
            if (m_TestsProvider != null)
            {
                m_TestsProvider.FinishTest(currentTest);
            }
            var testResult = m_ResultList.Single(t => t.GameObject == currentTest.gameObject);

            testResult.resultType = result;
            testResult.duration   = Time.time - m_StartTime;
            testResult.messages   = m_TestMessages;
            testResult.stacktrace = m_Stacktrace;
            TestRunnerCallback.TestFinished(testResult);
            currentTest = null;
            if (!testResult.IsSuccess &&
                testResult.Executed &&
                !testResult.IsIgnored)
            {
                k_ResultRenderer.AddResults(SceneManager.GetActiveScene().name, testResult);
            }
        }