Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

Trying to run existing test run with selenium

Hi I can create a new run. This makes the dashboard full. So now i want to run an existing test run by using the id. I tried but have not succeed. The bellow code just create a test run call Testrun. I want to run the test run with id 344. Can someone direct me in what i can still try please?

This is what i have.

    private static String PROJECT_ID = "12";
private static String URL = "https://10xinvestments.testrail.net";
private static String USER = "test@test.com";
private static String PASSWORD = "blahblah";
private static long runId = 344;
private static String caseId = "2562";
private static int FAILED = 5;
private static int PASS = 1;
private static  List cases = new ArrayList();


                           cases.add(new Integer(2562));
					
			APIClient client = new APIClient(URL);
			client.setUser(USER);
			client.setPassword(PASSWORD);
			//Create Test Run
			Map data = new HashMap();
			data.put("include_all",false);
			data.put("case_ids", cases);
			data.put("name","Testrun");
			JSONObject  b = (JSONObject)client.sendPost("add_run/"+PROJECT_ID,data);
			//Extract Test Run Id
			runId = (long)b.get("id");