Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a more programmatic way to produce tests #367

Open
lefou opened this issue Feb 15, 2025 · 0 comments
Open

Support a more programmatic way to produce tests #367

lefou opened this issue Feb 15, 2025 · 0 comments

Comments

@lefou
Copy link
Member

lefou commented Feb 15, 2025

Currently, all tests and sub-tests need to written explicitly. This always bugs me, as it makes writing test matrices unnecessary burdensome. You either need to move test matrix processing into the test, that means, test units are large and test failures don't communicate which point in the matrix is failing, or you need to move the matrix outside of the tests, resulting in much coding infrastructure involving generic classes/traits and many explicit test objects extends TestSuite for each and any test matrix value.

The naive approache doesn't work:

for {
  i <- Seq(1,2,3)
} yield test("testing-${i}") {
  assert(...)
}

Maybe, we can invent some API, that allows this kind of generic testing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant