Package: mdtest
Markdown Test (mdtest)Framework for verifying/testing documentation in markdown format. It can be used to do Behavior Test Driven Development (BTDD).  This document is also a living example of self verified documentation (some kind of SSOT - single source of truth). Syntax is inspired byConcordionand it'ssyntax. Implementation based onpython-markdown.NOTICE:Project is still in very early stage of development!!! It might be unstable and a lot of things will probably change (At least output and traceability)How to runJust install python package. Then in the project root run:mdtestIt will search forREADME.mdand markdown files(ending on.md) indoc/for a valid test (or "example" in Concordion language). For this project it willRan 12 tests+ this test (it is skipped here to avoid recursion).For more details about command options seedoc/CLI.md.Concordion SyntaxYou can easily start by looking atdoc/BasicConcordionExample.md. It is amdtestinstrumented version ofConcordion Getting Started, which I recommend you to follow ;).mdtestaims to use the same syntax asConcordion- it just provides different fixture implementation - python is a bit be more 'lightweight'.Basic instrumentation syntax relays on commands, which are special markdown links:# [Test case](- "basic")

Normal text and [text which might be verified](- "with some command")This defines "Test Case" that runs "with some command" command (see "Commands examples" section for details).Notice:commands links are always "-".Notice2:This test case uses buildin fixturefixture_basic.py. More details in section "Fixtures".Commands examplesassign text to variable[text will be value](- "#some_variable")text will be valueassert variable value[text will be value](- "?=#some_variable")text will be valuerun some command from fixture[text](- "?=get_first_word(#some_variable)")textMore details which syntax is supported can be found indoc/ConcordionSupport.mdFixturesTest cases definition contains annotation which fixture to be used:# [Test case](- "python_functions")This makes mdtest look for a given fixture (in this casefixture_pythonfunctions.py) in any path contains markdown files and builtin fixtures (likebasicorcli). Fixtures are just a python files, which may contain some useful function for instrumenting documentation. For details and examples see buildinfixturesor just seefixture_*.pyin this documentation doc file.Changes to Concordion SyntaxSome additions to original syntax includes:Eachblockis assigned to variablecodeXwhere X is sequence number in testcase, soblock is value of code1. This is useful for verifying some bigger blocks."==" provides assert useful with blocks. See example above.Limited python syntax supportExample and more details can be found indoc/ConcordionExtentions.mdOther notices and practice hitsTo see how your files are rendered against different engines you can usebabelmarkSome useful practices can be found onkeepSpecsSimpleby ConcordionAs a rule of thumb I would use this project for some high level verification(on integrating whole product only) and to keep the documentation/specification up to date. More use cases should be implemented as integration and unit tests. I will try to keep this project as an example, but I am only human and some mistakes are unavoidable - If you know how to make things better - let me know ;)