Create an Enterprise-Level Test Automation Framework with Appium: Using Spring-Boot, Gradle, Junit, ALM Integration, and Custom Reports with TDD and BDD Support 1484281969, 9781484281963

Think from a framework design perspective and move beyond straightforward coding skills. You’ll design an enterprise lev

110 106 6MB

English Pages 416 [403] Year 2022

Report DMCA / Copyright

DOWNLOAD FILE

Create an Enterprise-Level Test Automation Framework with Appium: Using Spring-Boot, Gradle, Junit, ALM Integration, and Custom Reports with TDD and BDD Support
 1484281969, 9781484281963

Table of contents :
Table of Contents
About the Author
About the Technical Reviewer
Introduction
Part I: Setting Up
Chapter 1: Automation Framework Overview
Framework Technology Stack
Framework Key Features
Scripting Strategy
Automation Coding Standards
Use Functional Programming Over Imperative Approach
Summary
Chapter 2: Creating the Wireframe with Spring-Boot
Bootstrapping with Spring-Boot
Opening Your Project in IntelliJ
IntelliJ Plugins
Deciding on Your Folder Structure
Summary
Chapter 3: Configuring Gradle
Preparing build.gradle
Preparing gradle.properties
Creating Annotations for Gradle Tasks
Preparing settings.gradle
Summary
Chapter 4: Creating the Properties Files
Creating Your Properties Files
Reading from Properties File with Spring-Boot Library
Reading from Properties Files in the Traditional Ways
Summary
Chapter 5: Creating Android, iOS, and Web Drivers on Demand
Creating a Driver with Standard Desired Capabilities
Creating a Driver with Default Service
Creating Drivers for Grid or Cloud Execution
Quitting Driver and Teardown
Summary
Chapter 6: Enhancing the Framework: Common Mobile Actions
Creating Variables for the MobileBaseActionScreen Class
Coding for Common Screen Actions
Summary
Part II: Building on the Framework
Chapter 7: Creating Page Objects
Initializing Page Objects and Workflow Class
Deciding on Locator Strategy
Writing Page Object Methods
Summary
Chapter 8: Writing Your First Test Suite
Using Various Annotations
Writing Soft Assertions
Plugging in the Reporting Module
Running Test Suite in Gradle
Summary
Chapter 9: Importing Test Data from Excel, XML, or Other Formats
Importing Test Data from Excel
Importing Test Data from XML and Other Formats
Summary
Chapter 10: Adding BDD Capabilities with Cucumber
Using a Spring Runner Class with Cucumber
Generating Extent Report in Runner Class
Writing Step Definitions
Running Test Suite in Gradle
Summary
Chapter 11: Adding Allure and Enhanced Extent Reports
Generating Allure Report
Viewing Allure Report
Making Extent Report Work with Junit
Improving Extent Report to Print Data Tables
Creating Separate Extent Report for Each Test Suite
Summary
Chapter 12: Creating a Pdf Report with Screenshots
Creating a PdfUtil Class to Generate Report for Each Test Suite
Passing Parameters to PdfUtil from a Test Suite
Merging Multiple PDFs
Summary
Chapter 13: Enhancing the Framework: Screenshots
Creating Screenshot and Saving in Default Location
Creating Screenshots and Saving in Various Locations
Creating Screenshot with Page Object Name
Summary
Chapter 14: Testing Multiple Apps and Versions in Same Test Suite
Best Practice You Should Follow
Testing Multiple Versions of App in Same Test Suite
Testing Multiple Apps in Same Test Suite
Summary
Chapter 15: Running Scripts or Batch Files from Test Suite
Scenarios in Which Running a Script or Batch Files Is Required
Running Script or Batch Files from Test Suite
Summary
Chapter 16: API Testing
Testing REST API with Web Client
Updating TestautomationApplicationTests
Summary
Part III: Advanced Topics
Chapter 17: Advanced Topic 1: Adding Device Management Functions
Overview
Unlocking the Device
Toggling the Wi-Fi
Setting the Language
Setting the Device Date, Time, Time Zone, and Time Format
Reading Device Properties
Enabling and Disabling App Notifications
Summary
Chapter 18: Advanced Topic 2: Integrating with HP ALM
Using ALM 15.x API
Login and Authentication
CRUD Operations in AboutAppTestSuite
CRUD Operations in  TestautomationApplicationTests
Summary
Chapter 19: Advanced Topic 3: Adding Localization Testing Capabilities
Deciding on Approach Based on Requirements
Localization Testing in Android
Localization Testing in iOS
Summary
Chapter 20: Advanced Topic 4: Implementing Parallel Test Execution
Managing Multiple Sessions
Updating BaseTest Class
Updating Test Suites and Step Definitions
Summary
Appendix A: Other Utilities
OCR Util
Image Comparison Util
Email Util
Appendix B: Automation Setup
Step 1: Install Open JDK and Configure JAVA_HOME
Step 2: Install Gradle and Configure GRADLE_HOME
Step 3: Install Git and Set Up git config
Step 4: Install Appium
Step 5: Install Carthage
Step 6: Install Xcode
Step 7: Install Android Studio
Step 8: Save System Variables in Bash Profile
Step 9: Install IntelliJ
Index

Polecaj historie