(folderId int, testSetId int)
| 332 | } |
| 333 | |
| 334 | func (c OrchestratorClient) ExecuteTestSet(folderId int, testSetId int) (int, error) { |
| 335 | request := c.createExecuteTestSetRequest(folderId, testSetId) |
| 336 | client := network.NewHttpClient(c.logger, c.httpClientSettings()) |
| 337 | response, err := client.Send(request) |
| 338 | if err != nil { |
| 339 | return -1, err |
| 340 | } |
| 341 | defer func() { _ = response.Body.Close() }() |
| 342 | body, err := io.ReadAll(response.Body) |
| 343 | if err != nil { |
| 344 | return -1, fmt.Errorf("Error reading response: %w", err) |
| 345 | } |
| 346 | if response.StatusCode != http.StatusOK { |
| 347 | return -1, fmt.Errorf("Orchestrator returned status code '%v' and body '%v'", response.StatusCode, string(body)) |
| 348 | } |
| 349 | return strconv.Atoi(string(body)) |
| 350 | } |
| 351 | |
| 352 | func (c OrchestratorClient) createExecuteTestSetRequest(folderId int, testSetId int) *network.HttpRequest { |
| 353 | uri := c.newUriBuilder("/api/TestAutomation/StartTestSetExecution"). |
no test coverage detected