Skip to content

Commit

Permalink
Update tests.yml and README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
mar10 committed Apr 27, 2024
1 parent 42b2fcf commit 5469b3d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 28 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,11 @@ jobs:
run: |
python -V
python -m pip install --upgrade pip
python -m pip install setuptools
python -m pip install pytest pytest-cov pytest-html ruff
python -m pip install requests cheroot lxml wsgidav
# python -m pip install psutil stressor-ps
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip list
- name: Lint with ruff
Expand Down
55 changes: 28 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ![logo](https://raw.githubusercontent.com/mar10/stressor/master/stressor/monitor/htdocs/stressor_48x48.png) stressor
[![Build Status](https://travis-ci.com/mar10/stressor.svg?branch=master)](https://app.travis-ci.com/github/mar10/stressor)

[![Tests](https://github.com/mar10/stressor/actions/workflows/tests.yml/badge.svg)](https://github.com/mar10/stressor/actions/workflows/tests.yml)
[![Latest Version](https://img.shields.io/pypi/v/stressor.svg)](https://pypi.python.org/pypi/stressor/)
[![License](https://img.shields.io/pypi/l/stressor.svg)](https://github.com/mar10/stressor/blob/master/LICENSE.txt)
[![Documentation Status](https://readthedocs.org/projects/stressor/badge/?version=latest)](http://stressor.readthedocs.io/)
Expand All @@ -10,7 +11,7 @@

> Stress-test your web app.
*Stressor* is a tool, that runs a sequence of activities in one or more
_Stressor_ is a tool, that runs a sequence of activities in one or more
parallel sessions.
The most common use case is to run a test script with HTTP commands
against a web server, simulating a bunch of parallel user sessions.
Expand All @@ -25,47 +26,47 @@ extended by custom activity-plugins.
Test scripts can be defined as text files, using a special syntax, that is then
executed by the `stressor` command line tool.
Stressor is also an Open Source Python library that can be included into your
own projects. This allows to define test *scenarios* programmtically.

own projects. This allows to define test _scenarios_ programmtically.

## Quickstart

1. Install *stressor* ([details](https://stressor.readthedocs.io/en/latest/installation.html))
1. Install _stressor_ ([details](https://stressor.readthedocs.io/en/latest/installation.html))

2. Create a new scenario folder. For example:

```bash
$ stressor init ./scenario_1
```
```bash
$ stressor init ./scenario_1
```

or alternatively import an existing HAR file as a starting point
([details](https://stressor.readthedocs.io/en/latest/ug_writing_scripts.html#importing-har-files)):
or alternatively import an existing HAR file as a starting point
([details](https://stressor.readthedocs.io/en/latest/ug_writing_scripts.html#importing-har-files)):

```bash
$ stressor init ./scenario_1 --convert /path/to/output.har
```
```bash
$ stressor init ./scenario_1 --convert /path/to/output.har
```

3. Edit the scripts as needed (*users.yaml*, *main_sequence.yaml*, *scenario.yaml*)
([details](https://stressor.readthedocs.io/en/latest/ug_writing_scripts.html))
3. Edit the scripts as needed (_users.yaml_, _main_sequence.yaml_, _scenario.yaml_)
([details](https://stressor.readthedocs.io/en/latest/ug_writing_scripts.html))

4. Run the script:

```bash
$ stressor run ./scenario_1/scenario.yaml
```
```bash
$ stressor run ./scenario_1/scenario.yaml
```

Use the `--monitor` option to view the progress in a separate window:

Use the `--monitor` option to view the progress in a separate window:
```bash
$ stressor run ./scenario_1/scenario.yaml --monitor
```

```bash
$ stressor run ./scenario_1/scenario.yaml --monitor
```
Use the `--log` argument to write output to a file or folder:

Use the `--log` argument to write output to a file or folder:
```bash
$ stressor run ./scenario_1/scenario.yaml --no-color --log .
```

```bash
$ stressor run ./scenario_1/scenario.yaml --no-color --log .
```
(Hit <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop.)
(Hit <kbd>Ctrl</kbd>+<kbd>C</kbd> to stop.)

5. [Read The Docs](https://stressor.readthedocs.io/en/latest/ug_tutorial.html)
for details.
Expand Down

0 comments on commit 5469b3d

Please # to comment.