public override void PreExecution() { if (IsSendingToNeoLoad()) { string testCaseId = RunContext.GetAdditionalExecutionInfo("testcase.uniqueid"); string testCaseName = RunContext.GetAdditionalExecutionInfo("testcase.name"); NeoLoadDesignApiInstance.GetInstance().SetUserPathName(testCaseName + " - Tosca"); // Start recording for API Testing test cases if (!NeoLoadDesignApiInstance.GetInstance().IsRecordStarted() && NeoLoadDesignApiInstance.GetInstance().IsRecordWeb()) { // We are before a web event, we can start WEB recording in NeoLoad. NeoLoadDesignApiInstance.GetInstance().StartRecording(NeoLoadDesignApiInstance.Protocol.WEB); } } }
public override void PreExecution() { try { ToscaTaskExecutionLogger.WriteToLogFile( "========================" + Constants.NewLine + "BEFORE TestCase: " + Constants.NewLine + "========================" + Constants.NewLine + "IsRetrying: " + RunContext.IsExecutionEntryRetrying + Constants.NewLine + "TestCase: Name: " + RunContext.GetAdditionalExecutionInfo(Constants.TestCaseName) + Constants.NewLine + "Nodepath: " + RunContext.GetAdditionalExecutionInfo(Constants.TestCaseNodepath) + Constants.NewLine + "ExecEntry: Name: " + RunContext.GetAdditionalExecutionInfo(Constants.ExecutionEntryName) + Constants.NewLine + "Nodepath: " + RunContext.GetAdditionalExecutionInfo(Constants.ExecutionEntryNodepath)); } catch (Exception) { } }
public override void PostExecution(ExecutionResult result) { try { ToscaTaskExecutionLogger.WriteToLogFile( "========================" + Constants.NewLine + "AFTER TestCase:" + Constants.NewLine + "========================" + Constants.NewLine + "IsRetrying: " + RunContext.IsExecutionEntryRetrying + Constants.NewLine + "TestCase passed: " + result.IsPositive() + Constants.NewLine + "TestCase: Name: " + RunContext.GetAdditionalExecutionInfo(Constants.TestCaseName) + Constants.NewLine + "Nodepath: " + RunContext.GetAdditionalExecutionInfo(Constants.TestCaseNodepath) + Constants.NewLine + "ExecEntry: Name: " + RunContext.GetAdditionalExecutionInfo(Constants.ExecutionEntryName) + Constants.NewLine + "Nodepath: " + RunContext.GetAdditionalExecutionInfo(Constants.ExecutionEntryNodepath)); } catch (Exception) { } }