Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 1.08 KB

Readme.md

File metadata and controls

31 lines (23 loc) · 1.08 KB

Scala test mock example

shields.io

Scala test example with normal and mocked server

Author: Maximilian Bundscherer (https://bundscherer-online.de)

Test-Coverage: 100.00% ;)

Overview / Features

  • Simple example server and client included (see src/main/scala/com/mb/scalamockexample/*)
  • Server and client communicate over simple messages
  • Normal and mocked server test included
    • normal-test - see src/test/scala/com/mb/scalamockexample/ExampleTest
    • test with mocked server - see src/test/scala/com/mb/scalamockexample/MockTest
  • Auto-generate coverage report(s) (sbt-scoverage)

Used technologies

  • Scala: programming language
  • ScalaTest: testing project ('overwritten' by ScalaMock)
  • ScalaMock: mocking framework
  • sbt-scoverage: generate test coverage report(s)

Let's get started

  1. See requirements!
  2. Run tests sbt clean coverage test
  3. Generate coverage report(s) sbt coverageReport

Requirements

  • SBT