Note re: Unit Tests

82 views
Skip to first unread message

Ian

unread,
Aug 12, 2012, 9:02:08 PM8/12/12
to joomla-de...@googlegroups.com
Just a note regarding a recent change to the unit testing suite for those who are trying to run them.  Output buffering was recently enabled at the start of the script presumably to facilitate session tests.  As a result, PHPUnit will not display any output until all the tests are complete.  If you run phpunit and it appears to just hang, that is normal.  Just give the tests time to complete and you will see all the results at the end.

Ian

Stefan Neculai

unread,
Aug 19, 2012, 3:15:13 PM8/19/12
to joomla-de...@googlegroups.com
Hey,

Is it there any possibility to make the output still show while running the tests? I find the output during the test really useful.

--
Thanks,
Stefan

Rouven Weßling

unread,
Aug 19, 2012, 5:55:11 PM8/19/12
to joomla-de...@googlegroups.com
Unfortunately our (few) tests for JSession require this for now. If you find a way to rewrite them that this isn't necessary anymore that be very welcome.

Rouven

Stefan Neculai

unread,
Aug 19, 2012, 7:47:20 PM8/19/12
to joomla-de...@googlegroups.com
Hi,

I was rather thinking at an option to set in bootstrap so everyone can enable and disable it easily. Developers can let it enabled when they run session tests and disable otherwise.

--
Stefan

Ian

unread,
Aug 19, 2012, 10:28:54 PM8/19/12
to joomla-de...@googlegroups.com
You still do get the results at the end, you just have to wait until everything is complete.

It isn't too bad so long as you use filter to only run the tests you actually want to test.

Something else that might be reasonable, so long as all the JSession tests are in one class (which I didn't look to check) would be to end output buffering in the tearDownAfterClass so that you would get the normal progress report as soon as the session tests were done.

Anyway, just thoughts.
Ian
Reply all
Reply to author
Forward
0 new messages