Dump of thoughts and tidbits on unit tests
- switch black from
--diff
to--check
. Diffs in pytest output are unreadable, only file list is interesting - why aren't step implementations blackified and why they ignored by unit tests?
- gherkin linter (#17)
- install:
dnf install yarn
-yarn add gherkin-lint
- create & tweak config file example one here -yarn run gherkin-lint --help
- these distribution-independent things (
pip
,yarn
) would make sense to be abstracted away to separate setup script common for any distro (well probably two, one for unit tests install and one to be run from envsetup during regular set up?) - need to analyze which rules are to be enforced and which to be ignored
- gherkin linter does not check for step implementations
- install:
- implementation of steps in feature files is checked by
behave --dry-run
. It'd make sense to run these in parallel from unit tests for all scenarios defined in mapper (tests not in mapper are already handled bytest_feature_tags()
andtest_last_scen_tag_is_test_tag_and_correctly_tagged()
)- first sentence means that hypothetical steps called just from another step implementations won't be checked
- parallel running: for 0.5 s per behave call (takes less), 15 parallel processes running at full speed and 1000 scenarios, we should be below additional half minute per unit tests run