Skip to content

Commit

Permalink
docs: update docs to match usage with plugin (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
guotin authored Dec 14, 2020
1 parent 1ed34e3 commit d98f19a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

# Change based tests selection for Python

- [Usage](#usage)
- [Development](#dev)
- [Contributing](#contrib)
- [Usage](#usage)
- [Development](#dev)
- [Contributing](#contrib)

## <a name="usage"></a> Usage

Expand All @@ -13,7 +13,7 @@
1. Add your public key to github profile
2. Add `git+ssh://git@github.com/F-Secure/pytest-rts.git#egg=pytest-rts` as a dependency to `requirements.txt`
3. Install dependencies
4. Run initialization `pytest_rts_init`
4. Use the tool with `pytest --rts`

### Usage from source code

Expand All @@ -23,15 +23,14 @@
2. In project directory run `make install` - that will:
- create virtual environment
- download all the dependencies
- install `pytest_rts` as a tool
- install `pytest-rts`
3. Switch to directory with target project
4. Install all the dependencies needed for testing (should be installed into the same pytest_rts virtual environment)
5. Execute `pytest_rts_init`
4. Install all the dependencies needed for testing (should be installed into the same pytest-rts virtual environment)
5. Execute `pytest --rts` which will run the entire test suite and build a mapping database

#### Running tests related to the changes

1. switch to directory with target project
2. execute `pytest_rts`
1. execute `pytest --rts` after doing changes

#### Running evaluation code

Expand All @@ -51,7 +50,6 @@ Read through our [contributing guidelines][contributing] to learn about our subm

Help us keep the project open and inclusive. Please read and follow our [Code of Conduct][codeofconduct].


[developer]: https://github.com/F-Secure/pytest-rts/tree/master/docs/DEVELOPER.md
[contributing]: https://github.com/F-Secure/pytest-rts/tree/master/docs/CONTRIBUTING.md
[codeofconduct]: https://github.com/F-Secure/pytest-rts/tree/master/docs/CODE_OF_CONDUCT.md
6 changes: 3 additions & 3 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ This tutorial uses [flask](https://github.com/pallets/flask) as an example. At t
1. Clone [flask](https://github.com/pallets/flask) and this repository to their own folders.
2. In the root of this repository, run `make install` which creates a virtualenv and activate it with `source .venv/bin/activate`
3. Go to the flask repository folder and install its dependencies. At the time of writing, this is done with `pip install -e . -r requirements/dev.txt`
4. Run `pytest_rts_init` to initialize the mapping database
4. Run `pytest --rts` to initialize the mapping database

## Usage

- Change some source code file or test file -> run `pytest_rts` -> the tool runs tests based on changes in the git working directory
- Change some source code file or test file -> commit changes -> run `pytest_rts` -> the tool runs tests based on changes between the current commit state and the time the mapping database was last updated & updates the database
- Change some source code file or test file -> run `pytest --rts` -> the tool runs tests based on changes in the git working directory
- Change some source code file or test file -> commit changes -> run `pytest --rts` -> the tool runs tests based on changes between the current commit state and the time the mapping database was last updated & updates the database

0 comments on commit d98f19a

Please sign in to comment.