-
Notifications
You must be signed in to change notification settings - Fork 81
Writing functional tests
Tests inside the cadasta-test repository are generally divided according to the test cases they implement in the Functional Test Cases spreadsheet. For example, tests for the User Accounts test cases can be found under the account_tests
directory and tests for the Resources test cases can be found under the resource_tests
directory.
Furthermore, tests are generally divided into test files that correspond to the sub-feature column of the Functional Test Cases spreadsheet. For example, tests for the Login sub-feature of the User Accounts test cases can be found in the account_tests\test_login.py
test file. Each test file should only have one test class named with the sub-feature (e.g., TestLogin
) and all test classes inherit from the SeleniumTestCase
base class found in the base_test.py
file.
Individual tests are implemented as individual methods of the test class and named test_<name>
where <name>
is generally the same as the corresponding test case title in the Functional Test Cases spreadsheet. For example, the test that implements the Projects #U1 test case (“PM can update project”) is named test_pm_can_update_project
.
For tests that implement more than one test case, use a test name that makes sense for those test cases. For example, the test that implements the Records #LC1 (“User can create location”) and #LD1 (“User can delete location”) test cases is named test_user_can_create_delete_location
.
Visit our User Documentation to learn more about using the Cadasta Platform.
If you'd like to contribute to the Cadasta Platform, start with our Contributing Guidelines.
Cadasta Wiki Home | Developer Setup Guide
Cadasta.org | About Cadasta | YouTube | Twitter | Facebook
- Installing & Running
- Contributing
- Planning & Sprints
- Platform Development
- Testing
- Utilities
- Outreachy
- Platform Site Map
- User Flows and Wireframes
- Other
- Quick Start Guide
- Glossary
- Questionnaire Guide