Re: [Phpmyadmin-devel] AllTests.php

Hi Sebastian, The tests run twice when executed via a shell: cd test phpunit AllTests.php Now I understand why you added this code. The student who is helping with the tests is also running the tests outside a browser. I wonder what is the "official" way of running them, I was under the impression that it is via a shell command. Marc -----Original Message----- From: Sebastian Mendel <lists@sebastianmendel.de> To: phpmyadmin-devel@lists.sourceforge.net Date: Wed, 10 Dec 2008 10:50:51 +0100 Subject: [Phpmyadmin-devel] AllTests.php Hi Marc,
// Please clarify the reason of this section; it has for effect // of running the tests a second time. /* if (PMA_MAIN_METHOD == 'AllTests::main') { echo '<pre>'; AllTests::main(); echo '</pre>'; } */
why a second time? when commenting out the code the test do not run at all for me!? i start the tests by entering http://phmyamdin/test/AllTests.php in my browser, how do you start the tests? -- Sebastian Mendel ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Phpmyadmin-devel mailing list Phpmyadmin-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel

Hi again, is there a way to get verbose output when running from a browser? Marc Marc Delisle a écrit :
Hi Sebastian, The tests run twice when executed via a shell: cd test phpunit AllTests.php
Now I understand why you added this code. The student who is helping with the tests is also running the tests outside a browser. I wonder what is the "official" way of running them, I was under the impression that it is via a shell command.
Marc
-----Original Message----- From: Sebastian Mendel <lists@sebastianmendel.de> To: phpmyadmin-devel@lists.sourceforge.net Date: Wed, 10 Dec 2008 10:50:51 +0100 Subject: [Phpmyadmin-devel] AllTests.php
Hi Marc,
// Please clarify the reason of this section; it has for effect // of running the tests a second time. /* if (PMA_MAIN_METHOD == 'AllTests::main') { echo '<pre>'; AllTests::main(); echo '</pre>'; } */
why a second time? when commenting out the code the test do not run at all for me!?
i start the tests by entering http://phmyamdin/test/AllTests.php in my browser, how do you start the tests?

On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser?
just use test/wui.php (just committed) btw.: "verbose output" seems like you think the test does run when pointing the browser to AllTests.php - this is not the case AllTest.php does nothing, it just declares a class - nothing more that's why the commented code was required to start the tests on the shell the 'phpunit' script is responsible for executing the test -- Sebastian Mendel

Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser?
just use test/wui.php (just committed)
Great, thanks.
btw.: "verbose output" seems like you think the test does run when pointing the browser to AllTests.php - this is not the case
AllTest.php does nothing, it just declares a class - nothing more
that's why the commented code was required to start the tests
on the shell the 'phpunit' script is responsible for executing the test

Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser?
just use test/wui.php (just committed)
But now, an attacker has an easy way (if there are failed tests) to get Path disclosure...
btw.: "verbose output" seems like you think the test does run when pointing the browser to AllTests.php - this is not the case
AllTest.php does nothing, it just declares a class - nothing more
that's why the commented code was required to start the tests
on the shell the 'phpunit' script is responsible for executing the test

On 2008-12-10 14:40, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser? just use test/wui.php (just committed)
But now, an attacker has an easy way (if there are failed tests) to get Path disclosure...
mhm, exclude test/ from package? -- Sebastian Mendel

Sebastian Mendel a écrit :
On 2008-12-10 14:40, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser? just use test/wui.php (just committed) But now, an attacker has an easy way (if there are failed tests) to get Path disclosure...
mhm,
exclude test/ from package?
Could do that. It depends on who we expect to run tests. If it's just people who use the SVN versions, OK. But... why is it better to run tests via browser? Marc

On 2008-12-10 14:50, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:40, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser? just use test/wui.php (just committed) But now, an attacker has an easy way (if there are failed tests) to get Path disclosure... mhm,
exclude test/ from package?
Could do that. It depends on who we expect to run tests. If it's just people who use the SVN versions, OK.
But... why is it better to run tests via browser?
better? mhm ... don't know ... for me it's just a lot easier ... windows, you know ... ;-) -- Sebastian Mendel

Sebastian Mendel a écrit :
On 2008-12-10 14:50, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:40, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote:
Hi again, is there a way to get verbose output when running from a browser? just use test/wui.php (just committed) But now, an attacker has an easy way (if there are failed tests) to get Path disclosure... mhm,
exclude test/ from package? Could do that. It depends on who we expect to run tests. If it's just people who use the SVN versions, OK.
But... why is it better to run tests via browser?
better? mhm ... don't know ... for me it's just a lot easier ... windows, you know ... ;-)
Ah yes ;) So, who is our target audience to run tests? For example, would a distro want to run them, just after downloading the package. Marc

On 2008-12-10 14:58, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:50, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:40, Marc Delisle wrote:
Sebastian Mendel a écrit :
On 2008-12-10 14:19, Marc Delisle wrote: > Hi again, > is there a way to get verbose output when running from a browser? just use test/wui.php (just committed) But now, an attacker has an easy way (if there are failed tests) to get Path disclosure... mhm,
exclude test/ from package? Could do that. It depends on who we expect to run tests. If it's just people who use the SVN versions, OK.
But... why is it better to run tests via browser? better? mhm ... don't know ... for me it's just a lot easier ... windows, you know ... ;-)
Ah yes ;) So, who is our target audience to run tests?
not sure, everyone (bug reporters required to provide some feedback, distro maintainers, developers) should be able to run the tests, but have them only in SVN ensures that they test only with latest development
For example, would a distro want to run them, just after downloading the package.
i don't think so -- Sebastian Mendel
participants (2)
-
Marc Delisle
-
Sebastian Mendel