HomeCoursesEffective Unit and Integration Testing in Scala
AI-powered learning
Save

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.

37 Lessons
12h
Join 2.9 million developers at
Join 2.9 million developers at
LEARNING OBJECTIVES
  • 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

Learning Roadmap

37 Lessons4 Quizzes3 Assessments

1.

Introduction

Introduction

Get familiar with the significance of testing in Scala, focusing on test types and best practices.

2.

Brief Introduction to Scala and sbt

Brief Introduction to Scala and sbt

Look at Scala's paradigms, sbt's build capabilities, and effective project layouts for testing.

3.

Writing Tests with ScalaTest

Writing Tests with ScalaTest

17 Lessons

17 Lessons

Work your way through writing expressive test cases using ScalaTest’s diverse styles and tools.

4.

Mocking with ScalaMock

Mocking with ScalaMock

5 Lessons

5 Lessons

Grasp the fundamentals of using ScalaMock for effective unit testing in Scala.

5.

Property-Based Testing with ScalaCheck

Property-Based Testing with ScalaCheck

5 Lessons

5 Lessons

Take a closer look at property-based testing concepts, table-driven checks, and ScalaCheck integration.

6.

Mocking External Services with TestContainers-scala

Mocking External Services with TestContainers-scala

4 Lessons

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.
Author NameEffective Unit and IntegrationTesting in Scala
Developed by MAANG Engineers
ABOUT THIS COURSE
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.
ABOUT THE AUTHOR

Matteo Di Pirro

Enthusiastic software engineer who specializes in the theory of programming languages and type safety.

Learn more about Matteo

Trusted by 2.9 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

A

Anthony Walker

@_webarchitect_

Just finished my first full #ML course: Machine learning for Software Engineers from Educative, Inc. ... Highly recommend!

E

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.

S

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

S

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.

V

Vinay Krishnaiah

Software Developer

Built for 10x Developers

No Passive Learning
Learn by building with project-based lessons and in-browser code editor
Learn by Doing
Personalized Roadmaps
The platform adapts to your strengths & skills gaps as you go
Learn by Doing
Future-proof Your Career
Get hands-on with in-demand skills
Learn by Doing
AI Code Mentor
Write better code with AI feedback, smart debugging, and "Ask AI"
Learn by Doing
Learn by Doing
MAANG+ Interview Prep
AI Mock Interviews simulate every technical loop at top companies
Learn by Doing

Free Resources

FOR TEAMS

Interested in this course for your business or team?

Unlock this course (and 1,000+ more) for your entire org with DevPath