Epg gsr8 status test updating Camwebxxx

by  |  07-Jan-2016 16:13

I have assigned to create C# application to update the test case status in MTM. But the problem is the below code is updating the result If the test case is already executed, it is not updating the status of the newly created test case(no history of run) using System; using System. Get Fully Qualified Uri For Name(""); ITest Plan Plan = proj. IO; namespace Update TFS { class Program { static void Main(string[] args) { //args[0] = Testplan Id; args[1] = Testcase Id; args[2] = Status; args[3] = configuration int test_plan = Int32. Write Line("Attempting the test case " +test_case+ "to be marked as "+args[3]); //Create TFS connection Tfs Team Project Collection tfs = new Tfs Team Project Collection(Tfs Team Project Collection.

epg gsr8 status test updating-70

Configuration Id == test_config) { if (args[2] == "Failed") { result.

Query Test Points("SELECT * FROM Test Point WHERE Test Case Id =" + args[1]); foreach (ITest Point p in points) { var test Results = proj. By Test Id(test_case); foreach (ITest Case Result result in test Results) { if (p. You can create a new test run then collect result from that test run and iterate through results and set: result.

Close(); } } } The code is updating ITest Case Result result outcomes only for test cases that were executed against a test run only.

Passed; } else if (args[2] == "Not Executed") { result. Write Line(args[0] + " Plan not found in MTM"); } tw.

Write Line(args[1] + " Test case not found the plan"); } } else { tw.

Community Discussion