Giter Site home page Giter Site logo

intertest's Introduction

intertest

Disclaimer: this is currently only a proof of concept and should not be used in production.

This testing framework allows you to express dependencies between tests. Tests can depend on each other, causing a test to be skipped when any of the tests it depends on fails.

This allows for both more expressive test results and for early failures, shortening the time tests take to run.

Consider a test suite that tests a custom vector implementation. There might be three tests in it:

  1. Test that the constructor works
  2. Test that items can be inserted
  3. Test that items can be removed again

Should there be a bug introduced in the constructor, in a standard testing framework, you might get up to 3 test failures, that are probably ordered arbitrarily in the test report. This makes it non-obvious that the actual bug was in the constructor, even though the constructor test might have caught the bug.

In intertest, you can describe those tests to depend on each other. Test 2 can depend on test 1, because you need to construct the vector before you add anything to it. Then test 3 might depend on both 2 and 1, because the vector needs to first be constructed and then items need to be added before it makes sense to run this test.
The resulting test suite could be represented as this graph:

1 ---> 2 --> 3
|            ^
+------------+

If test 1 fails, both Test 2 and 3 won't run, causing the test suite to finish quicker and to not clutter the test results.

intertest's People

Contributors

leonmatthes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.