views:

74

answers:

1

I read that I must be able to run all unit tests in my site with a single command, so I created a bat file to do it.

Even with pause before the end, after the phpunit command, the result of the unit tests flashes in the screen.

@echo off
cd c:\
cd xampp
cd htdocs
cd light
cd myworks
echo on
set /p site=The site:
set /p version=The version:
set /p location=The location:
phpunit "%site% v%version%/%location%"
pause

My other batch file with java %folder%/%file% runs the java software, then pauses.

@echo off
cd c:\
cd Codes
cd 1st general - Head First Java
echo on
set /p folder=Type a folder:
set /p file=Type a file without extension:
java %folder%/%file%
pause

UPDATE: it's much easier to run the unit tests with SimpleTest than with phpUnit.

+3  A: 

Try call phpunit ...

JRL
The difference here is that java is probably an `exe` and phpunit a `bat`. The bat will switch execution and never return without the `call`.
Pasi Savolainen