0

I have a Java 8 Spring-batch application with Cucumber testing framework.

Spring 4.3; cucumber-juni 1.2.5; cucumber-java 1.1.8

My backing class implements a Spring Framework Rest Template, which calls the api under test and returns a rather large JSON string.

My question is - what facilities come packaged in Cucumber framework for converting the JSON payload into a POJO?

I'd really appreciate an example on how to do that in Cucumber without bringing in other dependencies from outside, please.

1 Answer 1

0

There is nothing (as far as I know) in Cucumber to do this. Its just not something Cucumber should be doing. However you can easily get Cucumber to call something that will do this for you by writing a helper method that your step definitions can use to do this.

You have the whole of your programming language available to you in your step definitions. Use that to convert responses into POJO's if thats what you need to do.

Sign up to request clarification or add additional context in comments.

1 Comment

Thx - just making sure I'm not overlooking into something that already exists.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.