Unit Testing in Scala

ScalaTest is a well-known choice for testing Scala projects. Write tests to provide evidence that the project works as expected. These tests also serve as a communication and learning tool for other developers and stakeholders in your organization.
Course info
Level
Beginner
Updated
Jan 21, 2020
Duration
2h 24m
Table of contents
Course Overview
Setting up the Project
Writing the First Test
Working with Assertions
Performing Expressive Testing Using Matchers
Generating Data through Fixtures and Asynchronous Testing
Mocking and Tagging Your Tests
Description
Course info
Level
Beginner
Updated
Jan 21, 2020
Duration
2h 24m
Description

ScalaTest is a popular choice to test Scala projects. It has been used by well-known open-source projects such as Akka. In this course, Unit Testing in Scala, you will learn how to test a Scala project using ScalaTest. First, you will test your codebase using Assertions and Matchers. Next, you will discover how to create Fixtures for your testing using various methods, and how to test for asynchronous code. Then, you will see how to mock complex object creation and test for behaviors, while also learning to create tags and apply them selectively to your tests so that you can run tests based on the tags. Finally, you will explore different ways of running a test written using ScalaTest library. When you are finished with this course, you will have all the required knowledge to plug ScalaTest into your projects and start testing with confidence.

About the author
About the author

Harit Himanshu is an engineer by profession with the deep interest in applying technologies to solve business problems. Harit is passionate about writing clean, modular, testable code and believes in automating almost everything.

More from the author
Deep Dive into Web Push Notifications
Intermediate
1h 24m
May 21, 2020
Scala Build Tool: Getting Started
Beginner
1h 37m
Jun 13, 2019
More courses by Harit Himanshu
Section Introduction Transcripts
Section Introduction Transcripts

Course Overview
[Autogenerated] Hi, everyone. My name is Harry to Manchu and welcome to my course unit testing and scholar I'm, co founder of Bonsai Labs, the place where we create softer for startups and provide mentoring to turn us around the world on software development. Ecosystem skull is a wonderful language to work with, and it helps you become a better programmer in general. As you write more scholar, you must learn to write test for the Cody right and provide the evidence that your understanding matches with the Expectation Scholar test is a library that is pleasure to work with when it comes to writing tests. In this course, we're going to learn the fundamentals of scholar tests such as our test sweet, different distinct styles and how to run your test in different methods. We're going to work with assertion based test and then a ball. What understanding? To write this with matters, we will then right test pictures for our test and learn how to test asynchronous code, and we will learn to create, apply and run tests based on Todd's. And what's more exciting is that we will do this by testing an actual project. We will create more than 70 tests together throughout the scores. By the end of this course, you will know everything to integrate scholar test in your project and just like a pro before beginning this court, you should be comfortable in reading and writing. Scholar. If you're starting with Scholar, you may want to check out Scholar The Big Picture Scholar Fundamentals and SPD getting started Coaches on polluted state I hope you'll join me on this journey to learn scholar test with unit testing and scholar courts at Brutal site.