codefresh + blazemeter webinar: continuous testing for containerized applications
TRANSCRIPT
Continuous Load Testing for Containerized Applications
[email protected]@codefresh.io
Presenters
Raziel TabibCo-Founder & CEO
Brian MathesonSr. Sales Engineer
Agenda
Shifting Testing Left
Intro to Codefresh
Add your application services in Codefresh
Run and test the application manually
Configure an automated pipeline
Blazemeter & Taurus
Using the BlazeMeter Chrome Extension
Modifying the JMeter Script
Taurus Container Setup
Test Integration with Codefresh
Summary / Q&A
Shifting testing to the left
Codefresh
Codefresh is a container platform for Dev teams. It allows teams to Build, Run, Test and Deploy containerized applications.
www.codefresh.io
@RazielTabib
Build & Test Containerized app w Codefresh
Intuitive setup with native support for containers
Automated Unit, Integration, UI and Performance testing
Spin up on-demand Dev/Test environment on any Branch / Pull Request
containers101/demochat mongo:latest
Introduction to BlazeMeter and Taurus
BlazeMeter: Platform for executing load tests at scale
Cloud-based load generators
Intuitive reporting
Open Source DNA
Taurus: Open Source Test Development and Execution
Execute existing open source load test scripts: JMeter / Selenium / Gatling / etc…
and / or
Define tests in a YAML-based domain-specific language designed for load testing
and / or
Combine the two methods for complex parallel test runs
Test Development: Record with BlazeMeter Extension
Works with Google Chrome Web Browser and BlazeMeter Account
Easy to Install, Easy to Use
Click the Record Button to Start Capture
Captures All Requests from the Browser, Including AJAX
Navigate Through the App to Build the Test Plan
Stop Recorder and Save Recordings as JMX (or Taurus YAML)
Test Development: Modify the JMeter Script
Clean Up Extraneous Requests
Parameterize the Script
Replace static post data with ${variables}
Include a CSV file to populate the variables
Each thread or iteration will use different values.
Use Post Processors to Capture Session Tokens
Test Script Against an Instance of the App
Test Development: Convert to Taurus
Use jmx2yaml Utility to Convert JMeter files to more readable YAML
Optionally Trim Out Recorded Headers for Additional Readability
---execution:- concurrency: 20 iterations: 10 scenario: Thread Groupscenarios: Thread Group: default-address: http://AUT:5000 data-sources: - accounts.csv requests: - body: display-name: ${account} email: ${email} first-name: ${fname} last-name: ${lname} password: ${password} password-confirm: ${password} username: ${account} label: register method: POST url: /account/register
- label: login body: password: ${password} username: ${account} method: POST url: /account/login
- label: emotes method: GET url: /extras/emotes - label: replacements method: GET url: /extras/replacements - label: chat method: GET url: /socket.io/?EIO=3&transport=polling&t=1477932100202-0 extract-regexp: sid: default: NO_MATCH match-no: 1 regexp: '"sid":"(.+)","' template: $1$ - label: chat session method: GET url: /socket.io/?EIO=3&transport=polling&t=1477932100505-1&sid=${sid} - label: chat session body: 21:420["account:whoami"] method: POST url: /socket.io/?EIO=3&transport=polling&t=1477932100655-2&sid=${sid} - label: chat session method: GET url: /socket.io/?EIO=3&transport=polling&t=1477932100711-3&sid=${sid} - label: logout method: GET url: /logout store-cache: true store-cookie: true use-dns-cache-mgr: false
Test Development: Create Container for Taurus
Create Dockerfile to Build Taurus Container with Script and CSV Included
FROM debian:latest
RUN apt-get updateRUN apt-get install -y python default-jre-headless python-tk python-pip python-dev libxml2-dev libxslt-dev zlib1g-devRUN pip install bztRUN pip install --upgrade bzt
COPY . /scripts
WORKDIR /scripts
CMD ["bzt" , "letschat.yml", "-report"]
Next Steps
• Create your BlazeMeter account at www.blazemeter.com• Create your codefresh account at www.codefresh.io• BlazeMeter Performance Testing Info -
www.blazemeter.com/blog & www.blazemeter.com/resources• Containers info www.codefresh.io/blog• Twitter - @blazemeter @codefresh• Questions for sales - [email protected] [email protected]• gettaurus.org
6/7/16 12©2015 BlazeMeter. Confidential.
Questions?
Thank You!Let the Testing Begin!