Sometimes I want to be able to run tests synchronously, especially when tests are related to each other. For instance, say I have a test for a followUser endpoint and I also write a test for another endpoint: unfollowUser. It may be the case that unfollowUser gets called before followUser which results in an error because that follow DNE in the DB. Ideally, I want to first follow the user and then execute the unfollow test.
To make this cleaner, I'm proposing the ability to group tests and be able to define parameters that can be applied to all the tests in that group.
Like so:
group1:
mode: sync
default:
headers:
Authorization: token
tests:
test1:
test2:
group2:
mode: async
tests:
test1:
test2:
Let me know what you think.
Sometimes I want to be able to run tests synchronously, especially when tests are related to each other. For instance, say I have a test for a
followUserendpoint and I also write a test for another endpoint:unfollowUser. It may be the case thatunfollowUsergets called beforefollowUserwhich results in an error because thatfollowDNE in the DB. Ideally, I want to first follow the user and then execute the unfollow test.To make this cleaner, I'm proposing the ability to group tests and be able to define parameters that can be applied to all the tests in that group.
Like so:
Let me know what you think.