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

Add a Test Plan (TestRailService API for Java) not work since today!


#1

Hi, today I have some troubles with TestRail API for Java.
The method for add a test plan not work for me since today.

The code:

TestRailService testRailService = new TestRailService(“ofertia”,“testrail.user”, “testrail.password”);

  TestPlanCreator testPlanCreator = new TestPlanCreator();
  testPlanCreator.setName(“TESTPLANNAME");
  List<PlanEntry> entries = new ArrayList<PlanEntry>();
  PlanEntry entry = new PlanEntry();
  entry.setSuiteId(17);
  entry.setIncludeAll(true);
  entries.add(entry);
  testPlanCreator.setEntries(entries);

——> testRailService.addTestPlan(testRailService.getProjectByName(“PROJECTNAME").getId(), testPlanCreator);

….

The result:

4227 [main] ERROR com.rmn.testrail.service.TestRailService - Response code: 400
4227 [main] ERROR com.rmn.testrail.service.TestRailService - TestRails reported an error message: Invalid or incomplete JSON string in API request.


#2

I got the problem. The Test Plan Name have a letter " ñ"; that’s the problem.

Sorry for your loss time!

Thank you !!


#3

Hello Andrea,

Thanks for your posting. We can also recommend looking into using our official API binding which has full support for Unicode (I believe you are using a third-party library for accessing the API):

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

Regards,
Tobias


#4

Hi Tobias,

Is your official API on Maven?

Regards,
Andrea


#5

Hello Andrea,

Thanks for your reply. The API binding is not on Maven but can be found on docs.gurock.com as well as GitHub:

http://docs.gurock.com/testrail-api2/bindings-java
https://github.com/gurock/testrail-api/tree/master/java

I hope this helps!

Regards,
Tobias