Skip to content

Latest commit

 

History

History
28 lines (28 loc) · 2.36 KB

GettingStartedUsingTeswiz-README.md

File metadata and controls

28 lines (28 loc) · 2.36 KB

Getting Started, or how can you use teswiz?

It is very easy to use teswiz in your framework. Follow these steps:

  1. Setup the prerequisites mentioned below [https://github.com/znsio/teswiz#prerequisites]
  2. Using your favorite IDE (I use IntelliJ Idea Community Edition), create a new Java-Gradle project
  3. Copy build.gradle.sample file to your newly created project's root folder and rename it to build.gradle
  4. Validate that build.gradle has the right version of teswiz
  5. 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
  6. 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
  7. 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"
  8. 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
  9. Create capabilities.json in some folder - ex: **./caps** - refer to src/test/resources/com/znsio/e2e/features/android/caps/theapp_local_capabilities.json
  10. Update reportportal.properties file present under 'src/test/resources' with the neccessary details for reporting
  11. Validate the presence of **package.json ** at the root directory and execute npm install
  12. Implement the test
    1. Define your scenario in a feature file (src/test/resources/<package_name>/<feature_dir>)
    2. Create your step definitions (src/test/java/<package_name>/steps)
    3. Implement your business layer classes/methods (src/test/java/<package_name>/businessLayer)
    4. Implement your screen classes/methods (src/test/java/<package_name>/screen) in the corresponding OS (Android/iOS) folders
    5. Setup Applitools Visual AI Testing
  13. Update the run task in build.gradle with appropriate values for config.properties, pathToStepDef, pathToFeaturesDir, pathToLogProperties
  14. Refer to the Running the tests section