https://pact.io logo
#pact-jvm
Title
# pact-jvm
y

yusei ygui

04/20/2022, 8:45 PM
Hello, new to Pact. Was wondering if we can use pact to test pagination?
u

uglyog

04/20/2022, 10:49 PM
I would use 3 tests for that, one for the first page, one for the last page, and one for a middle page.
y

yusei ygui

04/21/2022, 1:22 AM
Is there a way to auto generate those content in the contract and can test each page at will, or it is over kill. (for example, testing navigating to page 25, then back to page 23 and verify the content for page 23 is the same). Thanks
u

uglyog

04/21/2022, 1:24 AM
I wouldn't test every page, it is not worth it.
y

yusei ygui

04/21/2022, 1:30 AM
ah .. thanks for the idea
b

Boris

04/21/2022, 2:28 AM
also, Pact isn't targeting behaviour (i.e. navigation between pages), use it for testing that the API responds with the correct page when it's requested. Page 23 shouldn't affect page 25 😎
☝️ 1
y

yusei ygui

04/21/2022, 2:41 AM
Thanks 😃