Course Objectives and Prerequisites

Get an overview of this course’s prerequisites and what you’ll learn.

In 2015, in the state of Washington, authorities discovered that more than 3,200 prisoners over 13 years had been released early because of a software bug. In 2002, after a court ruling about applying good behavior credits for an early release, a software update was issued to automatically compute these credits and determine a release date. However, the formula the software used had bugs and led to these prisoners getting out an average of 49 days early. Political and social implications aside, the story is interesting from a developer’s perspective because it highlights the importance of thorough testing. This is only one of an endless series of incidents caused by bugs in software.

What you’ll need to know

The main focus of the course will be on testing Scala code; therefore, you should be familiar with Scala syntax, especially Scala 3. Additionally, you should be familiar with its main building tool, sbtScala Build Tool. The first chapter gives a brief introduction to both Scala and sbt, and that’s a good starting point if you want to refresh your background knowledge. The course won’t use any niche features of the language. If any are mentioned, they’ll be explained so you can follow the lesson.

Throughout the course, we’ll discuss some advanced topics, such as testing asynchronous code, injecting fake data into tests, mocks, property testing, and testing with Docker. Although previous experience with these concepts will be helpful, the lessons will always give you a quick introduction you can use to deepen your knowledge.

What you’ll learn

This course is all about improving the way we write tests. We’ll use Scala 3 as much as possible, and ScalaTest will be the main testing library. This will give us the chance to write code samples demonstrating the concepts we’ll see throughout the course.

But this course offers more than just an introduction to a bunch of testing libraries and frameworks. Even though some lessons will show you how to do things using a given library, the main focus will be on applying critical reasoning to the constructs made available by the libraries. As you’ll see, there are many ways of testing the same thing, and this course will give you several good practices for writing tests under different conditions.

To create familiarity with the concepts, the course includes some theoretical lessons as well. After all, we can’t write ScalaTest suites without knowing how ScalaTest works and lets us write assertions.

You might find yourself in disagreement with some of the practices offered in this course, and that’s okay. Programming and testing is a complex world where people from different backgrounds face similar tasks every day under unique circumstances. Talking about what we consider good or bad, correct or incorrect, is a great way to share knowledge.

Ready? Enjoy the course!