All Projects → greghaskins → Spectrum

greghaskins / Spectrum

Licence: mit
A BDD-style test runner for Java 8. Inspired by Jasmine, RSpec, and Cucumber.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Spectrum

j8spec
Library that allows tests written in Java to follow the BDD style introduced by RSpec and Jasmine.
Stars: ✭ 45 (-68.31%)
Mutual labels:  jasmine, rspec, junit
Public
Repository for wallaby.js questions and issues
Stars: ✭ 662 (+366.2%)
Mutual labels:  bdd, jasmine, test-runner
ginkgo4j
A Java BDD Testing Framework (based on RSpec and Ginkgo)
Stars: ✭ 25 (-82.39%)
Mutual labels:  rspec, bdd, junit
Karma
Spectacular Test Runner for JavaScript
Stars: ✭ 11,591 (+8062.68%)
Mutual labels:  bdd, jasmine, test-runner
Jasmine Matchers
Write Beautiful Specs with Custom Matchers for Jest and Jasmine
Stars: ✭ 552 (+288.73%)
Mutual labels:  unit-testing, bdd, jasmine
Specflow
#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
Stars: ✭ 1,827 (+1186.62%)
Mutual labels:  bdd, gherkin
Junit Extensions
JUnit5 extensions library including JUnit5 equivalents of some of the common JUnit4 rules: ExpectedException, TemporaryFolder etc
Stars: ✭ 39 (-72.54%)
Mutual labels:  unit-testing, junit
Catch Exception
Stars: ✭ 137 (-3.52%)
Mutual labels:  bdd, junit
Jasmine Marbles
Marble testing helpers for RxJS and Jasmine
Stars: ✭ 85 (-40.14%)
Mutual labels:  unit-testing, jasmine
Vstest
Visual Studio Test Platform is the runner and engine that powers test explorer and vstest.console.
Stars: ✭ 624 (+339.44%)
Mutual labels:  unit-testing, test-runner
Karmatic
🦑 Easy automatic (headless) browser testing with Jest's API, but powered by Karma & Webpack.
Stars: ✭ 1,178 (+729.58%)
Mutual labels:  jasmine, test-runner
Zunit
A powerful testing framework for ZSH projects
Stars: ✭ 140 (-1.41%)
Mutual labels:  unit-testing, test-runner
Enzyme Matchers
Jasmine/Jest assertions for enzyme
Stars: ✭ 881 (+520.42%)
Mutual labels:  unit-testing, jasmine
Aruba
Test command-line applications with Cucumber-Ruby, RSpec or Minitest. The most up to date documentation can be found on Cucumber.Pro (https://app.cucumber.pro/projects/aruba)
Stars: ✭ 900 (+533.8%)
Mutual labels:  bdd, rspec
Company Structure
A company structure with a list of projects and their users
Stars: ✭ 48 (-66.2%)
Mutual labels:  junit, jasmine
Semaphore Ng2 Webpack
Stars: ✭ 81 (-42.96%)
Mutual labels:  unit-testing, jasmine
Gulp Jasmine
Run Jasmine tests in Node.js
Stars: ✭ 110 (-22.54%)
Mutual labels:  jasmine, test-runner
Rspec
(Rust) Rspec - a BDD test harness for stable Rust
Stars: ✭ 106 (-25.35%)
Mutual labels:  unit-testing, bdd
Test Smells
Test Smells for Android developers
Stars: ✭ 120 (-15.49%)
Mutual labels:  unit-testing, junit
Ut
UT: C++20 μ(micro)/Unit Testing Framework
Stars: ✭ 507 (+257.04%)
Mutual labels:  unit-testing, bdd

Spectrum

Build Status Codecov MIT License Download Gitter

A colorful BDD-style test runner for Java

Spectrum is inspired by the behavior-driven testing frameworks Jasmine and RSpec, bringing their expressive syntax and functional style to Java tests. It is a custom runner for JUnit, so it works with many development and reporting tools out of the box.

Spectrum with Eclipse via JUnit

Getting Started

Spectrum 1.2.0 is available as a package on JCenter and Maven Central.

Examples

Spectrum supports Specification-style tests similar to RSpec and Jasmine:

@RunWith(Spectrum.class)
public class Specs {{

  describe("A list", () -> {

    List<String> list = new ArrayList<>();

    afterEach(list::clear);

    it("should be empty by default", () -> {
      assertThat(list.size(), is(0));
    });

    it("should be able to add items", () -> {
      list.add("foo");
      list.add("bar");

      assertThat(list, contains("foo", "bar"));
    });

  });
}}

And also Gherkin-style tests similar to Cucumber:

@RunWith(Spectrum.class)
public class Features {{

  feature("Lists", () -> {

    scenario("adding items", () -> {

      Variable<List<String>> list = new Variable<>();

      given("an empty list", () -> {
        list.set(new ArrayList<>());
      });

      when("you add the item 'foo'", () -> {
        list.get().add("foo");
      });

      and("you add the item 'bar'", () -> {
        list.get().add("bar");
      });

      then("it contains both foo and bar", () -> {
        assertThat(list.get(), contains("foo", "bar"));
      });

    });

  });
}}

For more details and examples, see the documentation.

Can I Contribute?

Yes please! See CONTRIBUTING.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].