RetailMeNot / TestRailSDK

TestRail integration with Java WebDriver implementation.
MIT License
25 stars 27 forks source link

getTestCases methods don't work for TestRail v8.0.1 Default (1033) #63

Open ashubenok710 opened 1 year ago

ashubenok710 commented 1 year ago

Get the following exception in method protected List getEntityList(Class clazz, String apiCall, String param) from TestRailService class in List entities = JSONUtils.getMappedJsonObjectList(clazz, contents); line

org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of java.util.ArrayList out of START_OBJECT token at [Source: java.io.StringReader@66ce957f; line: 1, column: 1] at org.codehaus.jackson.map.JsonMappingException.from(JsonMappingException.java:163) at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:219) at org.codehaus.jackson.map.deser.StdDeserializationContext.mappingException(StdDeserializationContext.java:212) at org.codehaus.jackson.map.deser.std.CollectionDeserializer.handleNonArray(CollectionDeserializer.java:246) at org.codehaus.jackson.map.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:204) at org.codehaus.jackson.map.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:194) at org.codehaus.jackson.map.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:30) at org.codehaus.jackson.map.ObjectMapper._readMapAndClose(ObjectMapper.java:2732) at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1877) at com.rmn.testrail.util.JSONUtils.getMappedJsonObjectList(JSONUtils.java:81) at com.rmn.testrail.util.JSONUtils.getMappedJsonObjectList(JSONUtils.java:63) at com.rmn.testrail.service.TestRailService.getEntityList(TestRailService.java:128) at com.rmn.testrail.service.TestRailService.getTestCases(TestRailService.java:232) at com.rmn.testrail.service.TestRailService.getTestCases(TestRailService.java:210) at com.rmn.testrail.entity.TestSuite.getTestCases(TestSuite.java:69) at RedCAP_Add_Cases_App.main(RedCAP_Add_Cases_App.java:46) Exception in thread "main" java.lang.RuntimeException: Could not process JSON at com.rmn.testrail.util.JSONUtils.getMappedJsonObjectList(JSONUtils.java:86) at com.rmn.testrail.util.JSONUtils.getMappedJsonObjectList(JSONUtils.java:63) at com.rmn.testrail.service.TestRailService.getEntityList(TestRailService.java:128) at com.rmn.testrail.service.TestRailService.getTestCases(TestRailService.java:232) at com.rmn.testrail.service.TestRailService.getTestCases(TestRailService.java:210) at com.rmn.testrail.entity.TestSuite.getTestCases(TestSuite.java:69) at RedCAP_Add_Cases_App.main(RedCAP_Add_Cases_App.java:46)