Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 1.75 KB

README.md

File metadata and controls

28 lines (18 loc) · 1.75 KB

Spectrum Documentation

Specrtrum is a BDD-style test runner for Java 8. It leverages lambda functions to provide a test-writing experience that is familiar to users of BDD tools from other platforms like Ruby and JavaScript. The library is implemented as a custom runner for JUnit 4, allowing Spectrum tests to integrate (mostly) seamlessly with existing IDEs and tooling.

Supported Features

Spectrum provides two ways of writing tests:

Spectrum also supports:

  • Unlimited nesting of suites within suites
  • Rigorous error handling and reporting when something unexpected goes wrong
  • Compatibility with most existing JUnit tools; no configuration required
  • Plugging in familiar JUnit-friendly libraries like MockitoJUnit or SpringJUnit via JUnit @Rules handling.
  • Tagging specs for selective running
  • Mixing Spectrum tests and normal JUnit tests in the same project suite
  • RSpec-style aroundEach and aroundAll hooks for advanced users and plugin authors

Non-Features

Unlike some BDD-style frameworks, Spectrum is only a test runner. Assertions, expectations, mocks, and matchers are the purview of other libraries such as Hamcrest, AssertJ, Mockito, or plain JUnit.

Getting Started

See the quickstart waklthrough and the docs for writing Specification-style or Gherkin-style tests.