SlideShare a Scribd company logo
1 of 57
Download to read offline
qaware.de
Endlich gute API Tests
Boldly Testing APIs Where No One Has
Tested Before
Ildikó Tárkányi
ildiko.tarkanyi@qaware.de
Ildikó Tárkányi
Senior Software Engineer @ QAware GmbH 2
QAware
Sonja Wegner
Lead Software Architect @ QAware GmbH 3
QAware
API Tests
5
QAware
6
QAware
7
QAware
8
QAware
9
QAware
10
QAware
11
QAware
12
QAware
Spezifikation/Schema Testing
14
QAware
openValidation
16
QAware
17
QAware
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
responses:
'200':
description: Speaker added successfully
18
QAware
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
19
QAware
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
responses:
'200':
description: Speaker added successfully
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
20
QAware
Schlüsselwörter
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
responses:
'200':
description: Speaker added successfully
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
21
QAware
Schlüsselwörter
Schema-Attribute
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
responses:
'200':
description: Speaker added successfully
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
22
QAware
Schlüsselwörter
Schema-Attribute
Operanden
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
responses:
'200':
description: Speaker added successfully
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
23
QAware
Schlüsselwörter
Schema-Attribute
Operanden
domänenspezifische Operatoren
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
responses:
'200':
description: Speaker added successfully
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
IF Name IS NOT Ildikó Tárkányi
AND Email DOES NOT CONTAIN @qaware.de
THEN Please register with your full name and business e-mail address
responses:
'200':
description: Speaker added successfully
24
QAware
Fehlermeldung
Schlüsselwörter
Schema-Attribute
Operanden
domänenspezifische Operatoren
openapi: 3.0.3
info:
version: 1.0.0
title: Conference Management Service
paths:
/speakers:
post:
requestBody:
content:
application/json:
schema:
properties:
Name:
type: string
Email:
type: number
x-ov-rules:
culture: en
rule: |
responses:
'200':
description: Speaker added successfully
Stoplight - Spectral
26
QAware
27
QAware
extends: ["spectral:oas", "spectral:asyncapi"]
formats: ["oas3"]
documentationUrl: https://www.example.com/docs/api-style-guide.md
parserOptions:
duplicateKeys: warn # error is the default value
aliases:
Paths:
- "$.paths[*]~"
rules:
paths-kebab-case:
description: Paths should be kebab-case.
message: "{{property}} should be kebab-case (lower-case and separated with hyphens)"
severity: warn
formats: ["oas3"]
given: "#Paths"
then:
function: pattern
functionOptions:
match: "^(/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"
28
QAware
extends: ["spectral:oas", "spectral:asyncapi"]
formats: ["oas3"]
documentationUrl: https://www.example.com/docs/api-style-guide.md
parserOptions:
duplicateKeys: warn # error is the default value
aliases:
Paths:
- "$.paths[*]~"
rules:
paths-kebab-case:
description: Paths should be kebab-case.
message: "{{property}} should be kebab-case (lower-case and separated with hyphens)"
severity: warn
formats: ["oas3"]
given: "#Paths"
then:
function: pattern
functionOptions:
match: "^(/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"
29
QAware
extends: ["spectral:oas", "spectral:asyncapi"]
formats: ["oas3"]
documentationUrl: https://www.example.com/docs/api-style-guide.md
parserOptions:
duplicateKeys: warn # error is the default value
aliases:
Paths:
- "$.paths[*]~"
rules:
paths-kebab-case:
description: Paths should be kebab-case.
message: "{{property}} should be kebab-case (lower-case and separated with hyphens)"
severity: warn
formats: ["oas3"]
given: "#Paths"
then:
function: pattern
functionOptions:
match: "^(/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"
30
QAware
B:.
├───stoplight
│
└───spectral
.spectral.yaml
myOpenAPI.yaml
B:stoplightspectral> spectral lint myOpenAPI.yaml
8:10 warning operation-description Operation "description" must be present and non-empty string.
paths./speakers.post
8:10 warning operation-operationId Operation must have "operationId".
paths./speakers.post
8:10 warning operation-tags Operation must have non-empty "tags" array.
paths./speakers.post
✖ 3 problems (0 errors, 3 warnings, 0 infos, 0 hints)
31
QAware
Contract Testing
33
QAware
34
QAware
pact
36
QAware
{
"metadata": {...},
"provider": {
"name": "speaker-provider"
},
"consumer": {
"name": "speaker-consumer"
},
"interactions": [
{
"description": "A GET request for a speaker",
"request": {
"method": "GET",
"path": "/speakers/some-name"
},
"response": {
"status": 200,
"headers": {
"Content-Type": "application/json"
},
"body": {
"name": "some-name",
"email": "some-email"
}
}
},
{...}
]
}
37
QAware
1
2
3
4
38
QAware
@PactTestFor(providerName = "speaker-provider", hostInterface = "localhost")
public class SpeakerProviderPactTest {
@Pact(consumer = "agenda-consumer", provider = "speaker-provider")
public V4Pact createPactForSpeakerInteractions(PactDslWithProvider builder) {
PactDslJsonBody newSpeakerRequestBody = new PactDslJsonBody();
newSpeakerRequestBody.stringValue("name", "new-name")
.stringValue("email", "new-email")
.closeObject();
return builder
.uponReceiving("A POST request to add a speaker")
.path("/speakers")
.method(HttpMethod.POST)
.headers("Content-Type", "application/json")
.body(newSpeakerRequestBody)
.willRespondWith()
.status(204)
.toPact(V4Pact.class);
}
}
39
QAware
@Test
@PactTestFor
public void testSpeakerInteractions() {
HttpHeaders httpHeaders = new HttpHeaders();
httpHeaders.setContentType(MediaType.APPLICATION_JSON);
String jsonBody = "{"name": "new-name", "email": "new-email"}";
ResponseEntity<String> postResponse = new RestTemplate().exchange(
mockProvider.getUrl() + "/speakers",
HttpMethod.POST,
new HttpEntity<>(jsonBody, httpHeaders),
String.class
);
assertThat(postResponse.getStatusCode().value()).isEqualTo(204);
}
40
QAware
41
QAware
@Provider("speaker-provider")
@PactFolder("pacts")
class SpeakerProviderPactTest {
@BeforeEach
void setup(PactVerificationContext context) {
context.setTarget(new HttpTestTarget("localhost", 8080));
}
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void pactVerificationTestTemplate(PactVerificationContext context) {
context.verifyInteraction();
}
}
42
QAware
43
QAware
44
QAware
@Provider("speaker-provider")
@PactBroker(url = "http://localhost:9292")
class SpeakerProviderPactTest {
@BeforeEach
void setup(PactVerificationContext context) {
context.setTarget(new HttpTestTarget("localhost", 8080));
}
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void pactVerificationTestTemplate(PactVerificationContext context) {
context.verifyInteraction();
}
}
45
QAware
Trace-Testing
47
QAware
Tracetest
49
QAware
50
QAware
51
QAware
52
QAware
53
QAware
54
QAware
type: Test
spec:
id: Ugtm74WIg
name: speakers - POST
description: Create new speaker
trigger:
type: http
httpRequest:
method: POST
url: http://provider-service:8080/speakers
body: "{n "name": "some-name",n "email": "some-email"n}"
headers:
- key: Content-Type
value: application/json
specs:
- selector: span[tracetest.span.type="http"]
name: "Http span: response status code is 204"
assertions:
- attr:http.status_code = 204
- selector: span[tracetest.span.type="database"]
name: "Database span: processing time is less than 100ms"
assertions:
- attr:tracetest.span.duration < 100ms
- selector: span[tracetest.span.type="general" name="Tracetest trigger"]
name: "Trigger span: response time is less than 200ms"
assertions:
- attr:tracetest.span.duration < 200ms
55
QAware
B:.
├───tracetest
speakers_post.yaml
PS B:api-testing-demotracetest> tracetest run test --file speakers_post.yaml --output pretty
✔ speakers - POST (http://localhost:11633/test/Ugtm74WIg/run/42/test) - trace id: af60f652b4097a13120f001df3da4edd
✔ Http span: response status code is 204
✔ Database span: processing time is less than 100ms
✔ Trigger span: response time is less than 200ms
56
QAware
qaware.de
QAware GmbH
Aschauer Straße 32
81549 München
Tel. +49 89 232315-0
info@qaware.de
twitter.com/qaware
linkedin.com/company/qaware-gmbh
xing.com/companies/qawaregmbh
slideshare.net/qaware
github.com/qaware
Conclusion and Q&A

More Related Content

Similar to Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.

apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays
 
Kasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsKasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsLibbySchulze
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbsAWS Chicago
 
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADSKNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADSElad Hirsch
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIsJoe Cropper
 
Ninad cucumber rails
Ninad cucumber railsNinad cucumber rails
Ninad cucumber railsninad23p
 
How to Write IAC for Serverless
How to Write IAC for ServerlessHow to Write IAC for Serverless
How to Write IAC for ServerlessRyan Jones
 
Presentation kyushu-2018
Presentation kyushu-2018Presentation kyushu-2018
Presentation kyushu-2018masahitojp
 
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Daniel Bryant
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Rackspace Academy
 
Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Jose Luis Martínez
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Guido Schmutz
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaManish Pandit
 
Document Conversion & Retrieve and Rank 一問一答
Document Conversion & Retrieve and Rank 一問一答Document Conversion & Retrieve and Rank 一問一答
Document Conversion & Retrieve and Rank 一問一答Hisashi Komine
 
AWS Serverless concepts and solutions
AWS Serverless concepts and solutionsAWS Serverless concepts and solutions
AWS Serverless concepts and solutionsElenaIvannikova3
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Ontico
 
CloudFormation experience
CloudFormation experienceCloudFormation experience
CloudFormation experienceVitebsk Miniq
 
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewOpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewMaría Angélica Bracho
 

Similar to Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before. (20)

apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauretapidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
apidays LIVE Paris - The Augmented API Design Reviewer by Arnaud Lauret
 
Kasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applicationsKasten securing access to your kubernetes applications
Kasten securing access to your kubernetes applications
 
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
Serverless Framework Workshop - Tyler Hendrickson, Chicago/burbs
 
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADSKNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
KNATIVE - DEPLOY, AND MANAGE MODERN CONTAINER-BASED SERVERLESS WORKLOADS
 
Ams adapters
Ams adaptersAms adapters
Ams adapters
 
Working with PowerVC via its REST APIs
Working with PowerVC via its REST APIsWorking with PowerVC via its REST APIs
Working with PowerVC via its REST APIs
 
Ninad cucumber rails
Ninad cucumber railsNinad cucumber rails
Ninad cucumber rails
 
How to Write IAC for Serverless
How to Write IAC for ServerlessHow to Write IAC for Serverless
How to Write IAC for Serverless
 
Presentation kyushu-2018
Presentation kyushu-2018Presentation kyushu-2018
Presentation kyushu-2018
 
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
Canadian CNCF: "Emissary-ingress 101: An introduction to the CNCF incubation-...
 
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
Software as a Service workshop / Unlocked: the Hybrid Cloud 12th May 2014
 
Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014Building an aws sdk for Perl - Granada Perl Workshop 2014
Building an aws sdk for Perl - Granada Perl Workshop 2014
 
Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !Apache Kafka - Scalable Message-Processing and more !
Apache Kafka - Scalable Message-Processing and more !
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
 
Document Conversion & Retrieve and Rank 一問一答
Document Conversion & Retrieve and Rank 一問一答Document Conversion & Retrieve and Rank 一問一答
Document Conversion & Retrieve and Rank 一問一答
 
AWS Serverless concepts and solutions
AWS Serverless concepts and solutionsAWS Serverless concepts and solutions
AWS Serverless concepts and solutions
 
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)Mасштабирование микросервисов на Go, Matt Heath (Hailo)
Mасштабирование микросервисов на Go, Matt Heath (Hailo)
 
Pyrax talk
Pyrax talkPyrax talk
Pyrax talk
 
CloudFormation experience
CloudFormation experienceCloudFormation experience
CloudFormation experience
 
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewOpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
 

More from QAware GmbH

50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdfQAware GmbH
 
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...QAware GmbH
 
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN MainzFully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN MainzQAware GmbH
 
Down the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile ArchitectureDown the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile ArchitectureQAware GmbH
 
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!QAware GmbH
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringQAware GmbH
 
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit PlaywrightDer Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit PlaywrightQAware GmbH
 
Was kommt nach den SPAs
Was kommt nach den SPAsWas kommt nach den SPAs
Was kommt nach den SPAsQAware GmbH
 
Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo QAware GmbH
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...QAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster QAware GmbH
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!QAware GmbH
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s AutoscalingQAware GmbH
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPQAware GmbH
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.QAware GmbH
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s AutoscalingQAware GmbH
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.QAware GmbH
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysQAware GmbH
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster QAware GmbH
 
How to speed up Spring Integration Tests
How to speed up Spring Integration TestsHow to speed up Spring Integration Tests
How to speed up Spring Integration TestsQAware GmbH
 

More from QAware GmbH (20)

50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf50 Shades of K8s Autoscaling #JavaLand24.pdf
50 Shades of K8s Autoscaling #JavaLand24.pdf
 
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
Make Agile Great - PM-Erfahrungen aus zwei virtuellen internationalen SAFe-Pr...
 
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN MainzFully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
Fully-managed Cloud-native Databases: The path to indefinite scale @ CNN Mainz
 
Down the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile ArchitectureDown the Ivory Tower towards Agile Architecture
Down the Ivory Tower towards Agile Architecture
 
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!"Mixed" Scrum-Teams – Die richtige Mischung macht's!
"Mixed" Scrum-Teams – Die richtige Mischung macht's!
 
Make Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform EngineeringMake Developers Fly: Principles for Platform Engineering
Make Developers Fly: Principles for Platform Engineering
 
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit PlaywrightDer Tod der Testpyramide? – Frontend-Testing mit Playwright
Der Tod der Testpyramide? – Frontend-Testing mit Playwright
 
Was kommt nach den SPAs
Was kommt nach den SPAsWas kommt nach den SPAs
Was kommt nach den SPAs
 
Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo Cloud Migration mit KI: der Turbo
Cloud Migration mit KI: der Turbo
 
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See... Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
Migration von stark regulierten Anwendungen in die Cloud: Dem Teufel die See...
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!Kubernetes with Cilium in AWS - Experience Report!
Kubernetes with Cilium in AWS - Experience Report!
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAPKontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
Kontinuierliche Sicherheitstests für APIs mit Testkube und OWASP ZAP
 
Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.Service Mesh Pain & Gain. Experiences from a client project.
Service Mesh Pain & Gain. Experiences from a client project.
 
50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling50 Shades of K8s Autoscaling
50 Shades of K8s Autoscaling
 
Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.Blue turns green! Approaches and technologies for sustainable K8s clusters.
Blue turns green! Approaches and technologies for sustainable K8s clusters.
 
Per Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API GatewaysPer Anhalter zu Cloud Nativen API Gateways
Per Anhalter zu Cloud Nativen API Gateways
 
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
Aus blau wird grün! Ansätze und Technologien für nachhaltige Kubernetes-Cluster
 
How to speed up Spring Integration Tests
How to speed up Spring Integration TestsHow to speed up Spring Integration Tests
How to speed up Spring Integration Tests
 

Recently uploaded

Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noidabntitsolutionsrishis
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 

Recently uploaded (20)

2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in NoidaBuds n Tech IT Solutions: Top-Notch Web Services in Noida
Buds n Tech IT Solutions: Top-Notch Web Services in Noida
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 

Endlich gute API Tests. Boldly Testing APIs Where No One Has Tested Before.

  • 1. qaware.de Endlich gute API Tests Boldly Testing APIs Where No One Has Tested Before Ildikó Tárkányi ildiko.tarkanyi@qaware.de
  • 2. Ildikó Tárkányi Senior Software Engineer @ QAware GmbH 2 QAware
  • 3. Sonja Wegner Lead Software Architect @ QAware GmbH 3 QAware
  • 17. 17 QAware openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number responses: '200': description: Speaker added successfully
  • 18. 18 QAware openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully
  • 19. openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully 19 QAware openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number responses: '200': description: Speaker added successfully
  • 20. openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully 20 QAware Schlüsselwörter openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | responses: '200': description: Speaker added successfully
  • 21. openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully 21 QAware Schlüsselwörter Schema-Attribute openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | responses: '200': description: Speaker added successfully
  • 22. openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully 22 QAware Schlüsselwörter Schema-Attribute Operanden openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | responses: '200': description: Speaker added successfully
  • 23. openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully 23 QAware Schlüsselwörter Schema-Attribute Operanden domänenspezifische Operatoren openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | responses: '200': description: Speaker added successfully
  • 24. openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number IF Name IS NOT Ildikó Tárkányi AND Email DOES NOT CONTAIN @qaware.de THEN Please register with your full name and business e-mail address responses: '200': description: Speaker added successfully 24 QAware Fehlermeldung Schlüsselwörter Schema-Attribute Operanden domänenspezifische Operatoren openapi: 3.0.3 info: version: 1.0.0 title: Conference Management Service paths: /speakers: post: requestBody: content: application/json: schema: properties: Name: type: string Email: type: number x-ov-rules: culture: en rule: | responses: '200': description: Speaker added successfully
  • 27. 27 QAware extends: ["spectral:oas", "spectral:asyncapi"] formats: ["oas3"] documentationUrl: https://www.example.com/docs/api-style-guide.md parserOptions: duplicateKeys: warn # error is the default value aliases: Paths: - "$.paths[*]~" rules: paths-kebab-case: description: Paths should be kebab-case. message: "{{property}} should be kebab-case (lower-case and separated with hyphens)" severity: warn formats: ["oas3"] given: "#Paths" then: function: pattern functionOptions: match: "^(/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"
  • 28. 28 QAware extends: ["spectral:oas", "spectral:asyncapi"] formats: ["oas3"] documentationUrl: https://www.example.com/docs/api-style-guide.md parserOptions: duplicateKeys: warn # error is the default value aliases: Paths: - "$.paths[*]~" rules: paths-kebab-case: description: Paths should be kebab-case. message: "{{property}} should be kebab-case (lower-case and separated with hyphens)" severity: warn formats: ["oas3"] given: "#Paths" then: function: pattern functionOptions: match: "^(/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"
  • 29. 29 QAware extends: ["spectral:oas", "spectral:asyncapi"] formats: ["oas3"] documentationUrl: https://www.example.com/docs/api-style-guide.md parserOptions: duplicateKeys: warn # error is the default value aliases: Paths: - "$.paths[*]~" rules: paths-kebab-case: description: Paths should be kebab-case. message: "{{property}} should be kebab-case (lower-case and separated with hyphens)" severity: warn formats: ["oas3"] given: "#Paths" then: function: pattern functionOptions: match: "^(/|[a-z0-9-.]+|{[a-zA-Z0-9_]+})+$"
  • 30. 30 QAware B:. ├───stoplight │ └───spectral .spectral.yaml myOpenAPI.yaml B:stoplightspectral> spectral lint myOpenAPI.yaml 8:10 warning operation-description Operation "description" must be present and non-empty string. paths./speakers.post 8:10 warning operation-operationId Operation must have "operationId". paths./speakers.post 8:10 warning operation-tags Operation must have non-empty "tags" array. paths./speakers.post ✖ 3 problems (0 errors, 3 warnings, 0 infos, 0 hints)
  • 35. pact
  • 36. 36 QAware { "metadata": {...}, "provider": { "name": "speaker-provider" }, "consumer": { "name": "speaker-consumer" }, "interactions": [ { "description": "A GET request for a speaker", "request": { "method": "GET", "path": "/speakers/some-name" }, "response": { "status": 200, "headers": { "Content-Type": "application/json" }, "body": { "name": "some-name", "email": "some-email" } } }, {...} ] }
  • 38. 38 QAware @PactTestFor(providerName = "speaker-provider", hostInterface = "localhost") public class SpeakerProviderPactTest { @Pact(consumer = "agenda-consumer", provider = "speaker-provider") public V4Pact createPactForSpeakerInteractions(PactDslWithProvider builder) { PactDslJsonBody newSpeakerRequestBody = new PactDslJsonBody(); newSpeakerRequestBody.stringValue("name", "new-name") .stringValue("email", "new-email") .closeObject(); return builder .uponReceiving("A POST request to add a speaker") .path("/speakers") .method(HttpMethod.POST) .headers("Content-Type", "application/json") .body(newSpeakerRequestBody) .willRespondWith() .status(204) .toPact(V4Pact.class); } }
  • 39. 39 QAware @Test @PactTestFor public void testSpeakerInteractions() { HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_JSON); String jsonBody = "{"name": "new-name", "email": "new-email"}"; ResponseEntity<String> postResponse = new RestTemplate().exchange( mockProvider.getUrl() + "/speakers", HttpMethod.POST, new HttpEntity<>(jsonBody, httpHeaders), String.class ); assertThat(postResponse.getStatusCode().value()).isEqualTo(204); }
  • 41. 41 QAware @Provider("speaker-provider") @PactFolder("pacts") class SpeakerProviderPactTest { @BeforeEach void setup(PactVerificationContext context) { context.setTarget(new HttpTestTarget("localhost", 8080)); } @TestTemplate @ExtendWith(PactVerificationInvocationContextProvider.class) void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } }
  • 44. 44 QAware @Provider("speaker-provider") @PactBroker(url = "http://localhost:9292") class SpeakerProviderPactTest { @BeforeEach void setup(PactVerificationContext context) { context.setTarget(new HttpTestTarget("localhost", 8080)); } @TestTemplate @ExtendWith(PactVerificationInvocationContextProvider.class) void pactVerificationTestTemplate(PactVerificationContext context) { context.verifyInteraction(); } }
  • 54. 54 QAware type: Test spec: id: Ugtm74WIg name: speakers - POST description: Create new speaker trigger: type: http httpRequest: method: POST url: http://provider-service:8080/speakers body: "{n "name": "some-name",n "email": "some-email"n}" headers: - key: Content-Type value: application/json specs: - selector: span[tracetest.span.type="http"] name: "Http span: response status code is 204" assertions: - attr:http.status_code = 204 - selector: span[tracetest.span.type="database"] name: "Database span: processing time is less than 100ms" assertions: - attr:tracetest.span.duration < 100ms - selector: span[tracetest.span.type="general" name="Tracetest trigger"] name: "Trigger span: response time is less than 200ms" assertions: - attr:tracetest.span.duration < 200ms
  • 55. 55 QAware B:. ├───tracetest speakers_post.yaml PS B:api-testing-demotracetest> tracetest run test --file speakers_post.yaml --output pretty ✔ speakers - POST (http://localhost:11633/test/Ugtm74WIg/run/42/test) - trace id: af60f652b4097a13120f001df3da4edd ✔ Http span: response status code is 204 ✔ Database span: processing time is less than 100ms ✔ Trigger span: response time is less than 200ms
  • 57. qaware.de QAware GmbH Aschauer Straße 32 81549 München Tel. +49 89 232315-0 info@qaware.de twitter.com/qaware linkedin.com/company/qaware-gmbh xing.com/companies/qawaregmbh slideshare.net/qaware github.com/qaware Conclusion and Q&A