Supertester

Supertester Logo

Hex.pmDocumentationBuild StatusLicense

Supertester is an OTP-focused testing toolkit for Elixir. It helps you write deterministic tests for concurrent systems without Process.sleep/1, while keeping tests async-safe through per-test isolation.

Version: 0.6.0

Installation

def deps do
  [
    {:supertester, "~> 0.6.0", only: :test}
  ]
end
mix deps.get

Quick Example

defmodule MyApp.CounterTest do
  use Supertester.ExUnitFoundation, isolation: :full_isolation

  import Supertester.{OTPHelpers, GenServerHelpers, Assertions}

  test "increments deterministically" do
    {:ok, counter} = setup_isolated_genserver(Counter)

    :ok = cast_and_sync(counter, :increment)

    assert_genserver_state(counter, fn state -> state.count == 1 end)
  end
end

Core Modules

Behavioral Notes

Safety

Documentation

Examples

License

MIT