Git Product home page Git Product logo

testy's Introduction

Testy - a continuous test-runner

Testy was created to assist in TDD, as well as to remind a lazy developer to use tests. Testy monitors a directory for changed files and will run the appropriate test.

Testy might be used, to execute an arbitrary command or application, e.g. php-codesniffer, php-hint, etc.

Project-Configuration

Example w/o File to Test-Mapping

"testy": {
    "path": "~/workspace/testy",
    "test": "phpunit",
    "test_dir": "~/workspace/testy;",
    "syntax": "php -l $file",
    "find": "*.php"
}

Example with File to Test-Mapping

"testy": {
    "path": "~/workspace/testy",
    "test": "phpunit $file {Testy|Tests} {.php|Test.php}",
    "test_dir": "~/workspace/testy;",
    "syntax": "php -l $file",
    "find": "*.php"
}

Example with File to Test-Mapping & Syncing

"testy": {
    "path": "~/workspace/testy",
    "test": "phpunit $file {Testy|Tests} {.php|Test.php}",
    "test_dir": "~/workspace/testy;",
    "sync_dir: {
        "from": ~/workspace/testy,
        "to":   ~/not-a-vdisk/testy,
    },
    "syntax": "php -l $file",
    "find": "*.php"
}

Options

  • path: The path that is checked for changed files
  • find: The find-pattern that is used to find changed files
  • syntax: Command to do a syntax-check (skips testing on error)
  • test_dir: The dir to cd in, before executing the test-command (which is also checked for changes)
  • sync_dir: rsync the project to this directory, replace all paths with 'to'
    • from: The source
    • to: The target
  • repeat: Repeat the test-command without the specific file (which is replaced by ''), default: true
  • test: The test to execute on changed files
    • placeholders:
    • $file Each file that changed
    • $project The projects name
    • $time The current timestmap
    • $mtime The modification's timestamp

Notifiers

Testy supports several ways to notify the developer about the result of the executed command:

  • Stdout, which simply prints the output
  • File
  • Dbus
  • Growl, which works well with snarl on windows
  • Libnotify, which used notify-send

Testy uses hpbuniat/notifyy.

File-to-Test-Mapping

Use the {Search|Replace}-Pattern, as often as needed, to map the Source-File to it's test. If all Search-Patterns are found within the changed-files path, it is assumed that this is a test file.

Notes

The dbus-notifier is based on the php dbus-extension (http://pecl.php.net/package/DBus) by Derick Rethans

testy's People

Contributors

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