You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature Request] Add way to extract score to declarative tests
#87
Currently, while using declarative tests, any test can only result in one of two states: failed or passed.
Therefore, any test can either give full points or no points.
It would be great, if there were an option to extract a resulting score from stdout, as that would make it easy to integrate outside testing tools, which might not have a binary fail/success state or expose a more precise score.
One example of this would be the possibility of using cargo test.
Following example runs cargo tests on a repo and outputs the resulting amount of passing tests to stdout: cargo test | grep -oE '[0-9]+ passed' | awk '{print $1}'
In this case, this also outputs some lines to stderr which could also be included while looking for the score, or not.
stderr can easily be silenced by piping it to /dev/null so I don't think it's output would cause problems if it were considered while looking for the score. cargo test &> /dev/null | grep -oE '[0-9]+ passed' | awk '{print $1}' '
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Currently, while using declarative tests, any test can only result in one of two states: failed or passed.
Therefore, any test can either give full points or no points.
It would be great, if there were an option to extract a resulting score from stdout, as that would make it easy to integrate outside testing tools, which might not have a binary fail/success state or expose a more precise score.
One example of this would be the possibility of using
cargo test.Following example runs cargo tests on a repo and outputs the resulting amount of passing tests to stdout:
cargo test | grep -oE '[0-9]+ passed' | awk '{print $1}'In this case, this also outputs some lines to stderr which could also be included while looking for the score, or not.
stderr can easily be silenced by piping it to
/dev/nullso I don't think it's output would cause problems if it were considered while looking for the score.cargo test &> /dev/null | grep -oE '[0-9]+ passed' | awk '{print $1}' 'Thanks much for your work!
All reactions