Taurus is an open source automation framework for running various open source load testing tools and functional testing tools.
Taurus supports Apache JMeter, the most popular open source load testing tool, Selenium, Gatling, The Grinder, and others
Containers are virtual “boxes” inside machines that run the programs installed on them (and only the programs installed on them) in an isolated environment. Using containers enables you to know exactly which tools and plugins you are running and testing, and avoid dependency issues with other tools/versions on your machine.
Containers make your work faster, more accurate and let you focus only on what you want to work on. They are also very efficient because they take only a little memory or CPU from your machine. To run a container you need an image. Images are snapshots, which are essentially running instructions. You can develop and run containers through platforms like Docker.
In this blog we will run the Taurus by docker:
2. Run this Docker Pull Command:
docker pull blazemeter/Taurus
in your machine terminal. This command will pull the blazemeter/taurus image from the Docker hub into your local machine. You can make sure the Taurus image is installed by running the ‘docker images’ command. If the installation worked you should see the blazemeter/taurus image listed as a repository :
The complete list of tools that the Taurus Docker image contains is listed in the Dockerfile tab at https://hub.docker.com/r/blazemeter/taurus/~/dockerfile/. It includes everything you need in order to run a Taurus test, with all of its supported executors (including browsers for Selenium and additional tools).
3. Create two folders on your computer: one to store all of your YAML configs and additional files like JMX files, and another empty one for the future artifacts. For example:
4.Add the path to the two folders you created in step 3 in the Docker ‘Setting configuration. This is important for getting the logs of the test, into the artifacts folder you created.
When the test runs inside the container, adding the folder path will make sure the test logs can be copied to your host, outside of the container where the test ran.
If you are using Docker for Mac/Windows, you can do this by using the Docker UI on the ‘Setting’ => ‘Shared Drive’ option on left pannel.
Note: Reset the credential if you have changed your credentials or you are not able to to mapped the files on the container.
5.To run your YML script/s using the Taurus-Docker image, put your script and yaml file in scripts folder
Run the following command:
docker run –rm -v C:\Users\mnazim\Taurus\scripts:/bzt-configs -v C:\Users\mnazim\Taurus\artifacts:/tmp/artifacts blazemeter/taurus taurus_execution.yml
Note: Use backward slash in path string
Git Bash Command(Linux):
docker run –rm -v C:/Users/mnazim/Taurus/scripts:/bzt-configs -v C:/Users/mnazim/Taurus/artifacts:/tmp/artifacts blazemeter/taurus taurus_execution.yml
Note: Use forward slash in path string
This command will run the script you placed in your ‘scripts’ folder, through Taurus. The logs will be copied into the artifacts/Results/Other Files directory you created.
Taurus can send interim and final test results to BlazeMeter. Even more, you can watch the progress of the test currently being executed on the BlazeMeter website. This is available on all BlazeMeter pricing tiers including the free version and it even works in anonymous mode – you don’t even have to be registered with BlazeMeter to use the feature
Generating Blazemeter External Report
You can also generate the Blazemeter External report by below command .In order to see a report for the running a test on BlazeMeter systems, just append the -report parameter to the Taurus startup command and it will automatically open your default browser and navigate to the page with the results.:
docker run –rm -v C:\Users\mnazim\Taurus\scripts:/bzt-configs -v C:\Users\mnazim\Taurus\artifacts:/tmp/artifacts blazemeter/taurus taurus_execution.yml -report
A browser will opened with this blazemeter report which publicly available.
Generating Blazemeter Internal Report
To integrate with internal report which is linked to a blazemeter account ,you should have a blazemeter account ,if not you can create a account from here.
You have to set the BlazeMeter API key by below 3 different way:
By Command Line arguments:
bzt -o modules.blazemeter.token=<API_KEY:API_SECRET> -o modules.blazemeter.project=<PROJECT_NAME> -o modules.blazemeter.test=<TEST_NAME> -report
By configuring .bzr-rc file:
By YMAL file: