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

Sample TestRail example


#1

Hi Team,
I am new to Test Rail. Automating App using selenium. I wish to integrate Selenium result with TestRail.

Please provide some sample Program and Explanation


#2

A good place to start is the API documentation:

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

Also search the forums for Selenium to see what other users had issues with :slight_smile:


#4

Please let me know how to key “URL”

https://companyname.testrail.com or https://testrail.companyname.com

I am getting either 404 error or

javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name

APIClient client = new APIClient(“https://companyname.testrail.com/”);
client.setUser(“Username”);//[Not email id]
client.setPassword(“Password”);
try{
JSONObject jobj = (JSONObject) client.sendGet(“get_case/4168”);
System.out.println(“Testcase Description:”+jobj );
System.out.println(jobj .get(“title”));

        }
        catch(APIException e){
            e.printStackTrace();
            System.out.println("Error Message is: "+e.getMessage());
        }

#5

Hi there,

Thanks for your reply! You would just use the base address for your TestRail instance, and the format would be different depending on whether you use TestRail Cloud or have your own TestRail Server installation. So you would just use your base TestRail address. Please note that unless you also have an LDAP/AD integration, then you would also use your email address as the username for accessing the API as well. Hope this helps!

Regards,
Marco