Skip to content
This repository was archived by the owner on Apr 22, 2024. It is now read-only.
This repository was archived by the owner on Apr 22, 2024. It is now read-only.

Arbitrary generation #3

Open
Open
@jkarni

Description

@jkarni

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions