Example #1
0
        private void StartNewTest()
        {
            m_TestMessages = "";
            m_Stacktrace   = "";
            m_TestState    = TestState.Running;

            m_StartTime = Time.time;
            currentTest = m_TestsProvider.GetNextTest() as TestComponent;

            var testResult = m_ResultList.Single(result => result.TestComponent == currentTest);

            if (currentTest != null && currentTest.IsExludedOnThisPlatform())
            {
                m_TestState = TestState.Ignored;
                Debug.Log(currentTest.gameObject.name + " is excluded on this platform");
            }

            // don't ignore test if user initiated it from the runner and it's the only test that is being run
            if (currentTest != null &&
                (currentTest.IsIgnored() &&
                 !(isInitializedByRunner && m_ResultList.Count == 1)))
            {
                m_TestState = TestState.Ignored;
            }

            LogMessage(k_StartedMessage);
            TestRunnerCallback.TestStarted(testResult);
        }
Example #2
0
        private void StartNewTest()
        {
            m_TestMessages      = "";
            m_Stacktrace        = "";
            m_TestState         = TestState.Running;
            m_AssertionsToCheck = null;

            m_StartTime = Time.time;
            currentTest = m_TestsProvider.GetNextTest() as TestComponent;

            var testResult = m_ResultList.Single(result => result.TestComponent == currentTest);

            if (currentTest != null && currentTest.ShouldSucceedOnAssertions())
            {
                var assertionList = currentTest.gameObject.GetComponentsInChildren <AssertionComponent>().Where(a => a.enabled);
                if (assertionList.Any())
                {
                    m_AssertionsToCheck = assertionList.ToArray();
                }
            }

            if (currentTest != null && currentTest.IsExludedOnThisPlatform())
            {
                m_TestState = TestState.Ignored;
                Debug.Log(currentTest.gameObject.name + " is excluded on this platform");
            }

            // don't ignore test if user initiated it from the runner and it's the only test that is being run
            if (currentTest != null &&
                (currentTest.IsIgnored() &&
                 !(isInitializedByRunner && m_ResultList.Count == 1)))
            {
                m_TestState = TestState.Ignored;
            }

            LogMessage(k_StartedMessage);
            TestRunnerCallback.TestStarted(testResult);
        }
Example #3
0
        private void StartNewTest()
        {
            Debug.Log("StartNewTest");
            m_TestMessages = "";
            m_Stacktrace   = "";
            m_TestState    = TestState.Running;
            m_StartTime    = Time.time;
            currentTest    = m_TestsProvider.GetNextTest() as TestComponent;
            Debug.Log("GetNextTest: " + currentTest.name);
            TestResult test = m_ResultList.Single((TestResult result) => result.TestComponent == currentTest);

            if (currentTest != null && currentTest.IsExludedOnThisPlatform())
            {
                m_TestState = TestState.Ignored;
                Debug.Log(currentTest.gameObject.name + " is excluded on this platform");
            }
            if (currentTest != null && currentTest.IsIgnored() && (!isInitializedByRunner || m_ResultList.Count != 1))
            {
                m_TestState = TestState.Ignored;
            }
            LogMessage("IntegrationTest Started");
            TestRunnerCallback.TestStarted(test);
        }
Example #4
0
        private void StartNewTest()
        {
            m_TestMessages = "";
            m_Stacktrace = "";
            m_TestState = TestState.Running;

            m_StartTime = Time.time;
            currentTest = m_TestsProvider.GetNextTest() as TestComponent;

            var testResult = m_ResultList.Single(result => result.TestComponent == currentTest);

            if (currentTest != null && currentTest.IsExludedOnThisPlatform())
            {
                m_TestState = TestState.Ignored;
                Debug.Log(currentTest.gameObject.name + " is excluded on this platform");
            }

            // don't ignore test if user initiated it from the runner and it's the only test that is being run
            if (currentTest != null
                && (currentTest.IsIgnored()
                    && !(isInitializedByRunner && m_ResultList.Count == 1)))
                m_TestState = TestState.Ignored;

            LogMessage(k_StartedMessage);
            TestRunnerCallback.TestStarted(testResult);
        }
Example #5
0
		private void StartNewTest ()
		{
			this.testMessages = "";
			this.stacktrace = "";
			testState = TestState.Running;
			assertionsToCheck = null;

			startTime = Time.time;
			currentTest = testsProvider.GetNextTest () as TestComponent;

			var testResult = resultList.Single (result => result.TestComponent == currentTest);
			
			if (currentTest.ShouldSucceedOnAssertions ())
			{
				var assertionList = currentTest.gameObject.GetComponentsInChildren<AssertionComponent> ().Where (a => a.enabled);
				if(assertionList.Any())
					assertionsToCheck = assertionList.ToArray();
			}

			if (currentTest.IsExludedOnThisPlatform ())
			{
				testState = TestState.Ignored;
				Debug.Log(currentTest.gameObject.name + " is excluded on this platform");
			}

			//don't ignore test if user initiated it from the runner and it's the only test that is being run
			if (currentTest.IsIgnored () && !(isInitializedByRunner && resultList.Count == 1)) testState = TestState.Ignored;

			LogMessage(startedMessage);
			TestRunnerCallback.TestStarted (testResult);
		}