How to run autotest(Zentest)

Hi,

When I start the “autotest” it gives me the following error…not sure
what
HOME path I have to set…all Ruby/Rails related components are in path!


C:>autotest -rails
C:/Tools/InstantRails/ruby/lib/ruby/gems/1.8/gems/ZenTest-3.3.0/lib/autotest.rb:285:in
expand_path': couldn't find HOME environment -- expanding~/.autotest’
(ArgumentError)

Any clues? Thanks.
Hari

View this message in context:
http://www.nabble.com/How-to-run-autotest(Zentest)-tf2111845.html#a5822990
Sent from the RubyOnRails Users forum at Nabble.com.

Hey Nara - It needs to build a path to your tests, so you need run it
from the root of your rails application.

cheers,
Jodi

On Windows, the HOME environment variable is not set.

try

SET HOME=“C:\Documents And Settings<Your User Name Here>”

or add the HOME variable via system settings and run autotest again.

Max

Thanks Max,

I have set the HOME to the rails app root directory…it works fine with
the
windows root :slight_smile:

_Hari

Max M.-3 wrote:


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


View this message in context:
http://www.nabble.com/How-to-run-autotest(Zentest)-tf2111845.html#a5824326
Sent from the RubyOnRails Users forum at Nabble.com.

This can be helpful to future users

Rails autotest installation is not same in Windows and Linux. If we do
it in the same way then we will get the error “couldn’t find HOME
environment – expanding ‘~/.autotest’”.
The reason for the error is Autotest looks for a .autotest file in the
path defined by the HOME environment variable. Whis is set in Linux but
not on windows. We don’t necessarily
have to have a .autotest file, but we will need to set the HOME
environment variable.

Therefore, here is the installation instructions for the developers
using windows to work with autotest:

  1. Install ZenTest
    – gem install zentest
  2. Install diff-lcs
    – gem install zentest diff-lcs
  3. Install RSpec Autotest

Without subversion – ruby script/plugin install
http://svn.caldersphere.net/svn/main/plugins/rspec_autotest
With subversion – ruby script/plugin install -x
http://svn.caldersphere.net/svn/main/plugins/rspec_autotest

  1. In Linux after these steps “rake spec:autotest” will work fine. But
    we need to do something more for windows environment.

    • Download and install diffutils, " Complete package, except sources
      — Setup —24 May 2004 " from
      http://gnuwin32.sourceforge.net/packages/diffutils.htm
    • Put the installation directory of diff.exe into your PATH in
      Control Panel --> System --> Advanced --> Environment Variables.
  2. Go to the application directory of current rails application then set
    the home variable:

    – set home=.

  3. Go to the current rails application directory and run
    – autotest


Only if required ------

If rake spec:autotest don’t work go through the following steps:

  1. For ZenTest 3.5.0++
    cd spec
    svn export
    http://svn.caldersphere.net/svn/main/rspec_autotest/trunk/lib/rspec_autotest.rb
    cd …

  2. Add the following in the Rake file.

namespace :spec do
task :autotest do
require ‘./spec/rspec_autotest’
RspecAutotest.run
end
end

Or if you really want a Rake task for the job, add this to the Rakefile:

namespace :spec do
task :autotest do
system ‘autotest’
end
end

  1. Start working with rake spec:autotest or autotest.