diff options
authorLars Wirzenius <>2019-06-22 18:55:25 +0300
committerLars Wirzenius <>2019-06-22 18:55:25 +0300
commitda2ba9b027dae6e124e3ce2b08dc0abecd6dcce4 (patch)
parentbda456e4e0a17bf06e4c146cdc3fa270d953d375 (diff)
Add: first scenario for fable
2 files changed, 38 insertions, 0 deletions
diff --git a/ b/
index 89ee96b..50a91a0 100644
--- a/
+++ b/
@@ -321,3 +321,36 @@ other resource constraints.
# Acceptance tests for Fable
FIXME: This needs to be written eventually, when Fable is implemented.
+## Simple scenario
+We test that Fable can execute a very simple scenario. The test is
+based on generating the test program from an input file, running the
+test program, and examining the log file. This will require that the
+generated test program logs the things it does in a known format.
+Effectively, the log messages become a part of the contract.
+given file "" containing
+ # Simple
+ ```fable
+ given precondition foo
+ when I do bar
+ then bar was done
+ ```
+and file "simple.yaml" containing
+ - given: precondition foo
+ function: nop
+ - when: I do bar
+ function: nop
+ - then: bar was done
+ function: nop
+and file "" containing
+ def foo(ctx): pass
+when I run ftt-codegen --run
+then log file says scenario "Simple" was run
+and log file says step "given precondition foo" was run
+and log file says step "when I do bar" was run
+and log file says step "then bar was don" was run
+and program finished successfully
diff --git a/fable-arch.yaml b/fable-arch.yaml
index e69de29..fb563d2 100644
--- a/fable-arch.yaml
+++ b/fable-arch.yaml
@@ -0,0 +1,5 @@
+- given: file "(?P<filename>\S+)"" containing (?P<content>.*)
+- when: I run ftt-codegen --run (?P<filename>\S+)
+- then: log file says scenario "(?P<name>.+)" was run
+- then: log file says step "(?P<keyword>given|when|then) (?P<name>.+)" was run
+- then: program finished successfully