Giter Club home page Giter Club logo

regressiontest's Introduction

regressiontest

Build Status

regressiontest, at this point, is a simple module for calling programs on the command line, capturing output and comparing output against an existing reference file. The idea is to capture changes in output at a very global level, perhaps with different input files and command line options.

Note that JRuby on Travis does not allow invoking the command line, but MRI and Rubinius work fine.

Note: this software is under active development, your mileage may vary!

Installation

    gem install regressiontest

Usage

    require 'regressiontest'

Simple usage

  RegressionTest::CliExec::exec("ls","-l").should be_true

by default a .ref and a .new file are created in the ./test/data/regression directory. A filter can be added to ignore lines of output (as a regex), e.g.

  RegressionTest::CliExec::exec("ls","-l",ignore: 'INFO bio-gff3: Memory used')

Other options are :timeout and :should_fail.

The API doc is online. For more code examples see the test files in the source tree. A good example can be found in the bio-table project which uses cucumber features combined with the regressiontest gem. The features look like

Scenario: Test the numerical filter by indexed column values
  Given I have input file(s) named "test/data/input/table1.csv"
  When I execute "./bin/bio-table --num-filter 'values[3] > 0.05'"
  Then I expect the named output to match "table1-0_05"

and are listed in cli.feature and the matching steps are simply

Given /^I have input file\(s\) named "(.*?)"$/ do |arg1|
  @filenames = arg1.split(/,/)
end

When /^I execute "(.*?)"$/ do |arg1|
  @cmd = arg1 + ' ' + @filenames.join(' ')
end

Then /^I expect the named output to match "(.*?)"$/ do |arg1|
  RegressionTest::CliExec::exec(@cmd,arg1).should be_true
end

and listed in cli.rb. The automatically generated regression output files are checked into git in the test/data/regression directory and checked with 'bundle exec rake'.

Project home page

Information on the source tree, documentation, examples, issues and how to contribute, see

http://github.com/pjotrp/regressiontest

The BioRuby community is on IRC server: irc.freenode.org, channel: #bioruby.

Cite

If you use this software, please cite one of

Biogems.info

This Biogem is published at #regressiontest

Copyright

Copyright (c) 2012-2014 Pjotr Prins. See LICENSE.txt for further details.

regressiontest's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

glennsb nfredrik

regressiontest's Issues

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.