Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vgsantoniazzi/transmute
Write good tests — or transmute will complain about it.
https://github.com/vgsantoniazzi/transmute
Last synced: about 2 months ago
JSON representation
Write good tests — or transmute will complain about it.
- Host: GitHub
- URL: https://github.com/vgsantoniazzi/transmute
- Owner: vgsantoniazzi
- License: gpl-3.0
- Created: 2022-02-16T02:44:22.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-12T02:27:48.000Z (almost 2 years ago)
- Last Synced: 2024-10-31T14:47:10.684Z (2 months ago)
- Language: Rust
- Homepage:
- Size: 82 KB
- Stars: 7
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Welcome to Transmute
Transmute is a binary that works alone or in coordination with coverage formatter to report test quality. It will change your code and make the tests fail. If don't, we will raise it for you.
Any software requires well-written tests. This is where transmute steps in.
The key features of transmute are:
* **Mutate**: Arbitrary code can be changed.
Mutates booleans, numbers, strings, symbols, ranges, regexes and branches (if, while, unless, until)
can be changed in order to make your specs fail.* **Dynamic**: Automatically run the tests
Provide how to run the tests and transmute will run it..
* **Coverage**: Transmute will run just the affected tests.
Instead of running all the specs, we will run only the required specs.
This is good to provide a quick feedback-loop.* **Insights**: If the tests didn't fail, we will provide the information that you need to write a new tests case.
## Getting Started
```sh
$ transmute \
--files "app/models/**/*.rb" \
--coverage "transmute.json" \
--command "rspec {file}" \
--formatter "html" \
--log-level "trace"
```## Coverage file
Coverage is a file generated by the coverage formatter. We are building integration for the most used test libraries.
It is a good practice to provide the `coverage.json` file. It is very simple: For each implementation file, we have all the specs that touches it.
With that in hand, we don't need to run all specs in order to test one constant mutation.## Contributing
I :heart: Open source!
##### Clone
```
git clone [email protected]:vgsantoniazzi/transmute.git
```##### Compile
```
make build
```##### Run tests
```
make test
```##### Run with our dummy project
```sh
make run.dummy
```##### Format
```
make format
```[Follow github guides for forking a project](https://guides.github.com/activities/forking/)
[Follow github guides for contributing open source](https://guides.github.com/activities/contributing-to-open-source/#contributing)
[Squash pull request into a single commit](http://eli.thegreenplace.net/2014/02/19/squashing-github-pull-requests-into-a-single-commit/)
## License
Transmute is released under the GNU license.