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

Potential bug: old API no longer accepts add_plan calls


#1

I’m using TestRail 3.1.3.3146 and I am still using the old API to add plans.

I used to pass these parameters to the old miniapi:

{
    [name] => Test1
    [description] => MyDescription
    [milestone_id] => 1
    [suite_ids] => 30,376,379,521
    [key] => <whatever key I was always using>   
)

This used to work, but now, this is the new response returned by the server since hte upgrade:


//  Posted to http://$httphost/testrail/index.php?/miniapi/add_plan/$TESTRAIL_PROJECT_ID&key=" . $data['key'];

(
    [result] =>
    [error] => Field Case Selection is not a valid string.
)

I tried including [include_all] => true (and also tried 1, True, TRUE) in my post parameters, but I always get the same error. In any case, this shouldn’t matter because this is only required by version 2 of the API.


#2

Hello Adron,

Thanks for your posting. You would need to update the API to a 3.1 compatible version and you can download the current version here:

http://docs.gurock.com/testrail-api/installation

(please see the 3.1 download)

You can simply copy the files into your TestRail installation directory (thus overriding the existing files). You may need to reconfigure the API user and password afterwards.

I hope this helps!

Regards,
Tobias


#3

Thanks! I actually ended up using v2 of your API :slight_smile:

I love the PHP Client API you gave us :smiley: saves me a lot of trouble!


#4

Hello Adron,

Great to hear that :slight_smile:

Regards,
Tobias