mirror of
https://gitee.com/dcren/initializr.git
synced 2026-09-19 06:17:42 +08:00
Migrate smoke tests to Geb
Since Htmlunit does not provide a complete support for Javascript, smoke tests are migrated to Gab (i.e. using Selenium and an actual browser). This present a major challenge: it is not easy to assert the content of a file that the browser downloads when it submits a form. First, the browser should be configured to download the file directly instead of opening a (native) pop-up asking the users where to download it. Then, the tests should be aware of the location of the file in order to assert it. Hopefully, Firefox can be configured to achieve this goal. Closes gh-75
This commit is contained in:
+10
-6
@@ -184,17 +184,21 @@ it yourself.
|
||||
[[building]]
|
||||
=== Building
|
||||
|
||||
NOTE: Initializr currently uses a milestone release of `spring-test-htmlunit` that is available from
|
||||
the http://repo.spring.io/milestone[spring.io milestone repository]. If you use a repository
|
||||
manager, please make sure to configure it accordingly. For your convenience, the project defines
|
||||
a `springMilestone` that you should activate if you haven't defined that repository yourself.
|
||||
|
||||
The library is located in the `initializr` directory.
|
||||
|
||||
[indent=0]
|
||||
----
|
||||
$ cd initializr
|
||||
$ mvn clean install -PspringMilestone
|
||||
$ mvn clean install
|
||||
----
|
||||
|
||||
If you want to run the smoke tests using Geb, you need to enable the
|
||||
`smokeTests` profile. Firefox should also be installed on your machine
|
||||
|
||||
[indent=0]
|
||||
----
|
||||
$ cd initializr
|
||||
$ mvn verify -PsmokeTests
|
||||
----
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user