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...

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

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
MCP empowers AI Agents from Zero to Production
PDF
Module 1 - Introduction to Generative AI.pdf
PDF
Difference Between Website and Web Application.pdf
PDF
Mobile App Backend Development with WordPress REST API: The Complete eBook
PPTX
Comprehensive Guide to Digital Image Processing Concepts and Applications
PPTX
ROI from Efficient Content & Campaign Management in the Digital Media Industry
PPTX
Foundations of Marketo Engage: Nurturing
PPTX
Human Computer Interaction lecture Chapter 2.pptx
PPTX
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
PDF
Top 10 Project Management Software for Small Teams in 2025.pdf
PDF
Top AI Tools for Project Managers: My 2025 AI Stack
PPTX
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
PDF
Understanding the Need for Systemic Change in Open Source Through Intersectio...
PDF
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
PDF
Coding with GPT-5- What’s New in GPT 5 That Benefits Developers.pdf
PPTX
ESDS_SAP Application Cloud Offerings.pptx
PDF
How to Set Realistic Project Milestones and Deadlines
PDF
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
PPTX
StacksandQueuesCLASS 12 COMPUTER SCIENCE.pptx
PDF
IT Consulting Services to Secure Future Growth
MCP empowers AI Agents from Zero to Production
Module 1 - Introduction to Generative AI.pdf
Difference Between Website and Web Application.pdf
Mobile App Backend Development with WordPress REST API: The Complete eBook
Comprehensive Guide to Digital Image Processing Concepts and Applications
ROI from Efficient Content & Campaign Management in the Digital Media Industry
Foundations of Marketo Engage: Nurturing
Human Computer Interaction lecture Chapter 2.pptx
Post-Migration Optimization Playbook: Getting the Most Out of Your New Adobe ...
Top 10 Project Management Software for Small Teams in 2025.pdf
Top AI Tools for Project Managers: My 2025 AI Stack
Bandicam Screen Recorder 8.2.1 Build 2529 Crack
Understanding the Need for Systemic Change in Open Source Through Intersectio...
WhatsApp Chatbots The Key to Scalable Customer Support.pdf
Coding with GPT-5- What’s New in GPT 5 That Benefits Developers.pdf
ESDS_SAP Application Cloud Offerings.pptx
How to Set Realistic Project Milestones and Deadlines
Ragic Data Security Overview: Certifications, Compliance, and Network Safegua...
StacksandQueuesCLASS 12 COMPUTER SCIENCE.pptx
IT Consulting Services to Secure Future Growth

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: [email protected] • 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