It is very easy to use teswiz in your framework. Follow these steps:
- Setup the prerequisites mentioned below [https://github.com/znsio/teswiz#prerequisites]
- Using your favorite IDE (I use IntelliJ Idea Community Edition), create a new Java-Gradle project
- Copy build.gradle.sample file to your newly created project's root folder and rename it to build.gradle
- Validate that build.gradle has the right version of teswiz
- For
android app
automation- Get APP_PACKAGE_NAME - example:
aapt dump badging temp/sampleApps/theapp.apk | grep package
- Get APP_ACTIVITY - example:
aapt dump badging temp/ajio-8-3-4.apk | grep activity
- Get APP_PACKAGE_NAME - example:
- For
web
automation- Add
<>_BASE_URL
in environments.json - example:THEAPP_BASE_URL=https://the-internet.herokuapp.com
- Update
BASE_URL
with the above in config.properties - example:BASE_URL=THEAPP_BASE_URL
- Add
- For
electron
automation- Add
binary
path in browser_config.json - example:"binary": "C:\\path\\to\\chrome.exe"
- Add
browserVersion
in browser_config.json - example:"browserVersion": "latest"
- Add
- Create config.properties in some folder - ex:
**./configs**
and provide default values - refer to src/test/resources/com/znsio/e2e/features/android/configs/theapp_local_config.properties - Create capabilities.json in some folder - ex:
**./caps**
- refer to src/test/resources/com/znsio/e2e/features/android/caps/theapp_local_capabilities.json - Update
reportportal.properties
file present under 'src/test/resources' with the neccessary details for reporting - Validate the presence of **package.json ** at the root directory and execute npm install
- Implement the test
- Define your scenario in a feature file (
src/test/resources/<package_name>/<feature_dir>
) - Create your step definitions (
src/test/java/<package_name>/steps
) - Implement your business layer classes/methods (
src/test/java/<package_name>/businessLayer
) - Implement your screen classes/methods (
src/test/java/<package_name>/screen
) in the corresponding OS (Android/iOS) folders - Setup Applitools Visual AI Testing
- Define your scenario in a feature file (
- Update the run task in build.gradle with appropriate values for config.properties, pathToStepDef, pathToFeaturesDir, pathToLogProperties
- Refer to the Running the tests section