Property Base Your State Machine (Combo Workshop)
PREPARATION - A clone or copy of this repository https://github.com/qfpl/state-machine-testing-course/ and completion of the initial setup steps contained therein.
Types are great, but in most languages we use, they can't cover everything.
Testing tries to fill that gap. Property-based testing generates bizarre
examples and finds minimal reproductions that break your tests - a significant
improvement over writing test cases by hand. But what if you have a thorny
stateful system to test?
State Machine Testing extends property-based testing to randomly test stateful
systems. The actions performed against the system are modeled as commands, and
the usual property-based test machinery, generates test cases, and shrinks
failing tests to their minimal counter-examples.
In this workshop we will build on the earlier talk and begin building up a state-machine test suite for a small imperative system.
- Gain a basic understanding of property-based state-machine testing
- Have implemented several state-machine tests using the Haskell `hedgehog` testing library
- Understand its importance as an extremely powerful testing tool
- Be excited enough that they want to apply it to their own projects
- Gain awareness that:
- Haskell isn't the only language that has this capability
- Even in Haskell, `hedgehog` isn't the only library that can do this
People wanting a hands-on introduction to using property-based state-machine testing
Prerequisites for Attendees
- Intermediate Haskell knowledge is required.
- Knowledge of property-based (but not state-machine) testing would be beneficial
- A clone or copy of this repository https://github.com/qfpl/state-machine-testing-course/ and completion of the initial setup steps contained therein.
schedule Submitted 1 month ago
People who liked this proposal, also liked:
Ben Kolera - The Reflex Architecture (Combo Workshop)Ben KoleraFunctional Programming EngineerQFPL, Data61, CSIRO
schedule 1 month agoSold Out!
This workshop needs some pre-setup as I'll only have 5 thumbdrives with vms on them. It's around 3GiB to download with virtualbox/docker and about 700MiB with nix: https://github.com/qfpl/reflex-realworld-workshop/blob/master/SETUP.md.
Reflex-dom is a remarkably awesome way to write frontend web applications in Haskell. Reflex DOM is built from Functional Reactive Programming (FRP) primitives defined in a library called Reflex.
Writing apps in reflex-dom is a little weird at first because it's a whole brand new paradigm to structuring your programs. Just like the jump from imperative programming to FP, jumping into FRP is a tricky process of rewiring your brain to fit the new model of thinking. It can be very difficult to appreciate the power and architectures that you can from this transition while you are still learning the basics, which naturally makes it difficult to be motivated to put in the work.
In this workshop we will implement parts of the "real world demo", a demo blogging application designed as a way to test frontend frameworks with things like backend calls and frontend routing. There will be a lot of skeleton and example code already written and be very directed, so it's -- as with the talk -- it is going to be more getting a high level feel than learning all of the fundamentals. It is the hope that the fast paced guided intro will allow you to do the rest of the learning at your own pace later.