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
I'm trying to turn a (failing) alcotest binary into a dune expect test, but it's unreproducible because of one line: This test has ID ….. Is there a way to either silence this line, or set an ID via the environment?
The text was updated successfully, but these errors were encountered:
AFAIK, there is no such existing feature. In Alcotest's own test suite, we strip such non-deterministic output with a separate binary. In addition to the random ID, we also have to account for:
differences in printed filepaths on various platforms;
variations in reported duration of the test run;
some changes to OCaml's exception reporting for different OCaml versions – perhaps not an issue for you.
Additionally, Alcotest's default output format has been historically quite unstable, so snapshotting it while consuming it as a library may prove frustrating. I was going to suggest using .. --json 2>/dev/null, but it seems that --json still logs non-JSON lines to standard out. (This is likely a mistake, and can/should be fixed separately.)
I'm interested in knowing what information the snapshot is intended to hold: perhaps the binary contains both passing and failing cases and the goal is to record which is which?
I'm trying to turn a (failing) alcotest binary into a dune expect test, but it's unreproducible because of one line:
This test has ID ….
. Is there a way to either silence this line, or set an ID via the environment?The text was updated successfully, but these errors were encountered: