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
@@ -92,30 +90,17 @@ Use the `install` task to install SNAPSHOT builds in your local Maven repository
92
90
93
91
> **`gradle install`**
94
92
95
-
#### Maven Support
96
-
97
-
Although Gradle is used to produce official releases, **Selenium Foundation** also includes a fully functional Maven POM file.
98
-
99
-
> **`mvn package`**
100
-
101
-
Note that the version number in this POM file is merely a placeholder - a token that gets replaced during the normal build process. Finalized, functional `POMs` can be found within the **Selenium Foundation** JARs themselves at:
Unlocking the full capabilities of the Maven project file of **Selenium Foundation** requires the specification of several correlated properties. To simplify the process of building and testing the project with Maven, we've provided a script that packages up the details in a concise format. To build the project with the version number from `gradle.properties`:
108
-
109
-
> **`./mvn-build.sh`**
110
-
111
93
#### Running Browser Unit Tests
112
94
113
-
By default, the unit tests that run after the build completes are the support feature tests (which don't require a browser). The Gradle and Maven project files provide a set of browser profiles, one for each supported browser. By specifying one of these profiles, you activate dependencies, settings, and driver plug-in for the corresponding browser.
95
+
By default, the unit tests that run after the build completes are the support feature tests (which don't require a browser). The Gradle project file provides a set of browser profiles, one for each supported browser. By specifying one of these profiles, you activate dependencies, settings, and driver plug-in for the corresponding browser.
114
96
115
97
> **`gradle test -Pbrowsers=espresso`** # run Android Espresso unit tests
116
-
> **`./mvn-build.sh -t -b firefox -h`** # run Mozilla Firefox unit tests in "headless" mode
98
+
> **`gradle test -Pbrowsers=filefox -Ppersonality=firefox.headless`** # run Mozilla Firefox unit tests in "headless" mode
99
+
> **`gradle test -Pbrowsers=htmlunit -Ppersonality=htmlunit.nojs`** # run HtmlUnit unit tests without JavaScript support
100
+
101
+
The `personality` property directs **Selenium Foundation** to run the unit tests on browsers with the specified named capabilities. Available personalities are defined by each driver plug-in, and the list of personalities supported by the current Grid is shown in the console output. For example:
117
102
118
-
The second command uses the Maven build script instead of invoking Maven directly. This replicates the behavior of the Gradle project, consolidating the entire configuration set into a single named value.
A complete list of supported browser profiles can be found [here](https://github.com/sbabcoc/Selenium-Foundation/blob/master/docs/ConfiguringProjectSettings.md#grid-configuration-for-selenium-foundation-unit-tests),
Copy file name to clipboardExpand all lines: docs/ConfiguringProjectSettings.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -99,7 +99,7 @@ The **`GRID_PLUGINS`** setting specifies a semicolon-delimited list of fully-qua
99
99
100
100
#### Grid Configuration for Selenium Foundation unit tests
101
101
102
-
By default, the unit tests are [configured](LocalGridConfiguration.md) to run the "support" tests, which don't require browser sessions. The local Grid instance launched for this configuration runs in "servlet container" mode. The Maven and Gradle project file define sets of profiles, one for each supported browser, which specify the corresponding dependencies, settings, and driver plugin needed to run the unit tests for that browser.
102
+
By default, the unit tests are [configured](LocalGridConfiguration.md) to run the "support" tests, which don't require browser sessions. The local Grid instance launched for this configuration runs in "servlet container" mode. The Gradle project file defines a set of profiles, one for each supported browser, which specify the corresponding dependencies, settings, and driver plugin needed to run the unit tests for that browser.
Copy file name to clipboardExpand all lines: docs/DevelopmentEnvironment.md
+1-20
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,7 @@ The majority of the environment needed to build **Selenium Foundation** is compr
13
13
| Version control | git version 2.27 |
14
14
| Command shell | GNU bash, version 4.4.23(1) |
15
15
| Gradle (build tool) | version 6.5 |
16
-
| Maven (build tool) | version 3.5.2 |
17
16
| Eclipse (IDE) | 2020-12 (4.18.0) |
18
-
| Maven Plug-In | m2e 1.17.1.20201207-1112 |
19
17
| BuildShip Plug-In | 3.1.5.v20210113-0904 |
20
18
| TestNG Plug-In | 7.3.0.202011271758 |
21
19
@@ -29,15 +27,9 @@ To build **Selenium Foundation**, you'll need a Java 8 software development kit:
29
27
30
28
The Gradle project file for **Selenium Foundation** includes a **selenium3Deps** sub-file. This reflects the past (and probable future) support for multiple versions of the Selenium API.
31
29
32
-
## Maven Configuration:
33
-
34
-
### Project Profiles
35
-
36
-
The Maven POM for **Selenium Foundation** defines an active-by-default **selenium3** profile. This reflects the past (and probable future) support for multiple versions of the Selenium API.
37
-
38
30
### JDK Toolchains
39
31
40
-
To build the **Selenium Foundation** project with **Maven**, you'll also need to add a `toolchain` specification to your system configuration:
32
+
To build the **Selenium Foundation** project, you'll also need to add a **Maven**`toolchain` specification to your system configuration. This configuration allows **Gradle** to auto-discover the JDK installations on your machine:
@@ -61,19 +53,8 @@ To build the **Selenium Foundation** project with **Maven**, you'll also need to
61
53
| Variable | Target |
62
54
|:---|:---|
63
55
|**`GRADLE_HOME`**| Root folder of Gradle installation |
64
-
| **`M2`** | Path to Maven `bin` folder
65
-
|**`M2_HOME`**| Root folder of Maven installation |
66
-
|**`M2_REPO`**| Root folder of Maven repository |
67
56
|**`JDK8_HOME`**| Root folder of JDK 8 installation |
68
57
69
-
## TestNG Eclipse Configuration
70
-
71
-
In the **Selenium Foundation** POM file, the configuration for the Maven Surefire plug-in declares an `argLine` property that specifies the `-javaagent` option. The declaration of this option isn't needed to run or debug **TestNG** tests and may cause test execution to fail.
72
-
73
-
To resolve this issue, disable the option to pass the `argLine` property to **TestNG** in your **Eclipse** preferences:
74
-
75
-
> Preferences > TestNG > Maven > ☐ argLine
76
-
77
58
## JUnit Run Configuration
78
59
79
60
The JUnit support provided by **Selenium Foundation** relies on [event notifications](JUnit4Support.md#outline-of-required-elements) published by **JUnit Foundation**. Notifications are enabled by a Java agent, which uses bytecode enhancement to install hooks on test and configuration methods.
Copy file name to clipboardExpand all lines: docs/LocalGridConfiguration.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ In addition to providing a local Grid instance for running Selenium tests on you
10
10
11
11
To maximize flexibility, configurability, consistency, and control, the browser sessions dispensed by **Selenium Foundation** are provided by an instance of **Selenium Grid**. To use an existing Grid instance for session provisioning, specify its endpoint URL in the [**`HUB_HOST`** setting](ConfiguringProjectSettings.md#selenium-grid-configuration). By default, **Selenium Foundation** will launch a local Grid and acquire sessions from there.
12
12
13
-
The unit tests of this project acquire browser sessions from a local Grid instance that gets launched at the start of the test run and torn down when the run is complete. By default, the local Grid runs in "servlet container" mode, and only non-browser support feature tests are run. Profiles defined in the Gradle and Maven project files allow you to specify which browser to target with the corresponding unit tests. This aspect of the **Selenium Foundation** project provides a working example of how to configure for the local Grid feature, as detailed in the following sections.
13
+
The unit tests of this project acquire browser sessions from a local Grid instance that gets launched at the start of the test run and torn down when the run is complete. By default, the local Grid runs in "servlet container" mode, and only non-browser support feature tests are run. Profiles defined in the Gradle project file allows you to specify which browser to target with the corresponding unit tests. This aspect of the **Selenium Foundation** project provides a working example of how to configure for the local Grid feature, as detailed in the following sections.
0 commit comments