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

Adding configuration details for test runs in Test Plan


#1

Hey,

I am trying to add the configurations to runs in a test plan using the API. I am getting this constant error:

testrail.APIError: TestRail API returned HTTP 400 ("Field :entries has configurations but no test runs.")

I am trying to add configurations while creating the plan entry itself. I am creating the plan entry in this manner:

result = self.client.send_post(
                "add_plan_entry/" + str(plan_id),
                {"suite_id": suite, "include_all": False,
                 "case_ids": case_array, "config_ids": self.config_ids.values()})

Would appreciate your help in solving this.


#2

Hi Sanath,

Thanks for your posting. In addition to the configuration IDs, you would also need to specify the test runs so TestRail knows how to map the configurations. You can find a full example of how this looks like here:

http://docs.gurock.com/testrail-api2/reference-plans#add_plan

(under “Request example”)

You can also override the case selection, assignee and description per run/configuration.

I hope this helps!

Cheers,
Tobias


#3

Sorry for my delayed response! This worked perfectly. Thanks so much!


#4

Thanks for the confirmation, Sanath! You are welcome :slight_smile:

Cheers,
Tobias