All Projects → hopsoft → pry-test

hopsoft / pry-test

Licence: MIT license
A small test framework that supports debugging test failures & errors when they happen

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to pry-test

PixelTest
Fast, modern, simple iOS snapshot testing written purely in Swift.
Stars: ✭ 56 (+133.33%)
Mutual labels:  test-framework, testing-framework
IO-TESTER
A functional test framework
Stars: ✭ 32 (+33.33%)
Mutual labels:  test-framework, testing-framework
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (+70.83%)
Mutual labels:  test-framework, testing-framework
testza
Full-featured test framework for Go! Assertions, fuzzing, input testing, output capturing, and much more! 🍕
Stars: ✭ 409 (+1604.17%)
Mutual labels:  test-framework, testing-framework
Dredd
Language-agnostic HTTP API Testing Tool
Stars: ✭ 3,770 (+15608.33%)
Mutual labels:  test-framework, testing-framework
Wasmite
Now WebAssembly has proper testing, unit-testing and debugging 🤗
Stars: ✭ 20 (-16.67%)
Mutual labels:  test-framework, testing-framework
pysys-test
PySys System Test Framework
Stars: ✭ 14 (-41.67%)
Mutual labels:  test-framework, testing-framework
tau
A Micro (1k lines of code) Unit Test Framework for C/C++
Stars: ✭ 121 (+404.17%)
Mutual labels:  test-framework, testing-framework
cpptest
🛠️ Powerful, yet simple, C++ unit testing framework; new home after https://sourceforge.net/projects/cpptest/
Stars: ✭ 51 (+112.5%)
Mutual labels:  test-framework, testing-framework
page-content-tester
Paco is a Java based framework for non-blocking and highly parallelized Dom testing.
Stars: ✭ 13 (-45.83%)
Mutual labels:  test-framework, testing-framework
Recheck Web
recheck for web apps – change comparison tool with local Golden Masters, Git-like ignore syntax and "Unbreakable Selenium" tests.
Stars: ✭ 224 (+833.33%)
Mutual labels:  test-framework, testing-framework
Bandit
Human-friendly unit testing for C++11
Stars: ✭ 240 (+900%)
Mutual labels:  test-framework, testing-framework
tcframe
Test cases generation framework for competitive programming problems
Stars: ✭ 147 (+512.5%)
Mutual labels:  test-framework
Pry Byebug
Step-by-step debugging and stack navigation in Pry
Stars: ✭ 1,827 (+7512.5%)
Mutual labels:  pry
Pry
A runtime developer console and IRB alternative with powerful introspection capabilities.
Stars: ✭ 6,351 (+26362.5%)
Mutual labels:  pry
sandwich
Yet another test framework for Haskell.
Stars: ✭ 65 (+170.83%)
Mutual labels:  testing-framework
portman
Port OpenAPI Specs to Postman Collections, inject test suite and run via Newman 👨🏽‍🚀
Stars: ✭ 530 (+2108.33%)
Mutual labels:  test-framework
lit
Shine a light on terminal commands. 🔥
Stars: ✭ 12 (-50%)
Mutual labels:  pry
NBi
NBi is a testing framework (add-on to NUnit) for Business Intelligence and Data Access. The main goal of this framework is to let users create tests with a declarative approach based on an Xml syntax. By the means of NBi, you don't need to develop C# or Java code to specify your tests! Either, you don't need Visual Studio or Eclipse to compile y…
Stars: ✭ 102 (+325%)
Mutual labels:  test-framework
pry-inline
Inline variables view like RubyMine in Pry
Stars: ✭ 55 (+129.17%)
Mutual labels:  pry

Lines of Code Maintainability Build Status Coverage Status Downloads

Formerly known as MicroTest.

PryTest

aka pry-test

A small test framework that supports debugging test failures & errors when they happen.

Values

  • Simplicity - writing tests should be easy & devoid of friction
  • Intelligibility - tests should be readable & unambiguous
  • Immediacy - test failures should be dealt with quickly when they occur

Benefits

  • A simple test API
  • An awesome fail pry pass workflow
  • Optional async test runs

An important note on debugging test failures with Pry.

The API

Everything you need to know about PryTest's API is outlined here.

PryTest::Test Superclass for all test classes.
test(desc, &block) Defines a test method.
  • desc - a description of what is being tested
  • &block - a block of code which defines the test
assert(value) Verifies the truthiness of a value.
  • value - the value to assert
refute(value) Verifies the falsiness of a value.
  • value - the value to refute
before(&block) A callback that runs before each test method.
  • &block - the block of code to execute
after(&block) A callback that runs after each test method.
  • &block - the block of code to execute

A Complete Example

The entire public interface is used in this basic example.

class MathTest < PryTest::Test

  before do
    # runs before each test method
  end

  after do
    # runs after each test method
  end

  test "basic addition" do
    assert 2 + 2 == 4
  end

  test "all is right in the world" do
    refute 0 > 1
  end
end

Get Started

PryTest ships with a demo so you can try it out easily.

gem install pry-test
pry-test --help
pry-test --demo

Try some advanced features.

pry-test --demo --async
pry-test --demo --disable-pry

Testing Your Own Projects

PryTest assumes your test directory is located at PROJECT_ROOT/test; however, this isn't a requirement. You can indicate your test directory location.

pry-test /path/to/test/dir

If you have multiple versions of PryTest installed, it's safest to run your tests with bundle exec.

bundle exec pry-test /path/to/test/dir

PryTest is small & unobtrusive. It plays nice with other test frameworks, & can be introduced to existing projects incrementally.

Advanced

See the wiki to troubleshoot or get help with more advanced topics.

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].