You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Configure the new Run with a Suite ID, a Milestone ID, an Assigned To ID, and a Plan ID (the one from the created plan)
I log the pre-created Run object (using log4j2) and see it has the expected Plan ID
I create the run.
I log the Run object (post-creation), and see it now has a 'null' Plan ID
Looking in TestRail, I see the Plan and Run side-by-side, rather than the Test Run being found inside the Test Plan.
Code:
int milestoneId = 131;
Plan plan = new Plan();
UI_TEST_PLAN = "HTML_UI";
plan.setName(UI_TEST_PLAN);
plan.setMilestoneId(milestoneId);
Plan responsePlan = TR.plans().add(projectId, plan).execute();
LOGGER.info("Created new plan: {}. Full: {}", responsePlan.getId(), responsePlan);
List<Suite> suites = TR.suites().list(projectId).execute();
for (Suite suite : suites) {
if (suite.getName().startsWith("UI")) { // expected one is named UI-Suite in this testrail sandbox
Run run = new Run();
run.setSuiteId(suite.getId());
run.setPlanId(responsePlan.getId());
run.setMilestoneId(milestoneId);
run.setAssignedtoId(ROBOT_USER_ID);
LOGGER.info("Pre-created run: {}", run);
Run createdRun = TR.runs().add(projectId, run).execute();
LOGGER.info("Created run: {}", createdRun);
//TODO the test run is created but it's not getting into the test plan
}
}
Log4j2 logging, where you can see the Plan ID goes from 4355 pre-creation (which is correct) to null post-creation.
Screenshot showing correct milestoneId in URL bar (131), correct plan ID at the bottom left from hovering over the Plan link (4355), and showing the Test Run created outside the plan anyway.
Lastly, we're using a hosted TestRail version. Checking for updates says we're using the latest version, which is:
TestRail version | 5.4.0.3660 (check for update)
The text was updated successfully, but these errors were encountered:
Hi,
Inside a milestone, I am doing the following:
Code:
Log4j2 logging, where you can see the Plan ID goes from 4355 pre-creation (which is correct) to null post-creation.
Screenshot showing correct milestoneId in URL bar (131), correct plan ID at the bottom left from hovering over the Plan link (4355), and showing the Test Run created outside the plan anyway.
Lastly, we're using a hosted TestRail version. Checking for updates says we're using the latest version, which is:
TestRail version | 5.4.0.3660 (check for update)
The text was updated successfully, but these errors were encountered: