In order to make the tests reproducible the driver now includes a seed and size parameter to the GenerateRandomValue request. If a client process returns the same value for the same parameters, then you can reproduce a failure with --quickcheck-replay SEED.
In order to test this PR, It is recommended to also check out the corresponding purescript-marlowe PR, then:
Make sure the local tests are reproducible
Modify a ToJSON definition in MarloweCoreJson.lhs to make sure the test fails
Run the tests with cabal test marlowe-spec-test
Run the tests again and see that the random value has changed
Use the pattern and seed printed by the test and see check that the result is the same. To pass parameters to the local test you need to use --test-options like this:
cabal test marlowe-spec-test --test-options="--pattern /TransactionOutput/ --quickcheck-replay=457567"
Make sure client process tests are reproducible
In the purescript-marlowe repository, modify the flake.nix input to use this version of marlowe-spec
In order to make the tests reproducible the driver now includes a
seed
andsize
parameter to theGenerateRandomValue
request. If a client process returns the same value for the same parameters, then you can reproduce a failure with--quickcheck-replay SEED
.In order to test this PR, It is recommended to also check out the corresponding purescript-marlowe PR, then:
Make sure the local tests are reproducible
ToJSON
definition inMarloweCoreJson.lhs
to make sure the test failscabal test marlowe-spec-test
pattern
andseed
printed by the test and see check that the result is the same. To pass parameters to the local test you need to use--test-options
like this:Make sure client process tests are reproducible
purescript-marlowe
repository, modify theflake.nix
input to use this version ofmarlowe-spec
nix develop
in the purescript-marlowe repomarlowe-test
to build the project and run the tests (they should all pass)DecodeJson
inside theLanguage.Marlowe.Core.V1.Semantics.Types
modulemarlowe-test
, one of the serialization test should failcat $(which marlowe-test)
and execute the last line plus the suggested pattern and replay seed