REST API Testing with Scalatest - Matchers

| Reading time: 4 minutes.

In the previous post I’ve described how to start with test automation of the REST API using ScalaTest. Today I would like to show some more examples of using ScalaTest matchers - a smart way of writing more readable assertions. String matchers Let’s get back for a while to our previous code example. Our test seems still a bit unfinished as we have no assertions on the response body. ScalaTest has few methods defined called matchers which will give us nice looking assertions on the different data types.

Automated Acceptance Tests with ScalaTest

| Reading time: 4 minutes.

Almost seven years ago I’ve started a new and unexpected journey. Back then I had some experience with test automation in Python and Java and I’ve joined the team working on the backend application written in Scala. It was my first experience with functional programming so I was wondering if it would not be hard to learn and maintain the test suite written in this new for me language. It turned out that it’s not and the work with Scala gave me a lot of fun.

In this first episode of the blog post series I would like to show how to start testing a REST API using ScalaTest and how to use some more advanced features of this one of the most popular Scala-based test frameworks.

About Me

Hi! Welcome to my blog. My name is Krzysztof Komorowski. I am test engineer and software developer pasionate about functional programming. You can find me at: Mastodon GitHub LinkedIn