Skip to content

tests: fail-fast the test suites by default #190

@rbasso

Description

@rbasso

Some test suites are designed so that more complex cases come later, allowing users to incrementally solve the exercise, test by test.

I can think of three ways to deal with this usage case:

  • All tests enabled by default - This forces users to disable all the tests except the first before start solving the exercises. It's how it is now. 😩
  • All tests disable by default - This could save work for some users, but would be inconvenient for other users and would also break Travis-CI automated tests. ⛔
  • Fail-fast the tests - If the test suite fails displaying just the first error, everyone will be happy. ✅ 😄

Currently, all test suites use HUnit (trinary and octal use QuickCheck, but they will be deprecated by exercism/problem-specifications#279) because it was the only thing installed with the Haskell Platform. If we find a beautiful solution to fail-fast HUnit, we can use it immediately.

Alternatively, considering that we will migrate all exercises to Stack projects (#182, #189) and dependencies will not be a problem anymore, we can start to look at newer packages. I did some tests with tasty, tast-hunit and tasty-fail-fast, but they demand the user run the test with:

stack test --test-arguments --fail-fast

This is great, but it would be even better to have this as the default behavior. MichaelXavier/tasty-fail-fast#2

Does anyone knows a better solution?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions