This project contains UI tests for baeldung.com
The project uses Selenium framework, Crawler4J, jsoup and REST Assured for UI tests . The tests can be run in GUI or headless mode. UI browser has been configured with Firefox using gecodriver and tested with Firefox 56.0 (64 bit) on Windows. Headless mode works with PhantomJS and HtmlUnit browsers.
The default configuration executes tests with headless mode in windows environment and target URL is https://www.baeldung.com. The configuration can be changed using following properties:
- spring.profiles.active - environment variable to either "headless-browser" and "ui-browser"
- target.env - environment variable should be set to "win" or "linux" for headless browser
- base.url - to target base URL, for example http://www.baeldung.com
These can be set as environment variables via the Eclipse run configuration.
Three Maven profiles are available for running tests:
- headless-browser-windows
- headless-browser-linux
- ui-brower-windows
The target URL for all profiles is https://www.baeldung.com. The can be changed using following property
- base.url - to target base URL, for example http://www.baeldung.com
Available headless browsers
- PhantomJS (default)
- HtmlUnit
- chrome-headless(version 83.x)
Headless browser can be configured using following system property
- headless.browser.name
Run UpdateArticlesAndPagesLinks#updateLinks test for updataing list of articles and pages.
Following tags are available for running tests selectively. Refer Java docs in GlobalConstants.java for details
- hourly
- daily
- weekly
- editorial
- github-related
- technical
URLs can be added to the follwoing file to skip a specific test from the bi-monthly build - https://github.com/eugenp/blogwatch/blob/master/src/main/resources/exceptions-for-tests-hitting-all-urls.yaml
Set environment variable "LAUNCH_FLAG" to either true or false to set launch mode. Default is false
The tests are running here, on Jenkins
https://docs.google.com/spreadsheets/d/1r3i9FGrh_4cjZWYfZ649xgObOPoqaxBVa4FK-0GGDaI