jgrenat / regression-testing / RegressionTest.Generator

Exposes a bunch of methods to generate test data for regression testing.

Definition


type alias RegressionTestGeneratorProgram model msg =
Platform.Program Flags (Model model msg) (Msg model msg)

Program used to generate test data for regression tests.

Test a program

sandboxUpdate : { modelGenerator : Random.Generator model, messageGenerator : Random.Generator msg, update : msg -> model -> model, encodeModel : model -> Json.Encode.Value, encodeMessage : msg -> Json.Encode.Value, outputPort : Json.Encode.Value -> Platform.Cmd.Cmd msg, numberOfTests : Basics.Int } -> RegressionTestGeneratorProgram model msg

Generate test data for a sandboxProgram, with the update function following the form msg -> model -> model.

update : { modelGenerator : Random.Generator model, messageGenerator : Random.Generator msg, update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), encodeModel : model -> Json.Encode.Value, encodeMessage : msg -> Json.Encode.Value, outputPort : Json.Encode.Value -> Platform.Cmd.Cmd msg, numberOfTests : Basics.Int } -> RegressionTestGeneratorProgram model msg

Generate test data for a standard program, with the update function following the form msg -> model -> (model, Cmd msg).