MUnit

MUnit

  • Docs
  • Blog
  • GitHub

›Overview

Overview

  • Getting started
  • Declaring tests
  • assertions
  • Using fixtures
  • Filtering tests
  • Generating test reports
  • Coming from ScalaTest
  • Troubleshooting
Edit

Troubleshooting

Invalid test class

If you define a test suite as an object instead of class you get the following error:

==> X munit.BasicSuite.initializationError  0.003s org.junit.runners.model.InvalidTestClassError: Invalid test class 'munit.BasicSuite':
  1. Test class should have exactly one public constructor
  2. No runnable methods

To fix the problem, use class instead of object

- object MySuite extends munit.FunSuite { ... }
+ class MySuite extends munit.FunSuite { ... }
← Coming from ScalaTest
  • Invalid test class
MUnit
Overview
Getting started
Social
Copyright © 2020 Scalameta