How to prevent a batch file (.bat) from closing the terminal when running commands?

On a machine running Windows 7, if I run the PHPUnit Selenium command, like this manually, in a terminal:

phpunit --verbose --log-junit _selenium_tests\results\home.xml _selenium_tests\frontend\home.php

It launches a browser and performs a great test. Then the following is displayed:

Time: 10 seconds, Memory: 3.50Mb
OK (1 test, 3 assertions)

And the terminal remains open.

Now, if I copy and paste the exact command into an empty file and save it as I test.batclick on it, it also starts the test. I see the browser open and all tests are running. Only problem is that it immediately closes the terminal request. So I do not see the above conclusion.

An even bigger problem is that it closes the terminal if I add more commands for other tests after they fail to run.

I tried adding:

pause

bat, , . , ?

+5
2

this one. call . .bat .bat call, , pause .

+10
0

All Articles