Skip to content

christophs78/primefaces-integration-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

352 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT Actions Status Stackoverflow Discord Chat

PrimeFaces Integration Tests

To provide an integration and regression test suite for PrimeFaces.

Prerequisites

This project uses selenium webdriver for web browser automation. Currently, a native installation of Firefox and/or Chrome and/or Safari is required. Additionally, the selenium webdriver corresponding to the browser(s) must also be installed. These can be downloaded from the following locations:

Safari already comes with webdriver OOTB - look for more information into https://developer.apple.com/documentation/webkit/testing_with_webdriver_in_safari

Build & Run

  • Build by source: mvn clean package
  • Run "integration tests" with the verify phase: mvn verify
  • Run a single test with mvn verify -Dit.test=org.primefaces.extensions.integrationtests.datepicker.DatePicker001Test

Firefox (default)

The default configuration of the project runs tests with a visible Firefox browser. This requires geckodriver in order to allow selenium to control the browser. This is a binary file that can be downloaded via the link above, and can be placed in the base directory of the project where it will be accessed by selenium for running the tests. The default location for the binary is the base directory of the project with an assumed file name of geckodriver for Linux/MacOS and geckodriver.exe for Windows, but a non-default path can be specified via a system property:

mvn verify -Dwebdriver.firefoxDriverBinary=$HOME/.selenium/drivers/firefox/geckodriver

The tests will be run by default in a visible browser UI, but can be run in headless mode by activating the headless-mode maven profile:

mvn verify -Pheadless-mode

Chrome

Google Chrome may also be used to run the tests by activating the "chrome" maven profile. This can be done on the commandline with the -P maven parameter:

mvn verify -Pchrome

Using Chrome to run the tests requires the "chromedriver" binary which can be downloaded via the link above, and can be placed in the base directory of the project. Selenium will access the binary from the base directory with an assumed file name of chromedriver for Linux/MacOS and geckodriver.exe for Windows, but a non-default path can be specified via a system property:

  mvn verify -Dwebdriver.chromeDriverBinary=$HOME/.selenium/drivers/chrome/chromedriver -Pchrome

When using Chrome, the headless-mode maven profile may be activated to run chrome in headless mode:

 mvn verify -Pchrome,headless-mode

Safari

Safari may also be used to run the tests by activating the "safari" maven profile. This can be done on the commandline with the -P maven parameter:

mvn verify -Psafari

Keep in mind there are - as of january 2021 - following limitations for Safari webdriver:

About

PrimeFaces Integration Tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5