You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cucumber-core/README.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Cucumber Core
4
4
Provides components needed to discover, parse and execute feature files. The
5
5
core is designed with a few extension systems and plugin points. You
6
6
typically don't depend directly on `cucumber-core` but rather use the different
7
-
submodules together e.g. `cucumber-junit` and `cucumber-java`.
7
+
submodules together e.g. `cucumber-junit` and `cucumber-java`.
8
8
9
9
## Properties, Environment variables, System Options ##
10
10
@@ -79,7 +79,7 @@ Each property also has an `UPPER_CASE` and `snake_case` variant. For example
79
79
## Backend ##
80
80
81
81
Backends consist of two components: a `Backend`, and an optional `ObjectFactory`.
82
-
They are respectively responsible for discovering glue classes, registering
82
+
They are respectively responsible for discovering glue classes, registering
83
83
step definitions, and creating instances of said glue classes. Backend and
84
84
object factory implementations are discovered via SPI.
85
85
@@ -96,13 +96,13 @@ An event has a UUID. The UUID generator can be configured using the `cucumber.uu
96
96
| io.cucumber.core.eventbus.RandomUuidGenerator | Thread-safe, collision-free, multi-jvm |~1 | Reports may be generated on different JVMs at the same time. A typical example would be one suite that tests against Firefox and another against Safari. The exact browser is configured through a property. These are then executed concurrently on different Gitlab runners. |
97
97
| io.cucumber.core.eventbus.IncrementingUuidGenerator | Thread-safe, collision-free, single-jvm |~130 | Reports are generated on a single JVM |
98
98
99
-
The performance gain on real project depend on the feature size.
99
+
The performance gain on real projects depends on the feature size.
100
100
101
101
When not specified, the `RandomUuidGenerator` is used.
102
102
103
103
## Plugin ##
104
104
105
-
By implementing the Plugin interface classes can listen to execution events
105
+
By implementing the Plugin interface, classes can listen to execution events
106
106
inside Cucumber JVM. Consider using a Plugin when creating test execution reports.
Copy file name to clipboardExpand all lines: cucumber-deltaspike/README.md
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ Cucumber DeltaSpike
4
4
This module relies on [DeltaSpike Container Control](https://deltaspike.apache.org/documentation/container-control.html) to start/stop supported CDI container.
5
5
6
6
## Setup
7
-
Enable cdi support for your steps by adding a (empty) beans.xml into your classpath (src/main/resource/META-INF for normal classes or src/test/resources/META-INF for test classes):
7
+
Enable cdi support for your steps by adding an (empty) beans.xml into your classpath (src/main/resource/META-INF for normal classes or src/test/resources/META-INF for test classes):
8
8
9
9
```xml
10
10
<beansxmlns="http://java.sun.com/xml/ns/javaee"
@@ -16,7 +16,7 @@ Enable cdi support for your steps by adding a (empty) beans.xml into your classp
16
16
</beans>
17
17
```
18
18
19
-
To use DependencyInjection add `@Inject` to any field which should be managed by CDI, for more information see [JSR330](https://www.jcp.org/en/jsr/detail?id=330).
19
+
To use dependency injection, add `@Inject` to any field which should be managed by CDI. For more information, see [JSR330](https://www.jcp.org/en/jsr/detail?id=330).
20
20
21
21
```java
22
22
publicclassBellyStepdefs {
@@ -28,13 +28,13 @@ public class BellyStepdefs {
28
28
}
29
29
```
30
30
31
-
This ObjectFactory doesn't start or stop any [Scopes](https://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html), so all beans live inside the default scope (Dependent). Now cucumber requested a instance of your stepdefinitions for every step, which means cdi create a new instance for every step and for all injected fields. This behaviour makes it impossible to share a state inside a szenario.
31
+
This object factory doesn't start or stop any [Scopes](https://docs.oracle.com/javaee/6/tutorial/doc/gjbbk.html), so all beans live inside the default scope (Dependent). Now Cucumber requested an instance of your step definitions for every step, which means cdi create a new instance for every step and for all injected fields. This behaviour makes it impossible to share a state inside a scenario.
32
32
33
-
To bybass this, you must annotate your class(es) with `@javax.inject.Singleton`:
34
-
1. on stepdefintions: now the ojectfactory will create only one instance include injected fields per scenario and both injected fields and stepdefinitions can be used to share state inside a scenario.
35
-
2. on any other class: now the objectfactory will create a new instance of your stepdefinitions per step and stepdefinitions can not be used to share state inside a scenario, only the annotated classes can be used to share state inside a scenario
33
+
To bypass this, you must annotate your class(es) with `@javax.inject.Singleton`:
34
+
1. on destinations: now the object factory will create only one instance include injected fields per scenario, and both injected fields and step definitions can be used to share state inside a scenario.
35
+
2. on any other class: now the object factory will create a new instance of your step definitions per step and step definitions can not be used to share state inside a scenario, only the annotated classes can be used to share state inside a scenario
36
36
37
-
you can also combine both approaches.
37
+
You can also combine both approaches.
38
38
39
39
```java
40
40
@Singleton
@@ -46,9 +46,9 @@ public class BellyStepdefs {
46
46
//normal step code ...
47
47
}
48
48
```
49
-
It is not possible to use any other scope than Dependent this means alsoi it is not possible to share a state over two or more scenarios, every scenario start with a clean environment.
49
+
It is not possible to use any other scope than Dependent. This means also it is not possible to share a state over two or more scenarios; every scenario starts with a clean environment.
50
50
51
-
To enable this objectfactory add the following dependency to your classpath:
51
+
To enable this object factory, add the following dependency to your classpath:
52
52
```xml
53
53
<dependency>
54
54
<groupId>io.cucumber</groupId>
@@ -60,7 +60,7 @@ To enable this objectfactory add the following dependency to your classpath:
60
60
61
61
and one of the supported cdi-containers.
62
62
63
-
to use it with Weld:
63
+
To use it with Weld:
64
64
65
65
```xml
66
66
<dependency>
@@ -77,7 +77,7 @@ to use it with Weld:
77
77
</dependency>
78
78
```
79
79
80
-
or to use it with OpenEJB:
80
+
To use it with OpenEJB:
81
81
82
82
```xml
83
83
<dependency>
@@ -106,7 +106,8 @@ or to use it with OpenEJB:
106
106
</dependency>
107
107
```
108
108
109
-
or to use it with OpenWebBeans:
109
+
To use it with OpenWebBeans:
110
+
110
111
```xml
111
112
<dependency>
112
113
<groupId>org.apache.deltaspike.cdictrl</groupId>
@@ -128,4 +129,4 @@ or to use it with OpenWebBeans:
128
129
</dependency>
129
130
```
130
131
131
-
Some containers need that you provide a CDI-API in a given version, but if you develop CDI and use one of the above containers it should already on your path.
132
+
Some containers need you to provide a CDI-API in a given version, but if you develop CDI and use one of the above containers, it should already be on your path.
0 commit comments