public static async Task <List <TestCase> > GetTestCaseFailedWithMinorDefect(string testCasePath) { HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var requestUri = string.Format("api/TestCase/FailedWithMinorDefects?testCasePath={0}", testCasePath); var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); string workItem = await response.Content.ReadAsStringAsync(); List <TestCase> res = new List <TestCase>(); if (response.IsSuccessStatusCode) { JObject jObject = JObject.Parse(workItem); JArray ja = jObject["values"].ToObject <JArray>(); foreach (JObject jo in ja) { res.Add(jo.ToObject <TestCase>()); } } return(res); }
public static async Task <TestCase> GetTestCaseById(int id) { HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var requestUri = "/api/TestCase/" + id; var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); string workItem = await response.Content.ReadAsStringAsync(); if (response.IsSuccessStatusCode) { JObject jObject = JObject.Parse(workItem); return(jObject.ToObject <TestCase>()); } else { throw new Exception(); } }
public static async Task <List <TestCase> > GetTestCaseByPlan(int planId) { List <TestCase> res = new List <TestCase>(); HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var requestUri = "/api/TestCase/Plan/" + planId; var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); string workItem = await response.Content.ReadAsStringAsync(); if (response.IsSuccessStatusCode) { JObject jObject = JObject.Parse(workItem); JArray ja = jObject["values"].ToObject <JArray>(); Console.WriteLine("Parsed item"); foreach (JObject jo in ja) { res.Add(jo.ToObject <TestCase>()); } } return(res); }
public GetDefectWithTestCaseCount(Properties props) { _project = props.Project; _fileLocation = props.SaveLocation; _testPlanId = props.TestPlanId; _testSuite = props.TestSuiteId; _logger = props.Logger; HttpClientInitiator clientInitator = new HttpClientInitiator(props.Uri, props.PersonalAccessToken); _client = clientInitator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); _testCaseIdToResults = new Dictionary <int, List <TestCaseResult> >(); _tfsCommonFunctions = new TFSCommonFunctions(props); if (props.UseWebApi == 1) { _allTestCaseId = GetTestCasesWebApi.GetAllTestCaseIds().Result; } else { GetTestCasesInSuite getTestCaseInSuite = new GetTestCasesInSuite(props); List <TestCase> allTestCases = getTestCaseInSuite.GatherTestCases(); _allTestCaseId = new List <int>(); foreach (TestCase currTestCase in allTestCases) { _allTestCaseId.Add(currTestCase.TestCaseId); } } }
private async void InsertSingleTestScenario(TestScenario testScenario) { HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var patchValue = new StringContent(JsonConvert.SerializeObject(testScenario, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), Encoding.UTF8, "application/json"); var requestUri = "/api/TestScenario"; var method = new HttpMethod("PATCH"); var request = new HttpRequestMessage(method, requestUri) { Content = patchValue }; var response = await newClient.SendAsync(request); if (!response.IsSuccessStatusCode) { throw new HttpRequestException(); } }
//public async Task<List<TestCase>> GetTestCaseExecutedCumulativeAndPath(DateTime dateTime, string path) //{ // HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); // HttpClient newClient = client.CreateHttpClient(); // newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); // var requestUri = string.Format("api/TestCase/ByResultDateAndPath?dateTime={0}&"); // var method = new HttpMethod("GET"); // var request = new HttpRequestMessage(method, requestUri) { }; // var response = await newClient.SendAsync(request); // return null; //} public static async Task <List <TestCase> > GetTestCaseExecutedCumulativeAndPathAndStatuses(DateTime dateTime, string[] statuses, string path) { HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var requestUri = string.Format("api/TestCase/ByResultDateAndPath?dateTime={0}&statuses={1}&path={2}&cumulative=1", dateTime.ToString("yyyy-MM-dd"), String.Join(",", statuses), path); var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); string workItem = await response.Content.ReadAsStringAsync(); List <TestCase> res = new List <TestCase>(); if (response.IsSuccessStatusCode) { JObject jObject = JObject.Parse(workItem); JArray ja = jObject["values"].ToObject <JArray>(); foreach (JObject jo in ja) { res.Add(jo.ToObject <TestCase>()); } } return(res); }
public List <int> DeleteNonExistingTestsCases(List <TestCase> allTestCases = null) { List <int> deletedTestCases = new List <int>(); GetTestCasesInSuite getTestCasesInSuite = new GetTestCasesInSuite(_props); List <TestCase> allTestCasesInSuite; if (allTestCases == null) { allTestCasesInSuite = getTestCasesInSuite.GatherTestCases(); } else { allTestCasesInSuite = allTestCases; } List <int> allTestCaseIdInSuite = new List <int>(); foreach (TestCase curr in allTestCasesInSuite) { allTestCaseIdInSuite.Add(curr.TestCaseId); } TestCaseWebApiTools testCaseWebApiTools = new TestCaseWebApiTools(); List <int> allTestCasesInDb = testCaseWebApiTools.GetAllTestCaseIds().Result; foreach (int currId in allTestCasesInDb) { if (!allTestCaseIdInSuite.Contains(currId)) { deletedTestCases.Add(currId); } } Console.WriteLine("Test"); Console.WriteLine(deletedTestCases.Count); foreach (int curr in deletedTestCases) { Console.WriteLine(curr); HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); string requestUri = "/api/TestCase/" + curr; var method = new HttpMethod("DELETE"); var request = new HttpRequestMessage(method, requestUri) { }; var response = newClient.SendAsync(request).Result; } return(deletedTestCases); }
public Downloader(Properties props) { _saveLocation = props.SaveLocation; _uri = props.Uri; _personalAccessToken = props.PersonalAccessToken; _testCasesMissingAttachments = new List <TestCase>(); _basePath = props.BasePath; HttpClientInitiator initiator = new HttpClientInitiator(_uri, _personalAccessToken); _client = initiator.CreateHttpClient(); }
public CreatePlaybooks(Properties props) { _uri = props.Uri; _personalAccessToken = props.PersonalAccessToken; _project = props.Project; _logger = props.Logger; HttpClientInitiator clientInitiator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitiator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public GetWorkItemType(Properties props) { _project = props.Project; _fileLocation = props.SaveLocation; _testPlanId = props.TestPlanId; _testSuite = props.TestSuiteId; _logger = props.Logger; HttpClientInitiator clientInitator = new HttpClientInitiator(props.Uri, props.PersonalAccessToken); _client = clientInitator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public CreateTestCase() { _uri = "http://10.3.16.122/"; _personalAccessToken = "EXAMPLEACCESSTOKEN"; _project = "APHP"; _testPlan = 156611; _testSuite = 156696; _logger = new Logger(); HttpClientInitiator clientInitator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public TFSCommonFunctions(Properties props) { string _uri = props.Uri; string _personalAccessToken = props.PersonalAccessToken; _project = props.Project; _saveLocation = props.SaveLocation; _logger = props.Logger; HttpClientInitiator clientInitator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public TFSExecutionResults(Properties props) { _project = props.Project; _fileLocation = props.SaveLocation; _testPlanId = props.TestPlanId; _testSuite = props.TestSuiteId; _logger = props.Logger; HttpClientInitiator clientInitator = new HttpClientInitiator(props.Uri, props.PersonalAccessToken); _client = clientInitator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); _testCaseIdToResults = new Dictionary <int, List <TestCaseResult> >(); }
public LinkTestCaseToRtm(Properties props) { _uri = props.Uri; _personalAccessToken = props.PersonalAccessToken; _project = props.Project; _saveLocation = props.SaveLocation; _testPlan = props.TestPlanId; _testSuite = props.TestSuiteId; _logger = props.Logger; HttpClientInitiator clientInitiator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitiator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public UpdateContractRequirement(Properties props) { _props = props; _uri = props.Uri; _personalAccessToken = props.PersonalAccessToken; _project = props.Project; _logger = props.Logger; _dictionary = new Dictionary <string, int>(); HttpClientInitiator clientInitiator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitiator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
/// <summary> /// Constructor. Manaully set values to match your account. /// </summary> public Attachments(Properties props) { string _uri = props.Uri; string _personalAccessToken = props.PersonalAccessToken; _project = props.Project; _saveLocation = props.SaveLocation; _testPlanId = props.TestPlanId; _testSuiteId = props.TestSuiteId; _firstIteration = true; _logger = new Logger(_saveLocation); HttpClientInitiator clientInitator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public GetTestCasesInSuite(Properties props, int planId, int suiteId) { _uri = props.Uri; _personalAccessToken = props.PersonalAccessToken; _project = props.Project; _testPlanId = planId; _testSuiteId = suiteId; _firstIteration = true; _logger = props.Logger; _props = props; HttpClientInitiator clientInitiator = new HttpClientInitiator(_uri, _personalAccessToken); _client = clientInitiator.CreateHttpClient(); _client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); }
public void GatherTestRunAndResultsAndWriteToDb(Properties props) { GatherTestRun gatherTestRun = new GatherTestRun(props); List <TestRun> testRuns = gatherTestRun.GatherTestRunWithTestResult(); Console.WriteLine("Number of Test Runs: {0}", testRuns.Count); Console.Write("Writing Test Runs and Test Results to DB... "); int numTestRun = testRuns.Count; using (var progress = new ProgressBar()) { int currentCount = 1; foreach (TestRun currTestRun in testRuns) { progress.Report((double)currentCount / (double)numTestRun); HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var patchValue = new StringContent(JsonConvert.SerializeObject(currTestRun, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), Encoding.UTF8, "application/json"); var requestUri = "/api/TestRun"; var method = new HttpMethod("PATCH"); var request = new HttpRequestMessage(method, requestUri) { Content = patchValue }; string requestTxt = request.Content.ToString(); var response = newClient.SendAsync(request).Result; currentCount += 1; } Console.WriteLine("Done."); } }
public void PostHelper <T>(IEnumerable <T> entity, string endpoint) { using (var progress = new ProgressBar()) { double totalCount = entity.Count <T>(); double currCount = 1; foreach (T curr in entity) { currCount += 1; progress.Report(currCount / totalCount); HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); //currTestCase.TestCaseId = 114113; var patchValue = new StringContent(JsonConvert.SerializeObject(curr, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), Encoding.UTF8, "application/json"); var requestUri = endpoint; var method = new HttpMethod("POST"); var request = new HttpRequestMessage(method, requestUri) { Content = patchValue }; string requestTxt = request.Content.ToString(); var response = newClient.SendAsync(request).Result; _props.Logger.Log(requestUri); _props.Logger.Log(requestTxt); } } }
public async Task <List <Defect> > UpdateListDefects(List <Defect> entities) { List <Defect> res = new List <Defect>(); foreach (Defect currDefect in entities) { currDefect.TestCases = null; HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var patchValue = new StringContent(JsonConvert.SerializeObject(currDefect, Formatting.None, new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }), Encoding.UTF8, "application/json"); var requestUri = "/api/Defect"; var method = new HttpMethod("POST"); var request = new HttpRequestMessage(method, requestUri) { Content = patchValue }; Console.WriteLine(request.ToString()); var response = await newClient.SendAsync(request); string workItem = await response.Content.ReadAsStringAsync(); if (response.IsSuccessStatusCode) { res.Add(currDefect); } } return(res); }
private async Task <List <TestRun> > GatherTestCaseRunsAPI() { List <TestRun> res = new List <TestRun>(); HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); var requestUri = "api/TestRun"; var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); if (response.IsSuccessStatusCode) { string responseTxt = await response.Content.ReadAsStringAsync(); _logger.Log(responseTxt); var jo = JArray.Parse(responseTxt); foreach (JToken currTestRun in jo) { TestRun testRun = new TestRun(); testRun.TestRunId = Convert.ToInt32(currTestRun["testRunId"]); testRun.TestRunName = currTestRun["testRunName"].ToString(); testRun.PassedTests = Convert.ToInt32(currTestRun["passedTests"]); testRun.State = currTestRun["state"].ToString(); if (currTestRun["testSuiteId"].ToString() != "") { testRun.TestSuiteId = Convert.ToInt32(currTestRun["testSuiteId"]); } if (currTestRun["testPlanId"].ToString() != "") { testRun.TestPlanId = Convert.ToInt32(currTestRun["testPlanId"]); } List <TestCaseResult> allTestCaseResults = new List <TestCaseResult>(); //Console.WriteLine(currTestRun["testRunId"].ToString()); foreach (JToken currTestResult in currTestRun["testCaseResults"]) { if (currTestResult["testCaseResultId"] != null) { TestCaseResult testCaseResult = new TestCaseResult { TestCaseResultId = Convert.ToInt32(currTestResult["testCaseResultId"]), TestRunId = testRun.TestRunId, TestCaseId = Convert.ToInt32(currTestResult["testCaseId"]), Result = currTestResult["result"].ToString(), RunByName = currTestResult["runByName"].ToString(), ResultDT = DateTime.Parse(currTestResult["resultDT"].ToString()) }; if (!_testCaseIdToResults.ContainsKey(testCaseResult.TestCaseId)) { _testCaseIdToResults[testCaseResult.TestCaseId] = new List <TestCaseResult> { testCaseResult }; } else { _testCaseIdToResults[testCaseResult.TestCaseId].Add(testCaseResult); } } } if (allTestCaseResults.Count > 0) { testRun.TestCaseResults = allTestCaseResults; } res.Add(testRun); } return(res); } else { throw new Exception(); } }
public async Task <TestCase> GatherTestCase(TestCase testCase) { var requestUri = "/api/TestCase/" + testCase.TestCaseId; HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); //var requestUri = "/APHP/_apis/wit/workitems/" + testCase.TestCaseId + "?api-version=3.0"; var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); _logger.Log(requestUri); if (response.IsSuccessStatusCode) { string responseTxt = await response.Content.ReadAsStringAsync(); _logger.Log(responseTxt); JObject jo = JObject.Parse(responseTxt); //JToken fields = jo["fields"]; //if (fields["APHP.ALM.TestCaseApplication"] != null) //{ // testCase.Application = fields["APHP.ALM.TestCaseApplication"].ToObject<string>(); //} //testCase.ApplicationArea = fields["Microsoft.VSTS.CMMI.ApplicationArea"].ToObject<string>(); //testCase.ApplicationProcess = fields["Microsoft.VSTS.CMMI.ApplicationProcess"].ToObject<string>(); //if (fields["APHP.ALM.TestCaseApplicationSubArea"] != null) //{ // testCase.ApplicationSubArea = fields["APHP.ALM.TestCaseApplicationSubArea"].ToObject<string>(); //} //testCase.TestCaseName = fields["System.Title"].ToObject<string>(); //testCase.TestObjective = fields["Avanade.ACM.TestObjective"].ToObject<string>(); //if (fields["System.Description"] != null) //{ // testCase.TestDescription = fields["System.Description"].ToObject<string>(); //} //if (fields["Avanade.ACM.TestDataSetup"] != null) //{ // testCase.PreCondition = fields["Avanade.ACM.TestDataSetup"].ToObject<string>(); //} ////testCase.Priority = Convert.ToInt32(fields["Avanade.ACM.Priority"].ToObject<string>().Substring(0,0)); //testCase.Complexity = fields["Avanade.ACM.Complexity"].ToObject<string>(); //testCase.ScenarioType = fields["Avanade.ACM.ScenarioType"].ToObject<string>(); //testCase.TestCaseType = fields["APHP.ALM.TestCaseType"].ToObject<string>(); testCase.Application = jo["application"].ToString(); testCase.ApplicationArea = jo["applicationArea"].ToString(); testCase.ApplicationProcess = jo["applicationProcess"].ToString(); testCase.ApplicationSubArea = jo["applicationSubArea"].ToString(); testCase.TestCaseName = jo["testCaseName"].ToString(); testCase.TestObjective = jo["testObjective"].ToString(); testCase.TestDescription = jo["testDescription"].ToString(); testCase.PreCondition = jo["preCondition"].ToString(); testCase.Priority = Convert.ToInt32(jo["priority"]); testCase.Complexity = jo["complexity"].ToString(); testCase.ScenarioType = jo["scenarioType"].ToString(); testCase.TestCaseType = jo["testCaseType"].ToString(); testCase.TestSuiteId = Convert.ToInt32(jo["testSuiteId"]); return(testCase); } else { Console.Write("Error getting Test Case: {0}", response.Content.ReadAsStringAsync().Result); throw new Exception(); } //return testCase; }
public async Task <TestCaseRowMapping> GetTestCaseIdFromName(TestCaseRowMapping currTestCaseRowMapping) { TestCaseRowMapping tempTestCaseRowMapping = new TestCaseRowMapping() { RowNumber = currTestCaseRowMapping.RowNumber, TestCaseName = currTestCaseRowMapping.TestCaseName, TestSuiteId = currTestCaseRowMapping.TestSuiteId }; HttpClientInitiator client = new HttpClientInitiator("https://localhost:44369/"); HttpClient newClient = client.CreateHttpClient(); newClient.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json")); var requestUri = "/api/TestCase/TestCaseName/" + tempTestCaseRowMapping.TestCaseName; var method = new HttpMethod("GET"); var request = new HttpRequestMessage(method, requestUri) { }; var response = await newClient.SendAsync(request); if (response.IsSuccessStatusCode) { string responseString = await response.Content.ReadAsStringAsync(); if (responseString != "") { var jo = JObject.Parse(responseString); tempTestCaseRowMapping.TestCaseId = Convert.ToInt32(jo["testCaseId"]); } } //Console.WriteLine(tempTestCaseRowMapping.TestCaseId); return(tempTestCaseRowMapping); //string stringQuery = "Select[System.Id], [System.Title], [System.State] From WorkItems Where [System.WorkItemType] = 'Test Case' AND [System.Title] = '" + tempTestCaseRowMapping.TestCaseName + "'"; //List<Object> patchDocument = new List<object>(); //patchDocument.Add(new //{ // query = stringQuery //}); //var patchValue = new StringContent(JsonConvert.SerializeObject(patchDocument), Encoding.UTF8, "application/json-patch+json"); //var requestUri = "APHP/APHP%20Virginia/_api/_wit/search?searchText=" + tempTestCaseRowMapping.TestCaseName; //var method = new HttpMethod("GET"); //var request = new HttpRequestMessage(method, requestUri) { }; //var response = await _client.SendAsync(request); //List<int> listOfTestCasesInSuite = new List<int>(); //listOfTestCasesInSuite = await GetTestCaseIdsInSuite(tempTestCaseRowMapping.TestSuiteId); //Console.WriteLine(listOfTestCasesInSuite); //if (response.IsSuccessStatusCode) //{ // string responseString = await response.Content.ReadAsStringAsync(); // var jo = JObject.Parse(responseString); // int countTestCases = jo["payload"]["rows"].Count(); // Console.WriteLine(countTestCases); // if (countTestCases > 0) // { // foreach (JToken currWorkItem in jo["payload"]["rows"]) // { // if (listOfTestCasesInSuite.Contains(Convert.ToInt32(currWorkItem[0]))) // { // tempTestCaseRowMapping.TestCaseId = Convert.ToInt32(currWorkItem[0]); // return tempTestCaseRowMapping; // } // } // } // return null; //} //else //{ // throw new Exception(); //} }