Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

CodeSignal

Increasing Code Test Coverage

via CodeSignal

Overview

This course explores how to improve test coverage and foster a more testable codebase in Scala projects. Increasing code test coverage is essential for ensuring confidence when modifying existing systems. It allows developers to make changes with minimal risk of introducing bugs by providing a safety net of tests that document existing and desired behaviors.

Syllabus

  • Unit 1: What Will be Covered in This Course Path
    • Order Processing with Unit Testing
  • Unit 2: Why We Want to Increase Code Test Coverage
    • Adding the First Test to the Order Processor
    • Add New Test For Multiple Different Items
    • Adding a Test for Zero Order Items
    • Ensuring Orders Have Correct Processing Date Set
  • Unit 3: Increasing Code Test Coverage by Adding Characterization Tests
    • Adding a Test Confirming Order Item Quantity Limit
    • Test Demonstrating Discound Behavior
    • Documenting the Shipping Method Determination
    • Order Processing Uses Express Shipping for High Quantities
    • Shipping Rules Make Perfect Sense
    • Looking for Edge Cases
  • Unit 4: Increasing Testability - Adding Interfaces and Mocks
    • Email Service Dependency Done Right
    • Email Service Implementing Trait
    • Exchange Concrete Email Service for an Abstraction
    • Mock Dependencies in Order Processing
    • Adding Tests That Utilize Mocks
  • Unit 5: Bringing Writing Tests and Mocks Together
    • Creating a Database Abstraction
    • Using the Abstraction as a Dependency
    • Setting Up Test Environment Basics
    • Testing User Login
    • Verifying User Absence in Database
    • Database Exception Testing Made Simple

Reviews

Start your review of Increasing Code Test Coverage

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.