About the Customer & Project Overview
The client is associated with a digital commerce marketing platform. It offers a different approach to micro-influence marketing with the help of satisfied customers. The product enables customers to refer deals from their favorite products or services to their family and friends.
It is widely used by brands to generate higher revenue by establishing the newest customer base via referral marketing.
Continuous Integration has been implemented in the project for smoke testing of every build. It is implemented in a way that once the deployment is completed, Selenium script is triggered and automated script placed at one of the servers of the application is executed. This is implemented using Visual Studio online 2015.
Continuous integration is one of the DevOps practices that enable developers to continuously integrate code into a shared repository. While implementing this practice, the following are the challenges we faced.
- The biggest challenge was the lack of knowledge as CI was implemented for the first time using Visual Studio online.
- Another challenge was to execute the script with the latest code every time, so every time CI needs to check for the updated code.
- Selenium script should only be executed if all tasks of deployment are passed and build is not canceled.
We have used GitHub as a repository to store Selenium scripts so that before executing Selenium scripts, we can check for the latest code every time.
To overcome the challenge of script execution only when all tasks are successfully executed, we have enabled the property to execute automated test task only when all previous tasks have succeeded.
How We Did It?
- Used task Get sources and selected source as GitHub. Authorized task to use GitHub and specified repository and branch from where the task should take the updated
- Used task Copy Publish Artifact to copy updated files from the GitHub repository and place it at a specified location on the server where scripts will be executed.
- In Control Option, selected value Run this task property as “Only when all previous tasks have succeeded” so as to ensure that Selenium scripts will only be executed once build is succeeded.
- Added another repository on GitHub and placed PowerShell script with the command to execute Selenium scripts using maven. Command written is “mvn clean test”.
- Used task Powershell to execute shell scripts placed at GitHub repository.
Tools & Technologies
- Reduced manual efforts for smoke testing time every time new build is delivered
- Test basic and crucial functionality in an absence of QA
- Cost-savvy, time-saving testing of the application
- Continuous Integration helps in smoother deployments by allowing the team to identify the problems early