I'm getting this error when posting a simple JSON
[{"step":"Click Action dropdown >> Add Person","data":"\n"}]
to the
rest/raven/1.0/api/test/MyTestID/step/1
...any ideas?? Is it my Json file ?? I'm doing in in Java using unirest package with latests Xray version.
"stack-trace" -> "org.codehaus.jackson.map.JsonMappingException: Can not deserialize instance of com.xpandit.raven.rest.api.teststep.beans.TestStepBean out of START_ARRAY token
at [Source: org.apache.catalina.connector.CoyoteInputStream@30fefdd3; 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.BeanDeserializer.deserializeFromArray(BeanDeserializer.java:875)
at org.codehaus.jackson.map.deser.BeanDeserializer.deserialize(BeanDeserializer.java:597)
at org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:2704)
at org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:1315)
at org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:419)
at com"
Hi @Elie El-Tawil,
have a look at the documentation of their REST API to see if you call the correct endpoint with the correct data.
The endpoint you're calling is available for editing an existing test step. Since this is about editing one test step, you should not send an array, but only a single element to it, so your request should look like this (without the square brackets):
{"step":"Click Action dropdown >> Add Person","data":"\n"}
Cheers,
Matthias.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.