Code Monkey home page Code Monkey logo

jmeter-aks-loadtest's Introduction

Project

Automated performance pipeline using Apache JMeter and AKS

As the Azure DevOps cloud-based load testing by Microsoft has been deprecated, we evaluated the options and finalized on using Apache JMeter with Azure Kubernetes Service (AKS) in a distributed architecture to carry out an intensive load test by simulating hundreds and thousands of simultaneous users.

image

Currently we have also implemented an automated pipeline for running the performance test using Apache JMeter and AKS, which is also extended to simulate parallel load from multiple regions to reproduce a production scenario.

Prerequisite for onboarding to the automated pipeline:

JMeter test scripts:

  1. create the test suite with the help of how to setup JMeter test plan(https://jmeter.apache.org/usermanual/build-web-test-plan.html).
  2. Check in the JMX file and supporting files in a repository

AKS setup

  1. Create AKS cluster with the help of how to create a AKS cluster(https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal)
  2. Provide access to a Service Principal Name which would be used to run the JMX file in the cluster.

Steps to onboarding for the pipeline:

  1. Fork the YAML pipeline from the repository: JMeterAKSLoadTest(https://github.com/microsoft/JMeterAKSLoadTest.git)

  2. Folder structure looks like below: image

  3. Inside the JMeterFiles folder add the JMX and supporting files there image

  4. Overview on the variable set up:

  • JMX file has below variables, which can be used from the variable group or pipeline variables according to the setup:

    1. PerfTestResourceId – Resource Id for the API Auth
    2. PerfTestClientId – Client Id for the API Auth
    3. PerfTestClientSecret – Client secret for the API Auth
    4. JmeterFolderPath – JMX File folder path
    5. JmeterFileName – JMX File name
  • AKS set up related variables:

    1. AKSClusterNameRegion1 -Cluster name of the respective region
    2. AKSResourceGroupRegion1 – Cluster resource name for the region
    3. AKSSPNClientIdRegion1 – client id for the region
    4. AKSSPNClientSecretRegion1 – client secret for the region
    5. TenantId – tenant id
    6. CSVFileNames – list of supported file names for execution like “users.csv,ids.csv”

    image

  1. Set the mentioned pipeline variables as shown: image

  2. Set the Variable group linked from Key vault.

  3. The results of the execution is published as artifact and it can be downloaded. The index.html file holds the report of the run.

Advantages:

  1. With minimal cost you can simulate parallel load from different regions to replicate the production scenario.
  2. As all the Loops, Threads and Ramp up time variables are configured through pipeline variables you can run the test suite with minimal changes
  3. Once the setup is complete no dependency on any specific machine or user credential, therefore it could be run more frequently to understand the application performance.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

jmeter-aks-loadtest's People

Contributors

balaji1217 avatar durgashini68 avatar microsoft-github-operations[bot] avatar microsoftopensource avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.