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

Integrating testrail with codeception php testing framework


#1

I’m trying to integrate testRail with codeception. I followed https://github.com/bookitcom/codeception-testrail for configuring. When trying to run my cest files I’m facing this error as

[GuzzleHttp\Exception\ClientException]
Client error: GET https://bookit.testrail.com/index.php?/api/v2/get_project/ resulted in a 401 Unauthorized response: {“error”:“Authentication failed: invalid or missing user/password or session cookie.”}

Given user,apikey,url,project details seems fine. Can anyone please explain where am i doing wrong. Thanks.


#2

Hi @geekDroid,

Thanks for your posting. Have you tried the official API binding to see if the API and credentials are working in general? The codeception plugin is from a third party and we don’t have experience with this plugin unfortunately.

Cheers,
Tobias


#3

Hi @geekDroid,

If you’re still interested, the answer is in your GET request, where you are using wrong URL (not yours). That is the problem of dev branch /bookitcom/codeception-testrail repository.

Try to reinstall the extension not from dev but from dev-master.

In the file Extension.php the function will be look like:
Screenshot_2

In the dev-branch it’s hardcoded with the https://bookit.testrail.com URL