Skip to content

Commit 4058cc1

Browse files
Update README.md
1 parent c136bb7 commit 4058cc1

File tree

1 file changed

+36
-28
lines changed

1 file changed

+36
-28
lines changed

README.md

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -6,47 +6,53 @@ Use it and adapt it as you wish, and have fun with Dataiku!
66

77

88
# How to test your plugin
9-
Development cycles should be supported with unit and integration tests.
10-
To operate integration tests you will need the help of the `dataiku-plugin-tests-utils` pacakge in order
11-
to automate their executions while targeting DSS instances that should be dedicated to them.
129

13-
`dataiku-plugin-tests-utils` will be installed as a `pytest plugin`. So only install that package inside an environment dédicated for integration tests, otherwise `pytest` will complain about unused fixtures inside your unit tests.
10+
We recommend supporting your development cycle with unit and integration tests.
11+
To operate integration tests, you will need the help of the `dataiku-plugin-tests-utils` package to automate their executions while targeting dedicated DSS instances.
12+
13+
`dataiku-plugin-tests-utils` will be installed as a `pytest plugin`. Install that package inside an environment dedicated to integration tests; otherwise, `pytest` will complain about unused fixtures inside your unit tests.
1414

1515
# How to install in your plugin
16-
To install the `dataiku-plugin-tests-utils` package for your plugins use the
17-
following line depending on your prefered way to managed packages and situation
18-
you are in.
19-
## Using Requierement.txt
20-
### Development cycle
16+
17+
To install the `dataiku-plugin-tests-utils` package for your plugins, use the following line depending on your preferred way to managed packages.
18+
19+
## Using requirements.txt
20+
21+
### Development
2122

2223
```
2324
git+git://github.com/dataiku/dataiku-plugin-tests-utils.git@<BRANCH>#egg=dataiku-plugin-tests-utils
2425
```
2526

26-
Replace `<BRANCH>` by the most accurate value
27+
Replace `<BRANCH>` with the most accurate value
2728

28-
### Stable release (untested for now)
29+
### Stable release
2930

3031
```
3132
git+git://github.com/dataiku/dataiku-plugin-tests-utils.git@releases/tag/<RELEASE_VERSION>#egg=dataiku-plugin-tests-utils
3233
```
3334

34-
Replace `<RELEASE_VERSION>` by the most accurate value
35+
Replace `<RELEASE_VERSION>` with the most accurate value
36+
37+
## Using pipfile
3538

36-
## Using Pipfile
3739
Put the following line under `[dev-packages]` section
40+
3841
### Development cycle
42+
3943
```
4044
dku-plugin-test-utils = {git = "git://github.com/dataiku/dataiku-plugin-tests-utils.git", ref = "<BRANCH>"}
4145
```
46+
4247
### Stable release
4348
TBD
4449

4550
## Dev env
51+
4652
### Config
4753

48-
First, ensure that you have Personal Api Keys generated for the DSS you want to target.
49-
Secondly, define a config file which will give the DSS you will target.
54+
First, ensure that you have personal API Keys for the DSS you want to target.
55+
Secondly, define a config file that will give the DSS you will target.
5056
```
5157
{
5258
"DSSX":
@@ -80,18 +86,19 @@ Then, set the environment variable `PLUGIN_INTEGRATION_TEST_INSTANCE` to point t
8086
# How to use the package
8187

8288
## General information
89+
8390
To use the package in your test files:
8491
```python
8592
import dku_plugin_test_utils
8693
import dku_plugin_test_utils.subpakcage.subsymbol
8794
```
88-
Look at the next section for more information about potential `subpackage` and `subsymbol`
95+
Look at the next section for more information about potential `subpackage` and `subsymbol`.
8996

90-
The python integration tests files are indirections towards the "real" tests that are written as DSS scenarios on DSS instances.
91-
The python test function triggers the targeted DSS scenario and waits either for its sucessfull or failed completion.
97+
The python integration test files are indirections towards the "real" tests written as DSS scenarios on DSS instances.
98+
The python test function triggers the targeted DSS scenario and waits either for its successful or failed completion.
9299
Thence your test function should look like the following snippet :
93100
```python
94-
# Mandatory imprts
101+
# Mandatory imports
95102
from dku_plugin_test_utils import dss_scenario
96103

97104
def test_run_some_dss_scenario(user_dss_clients):
@@ -100,26 +107,27 @@ def test_run_some_dss_scenario(user_dss_clients):
100107
# [... other tests ...]
101108
```
102109
With:
103-
- `user_dss_clients`: representing the dss client corresponding to the desired user.
110+
- `user_dss_clients`: representing the DSS client corresponding to the desired user.
104111
- `PROJECT_KEY`: The project that holds the test scenarios
105112
- `scenario_id`: The test scenario to run
106-
- `user`: Specify the user to run the scenario with. It is an optionnal argument, by default it equalt to "default".
113+
- `user`: Specify the user to run the scenario with. It is an optional argument. By default, it is "default".
107114

108115
## How to generate a graphical report with Allure for integration tests
109116

110-
For each plugin, a folder named `allure_report` should exists inside the `test` folder, reports will be generated inside that folder.
111-
To generate the graphical report, you must have allure installed on your system as described [on their installation guide](https://docs.qameta.io/allure/#_manual_installation). Once the installation is done, run the following :
117+
For each plugin, a folder named `allure_report` should exist inside the `test` folder; reports will be generated inside that folder.
118+
To generate the graphical report, you must have Allure installed on your system as described [on their installation guide](https://docs.qameta.io/allure/#_manual_installation). Once the installation is done, run the following :
112119
```shell
113120
allure serve path/to/the/allure_report/dir/inside/you/plugin/test/folder/
114121
```
115122

116-
# Package Hierarchy
117-
As it is a tooling package for integration test, it will aggregate different packages with different aim.
123+
# Package hierarchy
124+
125+
As it is a tooling package for integration tests, it will aggregate different packages with different goals.
118126
The following hierarchy exposes the different sub-package contained in `dku_plugin_test_utils` with their aim
119127
and the list of public symbols:
120128

121129
- `run_config`:
122-
- `ScenarioConfiguration`: Class exposing the parsed run configuration as a python dict.
123-
- `PluginInfo`: Parse the plugin.json and the code-env desc.json files to extract plugin metadata as a python dict.
130+
- `ScenarioConfiguration`: Class exposing the parsed run configuration as a python dictionary.
131+
- `PluginInfo`: Parse the plugin.json and the code-env desc.json files to extract plugin metadata as a python dictionary.
124132
- `dss_scenario`:
125-
- `run`: Run the targetted DSS scenario and wait for it completion either success or failure.
133+
- `run`: Run the target DSS scenario and wait for its completion (either success or failure).

0 commit comments

Comments
 (0)