Beginner
12h
Effective Unit and Integration Testing in Scala
Gain insights into effective unit and integration testing in Scala. Learn about ScalaTest, Mockito, ScalaCheck, and Docker/TestContainers to enhance testing quality and maintainability.
Testing is a fundamental part of writing software. Tests should be written with as much care as we put into designing and coding our applications. Still, writing clean and well-organized test cases can be difficult. In many cases, their quality is lower than that of the rest of the application. This can seriously impact the overall quality and maintainability of the project in the long run.
The focus of this course is on unit and integration tests in Scala. First, you’ll learn about the most famous testing framework for Scala—ScalaTest. Then, you’ll move to mocking and property-based testing with Mockito and ScalaCheck. Finally, the course will focus on integration testing, showing how to mock the dependencies on external services with Docker and TestContainers.
After taking this course, you’ll have a more comprehensive view of the possibilities to run different tests in Scala, including practical knowledge of some widespread testing libraries.
Testing is a fundamental part of writing software. Tests should be written with as much care as we put into designing and coding...Show More
WHAT YOU'LL LEARN
A working knowledge of ScalaTest and its best practices
An understanding of property-based testing
An understanding of mocking and test doubles
Hands-on experience with mocking infrastructural dependencies via Docker containers
The ability to design and write effective tests in Scala
A working knowledge of ScalaTest and its best practices
Show more
TAKEAWAY SKILLS
Content
1.
Introduction
2 Lessons
Get familiar with the significance of testing in Scala, focusing on test types and best practices.
2.
Brief Introduction to Scala and sbt
3 Lessons
Look at Scala's paradigms, sbt's build capabilities, and effective project layouts for testing.
3.
Writing Tests with ScalaTest
17 Lessons
Work your way through writing expressive test cases using ScalaTest’s diverse styles and tools.
4.
Mocking with ScalaMock
5 Lessons
Grasp the fundamentals of using ScalaMock for effective unit testing in Scala.
5.
Property-Based Testing with ScalaCheck
5 Lessons
Take a closer look at property-based testing concepts, table-driven checks, and ScalaCheck integration.
6.
Mocking External Services with TestContainers-scala
4 Lessons
Tackle mock external services in integration testing using TestContainers-scala and Docker.
Certificate of Completion
Showcase your accomplishment by sharing your certificate of completion.
Course Author:
Developed by MAANG Engineers
Trusted by 2.8 million developers working at companies
"These are high-quality courses. Trust me the price is worth it for the content quality. Educative came at the right time in my career. I'm understanding topics better than with any book or online video tutorial I've done. Truly made for developers. Thanks"
Anthony Walker
@_webarchitect_
"Just finished my first full #ML course: Machine learning for Software Engineers from Educative, Inc. ... Highly recommend!"
Evan Dunbar
ML Engineer
"You guys are the gold standard of crash-courses... Narrow enough that it doesn't need years of study or a full blown book to get the gist, but broad enough that an afternoon of Googling doesn't cut it."
Software Developer
Carlos Matias La Borde
"I spend my days and nights on Educative. It is indispensable. It is such a unique and reader-friendly site"
Souvik Kundu
Front-end Developer
"Your courses are simply awesome, the depth they go into and the breadth of coverage is so good that I don't have to refer to 10 different websites looking for interview topics and content."
Vinay Krishnaiah
Software Developer
Hands-on Learning Powered by AI
See how Educative uses AI to make your learning more immersive than ever before.
AI Prompt
Code Feedback
Explain with AI
AI Code Mentor
Free Resources