practicalli / practicalli/clojure
Unit testing approaches
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 117
- Forks
- 36
- PR merge metrics
- No merged PRs in 30d
Description
Example based testing
- using
areto have a range of selected values for unit tests.
This is a simple approach and easy to do, it is very obvious as to what data is being tested.
The flaw in this approach it that it relies on the quality of the test data created by the development team. There may be edge cases not considered.
Also if there is a refactoring that changes the behaviour of the function being tested and the kind of arguments passed, then refactoring of the test data is also required.
Generative testing
This requires about the same initial setup, however once the basics specifications for generators are established very little extra work is required.
Use the properties (specifications) of the system to generate truely random tests.
Generative testing typically catches far more edge cases and runs far more tests than example based testing can comfortably maintain.
Simulation testing
System model
Random
Simulate the user interacting with the system (all the events triggered from some user interaction or possibly an event stream.
simulant - https://github.com/Datomic/simulant
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
No files, tests, or entry points are named. Start by reviewing the comparison of example-based, generative, and simulation testing and the linked simulant project. Clarify whether the intended contribution is documentation or implementation, then define what a completed contribution should contain.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100