-2

Need help on Following query I have written selenium Automation for given test cases and writting test executing result in an Excel sheet

I want to update the result "Pass" or "Fail" into QC using the above updated Excel sheet is that possible? please help me.

  • QC supports the API to update the results. You can write small API that can be invoked as AfterExecution and parse the testng-results.xml which is stored in default test-output. QC only support with Test case ID, For this you can rename the test cases by appending the TCID foo_123 While parsing split the TCID and update the results. – Abhinav Feb 28 '17 at 04:28
  • Please read [ask]. Please provide the code you have tried and the execution result including any error messages, etc. – JeffC Feb 28 '17 at 05:34

1 Answers1

0
Dictionary testResults = new Dictionary();
testResults.Add("New defects in Recent Updates are red", "Pass");
testResults.Add("Resolved defects in Recent Updates are green", "Pass");
testResults.Add("Reopened defects in Recent Updates are bold", "Fail");
if (testResults.ContainsKey(tsTest.TestName))
{
    string status = testResults[tsTest.TestName];
    recordTestResult(tsTest, status);
}