BDD Approach with Karate
Framework in Service Tests
Umit Ozdemir
Test Automation Engineer
22 July 2020
kloia is a solution provider that
moves you onto the new-era in
DevOps, Cloud and architecture.
30+ consultants in DevOps,
architecture, cloud, test, microservices
and product development
Partnerships with leading
platforms and tools
Offices in London and
Istanbul, clients from 9
countries
USA
Kloia in a Nutshell
Customers from:
DevOps/DevSecOps
Cloud/Kubernetes
Microservices/Software Architecture
Test Automation
Big Data
UK Germany
Finland Austria
Turkey
Malta Tanzania
UAE
BDD Approach with Karate Framework in Service Tests
Test Approaches in Software
Behaviour Driven Development
Web Service & Web Service Testing
Karate Framework
Demo
Test Approaches in Software
Test Driven Development
Data Driven Development
Acceptance Test Driven Development
Behaviour Driven Development
Behaviour Driven Development
Scenario: Order by credit card
Given buyer logged in
When buyer pay by credit card
Then buyer should see the thanks page
Then(/^buyer should see the thanks page$/) do
page.should have_text('Thanks for your shopping')
end
Test Pyramid
Web Service & Web Service Testing
What are Web Services?
What are Web Service Protocols?
What is Web Service Testing?
Why is Web Service Testing Required?
Karate Framework
Peter Thomas - 2017
Open-Source
37 Contributors
Java
Mocks, Performance & UI tests in one
JSON & XML assertions
BDD
Karate Framework
@done @ldap_auth
Scenario: LDAP Authentication
Given url apiUrl + loginPath
And request user
When method POST
Then status 201
Karate Framework
Build
Execution
Configure
Reports
Karate Framework
Before / After Hooks
Transforms
Loops
HTTP Basic Auth
Header Manipulation
Karate Framework
Variables Actions HTTP Request Response Assert
def assert url param response match ==
table call request header responseHeaders match =!
xml get method cookie responseStatus match contains
csv set path form field responseCookies match header
json replace status headers responseTime match each
yaml read() soap action params responseType contains
Demo
/ kloia_com
Q&A
daas.kloia.com/test-automation
Presentation
Thank you!
/ kloia_com

BDD Approach with Karate Framework in Service Tests

  • 1.
    BDD Approach withKarate Framework in Service Tests Umit Ozdemir Test Automation Engineer 22 July 2020
  • 2.
    kloia is asolution provider that moves you onto the new-era in DevOps, Cloud and architecture. 30+ consultants in DevOps, architecture, cloud, test, microservices and product development Partnerships with leading platforms and tools Offices in London and Istanbul, clients from 9 countries
  • 3.
    USA Kloia in aNutshell Customers from: DevOps/DevSecOps Cloud/Kubernetes Microservices/Software Architecture Test Automation Big Data UK Germany Finland Austria Turkey Malta Tanzania UAE
  • 4.
    BDD Approach withKarate Framework in Service Tests Test Approaches in Software Behaviour Driven Development Web Service & Web Service Testing Karate Framework Demo
  • 5.
    Test Approaches inSoftware Test Driven Development Data Driven Development Acceptance Test Driven Development Behaviour Driven Development
  • 6.
    Behaviour Driven Development Scenario:Order by credit card Given buyer logged in When buyer pay by credit card Then buyer should see the thanks page Then(/^buyer should see the thanks page$/) do page.should have_text('Thanks for your shopping') end
  • 7.
  • 8.
    Web Service &Web Service Testing What are Web Services? What are Web Service Protocols? What is Web Service Testing? Why is Web Service Testing Required?
  • 9.
    Karate Framework Peter Thomas- 2017 Open-Source 37 Contributors Java Mocks, Performance & UI tests in one JSON & XML assertions BDD
  • 10.
    Karate Framework @done @ldap_auth Scenario:LDAP Authentication Given url apiUrl + loginPath And request user When method POST Then status 201
  • 11.
  • 12.
    Karate Framework Before /After Hooks Transforms Loops HTTP Basic Auth Header Manipulation
  • 13.
    Karate Framework Variables ActionsHTTP Request Response Assert def assert url param response match == table call request header responseHeaders match =! xml get method cookie responseStatus match contains csv set path form field responseCookies match header json replace status headers responseTime match each yaml read() soap action params responseType contains
  • 14.
  • 15.
  • 16.