• Stars
    star
    145
  • Rank 245,322 (Top 5 %)
  • Language
    Ruby
  • Created about 15 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

= ZenTest

home :: https://github.com/seattlerb/zentest
rdoc :: http://docs.seattlerb.org/ZenTest

== DESCRIPTION

ZenTest provides 4 different tools: zentest, unit_diff, autotest, and
multiruby.

zentest scans your target and unit-test code and writes your missing
code based on simple naming rules, enabling XP at a much quicker pace.
zentest only works with Ruby and Minitest or Test::Unit. There is
enough evidence to show that this is still proving useful to users, so
it stays.

unit_diff is a command-line filter to diff expected results from
actual results and allow you to quickly see exactly what is wrong.
Do note that minitest 2.2+ provides an enhanced assert_equal obviating
the need for unit_diff

autotest is a continous testing facility meant to be used during
development. As soon as you save a file, autotest will run the
corresponding dependent tests.

multiruby runs anything you want on multiple versions of ruby. Great
for compatibility checking! Use multiruby_setup to manage your
installed versions.

*NOTE:* The next major release of zentest will not include autotest
(use minitest-autotest instead) and multiruby will use rbenv /
ruby-build for version management.

== FEATURES

* Scans your ruby code and tests and generates missing methods for you.
* Includes a very helpful filter for Test/Spec output called unit_diff.
* Continually and intelligently test only those files you change with autotest.
* Test against multiple versions with multiruby.
* Includes a LinuxJournal article on testing with ZenTest written by Pat Eyler.
* See also: http://blog.zenspider.com/archives/zentest/
* See also: http://blog.segment7.net/articles/category/zentest

== STRATEGERY

There are two strategeries intended for ZenTest: test conformance
auditing and rapid XP.

For auditing, ZenTest provides an excellent means of finding methods
that have slipped through the testing process. I've run it against my
own software and found I missed a lot in a well tested
package. Writing those tests found 4 bugs I had no idea existed.

ZenTest can also be used to evaluate generated code and execute your
tests, allowing for very rapid development of both tests and
implementation.

== AUTOTEST TIPS

Setting up your project with a custom setup is easily done by creating
a ".autotest" file in your project. Here is an example of adding some
plugins, using minitest as your test library, and running rcov on full
passes:

    require 'autotest/restart'

    Autotest.add_hook :initialize do |at|
      at.testlib = "minitest/autorun"
    end

    Autotest.add_hook :all_good do |at|
      system "rake rcov_info"
    end if ENV['RCOV']

Do note, since minitest ships with ruby19, if you want to use the
latest minitest gem you need to ensure that the gem activation occurs!
To do this, add the gem activation and the proper require to a
separate file (like ".minitest.rb" or even a test helper if you have
one) and use that for your testlib instead:

.minitest.rb:

    gem "minitest"
    require "minitest/autorun"

.autotest:

    Autotest.add_hook :initialize do |at|
      at.testlib = ".minitest"
    end

If you prefer to suffix test files with "_test.rb" (instead of the
default which prefixes test files with "test_") you can change the
mapping by installing the autotest-suffix plugin. To do this first
install the autotest-suffix gem:

    $ gem install autotest-suffix

Then add the following to the ".autotest" file:

    require "autotest/suffix"

If you prefer minitest/spec to minitest/unit, you can still use autotest
by installing the autotest-spec plugin.
To do this first install the autotest-spec gem:

    $ gem install autotest-spec

Then add the following to the ".autotest" file:

    require "autotest/spec"

== SYNOPSIS

  ZenTest MyProject.rb TestMyProject.rb > missing.rb

  ./TestMyProject.rb | unit_diff

  autotest

  multiruby_setup mri:svn:current
  multiruby ./TestMyProject.rb

== Windows and Color

Read this: http://blog.mmediasys.com/2010/11/24/we-all-love-colors/

== REQUIREMENTS

* Ruby 1.8+, JRuby 1.1.2+, or rubinius
* A test/spec framework of your choice.
* Hoe (development)
* rubygems, 1.8+
* diff.exe on windows. Use http://gnuwin32.sourceforge.net/packages.html

== INSTALL

* sudo gem install ZenTest

== LICENSE

(The MIT License)

Copyright (c) Ryan Davis, Eric Hodel, seattle.rb

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

More Repositories

1

flog

Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is in.
Ruby
869
star
2

flay

Flay analyzes code for structural similarities. Differences in literal values, variable, class, method names, whitespace, programming style, braces vs do/end, etc are all ignored.
Ruby
709
star
3

debride

Analyze code for potentially uncalled / dead methods, now with auto-removal.
Ruby
673
star
4

ruby_parser

ruby_parser is a ruby parser written in pure ruby. It outputs s-expressions which can be manipulated and converted back to ruby via the ruby2ruby gem.
Ruby
471
star
5

vlad

Ruby
353
star
6

rubyinline

Ruby
286
star
7

hoe

Hoe is a rake/rubygems helper for project Rakefiles. It helps you manage, maintain, and release your project and includes a dynamic plug-in system allowing for easy extensibility. Hoe ships with plug-ins for all your usual project tasks including rdoc generation, testing, packaging, deployment, and announcement.
Ruby
285
star
8

heckle

Ruby
176
star
9

ruby2ruby

Ruby
162
star
10

graph

Graph is a type of hash that outputs in graphviz's dot format. It comes with a command-line interface that is easily pluggable.
Ruby
158
star
11

wilson

Ruby
138
star
12

image_science

Ruby
128
star
13

omnifocus

Ruby
127
star
14

rake-remote_task

Ruby
90
star
15

sexp_processor

Ruby
80
star
16

ruby_to_c

Ruby
79
star
17

zenweb

Ruby
64
star
18

parsetree

Ruby
54
star
19

omnifocus-github

Ruby
42
star
20

autotest-rails

Ruby
40
star
21

rdoc_osx_dictionary

Ruby
39
star
22

oedipus_lex

This is not your father’s lexer.
Ruby
34
star
23

osx_keychain

Ruby
24
star
24

sysloglogger

This project is EOL'd because it was merged into ruby 2.0.
Ruby
23
star
25

upnp

Ruby
20
star
26

ar_mailer

Ruby
20
star
27

zenprofile

Ruby
19
star
28

autotest-screen

Ruby
17
star
29

png

Ruby
17
star
30

metaruby

Ruby
15
star
31

seattlerb.org

CSS
15
star
32

omnifocus-redmine

Ruby
14
star
33

event_hook

Ruby
13
star
34

ohmygems

Ruby
12
star
35

production_log_analyzer

Ruby
12
star
36

minitest-excludes

Ruby
11
star
37

upnp-mediaserver

Ruby
10
star
38

ssh

Ruby
10
star
39

graphics

C++
9
star
40

ruby2smalltalk

Ruby
9
star
41

minitest-proveit

Ruby
8
star
42

orca_card

Ruby
8
star
43

gauntlet

Ruby
7
star
44

imap_processor

Ruby
7
star
45

path_expander

Ruby
7
star
46

rails_analyzer_tools

Ruby
7
star
47

minitest-macruby

Ruby
7
star
48

rubygems-sandbox

Ruby
7
star
49

github_contribs

Ruby
7
star
50

upnp-contentdirectory

Ruby
6
star
51

sphincter

6
star
52

cocor

Ruby
6
star
53

smtp_tls

Ruby
6
star
54

minitest-stackprofit

Ruby
6
star
55

upnp-igd

Ruby
5
star
56

cached_model

Ruby
5
star
57

mem_inspect

5
star
58

makerakeworkwell

Ruby
5
star
59

minitest-trump

Ruby
5
star
60

un

Ruby
5
star
61

debride-erb

Ruby
4
star
62

action_profiler

Ruby
4
star
63

synchronizer

Perforce, meet GitHub.
Ruby
3
star
64

rubyaudit

Ruby
3
star
65

minitest-speed

Ruby
3
star
66

minitest-compare

Ruby
3
star
67

rfc_spec

Ruby
3
star
68

rubyholic

Ruby
3
star
69

rubygems-cleanroom

Ruby
3
star
70

zombies

Ruby
3
star
71

upnp-connectionmanager

Ruby
3
star
72

box_layout

Ruby
3
star
73

zenhacks

Ruby
3
star
74

worker_bee

Ruby
3
star
75

rubygems-sing

Ruby
3
star
76

minitest_tu_shim

Ruby
3
star
77

ringydingy

Ruby
3
star
78

rubyinlinefortran

Ruby
2
star
79

omnifocus-rubyforge

Ruby
2
star
80

zencallgraph

Ruby
2
star
81

siren_song

Ruby
2
star
82

rubygems-isit19

Ruby
2
star
83

minitest-unordered

Ruby
2
star
84

supercaller

Ruby
2
star
85

zengraph

Ruby
2
star
86

gmail_contacts

Ruby
2
star
87

imap_to_rss

Ruby
2
star
88

mogilefs-client

2
star
89

drawr

Ruby
2
star
90

minitest_bench

Ruby
2
star
91

change_class

Ruby
2
star
92

minitest-allow

Ruby
2
star
93

hoe-seattlerb

Ruby
2
star
94

rbayes

Ruby
1
star
95

flay-persistence

Ruby
1
star
96

firebrigade_api

Ruby
1
star
97

seattlerb_dashboard

Ruby
1
star
98

memcache-client

1
star
99

omnifocus-bugzilla

Ruby
1
star
100

rc-rest

Ruby
1
star