← Graph

TestBench

tool 11 connections

Test framework shipped with the Eventide project. Usable in any Ruby project, including Rails. Initial release March 31, 2016 on RubyGems after Nathan Ladd and Scott Bellware sketched it in an Austin coffee shop — built on the premise that tests are just procedures, so test files should be plain Ruby scripts. Initial DSL: context, test, assert, refute (assert_raises/refute_raises added later). No assert_equal, assert_in_epsilon, assert_json — values are shown via context/detail output methods so data is visible on both passing and failing runs (unlike assertion-message data hidden inside exceptions). V1 rewrite was produced via strict TDD to improve design; in the process Ladd discovered Test Bench can test itself because its DSL operates in isolation from the test framework, which implies the DSL (a `TestBench::Fixture` module) can be included in any class to turn it into a reusable test object. Fixtures can depend on other fixtures (e.g. a message-handler fixture calling a schema-equality fixture on events) and are themselves testable — you can prove a fixture passes when it should and fails when it should. ~5000 lines of code, took roughly five years of spare-time work. Pavel jokes that to use it you must 'forget anything you've ever learned about RSpec'.

author
Nathan Ladd
category
library
initial_release
2016-03-31
about
TestBench tool
Cited as a smaller test framework alternative to RSpec.
about
TestBench tool
Primary subject: the history, design, and capabilities of the Test Bench framework.
Mentions TestBench as Eventide's test framework.
tool TestBench
related_to
Eventide project
Test Bench is shipped and used as the test framework for Eventide projects.
tool TestBench
related_to
minitest tool
Team migrated their projects from minitest to Test Bench in 2016 after dissatisfaction with must_equal semantics, lack of refute_raises, and order-dependency semantics.
tool TestBench
related_to
RSpec tool
Positioned as an alternative to RSpec; rejects the elaborate matcher API and green-dot default output.
related_to
TestBench tool
Fixture is Test Bench's central abstraction, enabled by the DSL being usable in isolation from the framework.
related_to
TestBench tool
Bellware cites this refactoring as the rationale for Test Bench having only assert/refute on booleans instead of specialized assertion methods.
project Eventide
uses
TestBench tool
TestBench is Eventide's own test framework.
person Nathan Ladd
works_on
TestBench tool
Author of Test Bench; drove initial implementation and V1 rewrite.
role: author
works_on
TestBench tool
Collaborated on original design in 2016, wrote Test Bench V1 documentation.
role: collaborator, documentation

Provenance

Read by
12 extractions