52 Testing with ScalaTest
After reading this lesson, you’ll be able to
- Write and run tests using ScalaTest
- Test synchronous and asynchronous code
You’ve been learning how to create a fully working Scala application that connects to a database, processes data asynchronously, and exposes an HTTP API. Your application must include tests to check that it behaves as expected, implements its business requirements correctly, and prevents the introduction of bugs with future code changes. This lesson completes the picture by introducing you to the basics of writing tests in Scala. You’ll write tests using a popular library called ScalaTest, and you’ll run them using sbt. After writing and running your first test, you’ll learn how to test code that ...
Get Get Programming with Scala now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.