From 293a7e85bb69d0edca9ecf54133370921c7db594 Mon Sep 17 00:00:00 2001 From: Joze RIHTARSIC <joze.rihtarsic@ext.ec.europa.eu> Date: Wed, 12 Dec 2018 15:33:39 +0100 Subject: [PATCH] add maven parameter for url and driver location for SMP ui tests project --- smp-ui-tests/README.txt | 8 ++++++++ smp-ui-tests/pom.xml | 13 ++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/smp-ui-tests/README.txt b/smp-ui-tests/README.txt index 4f1e5a66d..5b38e13a1 100644 --- a/smp-ui-tests/README.txt +++ b/smp-ui-tests/README.txt @@ -16,6 +16,11 @@ After unzipping the path to the executable need to be updated in the pom.xml fil under "/project/profiles/profile/build/plugins/plugin/configuration/systemPropertyVariables". In the same set of variables please update the URL for the SMP home page. +Maven parameters + - url - Sets the SMP url without ui context. Ex.: http://localhost:7001/smp + - gecko.driver.path - set the path to gecko driver. Ex.: /opt/drivers/geckodriver + - chrome.driver.path - set the path to gecko driver. Ex.: drivers/chromedriver.exe + * Run: @@ -27,6 +32,9 @@ To run on Linux command line you need to install "Xvfb" and of course Firefox or (There is a crash when starting Chromium so it is better to run using Firefox until the crash is resolved) sudo xvfb-run --server-args="-screen 0 1920x1080x24" mvn test -P<profileName> +example +mvn clean install -Pubuntu -Durl=http://localhost:7001/smp -Dgecko.driver.path=drivers/geckodriver + * Reports diff --git a/smp-ui-tests/pom.xml b/smp-ui-tests/pom.xml index bce9ae6fa..7a04beac2 100644 --- a/smp-ui-tests/pom.xml +++ b/smp-ui-tests/pom.xml @@ -11,6 +11,9 @@ <properties> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> + <url>http://localhost:8080/smp</url> + <gecko.driver.path>drivers/geckodriver.exe</gecko.driver.path> + <chrome.driver.path>drivers/chromedriver.exe</chrome.driver.path> </properties> <dependencies> @@ -73,14 +76,14 @@ <configuration> <failIfNoTests>true</failIfNoTests> <systemPropertyVariables> - <webdriver.chrome.driver>chromedriver.exe</webdriver.chrome.driver> - <webdriver.gecko.driver>geckodriver.exe</webdriver.gecko.driver> + <webdriver.chrome.driver>${chrome.driver.path}</webdriver.chrome.driver> + <webdriver.gecko.driver>${gecko.driver.path}</webdriver.gecko.driver> <reports.folder>./target/</reports.folder> <data.folder>.\src\main\resources\</data.folder> <testdata.file>testData.json</testdata.file> <LONG_TIMEOUT>30</LONG_TIMEOUT> <SHORT_TIMEOUT>5</SHORT_TIMEOUT> - <UI_BASE_URL>http://edeltest5.westeurope.cloudapp.azure.com:7003/smp/ui/</UI_BASE_URL> + <UI_BASE_URL>${url}/ui/</UI_BASE_URL> </systemPropertyVariables> </configuration> </plugin> @@ -101,13 +104,13 @@ <failIfNoTests>true</failIfNoTests> <systemPropertyVariables> - <webdriver.chrome.driver>chromedriver</webdriver.chrome.driver> + <webdriver.gecko.driver>${gecko.driver.path}</webdriver.gecko.driver> <reports.folder>./target/</reports.folder> <data.folder>./src/main/resources/</data.folder> <testdata.file>testData.json</testdata.file> <LONG_TIMEOUT>30</LONG_TIMEOUT> <SHORT_TIMEOUT>15</SHORT_TIMEOUT> - <UI_BASE_URL>http://edeltest5.westeurope.cloudapp.azure.com:7003/smp/ui/</UI_BASE_URL> + <UI_BASE_URL>${url}/ui/</UI_BASE_URL> </systemPropertyVariables> </configuration> </plugin> -- GitLab