public void RunCreateTestRunTask(List <int> scenarioIDs, string[] testRunDetails, List <KeyValuePair <int, KeyValuePair <TestStatus, string> > > testResults) { HipTestApi hipTest = new HipTestApi(); int testRunID = hipTest.CreateTestRun(scenarioIDs, testRunDetails); Console.WriteLine($"TESTRUN ID: {testRunID}"); var runData = hipTest.BuildTestRunSnapshotData(testRunID); hipTest.UpdateHipTestRunData(runData, testResults); }
public void HipTest_UpdateTestResult() { string[] testRunDetails = new string[] { "testSuite", "testPriority", "testCaseNumber", "testComponent1", "testComponent2", "testEnv", "tenantName" }; List <int> scenarioIDs = new List <int> { 2238584, 2238585, 2238586 }; string description = "Test Description - (Env)Tenant"; var passDescPair = new KeyValuePair <TestStatus, string>(TestStatus.Passed, description); var failDescPair = new KeyValuePair <TestStatus, string>(TestStatus.Failed, description); var testResults = new List <KeyValuePair <int, KeyValuePair <TestStatus, string> > > { new KeyValuePair <int, KeyValuePair <TestStatus, string> >(2238585, passDescPair), new KeyValuePair <int, KeyValuePair <TestStatus, string> >(2238586, failDescPair), new KeyValuePair <int, KeyValuePair <TestStatus, string> >(2238584, passDescPair) }; HipTestApi hipTest = new HipTestApi(); int testRunID = hipTest.CreateTestRun(scenarioIDs, testRunDetails); Console.WriteLine($"TESTRUN ID: {testRunID}"); Thread.Sleep(5000); var runData = hipTest.BuildTestRunSnapshotData(testRunID); Thread.Sleep(5000); hipTest.UpdateHipTestRunData(runData, testResults); //RunCreateTestRunTask(scenarioIDs, testRunDetails, testResults); }