@@ -10,27 +10,35 @@ Pull the Redmine docker images and start them by running:
10
10
docker compose up -d
11
11
```
12
12
13
- Now you can run the tests:
13
+ Now you can run all behaviour-driven tests grouped by Redmine version using the ` bdt ` command :
14
14
15
15
``` bash
16
16
# all tests
17
- docker compose exec php composer behat
18
- # only a specific redmine version
17
+ docker compose exec php composer bdt
18
+ ```
19
+
20
+ If you need more control about the behat tests or want to change the output format,
21
+ you can use the ` behat ` command directly:
22
+
23
+ ``` bash
24
+ # test only a specific redmine version
19
25
docker compose exec php composer behat -- --suite=redmine_50103
20
- # only specific endpoints
26
+ # test only specific endpoints
21
27
docker compose exec php composer behat -- --tags=issue,group
22
- # only specific endpoints on a specific redmine version
28
+ # test only specific endpoints on a specific redmine version
23
29
docker compose exec php composer behat -- --suite=redmine_50103 --tags=issue,group
30
+ # test only a specific redmine version and format the output as `progress` (default is `pretty`)
31
+ docker compose exec php composer behat -- --suite=redmine_50103 --format=progress
24
32
```
25
33
26
- ## Redmine specific features
34
+ ## Redmine version specific features
27
35
28
- Some Redmine features are specific for a Redmine version. There are two ways to handle this situations .
36
+ Some Redmine features are specific for a Redmine version. Theses situations are handled in different ways .
29
37
30
38
### Modified Rest-API Responses
31
39
32
40
It is possible that a new Redmine version returns new or changed elements in a response.
33
- This can be handled on the ` step ` layer:
41
+ This can be handled on the ` step ` layer (note the missing ` homepage ` property in ` < 5.1.0 ` ) :
34
42
35
43
```
36
44
And the returned data "projects.0" property has only the following properties with Redmine version ">= 5.1.0"
@@ -40,29 +48,20 @@ This can be handled on the `step` layer:
40
48
identifier
41
49
description
42
50
homepage
43
- status
44
- is_public
45
- inherit_members
46
- created_on
47
- updated_on
48
51
"""
49
52
But the returned data "projects.0" property has only the following properties with Redmine version "< 5.1.0"
50
53
"""
51
54
id
52
55
name
53
56
identifier
54
57
description
55
- status
56
- is_public
57
- inherit_members
58
- created_on
59
- updated_on
60
58
"""
61
59
```
62
60
63
61
### New Rest-API Endpoints
64
62
65
- A new Redmine version could be introduce new REST-API endpoints that are missing in the older version.
63
+ A new Redmine version could introduce new REST-API endpoints.
64
+ Tests for this endpoint should not be run on older Redmine versions.
66
65
This can be handled on the ` scenario ` or ` feature ` layer.
67
66
68
67
1 . Tag features or scenarios e.g. with ` @since50000 ` .
@@ -98,7 +97,8 @@ default:
98
97
99
98
### Removed Rest-API Endpoints
100
99
101
- A new Redmine version could remove REST-API endpoints that are missing in the newer versions.
100
+ A new Redmine version could remove REST-API endpoints.
101
+ Tests for this endpoint should not be run on newer Redmine versions.
102
102
This can be handled on the ` scenario ` or ` feature ` layer.
103
103
104
104
1 . Tag features or scenarios e.g. with ` @until60000 ` .
0 commit comments