0

I'm working to write a specification with gherkin (for the first time) for a REST API which will return a long list of paged items (1000 items per page). I'm curious if there's a good way in gherkin to write a specification such as this?

Thanks!

  • 1
    Is i one of the requirements that it limits results too 1000 items pretty page, or do you just want to submit a query and verify results? – Greg Burghardt Nov 6 '19 at 23:03
2

Well, I belive such the verification will contradict the goal of Gherkin to improve readability of your scenarios. However if I would approach such the task, I would keep the item list in a separate source (say, a file). And then the construction like:

Given I am at the page with a long list
When Check all the items on a page
Then List items correspond to file "C:/MyPath/goldensource.txt"

Then you develop your step definition code to read from specified file and compare the result.

| improve this answer | |
  • I'm not a QA developer myself, so this is a bit out of my zone. Would you recommend this sort of testing happen in a different manner? – TheTFo Dec 10 '18 at 17:00

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