Skip to content

atlasmap/atlasmap-qe

Repository files navigation

AtlasMap tests

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.

How to build project?

  1. download project via git clone https://github.com/atlasmap/atlasmap-qe ${ATLASMAP_QE}
  2. cd ${ATLASMAP_QE}
  3. build project with ./mvnw clean install -DskipTests

How to run tests?

  1. cd ${ATLASMAP_QE}

  2. download correct drivers (see section Use correct webdriver version for selected browser)

  3. 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
  1. 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)

How does it work?

  1. maven-dependency-plugin downloads JAR with standalone AtlasMap
  2. process-exec-maven-plugin runs the JAR
  3. Tests initialization:
    1. resets AtlasMap
    2. enables classes from test-resources
    3. loads json and xml documents
  4. Test execution:
    1. sets mappings via Selenide
    2. saves mapping.json
    3. processes and verifies mapping.json in camel-route via mapping-validator
    4. removes mappings
  5. Tests passed

Use correct webdriver version for selected browser

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:

Chrome

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

Firefox

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published