Skip to content

Fix grammatical errors in README.md #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Oxygen is a [Robot Framework](https://robotframework.org/) tool that empowers th

Oxygen has built-in support for three testing frameworks: [JUnit](https://junit.org/junit5/), [Gatling](https://gatling.io/), and [Zed Attack Proxy (ZAP)](https://www.zaproxy.org/).

Oxygen is designed to be extensible. Users can create their own *handlers* for other testing framework or tools to transform their reporting into the Robot Framework's `log.html` and `report.html`.
Oxygen is designed to be extensible. Users can create their own *handlers* for other testing frameworks or tools to transform their reporting into the Robot Framework's `log.html` and `report.html`.

# Table of Contents
1. [Installation](#installation)
Expand All @@ -23,7 +23,7 @@ $ pip install robotframework-oxygen

## Pre-requisites

- Oxygen is supported on Windows, Linux and MacOS
- Oxygen is supported on Windows, Linux and macOS
- [Python 3.10](http://python.org) or above
- [pip](https://pypi.python.org/pypi/pip) for easy installation
- [Robot Framework](http://robotframework.org)
Expand All @@ -42,7 +42,7 @@ $ python --version

## Example: Robot Framework running other test tools

Main usage scenario for Oxygen is the ability to write acceptance test cases that run your tests in other test tools and integrate the resulting test report as part of Robot Framework's. This means you are able to run all of your testing from Robot Framework and thus having all test reporting consolidated together.
The main usage scenario for Oxygen is the ability to write acceptance test cases that run your tests in other test tools and integrate the resulting test report as part of Robot Framework's. This means you can run all of your testing from Robot Framework and thus have all test reporting consolidated together.

After installing Oxygen, it can be used in the Robot Framework suite to write test cases. For example, to build acceptance tests that run different sets of JUnit tests:

Expand All @@ -67,21 +67,21 @@ Then, run the suite by providing Oxygen as [a listener](http://robotframework.or
$ robot --listener oxygen.listener my_tests.robot
```

Opening the Robot Framework `log.html` and `report.html`, you should see that test case `JUnit unt tests should pass` has been replaced by Oxygen with test cases matching with what is in the `path/to/mydir/results.xml` JUnit report file. Similarly, test case `JUnit integration tests should pass` has been replaced with results from `path/to/anotherdir/results.xml`; each JUnit test case with its relevant information has a counterpart in the `log.html`. Each JUnit test case is also tagged with the tags from the original Robot Framework test case.
Opening the Robot Framework `log.html` and `report.html`, you should see that test case `JUnit unit tests should pass` has been replaced by Oxygen with test cases matching with what is in the `path/to/mydir/results.xml` JUnit report file. Similarly, test case `JUnit integration tests should pass` has been replaced with results from `path/to/anotherdir/results.xml`; each JUnit test case with its relevant information has a counterpart in the `log.html`. Each JUnit test case is also tagged with the tags from the original Robot Framework test case.

The example above, for the brevity, shows incomplete commands to run JUnit tool from command line. Please refer to [keyword documentation](#keyword-documentation) for more detailed documentation about keyword's arguments, as well as documentation for [Gatling](https://gatling.io/) and [ZAP](https://www.zaproxy.org/) related keywords. And, of course, refer to the particular tool documentation as well.
The example above, for brevity, shows incomplete commands to run JUnit tool from the command line. Please refer to [keyword documentation](#keyword-documentation) for more detailed documentation about the keyword's arguments, as well as documentation for [Gatling](https://gatling.io/) and [ZAP](https://www.zaproxy.org/) related keywords. And, of course, refer to the particular tool documentation as well.

## Using from command line

In case where you want to run your other testing tools separately, but yet combine results into unified Robot Framework `log.html` and `report.html`, you can use Oxygen's command line interface to convert single result file to single corresponding Robot Framework `output.xml`:
In the case where you want to run your other testing tools separately, but yet combine results into unified Robot Framework `log.html` and `report.html`, you can use Oxygen's command line interface to convert a single result file to a single corresponding Robot Framework `output.xml`:

```
$ python -m oxygen oxygen.junit my_junit_results.xml
```

As a convention, the resulting Robot Framework xml file will be named by adding a suffix to the end. In the example above, the resulting Robot Framework xml file would be named `my_junit_results_robot_output.xml`.

**Note** that resulting xml file will also be created at the same location as the original result file. Therefore, when original result files are in another directory:
**Note** that the resulting xml file will also be created at the same location as the original result file. Therefore, when the original result files are in another directory:

```
$ python -m oxygen oxygen.gatling path/to/results.log
Expand Down Expand Up @@ -116,13 +116,13 @@ oxygen.zap:

#### `--add-config`

This argument is used to add new handler configuration to Oxygen:
This argument is used to add a new handler configuration to Oxygen:

```bash
$ python -m oxygen --add-config path/to/your_handler_config.yml
```

This file is read and appended to the Oxygen's `config.yml`. Based on the key, Oxygen will try to import you handler.
This file is read and appended to Oxygen's `config.yml`. Based on the key, Oxygen will try to import your handler.

### `--reset-config`

Expand Down Expand Up @@ -162,27 +162,27 @@ Because you can add the configuration to the same handler multiple times, note t

## `utils` module

In [utils module](https://github.com/eficode/robotframework-oxygen/blob/master/src/oxygen/utils.py), you will find assortment of functionalities that you might want to leverage when writing your own handler.
In [utils module](https://github.com/eficode/robotframework-oxygen/blob/master/src/oxygen/utils.py), you will find an assortment of functionalities that you might want to leverage when writing your own handler.

### `run_command_line()`

Most of the time, handlers want to run the other test tool through command line. For this, `utils` provides `run_command_line()` that wraps Python's [`subprocess`](https://docs.python.org/3/library/subprocess.html) module for more easier to use when writing your handler.
Most of the time, handlers want to run the other test tool through the command line. For this, `utils` provides `run_command_line()` that wraps Python's [`subprocess`](https://docs.python.org/3/library/subprocess.html) module for easier to use when writing your handler.

`run_command_line()` takes following arguments:
`run_command_line()` takes the following arguments:
- `cmd`: the command to be executed in a subprocess
- `check_return_code`: if set to `True`, will raise an exception if the `cmd` fails in the subprocess. **Note** that this fails the keyword and, thus, the execution of the test case is stopped. If you want to enable test case to continue even after `run_command_line()` has failed, you should disable it by setting `False`. It is often a good idea to allow user using your handler's keyword to decide how they want the command line execution to affect the test case
- `check_return_code`: if set to `True`, will raise an exception if the `cmd` fails in the subprocess. **Note** that this fails the keyword and, thus, the execution of the test case is stopped. If you want to enable the test case to continue even after `run_command_line()` has failed, you should disable it by setting `False`. It is often a good idea to allow users to use your handler's keyword to decide how they want the command line execution to affect the test case
- `env`: a dictionary of environment variables that should be passed to the subprocess. By default, `run_command_line()` inherits the environment from the current Python process as well as from modifications done by the Robot Framework command line arguments (ie. `--pythonpath`)

# Developing Oxygen

Clone the Oxygen repository to the environment where you want to the run the tool.
Clone the Oxygen repository to the environment where you want to run the tool.

Oxygen requires a set of dependencies to be installed. Dependencies are listed in the `requirements.txt` file:
```
$ pip install -r requirements.txt
```

Oxygen uses task runner tool [`invoke`](http://www.pyinvoke.org/) to run tests, build the project, etc.
Oxygen uses the task runner tool [`invoke`](http://www.pyinvoke.org/) to run tests, build the project, etc.

Please refer to the available tasks for the project:
```
Expand All @@ -198,4 +198,4 @@ Details of project licensing can be found in the [LICENSE](LICENSE) file in the

# Acknowledgments

Oxygen tool was developed by Eficode Oy as part of [Testomat project](https://www.testomatproject.eu/) with funding by [Business Finland](https://www.businessfinland.fi/).
Oxygen tool was developed by Eficode Oy as part of [Testomat project](https://www.testomatproject.eu/) with funding from [Business Finland](https://www.businessfinland.fi/).