The Java ecosystem is very rich both for production and testing code; testing code is just as important as producing code. In this session, we’ll explore how to fake out REST APIs to test out client code; fake out REST clients to test out server code; write better parameterized tests; take care of concurrency related events; spy/mock/stub out collaborators to ensure cleaner and isolated tests; and more.
6. ixchelruiz
WHAT? WHY? WHO? WHEN?
REpresentational State Transfer.
“Architectural style for distributed hypermedia
systems, as it has been developed to represent the
model for how the modern Web should work. REST
provides a set of architectural constraints that,
when applied as a whole, emphasizes scalability of
component interactions, generality of interfaces,
independent deployment of components, and
intermediary components to reduce interaction
latency, enforce security, and encapsulate legacy
systems”
7. ixchelruiz
WHAT? WHY? WHO? WHEN?
REpresentational State Transfer.
“Architectural style for distributed hypermedia
systems, as it has been developed to represent the
model for how the modern Web should work. REST
provides a set of architectural constraints that,
when applied as a whole, emphasizes scalability of
component interactions, generality of interfaces,
independent deployment of components, and
intermediary components to reduce interaction
latency, enforce security, and encapsulate legacy
systems”
8. ixchelruiz
WHAT? WHY? WHO? WHEN?
REpresentational State Transfer.
“Architectural style for distributed hypermedia
systems, as it has been developed to represent the
model for how the modern Web should work. REST
provides a set of architectural constraints that,
when applied as a whole, emphasizes scalability of
component interactions, generality of interfaces,
independent deployment of components, and
intermediary components to reduce interaction
latency, enforce security, and encapsulate legacy
systems”
— Roy Thomas Fielding
https://www.ics.uci.edu/~fielding/pubs/dissertation/web_arch_domain.htm
9. ixchelruiz
WHAT? WHO? WHY? WHEN?
REpresentational State Transfer.
“Architectural style for distributed hypermedia
systems, as it has been developed to represent the
model for how the modern Web should work. REST
provides a set of architectural constraints that,
when applied as a whole, emphasizes scalability of
component interactions, generality of interfaces,
independent deployment of components, and
intermediary components to reduce interaction
latency, enforce security, and encapsulate legacy
systems”
— Roy Thomas Fielding (2000)
https://www.ics.uci.edu/~fielding/pubs/dissertation/web_arch_domain.htm
14. ixchelruiz
WHAT? WHY? WHO? WHEN?
“Define a standard, language-agnostic interface to
REST APIs which allows both humans and
computers to discover and understand the
capabilities of the service without access to source
code, documentation, or through network traffic
inspection. When properly defined via OpenAPI, a
consumer can understand and interact with the
remote service with a minimal amount of
implementation logic.”
15. ixchelruiz
WHAT? WHY? WHO? WHEN?
“Define a standard, language-agnostic interface to
REST APIs which allows both humans and
computers to discover and understand the
capabilities of the service without access to source
code, documentation, or through network traffic
inspection. When properly defined via OpenAPI, a
consumer can understand and interact with the
remote service with a minimal amount of
implementation logic.”
#vendorNeutral #portable #open #specification #technical
#metadata
16. ixchelruiz
WHAT? WHY? WHO? WHEN?
“Define a standard, language-agnostic interface to
REST APIs which allows both humans and
computers to discover and understand the
capabilities of the service without access to source
code, documentation, or through network traffic
inspection. When properly defined via OpenAPI, a
consumer can understand and interact with the
remote service with a minimal amount of
implementation logic.”
#vendorNeutral #portable #open #specification #technical
#metadata
— OpenApi Initiative
17. ixchelruiz
WHAT? WHO? WHY? WHEN?
“Define a standard, language-agnostic interface to
REST APIs which allows both humans and
computers to discover and understand the
capabilities of the service without access to source
code, documentation, or through network traffic
inspection. When properly defined via OpenAPI, a
consumer can understand and interact with the
remote service with a minimal amount of
implementation logic.”
#vendorNeutral #portable #open #specification #technical
#metadata
— OpenApi Initiative (Jul 26, 2017)
19. ixchelruiz
WHAT? WHY? WHO? WHEN?
“The OpenAPI Initiative (OAI) was created by a
consortium of forward-looking industry experts
who recognize the immense value of standardizing
on how REST APIs are described. Provides an open
source, technical community, within which industry
participants may easily contribute to building a
vendor-neutral, portable and open specification for
providing technical metadata for REST APIs. The
OAI is a collaborative project under the guidance of
the The Linux Foundation”
20. ixchelruiz
WHAT? WHY? WHO? WHEN?
“The OpenAPI Initiative (OAI) was created by a
consortium of forward-looking industry experts
who recognize the immense value of standardizing
on how REST APIs are described. Provides an open
source, technical community, within which
industry participants may easily contribute to
building a vendor-neutral, portable and open
specification for providing technical metadata for
REST APIs. The OAI is a collaborative project under
the guidance of the The Linux Foundation”
25. ixchelruiz
OPEN API 3.0
“Define a standard, language-agnostic interface to
REST APIs which allows both humans and
computers to discover and understand the
capabilities of the service without access to source
code, documentation, or through network traffic
inspection. When properly defined via OpenAPI,
a consumer can understand and interact with the
remote service with a minimal amount of
implementation logic.”
— Open API Initiative
26. ixchelruiz
OPEN API 3.0
“Define a standard, language-agnostic interface to
REST APIs which allows both humans and
computers to discover and understand the
capabilities of the service without access to source
code, documentation, or through network traffic
inspection. When properly defined via OpenAPI,
a consumer can understand and interact with the
remote service with a minimal amount of
implementation logic.”
— Open API Initiative