Comments on: PHPUnit Testing in the Browser https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser?utm_source=rss&utm_medium=rss&utm_campaign=phpunit-test-report-unit-testing-in-the-browser Mon, 19 Dec 2011 08:06:42 +0000 https://wordpress.org/?v=2.9.1 hourly 1 By: Matt Mueller https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-182 Matt Mueller Thu, 25 Aug 2011 07:50:15 +0000 https://mattmueller.me/blog/?p=514#comment-182 It's the man himself! Haha, I don't like it either... The *only* reason I bundled it was because I couldn't get it working on the latest version of PHPUnit (at the time). It was a bad hack, but it worked for my purposes. This project needs an update, now that I'm working with PHP & PHPUnit again, I plan on dusting off the cobwebs. It’s the man himself! Haha, I don’t like it either… The *only* reason I bundled it was because I couldn’t get it working on the latest version of PHPUnit (at the time). It was a bad hack, but it worked for my purposes. This project needs an update, now that I’m working with PHP & PHPUnit again, I plan on dusting off the cobwebs. ]]> By: Sebastian Bergmann https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-181 Sebastian Bergmann Thu, 25 Aug 2011 07:44:10 +0000 https://mattmueller.me/blog/?p=514#comment-181 Looks nice, good job! However, I do not like the fact that you are bundling PHPUnit in your GitHub repository. It would be nice to just have a separate PHPUnit_WebUI package that can be installed in addition to PHPUnit. Please contact me via email in case you want to discuss this further. Looks nice, good job! However, I do not like the fact that you are bundling PHPUnit in your GitHub repository. It would be nice to just have a separate PHPUnit_WebUI package that can be installed in addition to PHPUnit. Please contact me via email in case you want to discuss this further. ]]> By: Greenbar: Browser-Based TDD for Python | Yet Another Programming Blog https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-180 Greenbar: Browser-Based TDD for Python | Yet Another Programming Blog Mon, 22 Aug 2011 01:30:48 +0000 https://mattmueller.me/blog/?p=514#comment-180 [...] PHPUnit Test Report (PHP) [...] [...] PHPUnit Test Report (PHP) [...] ]]> By: Nick Turner https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-178 Nick Turner Mon, 18 Jul 2011 20:27:08 +0000 https://mattmueller.me/blog/?p=514#comment-178 Thanks Matt, Looking at your effort gave me the incentive to go off and write my own version. Although the source is completely different I based the HTML style on yours and gave you credit in the report footer and in the README files. Instead of using the JSON listener and then deciphering its output, my version inserts a proper HTML printer object which derived from the base PHPUnit framework printer interface. It also uses the normal 'runner' object used by the command line version so that most command line options are available via URL parameters. Once again to use it you just drop the example 'index.php' file into your tests directory and point the browser at it. If the PHPUnit and PHPUnit_Html projects are not in the PHP include path then you need to either add them there or edit the 'index.php' file to add the paths to the projects. It also has the option to view the source code of each test in the report. You can see a demo of the output generated at https://www.nickturner.co.uk/libs/PHPUnit_Html/demo/. For more details read the README file at https://github.com/nickturner/PHPUnit_Html/ Thanks for the inspiration and hope you don't mind me reusing some of your ideas. Nick Thanks Matt,

Looking at your effort gave me the incentive to go off and write my own version. Although the source is completely different I based the HTML style on yours and gave you credit in the report footer and in the README files.

Instead of using the JSON listener and then deciphering its output, my version inserts a proper HTML printer object which derived from the base PHPUnit framework printer interface.

It also uses the normal ‘runner’ object used by the command line version so that most command line options are available via URL parameters.

Once again to use it you just drop the example ‘index.php’ file into your tests directory and point the browser at it. If the PHPUnit and PHPUnit_Html projects are not in the PHP include path then you need to either add them there or edit the ‘index.php’ file to add the paths to the projects.

It also has the option to view the source code of each test in the report.

You can see a demo of the output generated at https://www.nickturner.co.uk/libs/PHPUnit_Html/demo/.

For more details read the README file at https://github.com/nickturner/PHPUnit_Html/

Thanks for the inspiration and hope you don’t mind me reusing some of your ideas.

Nick

]]>
By: JKrems https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-174 JKrems Tue, 14 Jun 2011 14:20:55 +0000 https://mattmueller.me/blog/?p=514#comment-174 Working on a yii-project and made a few minor changes to your script (for example *Test.php for filenames and running a bootstrap.php if present in the test directory). Now it "just works" when you set the path to your "/protected/tests/"-directory. :) If someone could use it: https://github.com/JKrems/yii-report Working on a yii-project and made a few minor changes to your script (for example *Test.php for filenames and running a bootstrap.php if present in the test directory). Now it “just works” when you set the path to your “/protected/tests/”-directory.

If someone could use it: https://github.com/JKrems/yii-report

]]>
By: NSinopoli https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-173 NSinopoli Mon, 04 Apr 2011 19:32:31 +0000 https://mattmueller.me/blog/?p=514#comment-173 Hi Matt - thanks for the kind words. I've another project in mind if you'd be interested in collaborating. I'd like to build a nice logging front-end (as an alternative to going through painfully verbose log files). I'm really impressed with your html/css skills and would love to have you cook up something akin to what you did with the PHPUnit project. I doubt it would take very long - shoot me an email and we can discuss the details! Thanks. Hi Matt – thanks for the kind words. I’ve another project in mind if you’d be interested in collaborating. I’d like to build a nice logging front-end (as an alternative to going through painfully verbose log files). I’m really impressed with your html/css skills and would love to have you cook up something akin to what you did with the PHPUnit project. I doubt it would take very long – shoot me an email and we can discuss the details! Thanks. ]]> By: Matt Mueller https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-171 Matt Mueller Tue, 22 Mar 2011 15:14:34 +0000 https://mattmueller.me/blog/?p=514#comment-171 Wow NSinopoli. Your fork looks fantastic! Thanks for taking the time to bring this project to the next level! I'm going to take a look at your fork and test it out as soon as I can, then I'll either integrate it into the main project or just redirect to your project page. I also like the name "Visual PHPUnit" much better :-D. Wow NSinopoli. Your fork looks fantastic! Thanks for taking the time to bring this project to the next level! I’m going to take a look at your fork and test it out as soon as I can, then I’ll either integrate it into the main project or just redirect to your project page. I also like the name “Visual PHPUnit” much better . ]]> By: NSinopoli https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-170 NSinopoli Tue, 22 Mar 2011 03:06:06 +0000 https://mattmueller.me/blog/?p=514#comment-170 Hi Matt, Thanks for releasing your code! I found your project after searching for a front-end for PHPUnit on StackOverflow. I ended up forking it and making a bunch of modifications - the most notable of which, I think, is the ability to log the unit test results (both visually and with JSON). Check it out here: https://github.com/NSinopoli/VisualPHPUnit Thanks again! Hi Matt,

Thanks for releasing your code! I found your project after searching for a front-end for PHPUnit on StackOverflow. I ended up forking it and making a bunch of modifications – the most notable of which, I think, is the ability to log the unit test results (both visually and with JSON). Check it out here:

https://github.com/NSinopoli/VisualPHPUnit

Thanks again!

]]>
By: Theodore R. Smith https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-154 Theodore R. Smith Sun, 23 Jan 2011 11:30:26 +0000 https://mattmueller.me/blog/?p=514#comment-154 I would like the following code added to the repo as soon as possible. Requiring, or even supporting, full paths is very dangerous. Seriously. You should only always support relativistic paths to the base of the project. So add this to Main/index.php: 19 $path = str_replace('../', '', $_GET['path']); // Protect against unauthorized file access. 20 $_GET['path'] = realpath(dirname(__FILE__) . '/../../' . $path); Also, in the same file, I have this, that enables TestDox output and Code Coverage output, as well: 36 ?> 37 38 41 42 <iframe src="/" width="100%" height="100%"> 43 <?php I would like the following code added to the repo as soon as possible.

Requiring, or even supporting, full paths is very dangerous. Seriously.

You should only always support relativistic paths to the base of the project. So add this to Main/index.php:

19 $path = str_replace(‘../’, ”, $_GET['path']); // Protect against unauthorized file access.
20 $_GET['path'] = realpath(dirname(__FILE__) . ‘/../../’ . $path);

Also, in the same file, I have this, that enables TestDox output and Code Coverage output, as well:

36 ?>
37
38
41
42 <iframe src="/” width=”100%” height=”100%”>
43 <?php

]]>
By: Matt Mueller https://mattmueller.me/blog/phpunit-test-report-unit-testing-in-the-browser/comment-page-1#comment-142 Matt Mueller Thu, 13 Jan 2011 17:19:32 +0000 https://mattmueller.me/blog/?p=514#comment-142 @Shaked - Thanks! I bundled PHPUnit because I couldn't figure out this issue at the time when I first wrote it. I'll take a look at integrating these changes! @Shaked – Thanks! I bundled PHPUnit because I couldn’t figure out this issue at the time when I first wrote it. I’ll take a look at integrating these changes! ]]>

We highly recommend you our friends Cpasbien to download any films, movies, songs, books or files you need.