Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Practical Cloud-Native Java Development with MicroProfile

You're reading from  Practical Cloud-Native Java Development with MicroProfile

Product type Book
Published in Sep 2021
Publisher Packt
ISBN-13 9781801078801
Pages 404 pages
Edition 1st Edition
Languages
Authors (5):
Emily Jiang Emily Jiang
Profile icon Emily Jiang
Andrew McCright Andrew McCright
Profile icon Andrew McCright
John Alcorn John Alcorn
Profile icon John Alcorn
David Chan David Chan
Profile icon David Chan
Alasdair Nottingham Alasdair Nottingham
Profile icon Alasdair Nottingham
View More author details

Table of Contents (18) Chapters

Preface 1. Section 1: Cloud-Native Applications
2. Chapter 1: Cloud-Native Applications 3. Chapter 2: How Does MicroProfile Fit into Cloud-Native Application Development? 4. Chapter 3: Introducing the IBM Stock Trader Cloud-Native Application 5. Section 2: MicroProfile 4.1 Deep Dive
6. Chapter 4: Developing Cloud-Native Applications 7. Chapter 5: Enhancing Cloud-Native Applications 8. Chapter 6: Observing and Monitoring Cloud-Native Applications 9. Chapter 7: MicroProfile Ecosystem with Open Liberty, Docker, and Kubernetes 10. Section 3: End-to-End Project Using MicroProfile
11. Chapter 8: Building and Testing Your Cloud-Native Application 12. Chapter 9: Deployment and Day 2 Operations 13. Section 4: MicroProfile Standalone Specifications and the Future
14. Chapter 10: Reactive Cloud-Native Applications 15. Chapter 11: MicroProfile GraphQL 16. Chapter 12: MicroProfile LRA and the Future of MicroProfile 17. Other Books You May Enjoy

Testing the Stock Trader microservices

Now that we've learned how to build our microservices, the next important step, before deploying them to an OpenShift environment, is to first perform some unit tests on them to make sure they are working as desired.

Testing the frontend microservice

We can perform such unit tests by using locally installed Docker on our laptops. Let's run the Docker container we just built for Trader, and try it out:

jalcorn@Johns-MBP-8 portfolio % docker run -p 9443:9443 -e JWT_AUDIENCE=test -e JWT_ISSUER=test -e TEST_MODE=true trader:latest
Launching defaultServer (Open Liberty 21.0.0.4/wlp-1.0.51.cl210420210407-0944) on Eclipse OpenJ9 VM, version 11.0.11+9 (en_US)
[AUDIT] CWWKE0001I: The server defaultServer has been launched.
<snip>
[INFO] SRVE0169I: Loading Web Module: Trader UI.
[INFO] SRVE0250I: Web Module Trader UI has been bound to default_host.
[AUDIT] CWWKT0016I: Web application available (default_host): http://5708495d563b...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}