Giter VIP home page Giter VIP logo

specjour's Introduction

Specjour

Notes

Listener daemonized or foregrounded forks a loader loader should load, setsid, then exit all workers then have the same sid and gid with no parent pid worker pgid = 100 sid = 100 webkit_server worker pgid = 100 sid = 100 webkit_server

performance.txt printing informational messages single specjour command starts daemon interrupts handle no careful_test database bonjour announce project names printer#project_name aliases

Instructions

  1. Start a listener on every machine in the network. # specjour listen
  2. Start a dispatcher. # specjour
  3. Say farewell to your long coffee breaks.

Installation

gem install specjour

Rails

Each worker needs an isolated database. Modify the test database name in your config/database.yml to include the following environment variable (Influenced by parallel_tests):

test:
  database: project_name_test<%=ENV['TEST_ENV_NUMBER']%>

Give it a try

source .dev bin/specjour listen -f -l bin/specjour spec/

Run specjour to start a dispatcher, manager, and multiple workers in the same terminal window.

$ cd myproject
$ specjour

Start a manager

If you wish to share your computing power with the rest of the computers in your network, run specjour listen to start a long running process. The next time you, or any of your co-workers run specjour, they'll find your machine.

$ specjour listen

Distribute the tests

Dispatch the tests among the managers in the network. Specjour checks the 'spec' and 'features' directories for tests to send to the listening managers.

$ specjour

Supplementary

Distribute a subset of tests

The first parameter of the specjour command is a test directory. It defalts to the current directory and searches for 'spec' and 'features' paths therein.

$ specjour spec # all rspec tests
$ specjour spec/models # only model tests
$ specjour features # all features

Custom Hooks

Specjour allows you to hook in to the test process on a per-machine and per-worker level through the before_fork and after_fork configuration blocks. If the default hooks don't work for your project, they can be overridden.

# .specjour/hooks.rb

# Modify the way you use bundler
Specjour::Configuration.before_fork = lambda do
  system('bundle install --without production')
end

# Modify your database setup
Specjour::Configuration.after_fork = lambda do
  # custom database setup here
end

A preparation hook is run when specjour prepare is invoked. This hook allows you to run arbitrary code on all of the listening workers. By default, it recreates the database on all workers.

# .specjour/hooks.rb

# Modify preparation
Specjour::Configuration.prepare = lambda do
  # custom preparation code
end

Customize what gets rsync'd

The standard rsync configuration file may be too broad for your project. If you find you're rsyncing gigs of extraneous data from your public directory, add an exclusion to your project's rsyncd.conf file.

$ vi workbeast/.specjour/rsyncd.conf

Listen for multiple projects

By default, a manager will listen to the project in the current directory. If you want to run tests for multiple projects, use the --projects flag.

$ specjour listen --projects bizconf workbeast # run tests for the bizconf and workbeast projects

Give your project an alias

By default, the dispatcher looks for managers matching the project's directory name. If you have multiple teams working on different branches of the same project you may want to isolate each specjour cluster. Give your project an alias and only listen for that alias.

~/bizconf $ specjour listen --projects bizconf_08
~/bizconf $ specjour --alias bizconf_08

~/bizconf $ specjour listen --projects bizconf_09
~/bizconf $ specjour --alias bizconf_09

Working with git

Commit the .specjour directory but ignore the performance file. The performance file constantly changes, there's no need to commit it. Specjour uses it in an attempt to optimize the run order; ensuring each machine gets at least one long-running test.

$ cat .gitignore
/.specjour/performance

Compatibility

  • RSpec 2
  • Cucumber 0.9+
  • Rails 3

Support

Hacking on Specjour

If you want to hack on specjour, here is how to test your changes:

source .dev
rake # run the test suite sanely
specjour # run the test suite with specjour

Then if all is good, go to another app and test your changes on your test suite:

gem build specjour.gemspec
cd /path/to/your/project
gem install -l /path/to/specjour/latest.gem
specjour

Thanks

  • shayarnett - Cucumber support, pairing and other various patches
  • voxdolo - Endless support, alpha testing, various patches
  • l4rk and leshill - Removed Jeweler, added support for RSpec 2 and Cucumber 0.9+
  • testjour - Ripped off your name
  • parallel_tests - Inspiration

Note on Patches/Pull Requests

  • Fork the project.
  • $ source .dev to ensure you're using the local specjour binary, not the rubygems version
  • Make your feature addition or bug fix.
  • Add tests for it. This is important so I don't break it in a future version unintentionally.
  • Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
  • Send me a pull request. Bonus points for topic branches.

Copyright

Copyright (c) 2010 Sandro Turriate. See MIT_LICENSE for details.

specjour's People

Contributors

andrewradev avatar delitescere avatar jgdavey avatar josephlord avatar leshill avatar paulelliott avatar redsquirrel avatar sandro avatar shayarnett avatar skanev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

specjour's Issues

git-sourced gems don't get loaded via bundler

I have an app that has a gem required through git. When I run the specjour listener with bundle exec specjour listen, the Gemfile isn't loaded correctly. The git-sourced gem simply doesn't load. I get Could not find rack-ssl-enforcer-0.2.0.gem for installation and tests fail because of the missing gem.

Rspec-core current dev > 2.11.1

I would like to notice this error for future reference.

In the meantime I was trying to figure out for issue43, I think I found another issue :

Add this to the Gemfile:

#Gemfile
...
gem "rspec-core", "~> 2.11", :git => "https://github.com/rspec/rspec-core"

And you'll see this error

$bundle install
$bundle exec rake #ok
$bundle exec specjour
$bundle exec cucumber
Looking for listeners...
No listeners found on this machine, starting one...
Workers found: 4
pierres-imac.lan (4)
Loading RSpec environment... completed in 0.091339s
Loading Cucumber Environment
/Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:109:in `block (2 levels) in filtered_examples': undefined method `[]' for nil:NilClass (NoMethodError)
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:108:in `each'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:108:in `detect'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:108:in `block in filtered_examples'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:106:in `map'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:106:in `filtered_examples'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:96:in `rspec_examples'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:90:in `register_tests_with_printer'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:86:in `load_app'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/loader.rb:22:in `start'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/cli.rb:57:in `load'
    from /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/task.rb:27:in `run'
    from /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/invocation.rb:120:in `invoke_task'
    from /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor.rb:275:in `dispatch'
    from /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/thor-0.16.0/lib/thor/base.rb:425:in `start'
    from /Users/PierreOzoux/Documents/scripts/specjour/lib/specjour/cli.rb:24:in `start'
    from /Users/PierreOzoux/Documents/scripts/specjour/bin/specjour:5:in `<main>'

Do you find the same?

I tried to investigate...without success.. Sorry

cucumber or akephalos error?

(i'm writing you here my progress on this for reference..)

So I had this bug at the beginning :

LoadError: load error: pathname -- java.lang.UnsatisfiedLinkError: failed to load shim library, error: dlopen(/private/tmp/seedrs/file:/usr/local/lib/ruby/gems/1.9.1/gems/jruby-jars-1.6.5.1/lib/jruby-stdlib-1.6.5.1.jar!/META-INF/jruby.home/META-INF/jruby.homeDarwin/libjruby-cext.jnilib, 10): image not found
  require at org/jruby/RubyKernel.java:1047
  require at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36
   (root) at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/pathname.rb:14
  require at org/jruby/RubyKernel.java:1047
  require at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/pathname.rb:36
   (root) at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/akephalos2-2.1.2/lib/akephalos/server.rb:1

I tried this https://github.com/jruby/jruby/wiki/Troubleshooting
And now I have :

[1] Running /tmp/seedrs/features/admin/admin.feature
LoadError: load error: pathname -- java.lang.UnsatisfiedLinkError: no jruby-cext in java.library.path
  require at org/jruby/RubyKernel.java:1047
  require at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/rubygems/custom_require.rb:36
   (root) at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/pathname.rb:14
  require at org/jruby/RubyKernel.java:1047
  require at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/1.9.1/pathname.rb:36
   (root) at /usr/local/Cellar/ruby/1.9.3-p194/lib/ruby/gems/1.9.1/gems/akephalos2-2.1.2/lib/akephalos/server.rb:1

I'm still investigating.

(i wanted to comment your last comment, but I preferred to open an issue, for others, maybe, it's not a specjour bug, still don't know..)

RSpec 3 - backtrace_clean_patterns

When I try to use specjour, I'm getting

Workers ready: 4
Listening for qa-automation
rsync -aL --delete --ignore-errors --port=23456 192.168.50.79::qa-automation /private/tmp/qa-automation... completed in 13.986203s
before_fork... completed in 0.520666s
/Users/xxx/Documents/qa-automation/.bundle/gems/specjour-0.7.0/lib/specjour/rspec/runner.rb:2:in `<module:Runner>': undefined method `backtrace_clean_patterns' for #<RSpec::Core::Configuration:0x007fa8ca133920> (NoMethodError)
    from /Users/xxxx/Documents/qa-automation/.bundle/gems/specjour-0.7.0/lib/specjour/rspec/runner.rb:1:in `<top (required)>'
    from /Users/xxxx/.rbenv/versions/2.0.0-p481/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/xxxx/.rbenv/versions/2.0.0-p481/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/xxxx/Documents/qa-automation/.bundle/gems/specjour-0.7.0/lib/specjour/rspec.rb:10:in `<module:RSpec>'
    from /Users/xxxx/Documents/qa-automation/.bundle/gems/specjour-0.7.0/lib/specjour/rspec.rb:2:in `<module:Specjour>'
    from /Users/xxxx/Documents/qa-automation/.bundle/gems/specjour-0.7.0/lib/specjour/rspec.rb:1:in `<top (required)>'
    from /Users/xxxx/Documents/qa-automation/.bundle/gems/specjour-0.7.0/lib/specjour/loader.rb:84:in `load_app'

Could anyone help please? Thank you!

Potential issue with prepare

Running specjour prepare causes Postgres to log errors that it can't find the databases, but it creates them (without tables). On a subsequent run, no errors are logged, but also no tables are created. We are running Rails 3.0.7 and RSpec 2.5.0 and Postgres.

After significant troubleshooting, I figured out that I needed to run rake spec once (I can abort with control-c) before I can run rspec directly (e.g. on a subset of our specs). Similarly, I need to run rake spec on each test database (assuming two cores) before specjour works:

rake spec TEST_ENV_NUMBER=1
control-c (after tests start)
rake spec TEST_ENV_NUMBER=2
control-c (after tests start)
specjour

Clearly, rake is running some important database setup tasks / code (we have custom code in the root level rails Rakefile and possibly other places).

I think I can run arbitrary code on each specjour test database by setting Specjour::Configuration.prepare in .specjour/hooks.rb, so if there's any rake tasks or other code that I need to run, it may work there.

parallel_tests seems to set up its databases correctly, but many of our specs fail.

DNSSD error

I get following error when I try to run specjour:

tjama@tjama-VirtualBox:~/dev/rack.apps$ specjour
Looking for listeners...
/home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/dnssd-2.0/lib/dnssd/service.rb:253:in `_resolve': DNSSD operation failed with error code: -65540 (DNSSD::BadParamError)
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/dnssd-2.0/lib/dnssd/service.rb:253:in `resolve'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/dnssd-2.0/lib/dnssd.rb:178:in `run'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/dnssd-2.0/lib/dnssd.rb:170:in `resolve!'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:130:in `block in resolve_reply'
    from /home/tjama/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:129:in `resolve_reply'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:105:in `block in gather_remote_managers'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:105:in `each'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:105:in `rescue in gather_remote_managers'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:97:in `gather_remote_managers'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:91:in `gather_managers'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/dispatcher.rb:24:in `start'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/cli.rb:78:in `dispatch'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/lib/specjour/cli.rb:24:in `start'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/gems/specjour-0.7.0/bin/specjour:5:in `<top (required)>'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/bin/specjour:23:in `load'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/bin/specjour:23:in `<main>'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `eval'
    from /home/tjama/.rvm/gems/ruby-2.0.0-p353/bin/ruby_executable_hooks:15:in `<main>'

Will not run on a linux computer

I am trying to run specjour on a linux computer (ubuntu 11.04) and I get an error

my stack trace for the error is

$ specjour
Looking for managers...
No listeners found on this machine, starting one...
/home/austin/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require': no such file to load -- rspec/core (LoadError)
    from /home/austin/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/rspec.rb:3
    from /home/austin/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `gem_original_require'
    from /home/austin/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:29:in `require'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/manager.rb:4
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/dispatcher.rb:94:in `fork_local_manager'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/dispatcher.rb:106:in `gather_managers'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/dispatcher.rb:23:in `start'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/cli.rb:49:in `dispatch'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/thor-0.14.6/lib/thor/task.rb:22:in `send'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/lib/specjour/cli.rb:18:in `start'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/gems/specjour-0.4.1/bin/specjour:5
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/bin/specjour:19:in `load'
    from /home/austin/.rvm/gems/ruby-1.8.7-p302@project/bin/specjour:19

In order to not muck up the issue I will not put all the outputs but more information can be found at http://stackoverflow.com/questions/6756239/specjour-error-trace

undefined method `step_mother' for Cucumber::Cli::Main:Class (NoMethodError)

I'm running 0.3.0.rc8 and am having trouble running my cucumber features. I'm able to run my features with rake cucumber just fine, but when I run specjour, get the following error a couple times and my features aren't run:

/Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/worker.rb:97:in `run_feature': undefined method `step_mother' for Cucumber::Cli::Main:Class (NoMethodError)
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/worker.rb:89:in `run_test'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/worker.rb:42:in `run_tests'
from /Users/treybean/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/1.8/benchmark.rb:308:in `realtime'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/worker.rb:42:in `run_tests'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/worker.rb:53:in `send'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/worker.rb:53:in `start'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/cli.rb:80:in `work'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/thor-0.14.2/lib/thor/task.rb:22:in `send'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/thor-0.14.2/lib/thor/task.rb:22:in `run'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/thor-0.14.2/lib/thor/invocation.rb:118:in `invoke_task'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/thor-0.14.2/lib/thor.rb:246:in `dispatch'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/thor-0.14.2/lib/thor/base.rb:389:in `start'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/lib/specjour/cli.rb:18:in `start'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/gems/specjour-0.3.0.rc8/bin/specjour:5
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/bin/specjour:19:in `load'
from /Users/treybean/.rvm/gems/ruby-1.8.7-p302@freightlink_tracker/bin/specjour:19

gemset:

*** LOCAL GEMS ***

actionmailer (2.3.4)
actionpack (2.3.4)
activemodel (3.0.0)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (3.0.0, 2.3.4)
arel (1.0.1)
Ascii85 (1.0.0)
aws-s3 (0.6.2)
builder (2.1.2)
bundler (1.0.0)
capybara (0.3.9)
columnize (0.3.1)
configuration (1.1.0)
cucumber (0.9.0)
cucumber-rails (0.3.2)
culerity (0.2.12)
database_cleaner (0.5.2)
declarative_authorization (0.5.1)
diff-lcs (1.1.2)
dnssd (1.3.4)
email_spec (0.6.2)
factory_girl (1.3.2)
ffi (0.6.3)
gherkin (2.2.4)
haml (3.0.18)
heroku (1.10.8)
i18n (0.4.1)
json (1.4.6)
json_pure (1.4.6)
launchy (0.3.7)
linecache (0.43)
mime-types (1.16)
nokogiri (1.4.3.1)
open4 (0.9.6)
pdf-reader (0.8.6)
rack (1.0.1)
rack-test (0.5.6)
rails (2.3.4)
rake (0.8.7)
rake-remote_task (2.0.2)
rdoc (2.5.11)
rest-client (1.6.1)
right_aws (2.0.0)
right_http_connection (1.2.4)
rspec (1.3.0)
rspec-rails (1.3.2)
ruby-debug (0.10.3)
ruby-debug-base (0.10.3)
ruby-ole (1.2.10.1)
rubyzip (0.9.4)
searchlogic (2.4.14)
selenium-webdriver (0.0.28)
sequel (3.15.0)
sinatra (1.0)
specjour (0.3.0.rc8)
spreadsheet (0.6.4.1)
sqlite3-ruby (1.3.1)
taps (0.3.13)
term-ansicolor (1.0.5)
thor (0.14.2)
thoughtbot-factory_girl (1.2.2)
trollop (1.16.2)
tzinfo (0.3.23)
vlad (2.1.0)
will_paginate (2.3.15)
xml-simple (1.0.12)

Thanks, Specjour rules!

Is this project still in development?

No commits for 6 months. Have you just been busy Sandro or have you stopped working on the project? Either way I'm glad to see that you are still active from your public activity.

You obviously don't owe anybody further work on this or any other project but I wanted to let you know that I am still following the project and appreciate your existing work.

Frequent but intermittent failure in specjour listen on Linux

/tmp/specjour/lib/specjour/connection.rb:46:in block in print': private methodprint' called for nil:NilClass (NoMethodError)
from /tmp/specjour/lib/specjour/connection.rb:82:in call' from /tmp/specjour/lib/specjour/connection.rb:82:inwill_reconnect'
from /tmp/specjour/lib/specjour/connection.rb:45:in print' from /tmp/specjour/lib/specjour/connection.rb:58:inblock in send_message'
from /tmp/specjour/lib/specjour/connection.rb:82:in call' from /tmp/specjour/lib/specjour/connection.rb:82:inwill_reconnect'
from /tmp/specjour/lib/specjour/connection.rb:57:in send_message' from /home/josephl/hf/specjour/specjour/lib/specjour/loader.rb:91:inregister_tests_with_printer'
from /home/josephl/hf/specjour/specjour/lib/specjour/loader.rb:86:in load_app' from /home/josephl/hf/specjour/specjour/lib/specjour/loader.rb:22:instart'
from /home/josephl/hf/specjour/specjour/lib/specjour/cli.rb:57:in load' from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor.rb:263:indispatch'
from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /home/josephl/hf/specjour/specjour/lib/specjour/cli.rb:24:instart'
from /home/josephl/hf/specjour/specjour/bin/specjour:5:in `

I don't understand what is happening here but I am usually but not always getting failures on my Linux based test server. I tried the current Gem and have built from the git source too but it doesn't seem to make a difference. I have also tried with Firewalls disabled.

This is output below from the 'specjour listen' command on the Linux server when I sent two 'specjour spec' commands from my OS X dev laptop. 90% of the time I get the failure you see that was the result of the second 'specjour spec' command. Sometimes the failure is received 4 times (it is a 4 core machine).

With my own application I have seen cases where I get the error message but it still manages a significant number

rsync -aL --delete --ignore-errors --port=23456 192.168.1.71::specjour /tmp/specjour
rsync complete
Loading RSpec Environment
Loading Cucumber Environment
[1] Running /tmp/specjour/features/undefined.feature
[1] Finished /tmp/specjour/features/undefined.feature in 0.0235
Workers ready: 4
Listening for specjour
rsync -aL --delete --ignore-errors --port=23456 192.168.1.71::specjour /tmp/specjour
rsync complete
Loading RSpec Environment
[1] Running /tmp/specjour/spec/specjour/cli_spec.rb:37
[2] Running /tmp/specjour/spec/specjour/cli_spec.rb:61
[4] Running /tmp/specjour/spec/specjour/cli_spec.rb:76[3] Running /tmp/specjour/spec/specjour/cli_spec.rb:71

[1] Finished /tmp/specjour/spec/specjour/cli_spec.rb:37 in 0.0398
[2] Finished /tmp/specjour/spec/specjour/cli_spec.rb:61 in 0.0449
[1] Running /tmp/specjour/spec/specjour/cli_spec.rb:83
[3] Finished /tmp/specjour/spec/specjour/cli_spec.rb:71 in 0.0480
[2] Running /tmp/specjour/spec/specjour/cli_spec.rb:88
[4] Finished /tmp/specjour/spec/specjour/cli_spec.rb:76 in 0.0442
[3] Running /tmp/specjour/spec/specjour/cli_spec.rb:93
[2] Finished /tmp/specjour/spec/specjour/cli_spec.rb:88 in 0.0167
[1] Finished /tmp/specjour/spec/specjour/cli_spec.rb:83 in 0.0197
[3] Finished /tmp/specjour/spec/specjour/cli_spec.rb:93 in 0.0165
[4] Running /tmp/specjour/spec/specjour/cli_spec.rb:98
[1] Running /tmp/specjour/spec/specjour/cli_spec.rb:103
[2] Running /tmp/specjour/spec/specjour/cli_spec.rb:117[3] Running /tmp/specjour/spec/specjour/cli_spec.rb:123

[3] Finished /tmp/specjour/spec/specjour/cli_spec.rb:123 in 0.0154
[4] Finished /tmp/specjour/spec/specjour/cli_spec.rb:98 in 0.0168
[1] Finished /tmp/specjour/spec/specjour/cli_spec.rb:103 in 0.0184
[2] Finished /tmp/specjour/spec/specjour/cli_spec.rb:117 in 0.0214
[3] Running /tmp/specjour/spec/specjour/cli_spec.rb:137
[4] Running /tmp/specjour/spec/specjour/cli_spec.rb:142
[1] Running /tmp/specjour/spec/specjour/cli_spec.rb:148
[2] Running /tmp/specjour/spec/specjour/configuration_spec.rb:45
[3] Finished /tmp/specjour/spec/specjour/cli_spec.rb:137 in 0.0151
[4] Finished /tmp/specjour/spec/specjour/cli_spec.rb:142 in 0.0160
[3] Running /tmp/specjour/spec/specjour/configuration_spec.rb:56
[1] Finished /tmp/specjour/spec/specjour/cli_spec.rb:148 in 0.0148
[2] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:45 in 0.0153
[4] Running /tmp/specjour/spec/specjour/configuration_spec.rb:65
[1] Running /tmp/specjour/spec/specjour/configuration_spec.rb:73
[2] Running /tmp/specjour/spec/specjour/configuration_spec.rb:84
[3] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:56 in 0.0156
[3] Running /tmp/specjour/spec/specjour/configuration_spec.rb:95
[4] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:65 in 0.0133
[4] Running /tmp/specjour/spec/specjour/configuration_spec.rb:103
[4] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:103 in 0.0134
[1] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:73 in 0.0322
[4] Running /tmp/specjour/spec/specjour/configuration_spec.rb:111
[1] Running /tmp/specjour/spec/specjour/configuration_spec.rb:115
[3] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:95 in 0.0348
[3] Running /tmp/specjour/spec/specjour/configuration_spec.rb:122
[1] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:115 in 0.0141
[4] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:111 in 0.0322
[1] Running /tmp/specjour/spec/specjour/cpu_spec.rb:25
[4] Running /tmp/specjour/spec/specjour/loader_spec.rb:10
[1] Finished /tmp/specjour/spec/specjour/cpu_spec.rb:25 in 0.0098
[4] Finished /tmp/specjour/spec/specjour/loader_spec.rb:10 in 0.0121
[1] Running /tmp/specjour/spec/specjour/loader_spec.rb:35
[2] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:84 in 0.0923
[4] Running /tmp/specjour/spec/specjour/loader_spec.rb:53
[2] Running /tmp/specjour/spec/specjour/manager_spec.rb:6
[1] Finished /tmp/specjour/spec/specjour/loader_spec.rb:35 in 0.0129
[4] Finished /tmp/specjour/spec/specjour/loader_spec.rb:53 in 0.0129
[2] Finished /tmp/specjour/spec/specjour/manager_spec.rb:6 in 0.0114
[1] Running /tmp/specjour/spec/specjour/manager_spec.rb:10
[4] Running /tmp/specjour/spec/specjour/manager_spec.rb:15
[2] Running /tmp/specjour/spec/specjour/printer_spec.rb:9
[1] Finished /tmp/specjour/spec/specjour/manager_spec.rb:10 in 0.0079
[4] Finished /tmp/specjour/spec/specjour/manager_spec.rb:15 in 0.0080
[1] Running /tmp/specjour/spec/specjour/printer_spec.rb:14
[2] Finished /tmp/specjour/spec/specjour/printer_spec.rb:9 in 0.0139
[4] Running /tmp/specjour/spec/specjour/printer_spec.rb:19
[2] Running /tmp/specjour/spec/specjour/printer_spec.rb:24
[3] Finished /tmp/specjour/spec/specjour/configuration_spec.rb:122 in 0.0861
[1] Finished /tmp/specjour/spec/specjour/printer_spec.rb:14 in 0.0135
[4] Finished /tmp/specjour/spec/specjour/printer_spec.rb:19 in 0.0134
[3] Running /tmp/specjour/spec/specjour/printer_spec.rb:48
[2] Finished /tmp/specjour/spec/specjour/printer_spec.rb:24 in 0.0138
[1] Running /tmp/specjour/spec/specjour/printer_spec.rb:59
[4] Running /tmp/specjour/spec/specjour/printer_spec.rb:72
[2] Running /tmp/specjour/spec/specjour/printer_spec.rb:83
[1] Finished /tmp/specjour/spec/specjour/printer_spec.rb:59 in 0.0156
[4] Finished /tmp/specjour/spec/specjour/printer_spec.rb:72 in 0.0156
[3] Finished /tmp/specjour/spec/specjour/printer_spec.rb:48 in 0.0190
[2] Finished /tmp/specjour/spec/specjour/printer_spec.rb:83 in 0.0159
[1] Running /tmp/specjour/spec/specjour/printer_spec.rb:98
[3] Running /tmp/specjour/spec/specjour/printer_spec.rb:111
[4] Running /tmp/specjour/spec/specjour/printer_spec.rb:124
[2] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:18
[3] Finished /tmp/specjour/spec/specjour/printer_spec.rb:111 in 0.0191
[3] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:19
[1] Finished /tmp/specjour/spec/specjour/printer_spec.rb:98 in 0.0292
[2] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:18 in 0.0282
[4] Finished /tmp/specjour/spec/specjour/printer_spec.rb:124 in 0.0289
[1] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:22
[2] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:27
[4] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:33
[3] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:19 in 0.0288
[1] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:22 in 0.0196
[4] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:33 in 0.0205
[3] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:59
[1] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:66
[4] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:74
[3] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:59 in 0.0206
[4] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:74 in 0.0193
[1] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:66 in 0.0352
[3] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:80
[4] Running /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:89
[1] Running /tmp/specjour/spec/specjour_spec.rb:11
[1] Finished /tmp/specjour/spec/specjour_spec.rb:11 in 0.0081
[1] Running /tmp/specjour/spec/specjour_spec.rb:15
[1] Finished /tmp/specjour/spec/specjour_spec.rb:15 in 0.0080
[3] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:80 in 0.0377
[4] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:89 in 0.0373
[2] Finished /tmp/specjour/spec/specjour/rsync_daemon_spec.rb:27 in 0.1200
Workers ready: 4
Listening for specjour
rsync -aL --delete --ignore-errors --port=23456 192.168.1.71::specjour /tmp/specjour
rsync complete
Loading RSpec Environment
/tmp/specjour/lib/specjour/connection.rb:46:in block in print': private methodprint' called for nil:NilClass (NoMethodError)
from /tmp/specjour/lib/specjour/connection.rb:82:in call' from /tmp/specjour/lib/specjour/connection.rb:82:inwill_reconnect'
from /tmp/specjour/lib/specjour/connection.rb:45:in print' from /tmp/specjour/lib/specjour/connection.rb:58:inblock in send_message'
from /tmp/specjour/lib/specjour/connection.rb:82:in call' from /tmp/specjour/lib/specjour/connection.rb:82:inwill_reconnect'
from /tmp/specjour/lib/specjour/connection.rb:57:in send_message' from /home/josephl/hf/specjour/specjour/lib/specjour/loader.rb:91:inregister_tests_with_printer'
from /home/josephl/hf/specjour/specjour/lib/specjour/loader.rb:86:in load_app' from /home/josephl/hf/specjour/specjour/lib/specjour/loader.rb:22:instart'
from /home/josephl/hf/specjour/specjour/lib/specjour/cli.rb:57:in load' from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor.rb:263:indispatch'
from /home/josephl/.rvm/gems/ruby-1.9.3-p125@specjour/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /home/josephl/hf/specjour/specjour/lib/specjour/cli.rb:24:instart'
from /home/josephl/hf/specjour/specjour/bin/specjour:5:in `

'
Workers ready: 4
Listening for specjour

rsync issue after install

This is probably a networking problem on my end, but wanted to see if you had any input - this was after a fresh gem install, and I have a proper database.yml set up on the test: property.

Looking for listeners...
No listeners found on this machine, starting one...
Workers found: 2
"myhostname replaced" (2)
rsync: getaddrinfo: "myhostname replaced" 23456: nodename nor servname provided, or not known
rsync error: error in socket IO (code 10) at /SourceCache/rsync/rsync-42/rsync/clientserver.c(105) [receiver=2.6.9]

Any input would be appreciated, and sorry if an issue report is the wrong place for this.

Doens't work with symlinks (cached_externals plugin)

In a project I'm using 37 signals cached_externals plugin. This creates symlinks in vendor/plugins/ to a dir outside the project. specjour obviously fails since only the symlinks are synced to another box. The fix is easy. Add the -L option to the rsync command meaning it will resolve symlinks and copy everything.

Using specjour with Microsoft SQLServer on OS X

I'm using OS X 10.6.3, Rails 2.3.5, rSpec 1.3.0, rSpec-Rails 1.3.2 and I have found that with how I have my system configured for access to Microsoft SQLServer, I needed to do things a bit more manually... but it does work.

I have a dual core machine and nothing to SSH to so I'm just rolling tests locally, but I'd like to be able to use both cores and 2 databases.

To do so I edited my "odbc.ini" file and created 2 explicit DSN entries. I have [APP_TEST1] and [APP_TEST2].

The reason this is important is that the DSN entries seems to override the setting in the database.yml file for the database name. Without manually specifying 2 DSN entries I was getting deadlock conflicts since 2 workers were both trying to hit the same DB. It's possible some other configuration (perhaps not specifying the database name in the DNS at all) would not require 2 DSN entries but getting SQL talking to OS X or Linux is always such a PITA that if it ain't broke... ya know how it goes.

Configuration details below:

odbc.ini (in /opt/local/etc/odbc.ini)

[APP_TEST1]
Driver = FreeTDS
Description = my app's development/test db
Servername = APPSQL_LOCAL
Server = APPSQL_LOCAL
Port = 1433
Database = app_test1

[APP_TEST2]
Driver = FreeTDS
Description = my app's development/test db
Servername = APPSQL_LOCAL
Server = APPSQL_LOCAL
Port = 1433
Database = app_test2

_In the interest of being complete I'll include the rest of my OS X -> SQLServer configuration that I _DID NOT* have to edit to get this working*


odbcinst.ini (in /opt/local/etc/odbcinst.ini)

[FreeTDS]
Decscription = FreeTDS driver for SQLServer
Driver = /opt/local/lib/libtdsodbc.so
Setup = /opt/local/lib/libtdsodbc.so
FileUsage = 1

freetds.conf (in /opt/local/etc/freetds/freetds.conf)

[APPSQL_LOCAL]
        host = 10.211.55.3
        port = 1433
        tds version = 8.0

Using specjour with Rails 3.2

We had specjour (0.4.1) working with our rails app (rails 3.0.12 & rspec 2.5.0 & rspec-rails 2.5.0) by using some hooks to reset fixtures after each test and load the test db after each fork.

We just upgraded to rails 3.2.6 & rspec 2.10.0 & rspec-rails 2.10.1 & specjour 0.5.6. All specs pass when we run rake spec.

When we run specs with specjour, we are having a lot of specs failing. We worked around the known rspec-core issue by patching it to keep the configuration around (rather than resetting it). We worked around a fixture issue (a name changed). A lot of the specs that are still failing seem to be related to code that uses the Rails cache.

Does anyone know of a version combination for rspec / rspec-rails / specjour (and/or a hook / workaround / anything) that works with rails 3.2.6?

I also asked this on Stack Overflow:
http://stackoverflow.com/questions/11232978/using-specjour-with-rails-3-2

Is there a way to stop the db_scrub task from running?

I see now that in specjour there is a rails/init.rb that adds an after_initialize block to the rails startup, so now it seems that if you have an initializer that does do some DB setup, whatever task specjour specifies to run will also be run?

I'm using bundler and have :

gem "specjour", :require => nil

And then I have an initializer that does some DB setup. However I cannot figure out how to remove your rails after_initialize block without deleting/renaming the file in the gem.

Any help would be much appreciated.

Thanks
Aaron

Specifying a task for the db_scrub file

Is it possible to add as a feature the ability to specify a rake task for the database setup. I tried your idea on the main page, but if I remove specjour from my Gemfile then I don't get the 'rake specjour' task as I can't require them in the Rakefile.

I'm just wondering if you could elaborate on having a non-standard database setup task?

Cannot start specjour (nodename nor servname provided, or not known)

Looking for managers...
(druby://192.168.1.51:50283) /Users/txus/.rvm/gems/ruby-1.8.7-head@rails3/gems/specjour-0.3.0.rc5/lib/specjour/socket_helper.rb:4:in `getaddrinfo': getaddrinfo: nodename nor servname provided, or not known (SocketError)

I get this error when running "specjour". Should I specify any special arguments, or do something else..?

Worker tiemout feature?

It could be nice to have this feature.

I have a test that fail randomly, and the worker print the error, but doesn't quit. So it could be nice to have a timeout. Like if a worker doen't respond during 60sec, then the manager will kill him, and send the output if this worker to the dispatcher (with the computer name)

What do you think about it?

I can work on that if you give some tips to start quickly :)

Thanks,

Pierre

rsync error - should specjour lisrten quit?

Hi,

I have this error (i'm investigating where does it come from)

rsync -aL --delete --ignore-errors --port=23456 192.168.1.X::workspace /tmp/workspace... rsync: failed to connect to 192.168.1.X (192.168.1.X): Connection refused (111)
rsync error: error in socket IO (code 10) at clientserver.c(122) [Receiver=3.0.9]

Is it normal behavior that specjour hang there without quiting? (and without returning to Listening for ... )

Thanks for your help again!

second invocation of "rake specjour" fails

The first time I run rake specjour, it works fine. I can break out of it with ctrl-c. If I try to run it again, I get this:

$ rake specjour
(in /Users/cto/git/myproj)
Waiting for managers
Managers found: 0

...and it exits. If I close the shell, open a new one and run it again, I get this new error:

$  rake specjour --trace
(in /Users/cto/git/myproj)
** Invoke specjour (first_time)
** Invoke specjour:dispatch (first_time)
** Execute specjour:dispatch
Waiting for managers
rake aborted!
getaddrinfo: nodename nor servname provided, or not known
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/socket_helpers.rb:4:in `getaddrinfo'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/socket_helpers.rb:4:in `ip_from_hostname'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/dispatcher.rb:97:in `resolve_reply'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd/service.rb:160:in `process'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd/service.rb:254:in `resolve'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd.rb:178:in `send'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd.rb:178:in `run'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd.rb:170:in `resolve!'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/dispatcher.rb:96:in `resolve_reply'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/dispatcher.rb:70:in `gather_managers'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd/service.rb:160:in `process'
/Library/Ruby/Gems/1.8/gems/dnssd-1.3.1/lib/dnssd/service.rb:65:in `browse'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/dispatcher.rb:68:in `gather_managers'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/dispatcher.rb:67:in `gather_managers'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/dispatcher.rb:24:in `start'
/Library/Ruby/Gems/1.8/gems/specjour-0.2.5/lib/specjour/tasks/dispatch.rake:6
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `call'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:636:in `execute'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `each'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:631:in `execute'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:597:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:607:in `invoke_prerequisites'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `each'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:604:in `invoke_prerequisites'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:596:in `invoke_with_call_chain'
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:590:in `invoke_with_call_chain'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:583:in `invoke'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in `invoke_task'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `each'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in `top_level'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2023:in `top_level'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in `run'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in `standard_exception_handling'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in `run'
/Users/cto/.gem/ruby/1.8/gems/rake-0.8.7/bin/rake:31
/usr/bin/rake:19:in `load'
/usr/bin/rake:19

undefined method preload_spec=

For some reason I'm seeing this when trying to use specjour:

.rvm/gems/ree-1.8.7-2010.02/gems/specjour-0.3.1/lib/specjour/dispatcher.rb:164:in set_up_manager': undefined methodpreload_spec=' for #Specjour::Manager:0x102f6ac18 (NoMethodError)

Just doing basic specjour commands as listed in the readme. Anyone ever seen this?

undefined method `step_mother' for Cucumber::Cli::Main:Class

Could issue 14 have crept back in?

*** LOCAL GEMS ***

activesupport (3.2.6)
addressable (2.2.8)
bigdecimal (1.1.0)
builder (3.0.0)
childprocess (0.3.2)
columnize (0.3.6)
cucumber (1.2.1)
daemons (1.1.8)
diff-lcs (1.1.3)
execjs (1.4.0)
factory_girl (3.4.0)
ffi (1.0.11)
gherkin (2.11.0 x86-mingw32)
i18n (0.6.0)
io-console (0.3)
json (1.5.4)
libwebsocket (0.1.3)
minitest (2.5.1)
multi_json (1.3.6)
nwrfc (0.0.5)
ParseTree (3.0.9)
pickle (0.4.10)
rake (0.9.2.2)
rbx-require-relative (0.0.9)
rdiscount (1.6.8)
rdoc (3.9.4)
redis (3.0.1)
rspec (2.10.0, 1.3.0) <--- I needed <a low[er] version> in order to get the gem to build
rspec-core (2.10.1)
rspec-expectations (2.10.0)
rspec-mocks (2.10.1)
RubyInline (3.9.0)
rubyzip (0.9.8)
selenium-webdriver (2.22.2)
sexp_processor (3.2.0)
systemu (2.5.1)
testjour (0.3.2)
watir-webdriver (0.6.1)
ZenTest (4.8.1)
C:\Dropbox\test\proj1>testjour slave:start
C:/Ruby/lib/ruby/gems/1.9.1/gems/testjour-0.3.2/lib/testjour/configuration.rb:79:in `step_mother': undefined method `step_mother' for Cucumber::Cli::M
ain:Class (NoMethodError)
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/testjour-0.3.2/lib/testjour/configuration.rb:20:in `setup'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/testjour-0.3.2/lib/testjour/commands/run.rb:21:in `execute'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/testjour-0.3.2/lib/testjour/cli.rb:36:in `execute'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/testjour-0.3.2/lib/testjour/cli.rb:7:in `execute'
        from C:/Ruby/lib/ruby/gems/1.9.1/gems/testjour-0.3.2/bin/testjour:8:in `<top (required)>'
        from C:/Ruby/bin/testjour:23:in `load'
        from C:/Ruby/bin/testjour:23:in `<main>'

excluding 'log' in rsyncd breaks real code...

G'day.

So, we have a log subsystem in our code, which has tests in spec/unit/util/log โ€“ and which are excluded because 'log' matches the default rsyncd exclusion pattern.

It would be good to match only '/log' there, and ideal not to exclude it at all, but document it to people to optimize things, IMO.

Regards,
Daniel

Rspec 2.11 config issue

Hi,

I would love to use specjour in production, but it doesn't work.

I tracked the issue, and I get to the point that something between my monkey patch from rails_warden and specjour is not working.

I have a monkey patch in my spec_helper :

# monkey patch
module RailsWarden::Mixins::HelperMethods
  def warden #:nodoc:
    @warden ||= begin
      p "during monkey patch"
      manager = Warden::Manager.new(nil)
      request.env["warden"] = Warden::Proxy.new(request.env, manager)
    end
  end
end

When I run rspec, it is printing "during monkey patch", and the test is successful.
When I run it with specjour, it is not printing "during monkey patch", and the test is not successful.

If I put this monkey patch in the actual code of rails_warden, I have the same behavior from specjour.

I have time to debug, as it will help us a lot to reduce our time to run our tests...

Do you have any idea where it can come from? Then I'll investigate!

Thanks a lot for your work!

Pierre

Feature request: pass options to cucumber cli

I need to be able to filter the features that are run on tag, like --tags ~@wip
I have forked this repo and my first attempt is as follows, borrowing the convention of ENV['CUCUMBER_OPTS'] from cucumber.rake.

https://github.com/briandunn/specjour/blob/master/lib/specjour/cucumber/runner.rb

This doesn't seem to affect the listeners, presumably because the environment of dispatch is not available. Do you have any thoughts on how something like this should be communicated to the listeners?

Getting 'no such file to load' for specjour/configuration

Did a gem install, get this whenever running:

/Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/specjour-0.4.0/lib/specjour/worker.rb:37:in run_tests': no such file to load -- specjour/configuration (LoadError) from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/specjour-0.4.0/lib/specjour/worker.rb:53:insend'
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/specjour-0.4.0/lib/specjour/worker.rb:53:in start' from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/specjour-0.4.0/lib/specjour/cli.rb:84:inwork'
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/thor-0.14.6/lib/thor/task.rb:22:in send' from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/thor-0.14.6/lib/thor/task.rb:22:inrun'
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/thor-0.14.6/lib/thor/invocation.rb:118:in invoke_task' from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/thor-0.14.6/lib/thor.rb:263:indispatch'
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/thor-0.14.6/lib/thor/base.rb:389:in start' from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/specjour-0.4.0/lib/specjour/cli.rb:18:instart'
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/gems/specjour-0.4.0/bin/specjour:5
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/bin/specjour:19:in `load'
from /Users/coreyhaines/.rvm/gems/ruby-1.8.7-p334@mercuryapp/bin/specjour:19

Specjour doesn't reassign specs if the worker is unable to run them

For example, when we bumped rails versions from 2.3.4 to 2.3.5, my machine didn't have 2.3.5 installed and thus it wasn't able to actually run any of the specs assigned to it.

If specjour was able to notice this, it could have reassigned the specs to another worker and then there wouldn't have been any false failures.

(We're running 0.1.18)

Not playing well with rspec-core 2.11.1

I couldn't make it work with rspec-core 2.11.1

I am using specjour (0.7.0)

here is the error i am getting

/usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:108:in block in filtered_examples': undefined methodparent_groups' for RSpec::Core::ExampleGroup::Nested_1::Nested_1:Class (NoMethodError)
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:106:in map' from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:106:infiltered_examples'
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:96:in rspec_examples' from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:90:inregister_tests_with_printer'
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:86:in load_app' from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/loader.rb:22:instart'
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/cli.rb:57:in load' from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/thor-0.16.0/lib/thor/task.rb:27:inrun'
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/thor-0.16.0/lib/thor/invocation.rb:120:in invoke_task' from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/thor-0.16.0/lib/thor.rb:275:indispatch'
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/thor-0.16.0/lib/thor/base.rb:425:in start' from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/lib/specjour/cli.rb:24:instart'
from /usr/local/rvm/gems/ruby-1.9.3-p194@redzone/gems/specjour-0.7.0/bin/specjour:5:in `

'

0.5.3 won't run with thor-0.15.2

Reverting to thor-0.14.6 resolved the issue for me. Not sure whether the bug is in specjour or thor or if you want to document or update.

jl-mbp:dashboard josephl$ specjour
/Users/josephl/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor.rb:273:in dispatch': protected methodargs' called for #Specjour::CLI:0x007faaf391ea88 (NoMethodError)
from /Users/josephl/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/base.rb:408:in start' from /Users/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.3/lib/specjour/cli.rb:24:instart'
from /Users/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.3/bin/specjour:5:in <top (required)>' from /Users/josephl/.rvm/gems/ruby-1.9.3-p194/bin/specjour:19:inload'
from /Users/josephl/.rvm/gems/ruby-1.9.3-p194/bin/specjour:19:in `

'

List managers at beginning of rake task

It would be great to see where the managers are, so it's easier to shut them down if there's a stray one. Example new output:

> rake specjour
Waiting for managers
Managers found: 2 (thehostname.local:57406, thehostname.local:57407)
 Workers found: 16

Here's a patch that might rock it:

diff --git a/lib/specjour/dispatcher.rb b/lib/specjour/dispatcher.rb
index 35370c3..7887856 100644
--- a/lib/specjour/dispatcher.rb
+++ b/lib/specjour/dispatcher.rb
@@ -74,12 +74,19 @@ module Specjour
         end
       rescue Timeout::Error
       end
-      puts "Managers found: #{managers.size}"
+      puts "Managers found: #{managers.size}#{print_manager_list}"
       abort unless managers.size > 0
-      puts "Workers found: #{worker_size}"
+      puts " Workers found: #{worker_size}"
       printer.worker_size = worker_size
     end

+    def print_manager_list
+      return unless managers.size > 0
+      result = " ("
+      result << managers.map {|mgr| "#{mgr.send(:drb_uri).host}:#{mgr.send(:drb_uri).port}"}.join(', ')
+      result << ")"
+    end
+
     def printer
       @printer ||= Printer.start(all_specs)
     end

Run with cucumber issue

Hi,

it's not working with cucumber. I'm sorry :)

So I tried 3 approaches :

On my code, it is failing because each worker is sending the result of his first step (in 0.001sec).

On Specjour code, when I try with just one worker (with the option -w1), it is passing just the first feature and not the other one.

I made a little script to mock the behavior of specjour : here

require 'cucumber'


configuration = ::Cucumber::Cli::Configuration.new
configuration.parse! []
runtime = ::Cucumber::Runtime.new(configuration)
runtime.send :load_step_definitions

def run feature, runtime    
    cli = ::Cucumber::Cli::Main.new([feature])

    runtime.instance_variable_set(:@configuration, cli.configuration)
  runtime.instance_eval do
      tree_walker = @configuration.build_tree_walker(self)
      self.visitor = tree_walker
      tree_walker.visit_features(features)
  end

end

feature1 = "features/fail.feature"
feature2 = "features/pass.feature"

p feature1
run feature1, runtime
p feature2
run feature2, runtime

And if you run it, you can see that it is just running the first feature and not the second one.

After investigating a bit more, I get to the conclusion that there is some Global variable that are reinitialized, and never loaded again after the first run. The result is that my step_definition are not loaded. I'm still investigating.

In the mean time, I tried to look at parallel_test, hydra and testjour.
Hydra and Testjour have the same approach, but as it is a bit old, I think, there is the same problem.

Parallel_test is running cucumber though a system call.

I will continue investigating. Maybe by trying to call to lower level API as suggested by a friend.. I'll see. If you have any idea?

Specjour is throwing DistrubutedFormatter constant errors

I am seeing errors when trying specjour out for the first time:


Manager started at druby://ares.local:55576
rsync -a --delete --port=8989 10.0.1.2::broth /tmp/broth
/Users/josh/.rvm/gems/ree-1.8.7-2010.01/gems/specjour-0.2.1/lib/specjour/worker.rb:16:in `initialize': uninitialized constant Specjour::Rspec::DistributedFormatter (NameError)
    from /Users/josh/.rvm/gems/ree-1.8.7-2010.01/gems/specjour-0.2.1/bin/specjour:47:in `new'
    from /Users/josh/.rvm/gems/ree-1.8.7-2010.01/gems/specjour-0.2.1/bin/specjour:47
    from /Users/josh/.rvm/gems/ree-1.8.7-2010.01/bin/specjour:19:in `load'
    from /Users/josh/.rvm/gems/ree-1.8.7-2010.01/bin/specjour:19

Specjour slow when before(:all) is heavily used

[Issue renamed for clarity and information of new readers - Was "Specjour slower than basic rspec on 4 core machine"]

It might well be something about my project set up but when I run specjour it is taking longer than normal rspec and it can take more than three times as long as for parallel_rspec on the same machine. This is pretty consistent although obviously there is some variation

Can you suggest what might be causing this and if there is anything I can do about it? Or any diagnosis I could provide.

$ time bundle exec rspec spec

Finished in 3 minutes 34.18 seconds
778 examples, 0 failures, 28 pending

real 3m48.092s
user 3m14.260s
sys 0m5.332s

$ time bundle exec specjour spec
Looking for listeners...
No listeners found on this machine, starting one...
Workers found: 4
jtl.me.uk (4)
Loading RSpec environment... completed in 14.104135037s

Finished in 4 minutes 49.54 seconds
778 examples, 0 failures, 28 pending

real 5m27.559s
user 13m58.396s
sys 0m22.745s

$ time bundle exec parallel_rspec spec
4 processes for 57 specs, ~ 14 specs per process

Finished in 24.74 seconds
211 examples, 0 failures, 12 pending

Finished in 27.67 seconds
220 examples, 0 failures, 2 pending

Finished in 52.31 seconds
161 examples, 0 failures, 1 pending

Finished in 1 minute 14.52 seconds
186 examples, 0 failures, 13 pending

778 examples, 0 failures, 28 pendings

Took 90.845140227 seconds

real 1m34.601s
user 3m38.938s
sys 0m6.104s

Specjour doesn't work with latest cucumber version

I get this error when I try to run 0.5.5 with cucumber-rails 1.3.0

/Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cucumber/distributed_formatter.rb:2:in `<module:Cucumber>': uninitialized constant Term (NameError)
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cucumber/distributed_formatter.rb:1:in `<top (required)>'
    from /Users/dev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/dev/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cucumber.rb:6:in `<module:Cucumber>'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cucumber.rb:2:in `<module:Specjour>'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cucumber.rb:1:in `<top (required)>'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/loader.rb:85:in `load_app'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/loader.rb:22:in `start'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cli.rb:57:in `load'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/lib/specjour/cli.rb:24:in `start'
    from /Users/dev/.rvm/gems/ruby-1.9.3-p194@search_discovery/gems/specjour-0.5.5/bin/specjour:5:in `<main>'

Seems to be incompatible with rspec-core 2.10.1 (fine with 2.10.0)

Sorry to flag another incompatibility.

My tests are still working fine with rspec directly and with parallel_rspec but most of my tests are failing and then it is crashing with specjour.

The errors are all 'NoMethodError' for rspec related matchers and 'stub_model'.

NoMethodError undefined method use_transactional_fixtures=' for #<Class:0xd922a18> /tmp/dashboard/spec/models/pricing/rate_spec.rb:98:inblock (3 levels) in <top (required)>'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:201:in module_eval' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:201:insubclass'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:187:in describe' /tmp/dashboard/spec/models/pricing/rate_spec.rb:97:inblock (2 levels) in <top (required)>'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:201:in module_eval' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:201:insubclass'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:187:in describe' /tmp/dashboard/spec/models/pricing/rate_spec.rb:68:inblock in <top (required)>'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:201:in module_eval' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:201:insubclass'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/example_group.rb:187:in describe' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/dsl.rb:18:indescribe'
/tmp/dashboard/spec/models/pricing/rate_spec.rb:36:in <top (required)>' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:245:inload'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:245:in block in load' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:236:inload_dependency'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/activesupport-3.2.5/lib/active_support/dependencies.rb:245:in load' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:inblock in load_spec_files'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:in map' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/configuration.rb:746:inload_spec_files'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/command_line.rb:22:in run' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/rspec-core-2.10.1/lib/rspec/core/runner.rb:69:inrun'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/rspec/runner.rb:5:in run' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/worker.rb:81:inrun_spec'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/worker.rb:72:in run_test' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/worker.rb:32:inblock in run_tests'
/home/josephl/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/benchmark.rb:295:in realtime' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/worker.rb:32:inrun_tests'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/loader.rb:26:in block (2 levels) in start' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/fork.rb:12:inblock in fork'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/fork.rb:9:in fork' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/fork.rb:9:infork'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/loader.rb:25:in block in start' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/loader.rb:24:ineach'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/loader.rb:24:in start' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/cli.rb:57:inload'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/task.rb:27:in run' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/invocation.rb:120:ininvoke_task'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor.rb:275:in dispatch' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/thor-0.15.2/lib/thor/base.rb:408:instart'
/home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/lib/specjour/cli.rb:24:in start' /home/josephl/.rvm/gems/ruby-1.9.3-p194/gems/specjour-0.5.5/bin/specjour:5:in

'

Specjour does not work with cucumber version >= 1.2.2

Specjour does not work with cucumber version >= 1.2.2
The problem is in lib/specjour/cucumber/distributed_formatter.rb, more specifically with step_mother.

class DistributedFormatter < ::Cucumber::Formatter::Progress

    def initialize(step_mother, io, options)
      @step_mother = step_mother
      @io = io
      @options = options
      @failing_scenarios = []
      @step_summary = []
    end

    def after_features(features)
      print_summary
      step_mother.scenarios.clear
      step_mother.steps.clear
    end
(...)

The @step_mother variable is not used, instead it is used step_mother that is defined as an attr_reader in ::Cucumber::Formatter::Progress.

The problem is that in cucumber 1.2.2 step_mother was renamed to runtime in this commit: cucumber/common@f74a8da
So the various step_mother used in lib/specjour/cucumber/distributed_formatter.rb are failing.

A quick fix is to replace in lib/specjour/cucumber/distributed_formatter.rb all usages of step_mother by @step_mother.
Tested this with cucumber 1.2.5 and it works.

What do you think about this?
I can submit a pull request with this change of you want.

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.