AZURE, DEVOPS

Automation Testing helps complete the entire software testing life cycle (STLC) in less time and improve efficiency of the testing process.
Test Automation enables teams to verify functionality, test for regression and run simultaneous tests efficiently. In this article we will take a detailed look at the Automation Testing Tools available, standards and best practices to be followed during Test Automation.
Following the best practices for Software Testing Life Cycle (Unit testing, Integration Testing & System Testing) ensures that the client gets the software as intended without any bugs. End-to-end testing is the methodology used to test whether the flow of an application is performing as designed from start to finish. Carrying out end-to-end tests helps identify system dependencies and ensure the flow of right information across various system components and the system.
Ultimately Automation Testing increases the speed of test execution and the test coverage.
The strategy to adopt test automation should clearly define when to opt for automation, its scope and selection of the right kind of tools for execution. And when it comes to tools the top ones to go for are
Cypress is a JavaScript based testing framework built for the modern web. Cypress helps to create End-to-end tests, Integration tests and Unit tests. Cypress takes a different approach compared to other testing frameworks, since it’s executed in the same run loop as the application. It also leverages a Node.js server to handle any task that needs to happen outside of the browser. With its ability to understand everything happening inside and outside of the browser, it produces more consistent results.
Cypress runs on most of the following CI providers.
Azure DevOps / VSTS CI / TeamFoundation
BitBucket
CircleCI
Docker
GitLab
Jenkins
TravisCI
Before we get started here are the basic Cypress installation commands
Clean up the old results
$ rm -rf cypress/reports/
Run the cypress application with required spec file.
$ cypress run –spec \”cypress/integration/**/*.spec.ts\” // mention your spec file
Configure the mocha reports path for publishing test results.
–reporter junit –reporter-options ‘mochaFile=cypress/reports/test-output-[hash].xml,toConsole=true’
Uninstall the application.
$ npm uninstall cypress-multi-reporters; npm uninstall cypress-promise; npm uninstall cypres
It is critical to test the application before the Build, Deployment or Release. Essentially the process involves regression and smoke testing. And don’t forget the sanity checks before the build is deployed in the staging environment.
Cypress comes in handy for testing angular / JavaScript applications before they are deployed to staging or production environment.
Install the required node module of the application then run the application with test mode.
$ npm install –save-dev start-server-and-test
$ start-server-and-test start http://localhost:4200
The results of the Cypress test execution are stored in specified path and are added to the Azure DevOps test results. Cypress supports JUnit, Mocha, Mochawsome test results reporter formats and provides options to create customised test results and merge all the test results as well.
Cypress supports docker containerization and that makes it easy to set it up in a cluster environment like AKS. The Cypress base images are available at the link below.
https://github.com/cypress-io/cypress-docker-images

Copy the package.json and UI source code to the app folder and run the Cypress test. The following commands are used to run the docker and execute.
script: |
docker run -d -it --name cypressName:cypressImageTag bash
docker commit -p cypressName:cypressImageTag
docker stop cypressName
docker rm -f cypressName
- script: docker tag cypressName:cypressImageTag
displayName: Tag Cypress image
- task: Docker@1
displayName: Push image To Registry
inputs:
command: push
azureSubscriptionEndpoint: azureSubscriptionEndpoint
azureContainerRegistry: $(azureContainerRegistry)
imageName: acrImageName:BuildId
- script: sudo rm -rf /test-results/*
displayName: Removing Previous Results
- task: ShellScript@2
displayName: 'Bash Script - cypress base image post-deployment'
inputs:
scriptPath: ./cypress-deployment.sh
args: $(azureRegistry) $(cypressImageName) $(azureContainerValue) $(CYPRESS_OPTIONS)
continueOnError: true
- task: PublishTestResults@1
displayName: 'Publish Test Results ./test-results-*.xml'
inputs:
cypress-base-image-post-deployment.sh
docker run -v $systemSourceDirectory:/app/cypress/reports --name vca-arp-ui
$cypress_Latestimage npx cypress run $cypressOptions bash
Now the container should be set up on on your local machine and start running your specs.
Cypress is simple and easily integrates with your CI environment. Apart from the browser support, Cypress reduces the efforts of manual testing and is relatively faster when compared to other automation testing tools.
Share this:

Part 4 of our series on intent-driven development. Start with Part 1, or read Parts 2 and 3 first if you want the technical workflow before the outcomes. The first three posts in this series covered the mechanics: why the spec is now the source of truth, how to build the CLAUDE.md context layer, and how OpenSpec moves […]

Part 3 of our series on intent-driven development. Read Part 1 (spec-driven development with Kiro) and Part 2 (mastering the CLAUDE.md file) first. Part 1 of this series established the principle: in AI-assisted development, the spec is the source of truth, not the code. Part 2 covered the CLAUDE.md file — the context layer that ensures every AI session starts from […]

How to Master the CLAUDE.md File: The Context Layer That Makes Spec-Driven Development Work Part 2 of our series on intent-driven development. If you haven't read Part 1 — Code is No Longer the Source of Truth. Your Spec Is. — start there. In Part 1, we explored how spec-driven development with tools like Kiro shifts the source of truth from […]
Partner with CloudIQ to achieve immediate gains while building a strong foundation for long-term, transformative success.