简体   繁体   中英

How to integrate JMeter Docker with Azure Pipelines

I have a requirement in which i have to run JMeter test using docker images in azure pipelines.Is there any way in which this can be accomplished.

Any help is appreciated.

Run JMeter test using docker images in azure pipelines

In azure pipeline, we offer a approach Container jobs which would help you achieve this. We provided the docker image for the agents which can make it easily to run them as containers. Then you will be able to run your Jmeter test steps inside that container.

If you hosted the image in Docker Hub, just specify the image name and the corresponding tag to the parameter container in YAML:

pool:
  vmImage: 'ubuntu-16.04'

container: ubuntu:16.04

steps:
..
..
..

Then, the pipeline server will fetch the corresponding image from Docker Hub, then start the container to run the steps, such as run Jmeter test task.

The script is for when the image is hosted in the Docker hub. If you want to fetch the image from Azure Container Registry, you should specify the service connection endpoint in YAML:

container:
  image: myprivate/registry:ubuntu1604
  endpoint: private_dockerhub_connection

Note: Until now, the container job are only available for YAML .

For detailed step, you can track these two blogs and our official doc: Containerized build pipeline , run private agents as docker containers and Using containerized services .

Hope this approach could help you achieve run Jmeter test with Docker image.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM