aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
blob: e81a7779994e2edc6f1db649dcb9401c776179d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# portal-ng end-to-end ui tests
This project contains portal-ng edition end-to-end UI tests.

This project is using Java, Cucumber, Selenide and Allure.

## Run tests
If you want to test a remote instance of the Portal, change the $PORTAL_ENV variable:    
`export PORTAL_ENV=test-remote.properties`

or provide the base url in an environment variable PORTAL_BASE_URL=https://external-host.org

`export PORTAL_BASE_URL=https://external-host.org`

Then adjust the properties file as needed.


By default `test-local.properties` is used.

### In Chrome
To run the tests with Chrome from gradle wrapper:
```shell
./gradlew cucumber
```
or with
```shell
./gradlew clean cucumber
```
### In headless mode
There's also a task for running in a headless mode (used in pipelines):
```shell
./gradlew cucumberCli
```
## Local development

If you want to run a single scenario for debugging while developing any of the tests or creating a new one, you can do so.

First you have to specify a `@debug` tag in any of the `.feature` files adding the `@debug` tag above the line `Scenario:`
and then you can run the task to only run this scenario:

```shell
./gradlew cucumberLocalDebug
```

You can also add `@debug` to more scenarios to be executed within the project and run the task above again.

This will also work in IntelliJ Idea when you create a gradle configuration, so you can easily run tests that you are currently developing.

Don't forget to add `PORTAL_ENV=test-local.properties` as an environment variable in your IntelliJ configuration.

## Test Reports

To generate allure reports on MAC
you must install allure via **brew** and then:

```shell
allure generate --clean
```

the report will appear:
`./allure-report/index.html`