E2E tests of standalone AtlasMap based on Selenide and Cucumber framework.
- test-resources contains test mapping classes that are loaded into AtlasMap.
- mapping-validator is used for processing mapping files with atlasmap-camel.
- datamapper-e2e contains gherkin test scenarios and run tests.
- download project via
git clone https://github.com/atlasmap/atlasmap-qe ${ATLASMAP_QE}
cd ${ATLASMAP_QE}
- build project with
./mvnw clean install -DskipTests
-
cd ${ATLASMAP_QE}
-
download correct drivers (see section Use correct webdriver version for selected browser)
-
Update test.properties file located in the root
${ATLASMAP_QE}
directory, e.g.
mapping.path=target/test-classes
ui.url=http://localhost:8585
backend.url=http://localhost:8585
test.timeout=5000
atlasmap.config.ui.browser=chrome
- run tests with:
../mvnw clean test
and you can use also following properties:- add
-Datlasmap.version=${VERSION}
to specify AtlasMap version - add
-Dselenide.headless=true
if you want to run tests in the background - add
-Dselenide.holdBrowserOpen=true
if you want to keep browser opened after tests - add
-Dtags='--tags @SmokeTest'
if you want to run only tests tagged with@SmokeTest
- add
-Datlasmap.mappings.root.directory=${mappings_home_dir}
in case you want explicitly specify the mappings root directory, in case it's not inside the test suite - this is set as default - add
-Datlasmap.fast.init=true
in case you want to setup the tests using- add
-Datlasmap.adm.resource=${adm_file_path}
in case you want to specify specify the adm file to be used (default is set for test-resources/src/main/resources/atlasmap-qe.adm)
- add
- add
- maven-dependency-plugin downloads JAR with standalone AtlasMap
- process-exec-maven-plugin runs the JAR
- Tests initialization:
- resets AtlasMap
- enables classes from test-resources
- loads json and xml documents
- Test execution:
- sets mappings via Selenide
- saves mapping.json
- processes and verifies mapping.json in camel-route via mapping-validator
- removes mappings
- Tests passed
By default the testsuite will not download any drivers when running tests. To download drivers, you need to use profile download-drivers, for example mvn clean install -DskipTests -Pdownload-drivers
. By default the testsuite will download latest drivers which may not work with older browsers. To use older webdriver, find supported version for your browser and set following maven property:
Find supported driver version for chrome browser here: http://chromedriver.chromium.org/downloads
Use following maven parameter when starting the tests: -Dchrome.driver.version=<selected_version>
For Chrome version 75, the parameter would be 75.0.3770.8
For Chrome version 74, the parameter would be 74.0.3729.6
For Chrome version 73, the parameter would be 73.0.3683.68
Find supported driver version for your firefox browser here: https://firefox-source-docs.mozilla.org/testing/geckodriver/geckodriver/Support.html
Use following maven parameter when starting the tests: -Dfirefox.driver.version=<selected_version>
For firefox 57 the parameter would be 0.24.0