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

Jenkins Plugin Authentication


#1

I have built and installed the latest snapshot from https://github.com/achikin/testrail-jenkins-plugin
We are evaluating TestRail Cloud.
When I tried to add the user authentication details under Jenkins Configuration, it says that the user/password combination is incorrect - but we can login to TestRail with these details successfully. It is not clear whether is is looking for the email of the user or the full name - but neither worked. It is also unclear whether this user has to have any special privileges - but setting to an administrator makes no difference.

I noticed that the POM we built from referenced an older version of Jenkins (1.570) so modified this to our version (1.625) but this failed to compile with the following message:

ERROR] /home/skent/temp/TestRail/testrail-jenkins-plugin-master/src/main/java/testrail/testrail/JunitResults/JUnitResults.java:[58,54] error: <anonymous testrail.testrail.JunitResults.JUnitResults$1> is not abstract and does not override abstract method checkRoles(RoleChecker) in RoleSensitive

So if anyone knows anything about the authentication and/or if there is going to be an updated version of the code to support the latest Jenkins releases then please let me know.


#2

Hello Simon,

Thanks for your posting! I just had a quick look at the authentication section of the code and this looks good actually. TestRail would accept both the regular email address and password but also the email address and possible API keys for this user (can be added under My Settings). It’s also important that you enable the API in general. Could you please check this under Administration > Site Settings > API?

Cheers,
Tobias


#3

Hi Simon,

We usually highly recommend directly integrating TestRail’s API with your test automation scripts instead of using a specific Jenkins plugin. This way your tests would directly submit the results to TestRail, whether they are triggered manually or via Jenkins. This is also usually much more flexible, as a Jenkins plugin would only be able to submit results on specific XML files or tools. Directly integrating TestRail’s API with your test automation scripts would be much more flexible, would result in integration with Jenkins and this is easier to maintain usually:

http://docs.gurock.com/testrail-api2/

I hope this helps!


#4

Thanks for your help guys. It was the API setting that was off in TestRail. Will also investigate the direct integration as that sounds useful.


#5

Hi Simon,

Great to hear that it works now!

Cheers,
Tobias


#6

Hi Simon,

I am trying to integrate TestRail and Jenkins . I need some help here.

where do I mention TestRail URL in m2/settings.xml?