open-gov-crawlers
open-gov-crawlers copied to clipboard
Create a data-driven test case framework
The Idea: enable non-programmers to write test cases.
Context: The English version has its tests in rome_statute_test.py. Each language would need its own test file. Eventually these could be refactored together. But regardless, a programmer would need to do this work.
But we can allow people with good language skills to contribute if we completely remove the expected
output from the test file and store it separately. Maybe in a spreadsheet or YAML file which the Python test file would read. This separate "database" would be 2-dimensional. One dimension are the tests such as "document title". The other dimension is the human languages such as English, Russian, etc.
See also:
- https://medium.com/ranorex-webtestit/data-driven-testing-using-python-and-the-parameterized-module-37e2cb863915