Giter Club home page Giter Club logo

typ's Introduction

typ (Test Your Program)

typ is a simple program for testing command line executables and Python code.

When testing Python code, it is basically a wrapper around the standard unittest module, but it provides the following bits of additional functionality:

  • Parallel test execution.
  • Clean output in the style of the Ninja build tool.
  • A more flexible mechanism for discovering tests from the command line and controlling how they are run:
    • Support for importing tests by directory, filename, or module.
    • Support for specifying tests to skip, tests to run in parallel, and tests that need to be run by themselves
  • Support for producing traces of test times compatible with Chrome's tracing infrastructure (trace_viewer).
  • Integrated test coverage reporting (including parallel coverage).
  • Integrated support for debugging tests.
  • Support for uploading test results automatically to a server (useful for continuous integration monitoring of test results).
  • An abstraction of operating system functionality called the Host class. This can be used by other python code to write more portable and easily testable code by wrapping the multiprocessing, os, subprocess, and time modules.
  • Simple libraries for integrating Ninja-style statistics and line printing into your own code (the Stats and Printer classes).
  • Support for processing arbitrary arguments from calling code to test cases.
  • Support for once-per-process setup and teardown hooks.

(These last two bullet points allow one to write tests that do not require Python globals).

History

typ originated out of work on the Blink and Chromium projects, as a way to provide a friendlier interface to the Python unittest modules.

Work remaining

typ is still a work in progress, but it's getting close to being done. Things remaining for 1.0, roughly in priority order:

  • Implement a non-python file format for testing command line interfaces
  • Write documentation

Possible future work

  • MainTestCase.check() improvements:
    • check all arguments and show all errors at once?
    • make multi-line regexp matches easier to follow?
  • --debugger improvements:
    • make it skip the initial breakpoint?
  • Support testing javascript, java, c++/gtest-style binaries?
  • Support for test sharding in addition to parallel execution (so that run-webkit-tests can re-use as much of the code as possible)?
  • Support for non-unittest runtest invocation (for run-webkit-tests, other harnesses?)

typ's People

Contributors

dpranke avatar dglazkov avatar natduca avatar qyearsley avatar

Watchers

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