You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2024. It is now read-only.
Currently we use Arbitrary for everything. This runs into an issue that makes testing particular endpoints not very effective. To see why, consider a typical CRUD set of endpoints (where e.g. "user/:id" is one of the GET endpoints). With a clean DB, arbitrary generation of IDs will almost never result in a query to an existing user - even if servant-quickcheck POSTs a new arbitrary user, the likelihood of it GETting that user is very small.
I think the way to go is to have a class with an IO a (rather than Gen a) method. This would allow library users to for example specify that Id should be taken from the list of IDs in the database.
The text was updated successfully, but these errors were encountered:
Currently we use
Arbitrary
for everything. This runs into an issue that makes testing particular endpoints not very effective. To see why, consider a typical CRUD set of endpoints (where e.g. "user/:id" is one of the GET endpoints). With a clean DB, arbitrary generation of IDs will almost never result in a query to an existing user - even ifservant-quickcheck
POSTs a new arbitrary user, the likelihood of it GETting that user is very small.I think the way to go is to have a class with an
IO a
(rather thanGen a
) method. This would allow library users to for example specify thatId
should be taken from the list of IDs in the database.The text was updated successfully, but these errors were encountered: