-
Notifications
You must be signed in to change notification settings - Fork 19
Description
1. Pupose
a. The unit tests currently in the tests/testthat/test-jira.R are not comprehensive, and do not cover all function categories that should be tested for.
b. The existing JIRA tests only cover for parse_jira, despite there being 3 downloaders, 3 parsers, and a refresher function to test for.
2. Process
a. Add to the existing tests/testthat/test-jira.R file so that it tests all functions available. The code coverage progress and impact of my work can be visualized with codecov, which is a coverage tool that informs how much code is tested for in Kaiaulu's packages. Based on previous notebooks, I’ve updated my test table to contain three main types of tests.
Test Explanations
| Types of Test | Test Explanation |
|---|---|
| Path Test | Tests that the both the incorrect and correct arguments for a function either result in the function successfully running or correctly erroring |
| Behavioral Test | Tests that functions will behave correctly given certain inputs |
| Third Party Tools Test | Checks if a path for a third party tool being called has been updated in tools.yml, and only test if the tool has been set up correctly |
b. Identify all tests in test-jira.R, refine them, and then create tests of my own to fully test all functions in the file. While moving through the files, I will first create Behavioral tests for the code inside the functions, and then add the Path and Third Party Tools tests after gaining a better understanding of how the functions behave and interact with each other. I will then compile a full proposed test list with statements written in the format of Kaiaulu’s testing package testthat. A basic example of what this would look like is ”testthat if the verbose argument is set to TRUE, function will print a download message”. These tests would be uploaded in the form of a .md file in a Pull Request that is linked to this issue. Once my test list is approved by @carlosparadis, I will begin work coding all of my tests and add them to the Pull Request to be merged into the main branch of Kaiaulu.
Test Process Checklist
- Identify all current JIRA tests
- Create Behavioral Tests for every function
- Create Path Tests for every function
- Create Third Party Tests(If applicable)
- Compile a full test list and create a Pull Request with it in a .md file
- Code the tests in R
- Update the Pull Request with the tests and pass CI/CD checks
- Waiting for Architect + Stakeholder review
- Merge the code