liuggio / fastest

Simple parallel testing execution... with some goodies for functional tests.
MIT License
475 stars 65 forks source link

Default command windows compat #56

Closed ioleo closed 6 years ago

ioleo commented 8 years ago

Fixes problem in #24 comments

liuggio commented 8 years ago

@loostro please could you squash it, we shouldn't have commit that are not working :)

ps before accept can we test on windows?

ioleo commented 8 years ago

@liuggio I've tested it on Windows 10 Home already yesterday (I had to run replace / with \ to make it work). Today I just thougnt we could edit the default command to auto-adjust to Windows.

liuggio commented 8 years ago

@loostro are you sure on windows bin phpunit makes sense?

ioleo commented 8 years ago

Example test suite I run just 10 minutes ago:

loostro@Pluto MINGW64 ~/Projekty/acme-platform (bugfix/DEV-XX-some-branch-desc)
$ find src/*/*Bundle/Tests -name '*Test.php' | sort | bin/fastest -r -o -v "bin\phpunit -c app/phpunit.xml.dist {}"
- 105 tests into the queue.
- Will be consumed by 4 parallel Processes.
1/105   ✔       26003 ms        src/Acme/MailerBundle/Tests/Services/Factory/SmsRendererTest.php
... (here 104 more tests) ...
ioleo commented 8 years ago

@liuggio hmm you've got a point here, I am useing Git bash as my shell. I must test on cmd.exe

ioleo commented 8 years ago

OK, it seems the correct syntax for windows under cmd.exe (the default CLI) is diffrent, I'll update the PR

liuggio commented 8 years ago

@loostro maybe we need a service that understand if is on windows and extract the correct phpunit exec?

ioleo commented 8 years ago

@liuggio updated readme, I've just tested this:

loostro@PLUTO C:\Users\loostro\Projekty\acme-platform
$ cd src && dir *Test.php /b/s | ..\bin\fastest.bat "..\bin\phpunit.bat -c ..\app\phpunit.xml.dist {}" && cd ..
- 105 shuffled tests into the queue.
- Will be consumed by 4 parallel Processes.

105/105 [============================] 100% 8 mins 6.0 MiB

     22 failures.

Note: the test failures were expected. My current branch has failing test suites :)

Summary: it works. The default config is for cmd.exe shell (Windows default). I've updated the readme - I also included hints how to setup a better unix-like enviroment (shell) under Windows.

ioleo commented 8 years ago

@Seldaek this may be of interest to you

francoispluchino commented 6 years ago

This PR can be closed, because already fixed.

DonCallisto commented 6 years ago

@francoispluchino have you tested it?

francoispluchino commented 6 years ago

Yes, see #98.

DonCallisto commented 6 years ago

Thank you