Introduction
Client : Mark Anthony Groups
Industry : Manufacturing and distributing beverages
Project Duration : 6 months
Background
Mark Anthony sought to automate all the functionalities of the Commerce7 system for their 9 wineries. With nine releases planned, the primary task was to generate orders for each release within a short timeframe. Additionally, functional and regression testing were required for each release to validate functionalities of various modules, including Admin, POS, and Customer View..
Problem Statement:
Manually creating orders for multiple wineries within a short period presents several challenges :
- High Manual Effort Creating orders manually for every release is tedious and time-consuming.
- High Test Execution Time The execution time is high as multiple wineries need to go live on specific dates.
Objectives
- Reduce manual efforts : Automate the functionalities of each winery to reduce manual intervention.
- Reusability of Scripts : Develop the test script for one winery and reuse it for the others, minimizing script creation and execution time.
- Futureproofing :Ensure test script reusability for multiple executions and adapt the framework to future change.
- Scalability : Define a test automation framework that accommodates future changes and new features for upcoming wineries.
Solution
To address these challenges, we proposed the following solution using Selenium and Java:
- Data-Driven Framework : Implementing a Data-Driven framework to separate test data from test logic. This enhances flexibility and scalability by allowing easy updates to test data using external files.
- Page Object Model (POM) : Develop the test script for one winery and reuse it for the others, minimizing script creation and execution time.
- Utility Functions :Creating a library of utility functions for common actions like login, navigation, and form submissions.
- Centralized Configuration : Using a centralized configuration file for managing environment-specific settings and test data.
Implementation
Data-Driven Framework :
- Developed a Data-Driven framework to separate test data from test scripts. The test scripts were divided into smaller, reusable modules. The test data is maintained easily by using external files.
- Each module represented a specific functionality, such as Admin, POS, and Customer View.
Page Object Model (POM) :
- Created page object classes for different pages of the application.
- Each class encapsulated the UI elements and methods to interact with those elements.
Utility Functions :
- Developed utility functions for common actions like clicking buttons, entering text, verifying element visibility, and common actions/functions across modules.
- These functions were used across multiple test scripts to avoid code duplication.
Centralized Configuration :
- Implemented a centralized configuration file to manage environment-specific settings such as URLs, credentials, and test data.
- This allowed easy switching between different environments without modifying the test scripts.
Results
- Reduced Cycle Time of Test Execution : The cycle time of test execution was significantly reduced.
- Reduced Maintenance Efforts : The Data-Driven framework and POM significantly reduced the time and effort required to update test scripts for changes for each winery.
- Eliminated Redundant Code : Utility functions and reusable modules eliminated redundant code, making the test suite more efficient and easier to maintain.
- Improved Scalability : The defined framework was scalable and could easily accommodate new features and frequent releases.
- Increased Test Coverage : The reusability of scripts allowed the team to cover more test scenarios within the same timeframe.
Conclusion
The implementation of a Data-Driven framework, Page Object Model, and utility functions significantly improved the reusability of automation scripts for the Mark Anthony Group. This led to reduced execution time, maintenance efforts, and eliminated redundant code. The scalability of the test automation suite was improved, ultimately, the efficiency and effectiveness of their testing process were greatly improved.