SlideShare uma empresa Scribd logo
1 de 17
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/bootiful_reactive.m4v
Bootiful Reactive Testing & CDC w/ Spring Boot
mgray@pivotal.io ~ ❯❯❯ $ whoami
Name: MarioGray
Role: Developer Advocate / Principal Technologist
Twitter: @mariogray
Code/Github: https://www.github.com/marios-code-path/bootiful-testing
mgray@pivotal.io ~ ❯❯❯ $ history | xargs jobs
… more history ...
2006 cat < /var/spool/jobs/EdwardJones > /dev/analyst
2011 write `cat ~/co-authors` “Pro Spring Integration”
2013 mv ~ la ; cat < /var/spool/jobs/NFL_Media > /dev/integrator
2015 cat /var/spool/jobs/MobCrush > /dev/microservices/video/stream
2017 cat /var/spool/jobs/pivotal > /dev/advocate
mgray@pivotal.io ❯❯❯ $ cat /etc/issue
And now for a slide or two about Testing
mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/issue
1. Don’t test trivial code getter/setter - Kent Beck
2. Nothing travels faster than the Speed of Light ;
with the exception of bad news which obeys it’s
own special laws - Douglas Adams (Mostly
Harmless ‘92)
3. CDC’s are invaluable for being able to move fast
without breaking other services and cause a lot of
frustration with other teams - Ham Vocke
mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/bobmartin/laws
1. You are not allowed to write any production code
unless it is to make a failing unit test pass.
2. You are not allowed to write any more of a unit
test than is sufficient to fail; and compilation
failures are test failures.
3. You are not allowed to write any more production
code than is sufficient to pass the one failing unit
test.
mgray@pivotal.io ❯❯❯ $ xargs --show-limits --cdc.verifier
● Spring Cloud Contract Verifier enables Consumer Driven
Contract (CDC) development of JVM-based applications.
● Contract Definition Language (CDL) to produce/generate:
○ JSON stubs used by WireMock when doing client integration.
○ Messaging routes; supports Spring Integration, Spring Cloud
Stream, Spring AMQP, and Apache Camel. Custom integrations.
○ Acceptance tests (in JUnit or Spock) implementation of the API is
compliant with the contract (server tests). Uses RestAssured.
mgray@pivotal.io ❯❯❯ $ xargs --show-limits --cdc.runner
● Stub Runner can automatically download and execute.
● Stub Jars are manageable via centralized repository like
Maven.
● Service Discovery is Stubbable!
○ Takes place for Consul, Eureka, or other Directory
○ Wiremock to back stubbed service discovery when
using Feign, load-balanced Rest-template or
DiscoveryClient.
mgray@pivotal.io ~ ❯❯❯ $ xview /etc/cdc/desc.png
Spring Cloud Contract Locator Format:
mgray@pivotal.io ❯❯❯ $ cat ~/.reactive
Let’s get (re)Active
mgray@pivotal.io ~ ❯❯❯ $ xargs --show-limits --reactive
Core: Fully Non-blocking foundation with efficient demand management. It directly
interacts with Java 8 functional API, Completable Future, Stream and Duration.
Types: Reactor offers [0|1|N] sequences in 2 reactive composable components:
Flux[N] and Mono[0|1] extensively implementing Reactive Extensions.
Comms: Non-Blocking IPC that is suited for Microservices. Reactor IPC offers
backpressure-ready network engines for TCP, UDP, HTTP and WebSockets.
Encoder/Decoder (encoded to POJO) functionality is fully supported.
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/interfaces
Reactive Streams: 4 interfaces
● Publisher<T> // subscribe( sub )
● Subscriber<T> // onSubscribe( sub )
● Subscription // request ( n )
● Processor<T, R> // subscribe (s) && onSubscribe(s)
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/operators
filter( x )
map ( x )
flatMap ( x[][] )
zipWith( x[] )
reduce( i, x )
repeat( )
… And More !
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/mono
Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Mono.html
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/flux
Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Flux.html
Demo Time!
(Reactive Data, Web, then CDC)
mgray@pivotal.io ~ ❯❯❯ $ cat /etc/issue
Say Hello to / / / (Plus the other “usual suspects”)
mgray@pivotal.io ~ ❯❯❯ $ exit
This talk is shutting down in 60 seconds.
Link to this talk: https://www.github.com/marios-code-path/bootiful-testing
Eat pizza, be merry, and code!
BLOG: http://www.sudoinit5.com
Don’t forget to fork() and | bind()
Use your left
Questions?
Here are some helpful resources:
https://github.com/reactor/reactor-ipc/blob/master/src/docs/asciidoc/net.adoc
https://github.com/reactive-ipc/reactive-ipc-jvm
http://www.reactive-streams.org
https://cloud.spring.io/spring-cloud-contract/multi/multi__spring_cloud_contract_verifier_introduction.html
https://projectreactor.io/docs/core
https://martinfowler.com/articles/201701-event-driven.html
http://jonasboner.com/foreword-reactive-design-patterns
https://projectreactor.io/docs/core/snapshot/api
https://github.com/mkheck/FSRx
(R2DBC WIP!: https://github.com/mkheck/coffee-service-r2dbc)

Mais conteúdo relacionado

Mais procurados

Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Roberto Pérez Alcolea
 

Mais procurados (20)

Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition! Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
Battle Of The Microservice Frameworks: Micronaut versus Quarkus edition!
 
Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web Apps
 
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging PlatformsGame of Streams: How to Tame and Get the Most from Your Messaging Platforms
Game of Streams: How to Tame and Get the Most from Your Messaging Platforms
 
Spring Boot Observability
Spring Boot ObservabilitySpring Boot Observability
Spring Boot Observability
 
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
LJC 4/21"Easy Debugging of Java Microservices Running on Kubernetes with Tele...
 
What’s New in Spring Data MongoDB
What’s New in Spring Data MongoDBWhat’s New in Spring Data MongoDB
What’s New in Spring Data MongoDB
 
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
Leveraging Gradle @ Netflix (Madrid GUG Feb 2, 2021)
 
Ingress? That’s So 2020! Introducing the Kubernetes Gateway API
Ingress? That’s So 2020! Introducing the Kubernetes Gateway APIIngress? That’s So 2020! Introducing the Kubernetes Gateway API
Ingress? That’s So 2020! Introducing the Kubernetes Gateway API
 
Spring Boot—Production Boost
Spring Boot—Production BoostSpring Boot—Production Boost
Spring Boot—Production Boost
 
Automating stateful applications with kubernetes operators - Openstack Summit...
Automating stateful applications with kubernetes operators - Openstack Summit...Automating stateful applications with kubernetes operators - Openstack Summit...
Automating stateful applications with kubernetes operators - Openstack Summit...
 
Spring GraphQL
Spring GraphQLSpring GraphQL
Spring GraphQL
 
High Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring BootHigh Performance Microservices with Ratpack and Spring Boot
High Performance Microservices with Ratpack and Spring Boot
 
Unleashing Docker with Pipelines in Bitbucket Cloud
Unleashing Docker with Pipelines in Bitbucket CloudUnleashing Docker with Pipelines in Bitbucket Cloud
Unleashing Docker with Pipelines in Bitbucket Cloud
 
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
Introduction to gRPC - Mete Atamel - Codemotion Rome 2017
 
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
Container Days: Easy Debugging of Microservices Running on Kubernetes with Te...
 
A Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in JavaA Series of Fortunate Events: Building an Operator in Java
A Series of Fortunate Events: Building an Operator in Java
 
BENEFIT OF FLUTTER APP DEVELOPMENT - INFOGRAPHICS
BENEFIT OF FLUTTER APP DEVELOPMENT - INFOGRAPHICSBENEFIT OF FLUTTER APP DEVELOPMENT - INFOGRAPHICS
BENEFIT OF FLUTTER APP DEVELOPMENT - INFOGRAPHICS
 
You Might Just be a Functional Programmer Now
You Might Just be a Functional Programmer NowYou Might Just be a Functional Programmer Now
You Might Just be a Functional Programmer Now
 
You've Made Kubernetes Available to Your Developers, Now What?
You've Made Kubernetes Available to Your Developers, Now What?You've Made Kubernetes Available to Your Developers, Now What?
You've Made Kubernetes Available to Your Developers, Now What?
 
Spring boot wednesday
Spring boot wednesdaySpring boot wednesday
Spring boot wednesday
 

Semelhante a Bootiful Reactive Testing - Mario Gray

Semelhante a Bootiful Reactive Testing - Mario Gray (20)

Bootiful Reactive Testing with Mario Gray
Bootiful Reactive Testing with Mario GrayBootiful Reactive Testing with Mario Gray
Bootiful Reactive Testing with Mario Gray
 
Continuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin StachniukContinuous delivery w projekcie open source - Marcin Stachniuk
Continuous delivery w projekcie open source - Marcin Stachniuk
 
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Denver JUG 2020
 
Dynamic Groovy Edges
Dynamic Groovy EdgesDynamic Groovy Edges
Dynamic Groovy Edges
 
Django Architecture Introduction
Django Architecture IntroductionDjango Architecture Introduction
Django Architecture Introduction
 
Spring boot introduction
Spring boot introductionSpring boot introduction
Spring boot introduction
 
Monitoring using Prometheus and Grafana
Monitoring using Prometheus and GrafanaMonitoring using Prometheus and Grafana
Monitoring using Prometheus and Grafana
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
Not Only Streams for Akademia JLabs
Not Only Streams for Akademia JLabsNot Only Streams for Akademia JLabs
Not Only Streams for Akademia JLabs
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
 
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
Continuous Delivery w projekcie Open Source - Marcin Stachniuk - DevCrowd 2017
 
AppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security AgileAppSec California 2016 - Making Security Agile
AppSec California 2016 - Making Security Agile
 
H2O 3 REST API Overview
H2O 3 REST API OverviewH2O 3 REST API Overview
H2O 3 REST API Overview
 
H2O 3 REST API Overview
H2O 3 REST API OverviewH2O 3 REST API Overview
H2O 3 REST API Overview
 
What's new in Gradle 4.0
What's new in Gradle 4.0What's new in Gradle 4.0
What's new in Gradle 4.0
 
手把手教你如何串接 Log 到各種網路服務
手把手教你如何串接 Log 到各種網路服務手把手教你如何串接 Log 到各種網路服務
手把手教你如何串接 Log 到各種網路服務
 
GE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoTGE Predix 新手入门 赵锴 物联网_IoT
GE Predix 新手入门 赵锴 物联网_IoT
 
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
Monitoring Kafka w/ Prometheus
Monitoring Kafka w/ PrometheusMonitoring Kafka w/ Prometheus
Monitoring Kafka w/ Prometheus
 

Mais de VMware Tanzu

Mais de VMware Tanzu (20)

What AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About ItWhat AI Means For Your Product Strategy And What To Do About It
What AI Means For Your Product Strategy And What To Do About It
 
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023Make the Right Thing the Obvious Thing at Cardinal Health 2023
Make the Right Thing the Obvious Thing at Cardinal Health 2023
 
Enhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at ScaleEnhancing DevEx and Simplifying Operations at Scale
Enhancing DevEx and Simplifying Operations at Scale
 
Spring Update | July 2023
Spring Update | July 2023Spring Update | July 2023
Spring Update | July 2023
 
Platforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a ProductPlatforms, Platform Engineering, & Platform as a Product
Platforms, Platform Engineering, & Platform as a Product
 
Building Cloud Ready Apps
Building Cloud Ready AppsBuilding Cloud Ready Apps
Building Cloud Ready Apps
 
Spring Boot 3 And Beyond
Spring Boot 3 And BeyondSpring Boot 3 And Beyond
Spring Boot 3 And Beyond
 
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdfSpring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
 
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
 
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
 
tanzu_developer_connect.pptx
tanzu_developer_connect.pptxtanzu_developer_connect.pptx
tanzu_developer_connect.pptx
 
Tanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - FrenchTanzu Virtual Developer Connect Workshop - French
Tanzu Virtual Developer Connect Workshop - French
 
Tanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - EnglishTanzu Developer Connect Workshop - English
Tanzu Developer Connect Workshop - English
 
Virtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - EnglishVirtual Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
 
Tanzu Developer Connect - French
Tanzu Developer Connect - FrenchTanzu Developer Connect - French
Tanzu Developer Connect - French
 
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software EngineerSpringOne Tour: The Influential Software Engineer
SpringOne Tour: The Influential Software Engineer
 
SpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs PracticeSpringOne Tour: Domain-Driven Design: Theory vs Practice
SpringOne Tour: Domain-Driven Design: Theory vs Practice
 
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense SolutionsSpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
SpringOne Tour: Spring Recipes: A Collection of Common-Sense Solutions
 

Último

Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
masabamasaba
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Medical / Health Care (+971588192166) Mifepristone and Misoprostol tablets 200mg
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 

Último (20)

MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
Abortion Pills In Pretoria ](+27832195400*)[ 🏥 Women's Abortion Clinic In Pre...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni%in Benoni+277-882-255-28 abortion pills for sale in Benoni
%in Benoni+277-882-255-28 abortion pills for sale in Benoni
 
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
WSO2CON 2024 - Building the API First Enterprise – Running an API Program, fr...
 
What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
%+27788225528 love spells in Knoxville Psychic Readings, Attraction spells,Br...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
WSO2CON 2024 - API Management Usage at La Poste and Its Impact on Business an...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
WSO2Con2024 - From Code To Cloud: Fast Track Your Cloud Native Journey with C...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 

Bootiful Reactive Testing - Mario Gray

  • 1. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/bootiful_reactive.m4v Bootiful Reactive Testing & CDC w/ Spring Boot mgray@pivotal.io ~ ❯❯❯ $ whoami Name: MarioGray Role: Developer Advocate / Principal Technologist Twitter: @mariogray Code/Github: https://www.github.com/marios-code-path/bootiful-testing mgray@pivotal.io ~ ❯❯❯ $ history | xargs jobs … more history ... 2006 cat < /var/spool/jobs/EdwardJones > /dev/analyst 2011 write `cat ~/co-authors` “Pro Spring Integration” 2013 mv ~ la ; cat < /var/spool/jobs/NFL_Media > /dev/integrator 2015 cat /var/spool/jobs/MobCrush > /dev/microservices/video/stream 2017 cat /var/spool/jobs/pivotal > /dev/advocate
  • 2. mgray@pivotal.io ❯❯❯ $ cat /etc/issue And now for a slide or two about Testing
  • 3. mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/issue 1. Don’t test trivial code getter/setter - Kent Beck 2. Nothing travels faster than the Speed of Light ; with the exception of bad news which obeys it’s own special laws - Douglas Adams (Mostly Harmless ‘92) 3. CDC’s are invaluable for being able to move fast without breaking other services and cause a lot of frustration with other teams - Ham Vocke
  • 4. mgray@pivotal.io ❯❯❯ $ cat /etc/tdd/bobmartin/laws 1. You are not allowed to write any production code unless it is to make a failing unit test pass. 2. You are not allowed to write any more of a unit test than is sufficient to fail; and compilation failures are test failures. 3. You are not allowed to write any more production code than is sufficient to pass the one failing unit test.
  • 5. mgray@pivotal.io ❯❯❯ $ xargs --show-limits --cdc.verifier ● Spring Cloud Contract Verifier enables Consumer Driven Contract (CDC) development of JVM-based applications. ● Contract Definition Language (CDL) to produce/generate: ○ JSON stubs used by WireMock when doing client integration. ○ Messaging routes; supports Spring Integration, Spring Cloud Stream, Spring AMQP, and Apache Camel. Custom integrations. ○ Acceptance tests (in JUnit or Spock) implementation of the API is compliant with the contract (server tests). Uses RestAssured.
  • 6. mgray@pivotal.io ❯❯❯ $ xargs --show-limits --cdc.runner ● Stub Runner can automatically download and execute. ● Stub Jars are manageable via centralized repository like Maven. ● Service Discovery is Stubbable! ○ Takes place for Consul, Eureka, or other Directory ○ Wiremock to back stubbed service discovery when using Feign, load-balanced Rest-template or DiscoveryClient.
  • 7. mgray@pivotal.io ~ ❯❯❯ $ xview /etc/cdc/desc.png Spring Cloud Contract Locator Format:
  • 8. mgray@pivotal.io ❯❯❯ $ cat ~/.reactive Let’s get (re)Active
  • 9. mgray@pivotal.io ~ ❯❯❯ $ xargs --show-limits --reactive Core: Fully Non-blocking foundation with efficient demand management. It directly interacts with Java 8 functional API, Completable Future, Stream and Duration. Types: Reactor offers [0|1|N] sequences in 2 reactive composable components: Flux[N] and Mono[0|1] extensively implementing Reactive Extensions. Comms: Non-Blocking IPC that is suited for Microservices. Reactor IPC offers backpressure-ready network engines for TCP, UDP, HTTP and WebSockets. Encoder/Decoder (encoded to POJO) functionality is fully supported.
  • 10. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/interfaces Reactive Streams: 4 interfaces ● Publisher<T> // subscribe( sub ) ● Subscriber<T> // onSubscribe( sub ) ● Subscription // request ( n ) ● Processor<T, R> // subscribe (s) && onSubscribe(s)
  • 11. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/operators filter( x ) map ( x ) flatMap ( x[][] ) zipWith( x[] ) reduce( i, x ) repeat( ) … And More !
  • 12. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/mono Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Mono.html
  • 13. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/reactive/publisher/flux Source: https://projectreactor.io/docs/core/snapshot/api/reactor/core/publisher/Flux.html
  • 14. Demo Time! (Reactive Data, Web, then CDC)
  • 15. mgray@pivotal.io ~ ❯❯❯ $ cat /etc/issue Say Hello to / / / (Plus the other “usual suspects”)
  • 16. mgray@pivotal.io ~ ❯❯❯ $ exit This talk is shutting down in 60 seconds. Link to this talk: https://www.github.com/marios-code-path/bootiful-testing Eat pizza, be merry, and code! BLOG: http://www.sudoinit5.com Don’t forget to fork() and | bind() Use your left
  • 17. Questions? Here are some helpful resources: https://github.com/reactor/reactor-ipc/blob/master/src/docs/asciidoc/net.adoc https://github.com/reactive-ipc/reactive-ipc-jvm http://www.reactive-streams.org https://cloud.spring.io/spring-cloud-contract/multi/multi__spring_cloud_contract_verifier_introduction.html https://projectreactor.io/docs/core https://martinfowler.com/articles/201701-event-driven.html http://jonasboner.com/foreword-reactive-design-patterns https://projectreactor.io/docs/core/snapshot/api https://github.com/mkheck/FSRx (R2DBC WIP!: https://github.com/mkheck/coffee-service-r2dbc)

Notas do Editor

  1. exec(‘/bin/rewrite’) > /dev/profile 2>/dev/null;
  2. Consumer-Driven Contract tests can be a real game changer to establish autonomous teams that can move fast and with confidence. Do yourself a favor, read up on that concept and give it a try. A solid suite of CDC tests is invaluable for being able to move fast without breaking other services and cause a lot of frustration with other teams.
  3. it moves TDD to the level of software architecture.
  4. it moves TDD to the level of software architecture.