dblock / dblock/code.dblock.org
Which part of an application should I first test in case a base code is already here and have no test at all?
Open
Nobody has claimed this yet.
post topic suggestion
- Dominant language
- JavaScript
- Stars
- 7
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
In short I think you should start by writing regression tests for every bug. But maybe there's a more thorough strategy, especially for common applications such as Rails?
- Write tests for any regression, so every time you find a bug, don't fix a bug without a test.
- Write basic tests for any class you touch, for example if you are modifying a model, at least add a test file for it, write a test for the new feature as well as a "hello world" test of say a model can be created with some argument passed to it.
- Try to fill out new types of tests on your copious free time, like maybe a first controller test, then a first integration test with Capybara.
- Try to write tests in adjacent areas, if you're adding a method to a controller, test another part of the controller.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, entry points, or existing tests. Start by reviewing the repository's current test setup and the proposed regression, model, controller, and integration-testing areas; done would require a project-specific testing strategy and an agreed scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, rails
- Domain
- testing
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100