1

I have many scenarios to create request file that are sent to another application. This application processes the requests and sends back the responses. These responses should be validated against the request requests. There are more than 20 fields in one file. I am thinking of testing this using java, Jbehave and Junit.

My question is how to maintain expected data which is used to validate. I thought to put them in Jbehave Example table, But it will become more complex.

Which method may I adopt to keep my test data clean and simple?

1

Can you please consider using external dataProvider? E.g. use an Excel sheet as the source of expected data.

They can be formatted as this in the spread sheet:

username | password | 1stRequest | 1stResponse | 2ndRequest | 2ndResponse
Harsha   | admin    | hi there   | yes?        | say you    | sure

Your script can read strings from the spread sheet and compare them.

Simply add, remove or format as you go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.