public void EndTest(string testName) { if (LoggingState == LoggingState.HasVariation) { LogResult(Result.Fail); LogMessage("This variation was not closed before End Test."); EndVariation(currentVariationName); hasConnection = false; currentVariationName = null; } if (LoggingState == LoggingState.IsConnected) { if (!hasReceivedBeginVariation) { BeginVariation("Non-existent Test Variation"); LogMessage("Test never reported any variations."); LogResult(Result.Fail); EndVariation("Non-existent Test Variation"); } hasConnection = false; currentVariationName = null; Loggers.EndTest(testName); } currentTestIndex++; currentVariationIndex = -1; //Ignore if test was not started. Cleanup will catch this. }