SlideShare a Scribd company logo
How to Be a Java Automated Testing
Superstar!
Billy Korando
Oracle - Java Developer Advocate ☕🥑
@BillyKorando
• Ask questions
• Reach out:
Twitter: @BillyKorando
Email: billy.korando@oracle.com
• Key link 👉 https://github.com/wkorando/java-testing-superstar
Important Notes
Copyright © 2021, Oracle and/or its affiliates
2
Copyright © 2021, Oracle and/or its affiliates
3
https://billykorando.com/
My code is perfect!
Why should I waste time writing tests?
Why Write Automated Tests?
Copyright © 2021, Oracle and/or its affiliates
4
• Substantial time and effort to write tests
• Substantial time and effort to maintain tests
🏠
Why Write Automated Tests?
Copyright © 2021, Oracle and/or its affiliates
5
CI/CD Process =>
🧱🧱🧱🧱🧱🧱
🧱🧱🧱🧱🧱🧱🧱🧱
🧱🧱🧱🧱🧱🧱🧱🧱
Automated Tests =>
Deployment Process
Copyright © 2021, Oracle and/or its affiliates
6
🌎
Deploy to Prod
👩💻🧑💻
👨💻
Developers
Commit Code
🔨
Build & Test
Code
✅✅
✅
🛴
Manual Process
Takes hours or days
The code
your code
runs on
The Dependency Iceberg
Copyright © 2021, Oracle and/or its affiliates
7
Your Code
{
• Security patches
• Performance
enhancements
• Feature
enhancements
Manual Test Costs
Copyright © 2021, Oracle and/or its affiliates
8
The high effort of regression testing code
disincentivizes keeping dependencies up-to-date
Deployment Process
Copyright © 2021, Oracle and/or its affiliates
9
🌎
Deploy to Prod
👩💻🧑💻
👨💻
Developers
Commit Code
🔨
Build & Test
Code
✅✅
✅
🏍
Automated Process
Measured in minutes
Auditable 🕵
• Can review test code, reports, and logging
Repeatable ↻
• Can re-run test suite to see if problems persists
• Can run test suite against other code base/version to see if problem exists
Additional Benefits
Copyright © 2021, Oracle and/or its affiliates
10
Whatever gives you confidence to
deploy to PROD without manual
intervention
How Many Automated Test Should I Write?
Copyright © 2021, Oracle and/or its affiliates
11
Manual testing still needed.
But it’s exploratory testing.
Manual Testing
Copyright © 2021, Oracle and/or its affiliates
12
How to be an Automated Testing
Superstar?
Copyright © 2021, Oracle and/or its affiliates
13
✅ Treat Test Code like “Production” Code
✅ Write Human Readable Tests
How to be an Automated Testing Superstar?
Copyright © 2021, Oracle and/or its affiliates
14
• Parallel test execution
• Repeated tests
• Extensions
• Selective disabling
• Default test methods
• And more!
JUnit 5 Not Covered
[Date]
Copyright © 2021, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted
15
AssertJ – Fluent Assertions
Copyright © 2021, Oracle and/or its affiliates
16
AssertJ – Fluent Assertions
Copyright © 2021, Oracle and/or its affiliates
17
✅ Write Reliable Tests
How to be an Automated Testing Superstar?
Copyright © 2021, Oracle and/or its affiliates
18
Test Containers
Copyright © 2021, Oracle and/or its affiliates
19
Test Containers
Copyright © 2021, Oracle and/or its affiliates
20
• Test against local containerized instances of remote services
• Don’t have to worry about:
• Service being down
• Test data going missing
• Maintain local instance
JFRUnit
Copyright © 2021, Oracle and/or its affiliates
21
JFRUnit
Copyright © 2021, Oracle and/or its affiliates
22
• Capture JDK Flight Recorder (JFR) Events to track system performance behavior
• Check JVM behavior consistent across systems and environments
Contract Driven Development (Spring Cloud Contract)
Copyright © 2021, Oracle and/or its affiliates
23
Contract Driven Development (Spring Cloud Contract)
Copyright © 2021, Oracle and/or its affiliates
24
• Contracts validate service fulfill defined behavior
• Contracts can be used to setup up mock of service
Junit 5, Mockito, AssertJ, and Test Containers:
https://github.com/wkorando/welcome-to-junit5-v2
Spring Cloud Contract Example:
https://github.com/wkorando/collaborative-contract-driven-development-2-0
JFRUnit:
https://github.com/wkorando/testing-tuesday/tree/main/xxx-jfr-unit
Code Examples
Copyright © 2021, Oracle and/or its affiliates
25
Thank you
26 Copyright © 2021, Oracle and/or its affiliates
How To Be a Java Automated Testing Superstar

More Related Content

PDF
Prod-Like Integration Testing for Distributed Containerized Applications
PDF
Spring Data JDBC: Beyond the Obvious
PDF
Going Serverless Using the Spring Framework Ecosystem
PDF
Continuous Performance Testing: The New Standard
PDF
Jenkins Reviewbot
PDF
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
PDF
Your own kubernetes castle
PDF
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes
Prod-Like Integration Testing for Distributed Containerized Applications
Spring Data JDBC: Beyond the Obvious
Going Serverless Using the Spring Framework Ecosystem
Continuous Performance Testing: The New Standard
Jenkins Reviewbot
CI and CD Across the Enterprise with Jenkins (devops.com Nov 2014)
Your own kubernetes castle
Next-Generation Cloud Native Apps with Spring Cloud and Kubernetes

What's hot (18)

PPTX
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
PDF
Continuous integration and delivery for java based web applications
PDF
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
PDF
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
PDF
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
PDF
Standardizing Jenkins with CloudBees Jenkins Team
PDF
Scaling Jenkins
PDF
Using Docker for Testing
PPTX
Jenkins - From Continuous Integration to Continuous Delivery
PPTX
Continuous integration using jenkins
PDF
Continuously serving the developer community with Continuous Integration and...
PDF
Introduction to CICD
PPTX
Test Policy and Practices
PPTX
Improving Your Company’s Health with Middleware Takeout
PDF
Demystify LDAP and OIDC Providing Security to Your App on Kubernetes
PDF
Cloud native development without the toil
PPTX
JENKINS Training
PDF
Docker Jenkins Pipeline Tutorial | Microservices Using Docker & Jenkins | Dev...
DOES14 - Gary Gruver - Macy's - Transforming Traditional Enterprise Software ...
Continuous integration and delivery for java based web applications
Anatomy of a Continuous Integration and Delivery (CICD) Pipeline
Pimp your Continuous Delivery Pipeline with Jenkins workflow (W-JAX 14)
Automated Virtualized Testing (AVT) with Docker, Kubernetes, WireMock and Gat...
Standardizing Jenkins with CloudBees Jenkins Team
Scaling Jenkins
Using Docker for Testing
Jenkins - From Continuous Integration to Continuous Delivery
Continuous integration using jenkins
Continuously serving the developer community with Continuous Integration and...
Introduction to CICD
Test Policy and Practices
Improving Your Company’s Health with Middleware Takeout
Demystify LDAP and OIDC Providing Security to Your App on Kubernetes
Cloud native development without the toil
JENKINS Training
Docker Jenkins Pipeline Tutorial | Microservices Using Docker & Jenkins | Dev...
Ad

Similar to How To Be a Java Automated Testing Superstar (20)

PDF
Introduction to test automation in java and php
ODP
xUnit and TDD: Why and How in Enterprise Software, August 2012
PDF
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
PDF
3 WAYS TO TEST YOUR COLDFUSION API
PDF
3 WAYS TO TEST YOUR COLDFUSION API -
PPTX
Test-Driven Development
PDF
OUG Ireland Meet-up 12th January
PPTX
Presentation
PDF
Android Test Driven Development & Android Unit Testing
PPSX
PDF
junit-160729073220 eclipse software testing.pdf
PDF
The Evolution of Development Testing
PPTX
unit 1 (1).pptx
PPT
PPTX
Junit5 brujug
PDF
Test driven cloud development using Oracle SOA CS and Oracle Developer CS
PDF
Intro to JavaScript Testing
PPTX
Test Driven Development - a Practitioner’s Perspective
PDF
The Best Java Testing Frameworks to focus in 2021.pdf
PPTX
Open Source Power Tools - Opensouthcode 2018-06-02
Introduction to test automation in java and php
xUnit and TDD: Why and How in Enterprise Software, August 2012
Deliver Faster with BDD/TDD - Designing Automated Tests That Don't Suck
3 WAYS TO TEST YOUR COLDFUSION API
3 WAYS TO TEST YOUR COLDFUSION API -
Test-Driven Development
OUG Ireland Meet-up 12th January
Presentation
Android Test Driven Development & Android Unit Testing
junit-160729073220 eclipse software testing.pdf
The Evolution of Development Testing
unit 1 (1).pptx
Junit5 brujug
Test driven cloud development using Oracle SOA CS and Oracle Developer CS
Intro to JavaScript Testing
Test Driven Development - a Practitioner’s Perspective
The Best Java Testing Frameworks to focus in 2021.pdf
Open Source Power Tools - Opensouthcode 2018-06-02
Ad

More from VMware Tanzu (20)

PDF
Spring into AI presented by Dan Vega 5/14
PDF
What AI Means For Your Product Strategy And What To Do About It
PDF
Make the Right Thing the Obvious Thing at Cardinal Health 2023
PPTX
Enhancing DevEx and Simplifying Operations at Scale
PDF
Spring Update | July 2023
PPTX
Platforms, Platform Engineering, & Platform as a Product
PPTX
Building Cloud Ready Apps
PDF
Spring Boot 3 And Beyond
PDF
Spring Cloud Gateway - SpringOne Tour 2023 Charles Schwab.pdf
PDF
Simplify and Scale Enterprise Apps in the Cloud | Boston 2023
PDF
Simplify and Scale Enterprise Apps in the Cloud | Seattle 2023
PPTX
tanzu_developer_connect.pptx
PDF
Tanzu Virtual Developer Connect Workshop - French
PDF
Tanzu Developer Connect Workshop - English
PDF
Virtual Developer Connect Workshop - English
PDF
Tanzu Developer Connect - French
PDF
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
PDF
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
PDF
SpringOne Tour: The Influential Software Engineer
PDF
SpringOne Tour: Domain-Driven Design: Theory vs Practice
Spring into AI presented by Dan Vega 5/14
What AI Means For Your Product Strategy And What To Do About It
Make the Right Thing the Obvious Thing at Cardinal Health 2023
Enhancing DevEx and Simplifying Operations at Scale
Spring Update | July 2023
Platforms, Platform Engineering, & Platform as a Product
Building Cloud Ready Apps
Spring Boot 3 And Beyond
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 | Seattle 2023
tanzu_developer_connect.pptx
Tanzu Virtual Developer Connect Workshop - French
Tanzu Developer Connect Workshop - English
Virtual Developer Connect Workshop - English
Tanzu Developer Connect - French
Simplify and Scale Enterprise Apps in the Cloud | Dallas 2023
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: The Influential Software Engineer
SpringOne Tour: Domain-Driven Design: Theory vs Practice

Recently uploaded (20)

PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PPTX
L1 - Introduction to python Backend.pptx
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPT
Introduction Database Management System for Course Database
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
System and Network Administraation Chapter 3
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
Transform Your Business with a Software ERP System
PPTX
history of c programming in notes for students .pptx
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Digital Strategies for Manufacturing Companies
PPTX
ai tools demonstartion for schools and inter college
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Design an Analysis of Algorithms II-SECS-1021-03
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Odoo Companies in India – Driving Business Transformation.pdf
2025 Textile ERP Trends: SAP, Odoo & Oracle
Operating system designcfffgfgggggggvggggggggg
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
L1 - Introduction to python Backend.pptx
Wondershare Filmora 15 Crack With Activation Key [2025
Navsoft: AI-Powered Business Solutions & Custom Software Development
Introduction Database Management System for Course Database
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
System and Network Administraation Chapter 3
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Transform Your Business with a Software ERP System
history of c programming in notes for students .pptx
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Digital Strategies for Manufacturing Companies
ai tools demonstartion for schools and inter college
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Design an Analysis of Algorithms II-SECS-1021-03

How To Be a Java Automated Testing Superstar

  • 1. How to Be a Java Automated Testing Superstar! Billy Korando Oracle - Java Developer Advocate ☕🥑 @BillyKorando
  • 2. • Ask questions • Reach out: Twitter: @BillyKorando Email: billy.korando@oracle.com • Key link 👉 https://github.com/wkorando/java-testing-superstar Important Notes Copyright © 2021, Oracle and/or its affiliates 2
  • 3. Copyright © 2021, Oracle and/or its affiliates 3 https://billykorando.com/
  • 4. My code is perfect! Why should I waste time writing tests? Why Write Automated Tests? Copyright © 2021, Oracle and/or its affiliates 4 • Substantial time and effort to write tests • Substantial time and effort to maintain tests
  • 5. 🏠 Why Write Automated Tests? Copyright © 2021, Oracle and/or its affiliates 5 CI/CD Process => 🧱🧱🧱🧱🧱🧱 🧱🧱🧱🧱🧱🧱🧱🧱 🧱🧱🧱🧱🧱🧱🧱🧱 Automated Tests =>
  • 6. Deployment Process Copyright © 2021, Oracle and/or its affiliates 6 🌎 Deploy to Prod 👩💻🧑💻 👨💻 Developers Commit Code 🔨 Build & Test Code ✅✅ ✅ 🛴 Manual Process Takes hours or days
  • 7. The code your code runs on The Dependency Iceberg Copyright © 2021, Oracle and/or its affiliates 7 Your Code { • Security patches • Performance enhancements • Feature enhancements
  • 8. Manual Test Costs Copyright © 2021, Oracle and/or its affiliates 8 The high effort of regression testing code disincentivizes keeping dependencies up-to-date
  • 9. Deployment Process Copyright © 2021, Oracle and/or its affiliates 9 🌎 Deploy to Prod 👩💻🧑💻 👨💻 Developers Commit Code 🔨 Build & Test Code ✅✅ ✅ 🏍 Automated Process Measured in minutes
  • 10. Auditable 🕵 • Can review test code, reports, and logging Repeatable ↻ • Can re-run test suite to see if problems persists • Can run test suite against other code base/version to see if problem exists Additional Benefits Copyright © 2021, Oracle and/or its affiliates 10
  • 11. Whatever gives you confidence to deploy to PROD without manual intervention How Many Automated Test Should I Write? Copyright © 2021, Oracle and/or its affiliates 11
  • 12. Manual testing still needed. But it’s exploratory testing. Manual Testing Copyright © 2021, Oracle and/or its affiliates 12
  • 13. How to be an Automated Testing Superstar? Copyright © 2021, Oracle and/or its affiliates 13
  • 14. ✅ Treat Test Code like “Production” Code ✅ Write Human Readable Tests How to be an Automated Testing Superstar? Copyright © 2021, Oracle and/or its affiliates 14
  • 15. • Parallel test execution • Repeated tests • Extensions • Selective disabling • Default test methods • And more! JUnit 5 Not Covered [Date] Copyright © 2021, Oracle and/or its affiliates | Confidential: Internal/Restricted/Highly Restricted 15
  • 16. AssertJ – Fluent Assertions Copyright © 2021, Oracle and/or its affiliates 16
  • 17. AssertJ – Fluent Assertions Copyright © 2021, Oracle and/or its affiliates 17
  • 18. ✅ Write Reliable Tests How to be an Automated Testing Superstar? Copyright © 2021, Oracle and/or its affiliates 18
  • 19. Test Containers Copyright © 2021, Oracle and/or its affiliates 19
  • 20. Test Containers Copyright © 2021, Oracle and/or its affiliates 20 • Test against local containerized instances of remote services • Don’t have to worry about: • Service being down • Test data going missing • Maintain local instance
  • 21. JFRUnit Copyright © 2021, Oracle and/or its affiliates 21
  • 22. JFRUnit Copyright © 2021, Oracle and/or its affiliates 22 • Capture JDK Flight Recorder (JFR) Events to track system performance behavior • Check JVM behavior consistent across systems and environments
  • 23. Contract Driven Development (Spring Cloud Contract) Copyright © 2021, Oracle and/or its affiliates 23
  • 24. Contract Driven Development (Spring Cloud Contract) Copyright © 2021, Oracle and/or its affiliates 24 • Contracts validate service fulfill defined behavior • Contracts can be used to setup up mock of service
  • 25. Junit 5, Mockito, AssertJ, and Test Containers: https://github.com/wkorando/welcome-to-junit5-v2 Spring Cloud Contract Example: https://github.com/wkorando/collaborative-contract-driven-development-2-0 JFRUnit: https://github.com/wkorando/testing-tuesday/tree/main/xxx-jfr-unit Code Examples Copyright © 2021, Oracle and/or its affiliates 25
  • 26. Thank you 26 Copyright © 2021, Oracle and/or its affiliates