0

I'm developing a automation script using selenium-cucumber-java with testNG combination for API testing.

In UI there is a some validation available as text box should accept 500 characters only, if more that text box will not allow to enter.

Same validation I should expect in API end point testing with help of rest assured. How to test max length check in rest assured API automation? Please help to resolve it, it is a new journey.

user3114967
  • 639
  • 5
  • 15
  • 38

1 Answers1

0

you need to send the request with the parameter value corresponding to that textbox, with more than 500 characters. it should throw you a response 400 with an error status message customized by your developer. You need to Assert the response code with the expected response code(400) and status message with the expected status message.

If you further want to validate, you may validate in the database the field is not updated.