smarty / gunit

xUnit-style test fixture adapter for go test
Other
120 stars 11 forks source link

Introducing functional options for more flexible execution of fixtures and test cases #29

Closed mdwhatcott closed 4 years ago

mdwhatcott commented 4 years ago

Resolves #25 and #27

Summary of changes to the public contract:

  1. RunSequential is deprecated
  2. Run now accepts variadic functional options as its last argument. Those options are as follows:
    1. Options.AllSequential() - Passing this to gunit is equivalent to the now deprecated Run function.
    2. Options.SequentialFixture() - Prevent corresponding fixture from being run in parallel
    3. Options.SequentialTestCases() - Prevent test cases on a fixture from being run in parallel with each other.
    4. Options.LongRunning - Mark every test in a fixture as long-running
    5. Options.SkipFixture - Mark every test in a fixture as skipped.