-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a data-driven test case framework #102
Comments
ComplicationsNot all tests simply look for a string.
The second one above should make no difference. But the one that looks for a |
Thoughts about the database:
Tests:
Title Works Correctly:
French: Statut de Rome de la Cour pénale internationale
English: Rome Statute of the International Criminal Court
Language Works Correctly:
French: fr-FR
English: en-US A bonus with YAML is that it supports values of list of strings. The "schema checking" could be just a few lines of Python that attempts to read in the data. Or, it could be a JSON-schema.
add(TestCase(
test_name = "Title works correctly",
french = "Statut de Rome de la Cour pénale internationale",
english = "Rome Statute of the International Criminal Court"
))
add(TestCase(
test_name = "Language Works Correctly",
french = "fr-FR",
english = "en-US"
))
|
Idea for testing the tests:Create a This wouldn't provide a lot of assurance, but it'd be some. (?) |
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:
The text was updated successfully, but these errors were encountered: