SlideShare a Scribd company logo
1
Skills | Knowledge | CollaborationSkills | Knowledge | Collaboration
FunctionalAPIautomationwithJMeter(realcase)
by Mykola Kovsh
2
Skills | Knowledge | Collaboration
Speaker info
Hi, I’m Mykola Kovsh
PerformanceTestEngineer
Performance Testing Department at
Testing Centerof Excellence,
Ciklum,Ukraine
•Performance/ Automation / Manualtesting
www.linkedin.com/in/mykolakovsh/
3
Skills | Knowledge | Collaboration
Content
6 Our Results
Demo5
Testing Product Description1
Our Problem2
Continuous Integration with JMeter (Bamboo). Reporting4
JMeter as a Solution3
Conclusions7
Links and Q&A session
4
Skills | Knowledge | Collaboration
Testing Product Description
Client: Mobile / Facebookweb sport betting application
Server:Amazon cloud-based application, REST API based
Technology stack: Java, Cassandra DB, Unity 3D
Product is in active development for near 3years
A lot of parsing and integration logic with 3rd-party data providers
Frequent releases driven by business needs (startup)
5
Skills | Knowledge | Collaboration
Our Problem
 We should run full regression REST API functional tests each release
 Manual runs took 4-5 days for 2 QAs what did not satisfy business
 No QA automation specialist on the project, but we use JMeter for performance testing and have
expertise in it
 A lot of GUI/usability testing in addition to functional
 To sum up:often we did not have time for full functional regression testing before release what
resulted in bugs and frequent hotfixes on Production
6
Skills | Knowledge | Collaboration
Solution 1: Postman
Goodas supplementarytoolfor manualtesting
CIintegration
Reports convertingtoHTML file
Team workoptionbut NOT FREE
Incase oftrickyparametrizationandcustom logic, some tool’s issues
couldinfluence autotests runs
JavaScriptbasicknowledgeis required
Hardtomaintainwhen alot oftest-cases
Noabilityofparallelruns
Reports arenot very comprehensive
7
Skills | Knowledge | Collaboration
Solution 2: JMeter. Why for API?
Free toolwithlargecommunityandsupport
GUI based- fastlearning
Customization-throughJMeter API andusing scripting languages
Abilitytoreuse functionaltestsforload purposes
Abilitytoreuse GUI modulesin different tests
Assertions- allowyouto"test"whetheryourapplicationreturnstheresults youexpectit to
Paralleltest runs
CI integration
ComprehensiveHTML reports
Basicknowledgeofsomescripting languageandregularexpressionsis required
Hardtomaintainonlargeprojects
Version control:onlyJMX filescould betracked
8
Skills | Knowledge | Collaboration
JMeter: Functional Tests Creation
1. ThreadGroup(user) ->Testset/Testsuite
2. LogicControllers:
a) TransactionController->Testsuite/Testcase
b) Loop/While/ForEachController
c) If Controlleretc.
3. Samplers->Requests(HTTP(s), TCP, SOAP,etc.)
4. Assertions->Testyourresponse/Customize/Parametrize
5. Timers
6. Configurationelements
1
2
3
4
5
6
9
Skills | Knowledge | Collaboration
JMeter: Customize/Parametrize/Test
Assertion types:
JSR223Assertion
Response Assertion
Duration Assertion
SizeAssertion
XML Assertion
BeanShell Assertion
MD5Hex Assertion
HTML Assertion
XPath Assertion
XML Schema Assertion
Compare Assertion, etc.
10
Skills | Knowledge | Collaboration
Reusable/Modular Scripts Approach
To makefunctional testing scripts easy
maintainable and reusableuse next JMeter
elements:
Test Fragment
Simple / Transaction Controller
Module Controller
Parameterized Controller
Include Controller
11
Skills | Knowledge | Collaboration
Data + Keyword Driven Approach
To separatetest scriptsfrom test cases design
use next JMeter elements:
Test Fragment
Switch Controller
Simple / Transaction Controller
Module Controller
ForEach Controller
CSV Data Set Config
12
Skills | Knowledge | Collaboration
JMeter: Continuous Integration
Process and tools:
1. JMeter:functional testing scripts
2. ANTbuild tool: converts results from JTL output files into HTML reports
- ANT parses JTL logs using XSLT stylesheet file
3. Bamboo CI tool
Development SourceControl Build Unit/IntegrationTesting FunctionalTesting Report
13
Skills | Knowledge | Collaboration
What is ANT
Apache Ant (Another Neat Tool) is a general purpose build tool.
Ant is primarily used for building and deploying Java projects but can be used for
every possible repetitive tasks, e.g. generating documentation.
A build tool is used to automate repetitive tasks during some process:
- compiling source code,
- running software tests,
- creating files and documentation for the software deployment, etc.
Popular build tools in the Java space are Maven, Gradle and Apache Ant.
14
Skills | Knowledge | Collaboration
JMeter CI: Approaches
ANTstandalone –all steps are executedin
ANT build.xml file, using 1 Bamboo Task:
• Run JMeter tests
• Convert JTL logs to HTML report
• Verify test results and pass/fail build
PowerShell(console) + ANTcombination
–3 Bamboo tasks:
• Task1Script:run JMeter tests
• Task2ANT: convertJTL log to HTML
report
• Task3Script:verify results and pass/fail
build
1 2
15
Skills | Knowledge | Collaboration
CI 2nd Approach: Project Structure
16
Skills | Knowledge | Collaboration
Bamboo Task 1: Tests Running
del Jmeter_ci_with_antresultstest_report.html
del Jmeter_ci_with_antresultsresultlog.jtl
${bamboo.JMETER_HOME}binjmeter.bat -n-tJmeter_ci_with_antJmeter_test_plan.jmx-lJmeter_ci_with_antresultsresultlog.jtl-
qJmeter_ci_with_antci_jmeter.properties
17
Skills | Knowledge | Collaboration
Bamboo Task 2: HTML Reporting
18
Skills | Knowledge | Collaboration
Bamboo Task 2: ANT Build File
After tests executed, generate HTML report using
build_report.xml file (default name build.xml)
Wehave3 <target> here:
• report - log process
• xslt-report –convertusing XSLTfile
• copy_report –move reports to separate folder
tokeephistory
19
Skills | Knowledge | Collaboration
What is XSLT
Wikipedia: XSLT (Extensible Stylesheet Language
Transformations) is a language for transforming XML
documents into other XML documents,
or other formats such as HTML for web pages, plain text or
XSL Formatting Objects, which may subsequently be
converted to other formats, such as PDF, PostScript and PNG
20
Skills | Knowledge | Collaboration
HTML: XSLT Stylesheet File Update
OurImprovements:
• Statistics by test suites (threads) and request
• Expand/Collapse test suits option
• Show only failed transactions filter
before after
*Origin: http://shanhe.me/node/18/314
*UpdatedXSLT: https://drive.google.com/file/d/0B4SCa_HZT_OOQnoyQjc1TGw0a0E/view?usp=sharing
21
Skills | Knowledge | Collaboration
HTML Reporting: Investigate Issue
22
Skills | Knowledge | Collaboration
HTML Reporting: Limitation
In casedifferentThreadGroupsrununderthe sameTestPlan,theyarenotseparatedin report
Todeal withit, wesuggest:
1) RunThreadGroupsconsequently. Itcan takesometime, iftherearea lotofcases
2) orSeparateTest Plans(JMX files) bysomelogic andrun themsimultaneously
23
Skills | Knowledge | Collaboration
Bamboo Task 3: Verify results
24
Skills | Knowledge | Collaboration
25
Skills | Knowledge | Collaboration
Recommendations
1) Apply decomposition for faster tests runs:
-One functional area -One separate Test Plan
-Decompose tests runsby jobs inCItool (Bamboo, Jenkins)
2) Runsmoke functional test and, if success, make it trigger full coverage testing run
3) Use Modular approach to create maintainable/reusable scripts
4) Team work:use IncludeControllers to run scripts created by each member
5) UseJSR223Assertion element to customize/parametrize/test yourcustom logic in flexible way
6) UseUserDefined Variables element to create and fast switch between Test/Stage/Prod hosts
7) Shareyourscripts with developers to debug current and new features
8) UseJMeterscripts for Load testing, if needed
26
Skills | Knowledge | Collaboration
Disadvantages
 Inappropriate for largeprojects/teams
 Hard to maintain scripts, if there are lot of them
 Scripts version control is absent
 Not veryconvenient for large QA team use(if more than 2-3 QAspecialists)
 You still need time to learnsome scripting language (and regexp) to create comprehensive scripts with
JMeter
27
Skills | Knowledge | Collaboration
Our Results
For 5 months ~200 (30%) of API functional high priority test cases were automated
~100 regression and ~80 new features bugs found
Functional API regression testing period shortened from 5 to 2 days
QA team has more time to focus on GUI and cross-platform testing
Overall quality of the application was improved and more stable builds released to Prod
28
Skills | Knowledge | Collaboration
Conclusions
Involve automation QA engineer(s) to implement automation testing on the project within high
standards (Python/Java/etc. frameworks)
IF Your team/project is relatively small (near 5-8 members) and limited time for full regression runs, to
improve product quality you can:
• use JMeter automation testing as complement to manual testing
• automate high priority API test cases to verify main product functionality -smoke and short
acceptance testing
• automate new features testing
• integrate JMeter API testing into product CI pipeline
ELSE
29
Skills | Knowledge | Collaboration
30
Skills | Knowledge | Collaboration
Useful Links
• Functional Testing with JMeter: https://www.packtpub.com/books/content/functional-testing-jmeter
• JMeter как относительно удобноеи практичное средстводля тестирования API: https://habrahabr.ru/post/243097/
• Test cloud-based applications with Apache JMeter: https://www.ibm.com/developerworks/cloud/library/cl-jmeter-restful/#listing3
• JMeter –Continuous Performance Testing –JMeter +ANT +Jenkins Integration –Part1 and 2: http://www.testautomationguru.com/jmeter-continuous-
performance-testing-part1/
• JMeter –Creating Modular/Reusable Test Scripts: http://www.testautomationguru.com/jmeter-modularizing-test-scripts/
• JMeter –How tocreate a Data+Keyword Driven Framework for Performance Testing: http://www.testautomationguru.com/jmeter-how-to-create-a-data-keyword-
driven-framework-for-performance-testing/
• How toUse JMeter Assertions in Three Easy Steps: https://www.blazemeter.com/blog/how-use-jmeter-assertions-3-easy-steps
• Acollection ofresources covering different aspects of JMeter usage: https://github.com/aliesbelik/awesome-jmeter

More Related Content

What's hot

API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
Siddharth Sharma
 
Testando uma aplicação com Arquitetura Hexagonal e Spring Boot
Testando uma aplicação com Arquitetura Hexagonal e Spring BootTestando uma aplicação com Arquitetura Hexagonal e Spring Boot
Testando uma aplicação com Arquitetura Hexagonal e Spring Boot
Henrique Schmidt
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
RahulCR31
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
Idexcel Technologies
 
What is Ad-Hoc Testing
What is Ad-Hoc TestingWhat is Ad-Hoc Testing
What is Ad-Hoc Testing
Exforsys Inc
 
ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...
ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...
ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...
QADay
 
2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured
Eing Ong
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017
Deepu K Sasidharan
 
BPM Patterns & Best Practices with OutSystems BPT
BPM Patterns & Best Practices with OutSystems BPTBPM Patterns & Best Practices with OutSystems BPT
BPM Patterns & Best Practices with OutSystems BPT
Gonçalo Borrêga
 
Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...
clintongormley
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Roger van de Kimmenade
 
Monitoring Microservices
Monitoring MicroservicesMonitoring Microservices
Monitoring Microservices
Weaveworks
 
COMPUTER SCIENCE & ENGINEERING ACTION PLAN
COMPUTER SCIENCE & ENGINEERING ACTION PLANCOMPUTER SCIENCE & ENGINEERING ACTION PLAN
COMPUTER SCIENCE & ENGINEERING ACTION PLAN
rkosta
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
Amazon Web Services
 
Validation testing
Validation testingValidation testing
Validation testingSlideshare
 
Postman 101 for Students
Postman 101 for StudentsPostman 101 for Students
Postman 101 for Students
Postman
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
Lee Barnes
 
API testing - Japura.pptx
API testing - Japura.pptxAPI testing - Japura.pptx
API testing - Japura.pptx
TharindaLiyanage1
 
Event Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference ArchitectureEvent Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference Architecture
Bob Rhubart
 
Microservices Design Patterns | Edureka
Microservices Design Patterns | EdurekaMicroservices Design Patterns | Edureka
Microservices Design Patterns | Edureka
Edureka!
 

What's hot (20)

API Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNGAPI Testing Using REST Assured with TestNG
API Testing Using REST Assured with TestNG
 
Testando uma aplicação com Arquitetura Hexagonal e Spring Boot
Testando uma aplicação com Arquitetura Hexagonal e Spring BootTestando uma aplicação com Arquitetura Hexagonal e Spring Boot
Testando uma aplicação com Arquitetura Hexagonal e Spring Boot
 
API Documentation.pptx
API Documentation.pptxAPI Documentation.pptx
API Documentation.pptx
 
Test Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.comTest Automation Framework Design | www.idexcel.com
Test Automation Framework Design | www.idexcel.com
 
What is Ad-Hoc Testing
What is Ad-Hoc TestingWhat is Ad-Hoc Testing
What is Ad-Hoc Testing
 
ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...
ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...
ОЛЕКСІЙ ОСТАПОВ «Найкрутіші особливості автоматизації на Playwright Python» K...
 
2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured2015-StarWest presentation on REST-assured
2015-StarWest presentation on REST-assured
 
Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017Easy Microservices with JHipster - Devoxx BE 2017
Easy Microservices with JHipster - Devoxx BE 2017
 
BPM Patterns & Best Practices with OutSystems BPT
BPM Patterns & Best Practices with OutSystems BPTBPM Patterns & Best Practices with OutSystems BPT
BPM Patterns & Best Practices with OutSystems BPT
 
Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...Elasticsearch Query DSL - Not just for wizards...
Elasticsearch Query DSL - Not just for wizards...
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Monitoring Microservices
Monitoring MicroservicesMonitoring Microservices
Monitoring Microservices
 
COMPUTER SCIENCE & ENGINEERING ACTION PLAN
COMPUTER SCIENCE & ENGINEERING ACTION PLANCOMPUTER SCIENCE & ENGINEERING ACTION PLAN
COMPUTER SCIENCE & ENGINEERING ACTION PLAN
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Validation testing
Validation testingValidation testing
Validation testing
 
Postman 101 for Students
Postman 101 for StudentsPostman 101 for Students
Postman 101 for Students
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
 
API testing - Japura.pptx
API testing - Japura.pptxAPI testing - Japura.pptx
API testing - Japura.pptx
 
Event Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference ArchitectureEvent Driven Architecture (EDA) Reference Architecture
Event Driven Architecture (EDA) Reference Architecture
 
Microservices Design Patterns | Edureka
Microservices Design Patterns | EdurekaMicroservices Design Patterns | Edureka
Microservices Design Patterns | Edureka
 

Similar to API automation with JMeter + Bamboo CI

Mykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with JmeterMykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with Jmeter
Ievgenii Katsan
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio
 
Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...
Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...
Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...Mahesh Kumar I H
 
AparnaNair_Resume
AparnaNair_ResumeAparnaNair_Resume
AparnaNair_ResumeAparna Nair
 
Kiran R P_CV
Kiran  R P_CVKiran  R P_CV
Kiran R P_CVKiran RP
 
Boost your App with Gatling
Boost your App with GatlingBoost your App with Gatling
Boost your App with Gatling
Knoldus Inc.
 
Shriraam-performance test engineer 5.4 years
Shriraam-performance test engineer 5.4 yearsShriraam-performance test engineer 5.4 years
Shriraam-performance test engineer 5.4 years
shriraam ms
 
Automation test lead
Automation test leadAutomation test lead
Automation test lead
senthil kumar
 
CV_SyedShoeb_2015
CV_SyedShoeb_2015CV_SyedShoeb_2015
CV_SyedShoeb_2015Syed Shoeb
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance TestingAtul Pant
 
Shuvam dutta
Shuvam duttaShuvam dutta
Shuvam dutta
Shuvam Dutta
 
Shuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam dutta | Performance tester
Shuvam dutta | Performance tester
Shuvam Dutta
 

Similar to API automation with JMeter + Bamboo CI (20)

Mykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with JmeterMykola Kovsh - Functional API automation with Jmeter
Mykola Kovsh - Functional API automation with Jmeter
 
Shalini Sharma Resume
Shalini Sharma ResumeShalini Sharma Resume
Shalini Sharma Resume
 
Katalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and DevelopersKatalon Studio - Successful Test Automation for both Testers and Developers
Katalon Studio - Successful Test Automation for both Testers and Developers
 
Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...
Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...
Updated_Mahesh Kumar_Software Engineer_3.6 Yr_Exp_in (Manual Automation and D...
 
Sreekanth 4+ PT
Sreekanth 4+ PTSreekanth 4+ PT
Sreekanth 4+ PT
 
AparnaNair_Resume
AparnaNair_ResumeAparnaNair_Resume
AparnaNair_Resume
 
Kiran R P_CV
Kiran  R P_CVKiran  R P_CV
Kiran R P_CV
 
Boost your App with Gatling
Boost your App with GatlingBoost your App with Gatling
Boost your App with Gatling
 
Updated resume
Updated resumeUpdated resume
Updated resume
 
Shriraam-performance test engineer 5.4 years
Shriraam-performance test engineer 5.4 yearsShriraam-performance test engineer 5.4 years
Shriraam-performance test engineer 5.4 years
 
Automation test lead
Automation test leadAutomation test lead
Automation test lead
 
Prakasha_Resume
Prakasha_ResumePrakasha_Resume
Prakasha_Resume
 
CV_SyedShoeb_2015
CV_SyedShoeb_2015CV_SyedShoeb_2015
CV_SyedShoeb_2015
 
SANTOSH KUMAR M -FD
SANTOSH KUMAR M -FDSANTOSH KUMAR M -FD
SANTOSH KUMAR M -FD
 
Anuradha_Resume_10 Years
Anuradha_Resume_10 YearsAnuradha_Resume_10 Years
Anuradha_Resume_10 Years
 
Jmeter Performance Testing
Jmeter Performance TestingJmeter Performance Testing
Jmeter Performance Testing
 
Shuvam dutta
Shuvam duttaShuvam dutta
Shuvam dutta
 
SONAL MITTAL CV
SONAL MITTAL CVSONAL MITTAL CV
SONAL MITTAL CV
 
Ahmed Faraz
Ahmed FarazAhmed Faraz
Ahmed Faraz
 
Shuvam dutta | Performance tester
Shuvam dutta | Performance testerShuvam dutta | Performance tester
Shuvam dutta | Performance tester
 

Recently uploaded

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
kalichargn70th171
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Mind IT Systems
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
AMB-Review
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus
 

Recently uploaded (20)

A Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdfA Comprehensive Look at Generative AI in Retail App Testing.pdf
A Comprehensive Look at Generative AI in Retail App Testing.pdf
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
SOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar Research Team: Latest Activities of IntelBroker
SOCRadar Research Team: Latest Activities of IntelBroker
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdfDominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
Dominate Social Media with TubeTrivia AI’s Addictive Quiz Videos.pdf
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus Compute wth IRI Workflows - GlobusWorld 2024
Globus Compute wth IRI Workflows - GlobusWorld 2024
 

API automation with JMeter + Bamboo CI

  • 1. 1 Skills | Knowledge | CollaborationSkills | Knowledge | Collaboration FunctionalAPIautomationwithJMeter(realcase) by Mykola Kovsh
  • 2. 2 Skills | Knowledge | Collaboration Speaker info Hi, I’m Mykola Kovsh PerformanceTestEngineer Performance Testing Department at Testing Centerof Excellence, Ciklum,Ukraine •Performance/ Automation / Manualtesting www.linkedin.com/in/mykolakovsh/
  • 3. 3 Skills | Knowledge | Collaboration Content 6 Our Results Demo5 Testing Product Description1 Our Problem2 Continuous Integration with JMeter (Bamboo). Reporting4 JMeter as a Solution3 Conclusions7 Links and Q&A session
  • 4. 4 Skills | Knowledge | Collaboration Testing Product Description Client: Mobile / Facebookweb sport betting application Server:Amazon cloud-based application, REST API based Technology stack: Java, Cassandra DB, Unity 3D Product is in active development for near 3years A lot of parsing and integration logic with 3rd-party data providers Frequent releases driven by business needs (startup)
  • 5. 5 Skills | Knowledge | Collaboration Our Problem  We should run full regression REST API functional tests each release  Manual runs took 4-5 days for 2 QAs what did not satisfy business  No QA automation specialist on the project, but we use JMeter for performance testing and have expertise in it  A lot of GUI/usability testing in addition to functional  To sum up:often we did not have time for full functional regression testing before release what resulted in bugs and frequent hotfixes on Production
  • 6. 6 Skills | Knowledge | Collaboration Solution 1: Postman Goodas supplementarytoolfor manualtesting CIintegration Reports convertingtoHTML file Team workoptionbut NOT FREE Incase oftrickyparametrizationandcustom logic, some tool’s issues couldinfluence autotests runs JavaScriptbasicknowledgeis required Hardtomaintainwhen alot oftest-cases Noabilityofparallelruns Reports arenot very comprehensive
  • 7. 7 Skills | Knowledge | Collaboration Solution 2: JMeter. Why for API? Free toolwithlargecommunityandsupport GUI based- fastlearning Customization-throughJMeter API andusing scripting languages Abilitytoreuse functionaltestsforload purposes Abilitytoreuse GUI modulesin different tests Assertions- allowyouto"test"whetheryourapplicationreturnstheresults youexpectit to Paralleltest runs CI integration ComprehensiveHTML reports Basicknowledgeofsomescripting languageandregularexpressionsis required Hardtomaintainonlargeprojects Version control:onlyJMX filescould betracked
  • 8. 8 Skills | Knowledge | Collaboration JMeter: Functional Tests Creation 1. ThreadGroup(user) ->Testset/Testsuite 2. LogicControllers: a) TransactionController->Testsuite/Testcase b) Loop/While/ForEachController c) If Controlleretc. 3. Samplers->Requests(HTTP(s), TCP, SOAP,etc.) 4. Assertions->Testyourresponse/Customize/Parametrize 5. Timers 6. Configurationelements 1 2 3 4 5 6
  • 9. 9 Skills | Knowledge | Collaboration JMeter: Customize/Parametrize/Test Assertion types: JSR223Assertion Response Assertion Duration Assertion SizeAssertion XML Assertion BeanShell Assertion MD5Hex Assertion HTML Assertion XPath Assertion XML Schema Assertion Compare Assertion, etc.
  • 10. 10 Skills | Knowledge | Collaboration Reusable/Modular Scripts Approach To makefunctional testing scripts easy maintainable and reusableuse next JMeter elements: Test Fragment Simple / Transaction Controller Module Controller Parameterized Controller Include Controller
  • 11. 11 Skills | Knowledge | Collaboration Data + Keyword Driven Approach To separatetest scriptsfrom test cases design use next JMeter elements: Test Fragment Switch Controller Simple / Transaction Controller Module Controller ForEach Controller CSV Data Set Config
  • 12. 12 Skills | Knowledge | Collaboration JMeter: Continuous Integration Process and tools: 1. JMeter:functional testing scripts 2. ANTbuild tool: converts results from JTL output files into HTML reports - ANT parses JTL logs using XSLT stylesheet file 3. Bamboo CI tool Development SourceControl Build Unit/IntegrationTesting FunctionalTesting Report
  • 13. 13 Skills | Knowledge | Collaboration What is ANT Apache Ant (Another Neat Tool) is a general purpose build tool. Ant is primarily used for building and deploying Java projects but can be used for every possible repetitive tasks, e.g. generating documentation. A build tool is used to automate repetitive tasks during some process: - compiling source code, - running software tests, - creating files and documentation for the software deployment, etc. Popular build tools in the Java space are Maven, Gradle and Apache Ant.
  • 14. 14 Skills | Knowledge | Collaboration JMeter CI: Approaches ANTstandalone –all steps are executedin ANT build.xml file, using 1 Bamboo Task: • Run JMeter tests • Convert JTL logs to HTML report • Verify test results and pass/fail build PowerShell(console) + ANTcombination –3 Bamboo tasks: • Task1Script:run JMeter tests • Task2ANT: convertJTL log to HTML report • Task3Script:verify results and pass/fail build 1 2
  • 15. 15 Skills | Knowledge | Collaboration CI 2nd Approach: Project Structure
  • 16. 16 Skills | Knowledge | Collaboration Bamboo Task 1: Tests Running del Jmeter_ci_with_antresultstest_report.html del Jmeter_ci_with_antresultsresultlog.jtl ${bamboo.JMETER_HOME}binjmeter.bat -n-tJmeter_ci_with_antJmeter_test_plan.jmx-lJmeter_ci_with_antresultsresultlog.jtl- qJmeter_ci_with_antci_jmeter.properties
  • 17. 17 Skills | Knowledge | Collaboration Bamboo Task 2: HTML Reporting
  • 18. 18 Skills | Knowledge | Collaboration Bamboo Task 2: ANT Build File After tests executed, generate HTML report using build_report.xml file (default name build.xml) Wehave3 <target> here: • report - log process • xslt-report –convertusing XSLTfile • copy_report –move reports to separate folder tokeephistory
  • 19. 19 Skills | Knowledge | Collaboration What is XSLT Wikipedia: XSLT (Extensible Stylesheet Language Transformations) is a language for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subsequently be converted to other formats, such as PDF, PostScript and PNG
  • 20. 20 Skills | Knowledge | Collaboration HTML: XSLT Stylesheet File Update OurImprovements: • Statistics by test suites (threads) and request • Expand/Collapse test suits option • Show only failed transactions filter before after *Origin: http://shanhe.me/node/18/314 *UpdatedXSLT: https://drive.google.com/file/d/0B4SCa_HZT_OOQnoyQjc1TGw0a0E/view?usp=sharing
  • 21. 21 Skills | Knowledge | Collaboration HTML Reporting: Investigate Issue
  • 22. 22 Skills | Knowledge | Collaboration HTML Reporting: Limitation In casedifferentThreadGroupsrununderthe sameTestPlan,theyarenotseparatedin report Todeal withit, wesuggest: 1) RunThreadGroupsconsequently. Itcan takesometime, iftherearea lotofcases 2) orSeparateTest Plans(JMX files) bysomelogic andrun themsimultaneously
  • 23. 23 Skills | Knowledge | Collaboration Bamboo Task 3: Verify results
  • 24. 24 Skills | Knowledge | Collaboration
  • 25. 25 Skills | Knowledge | Collaboration Recommendations 1) Apply decomposition for faster tests runs: -One functional area -One separate Test Plan -Decompose tests runsby jobs inCItool (Bamboo, Jenkins) 2) Runsmoke functional test and, if success, make it trigger full coverage testing run 3) Use Modular approach to create maintainable/reusable scripts 4) Team work:use IncludeControllers to run scripts created by each member 5) UseJSR223Assertion element to customize/parametrize/test yourcustom logic in flexible way 6) UseUserDefined Variables element to create and fast switch between Test/Stage/Prod hosts 7) Shareyourscripts with developers to debug current and new features 8) UseJMeterscripts for Load testing, if needed
  • 26. 26 Skills | Knowledge | Collaboration Disadvantages  Inappropriate for largeprojects/teams  Hard to maintain scripts, if there are lot of them  Scripts version control is absent  Not veryconvenient for large QA team use(if more than 2-3 QAspecialists)  You still need time to learnsome scripting language (and regexp) to create comprehensive scripts with JMeter
  • 27. 27 Skills | Knowledge | Collaboration Our Results For 5 months ~200 (30%) of API functional high priority test cases were automated ~100 regression and ~80 new features bugs found Functional API regression testing period shortened from 5 to 2 days QA team has more time to focus on GUI and cross-platform testing Overall quality of the application was improved and more stable builds released to Prod
  • 28. 28 Skills | Knowledge | Collaboration Conclusions Involve automation QA engineer(s) to implement automation testing on the project within high standards (Python/Java/etc. frameworks) IF Your team/project is relatively small (near 5-8 members) and limited time for full regression runs, to improve product quality you can: • use JMeter automation testing as complement to manual testing • automate high priority API test cases to verify main product functionality -smoke and short acceptance testing • automate new features testing • integrate JMeter API testing into product CI pipeline ELSE
  • 29. 29 Skills | Knowledge | Collaboration
  • 30. 30 Skills | Knowledge | Collaboration Useful Links • Functional Testing with JMeter: https://www.packtpub.com/books/content/functional-testing-jmeter • JMeter как относительно удобноеи практичное средстводля тестирования API: https://habrahabr.ru/post/243097/ • Test cloud-based applications with Apache JMeter: https://www.ibm.com/developerworks/cloud/library/cl-jmeter-restful/#listing3 • JMeter –Continuous Performance Testing –JMeter +ANT +Jenkins Integration –Part1 and 2: http://www.testautomationguru.com/jmeter-continuous- performance-testing-part1/ • JMeter –Creating Modular/Reusable Test Scripts: http://www.testautomationguru.com/jmeter-modularizing-test-scripts/ • JMeter –How tocreate a Data+Keyword Driven Framework for Performance Testing: http://www.testautomationguru.com/jmeter-how-to-create-a-data-keyword- driven-framework-for-performance-testing/ • How toUse JMeter Assertions in Three Easy Steps: https://www.blazemeter.com/blog/how-use-jmeter-assertions-3-easy-steps • Acollection ofresources covering different aspects of JMeter usage: https://github.com/aliesbelik/awesome-jmeter