- All the automation code should strictly be under the src/e2e-test/ of main project repo for which automation needs to be done.
- For logging: Place logback-test.xml under src/e2e-test/resources folder and give this location in resources tag under build section of pom profile, and also add logback-classic dependency.
Configuration Details required for Setup:
- Create a maven profile in the main project for which e2e tests are required, with a dependency of e2e test framework artifact, along with your Runner file inside the failsafe plugin.
NOTE: All the properties/ actions/ locators which are common to plugins, need to be or will be present in the framework code. Plugin specific properties/ actions/ locators should reside in the main project module (for eg: google-cloud).
- TestRunners and its step definition should also reside in the main project module.
- Specify service account credentials by setting environment variable, GOOGLE_APPLICATION_CREDENTIALS=Path of JSON service key.
Add Feature:
Refer documentation about features.
-
All the Feature files are at path src/e2e-test/features/.
-
Plugin specific code is under their respective package name at src/e2e-test/java/io/cdap/plugin/ with below sub packages:
a. tests.runner
It contains TestRunner which will glue the feature file with the stepsdesign.
b. stepsdesign
It maps the test case steps in the feature files(by Given/When/Then).
c. actions
It contains locator actions of what action needs to be performed on the respective field.
d. locators
It contains the Web Element identification of the respective field.
- TestRunner.java is included in e2e-tests profile (in pom.xml) to enable the e2e tests for any new plugin.
- Make sure that the TestRunner's tags option should match with the feature's scenario tags.