Skip to content

Option to run tests synchronously (& group by) #1

Description

@sebasslash

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions