guard-phpunit icon indicating copy to clipboard operation
guard-phpunit copied to clipboard

Not Automating the Tests in Linux

Open villimagg opened this issue 13 years ago • 7 comments

I've installed all the guard gems for this to work and libnotify. I'm on a Fedora 17 platform and the testing isn't automated. Meaning I always have to return to the terminal and hit "Enter" for the tests to run again cause it's not testing on save.

Here s my Guardfile:

guard 'phpunit', :tests_path => 'application/tests/*.php', :cli => '--colors', :keep_failed => true, :all_after_pass => true do watch(%r{application/tests/(.+)\.php$}) watch(%r{^application/libraries/(.+)\.php$}) { |m| "tests/#{m[1]}test.php" } watch(%r{^application/tasks/(.+)\.php$}) { |m| "tests/#{m[1]}test.php" } end

villimagg avatar Sep 28 '12 13:09 villimagg

I am having the same problem on Mac. I have searched for hours on how to get this working. Here is my gem list:

archive-tar-minitar (0.5.2)
coderay (1.0.8)
gli (2.0.0)
guard (1.5.2)
guard-phpunit (0.1.4)
json_pure (1.7.5)
listen (0.5.3)
lumberjack (1.0.2)
method_source (0.8.1)
mime-types (1.19)
pagoda (0.6.2)
pagoda-client (0.1.8)
pagoda-tunnel (0.1.3)
pry (0.9.10)
rb-fsevent (0.9.2)
rest-client (1.6.7)
slop (3.3.3)
socketio-client (0.0.3)
test-unit (2.5.2)
thor (0.16.0)

and here is my Gemfile: (I just did guard init phpunit in the tests directory)

# A sample Guardfile
# More info at https://github.com/guard/guard#readme

guard 'phpunit', :cli => '--colors' do
  watch(%r{^.+Test\.php$})
end

All my tests are in tests/subdirectory/test_name_Test.php so for instance I have a test tests/controllers/welcome_Test.php. I cd into tests and run guard. I change the contents of a test file and save. Nothing happens in the guard terminal window. :rage: What am I doing wrong??

mikedfunk avatar Oct 30 '12 22:10 mikedfunk

Same problem here, only getting the guard prompt after the initial load, then have to hit enter to run the tests.

Running on Mac 10.8, Ruby 1.8.7,

gem list:

guard (1.6.1) guard-phpunit (0.1.4)

bwiggs avatar Jan 24 '13 19:01 bwiggs

@Maher4Ever Also having this problem on Mac and Linux. Did anyone manage to solve or find an alternative solution for automating? @bawigga @mikedfunk @villimagg Thank you.

ghost avatar Mar 09 '13 17:03 ghost

Changed from Fedora to Ubuntu and got all the newest updates and automatic testing is now working. Still wouldn't know how it would be with Fedora. But the automatic notifications don't show correct info. It always show a green checkmark and 0 tests, 0 failures even if I do assertTrue(FALSE);

villimagg avatar Mar 31 '13 23:03 villimagg

Same problem here with Mac. Is this software discontinued?

sergigp avatar Sep 29 '13 17:09 sergigp

@sergigp yes it is.

liuggio avatar Sep 29 '13 17:09 liuggio

@liuggio thanks for your answer ;) i will use guard.

sergigp avatar Oct 02 '13 18:10 sergigp