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

Add numbers to test cases in clash run #43

Closed
Andriamanitra opened this issue Nov 14, 2023 · 0 comments · Fixed by #44
Closed

Add numbers to test cases in clash run #43

Andriamanitra opened this issue Nov 14, 2023 · 0 comments · Fixed by #44
Assignees
Labels
feature Feature request

Comments

@Andriamanitra
Copy link
Owner

When running clash run it would be nice to know the number of the failing test case especially if there are lots of tests. This would allow users to easily run only the failing testcase with clash run --testcases N.

Probably the best way to tackle the issue would be to add a field into the TestCase struct when parsing a clash (maybe serde has a way to do this?). The numbering of tests should start from 1 (similar to how it is on Codingame), so test 1 is the first test (index 0 in test case array) and test 2 is the first validator (index 1 in test case array). When done this way the numbering keeps working nicely even if you run tests in a weird order like clash run --testcases 6,4,2.

Current output:

PASS Test 1
PASS Validator 1
PASS Test 2
PASS Validator 2
... more output ...
11/12 tests passed

Desired output:

PASS #1 Test 1
PASS #2 Validator 1
PASS #3 Test 2
PASS #4 Validator 2
... more output ...
11/12 tests passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant