| layout | default | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| keywords | |||||||||
| comments | false | ||||||||
| title | Lab - Unit Tests | ||||||||
| description | Now for the best part - adding unit tests! | ||||||||
| author |
|
||||||||
| micro_nav | true | ||||||||
| page_nav |
|
Now that the source code is cleaner, start adding some unit tests. Run your characterization and newly created unit tests often.
Know that you know some of the characteristics of the code and how it behaves and you have refactored it using well-known practices. Add some unit tests for the test cases you do know. It's ok to keep refactoring, it didn't have to be perfect the first time.
Run your tests often.
- Refactor your unit tests simple to read
- Add unit tests for the other API calls (If you have supported characterization tests)