mahfuzmr / ensuring-quality-releases

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ensuring Quality Releases

This project demonstrates the capabilities of automated CI/CD pipelines using Azure DevOps.

The CI/CD pipeline consists of four stages:

Pipeline overview

Infrastructure

Infrastructure is described as code that is instantiated and managed by Terraform.

The Infrastructure stage uses the terraform configuration in the 'terraform' directory to perform the following tasks:

  • Install Terraform
  • Terraform Init
  • Terraform Plan
  • Terraform Apply

Infrastructure Terraform

Build

The Build stage packages the FakeRestAPI web application contained in the 'fakerestapi' directory into an artifact.

Build Artifact

Deploy

The Deploy stage deploys the artifact generated in the Build stage to the Azure AppService created in the Infrastructure stage.

Deploy Webapp

Test

The Test stage consists of three different steps:

Integration Tests

Integration Tests are performed to check the APIs provided by the webapp for existence (regression) and correctness (validation).

The tests were created using Postman and can be found in 'automatedtesting/postman'.

Execution within the pipeline is done via newman.

Test Integration Regression

Test Integration Validation

Test results are uploaded to the pipeline and are directly visible:

Test Integration Results Publish

Test Integration Results

Test Integration Run Summary

Test Integration Test Results

Performance Tests

Performance Tests ensure that the webapp can handle the expected load in different situations.

JMeter is used to perform two types of performance tests:

  • Stress Test: High load during short period of time.

Test Performance Stress

  • Endurance Test: Constant load over long period of time.

Test Performance Endurance

UI Tests

UI Tests ensure that the functionality of an app works as expected.

Selenium is used to test a web shop by adding items to a cart and removing them.

Test UI

Monitoring

Alerting

An alert is triggered whenever too many 404 errors occur:

Alert Rule Graph

Alert Rule Metric

It automatically generates eMails as shown below:

Alert Rule eMail

Logging

Azure log analytics is used for the webapp http logs:

Logs HTTP

And is also used for the UI test logs produced by selenium:

Logs UI Test

About


Languages

Language:JavaScript 37.5%Language:HTML 34.9%Language:HCL 15.8%Language:Python 6.2%Language:CSS 5.4%Language:ASP.NET 0.2%