Page 1 of 1
simipletest: anyone passing unit test cases of simpletest?
Posted: Fri Aug 25, 2006 2:23 am
by jmut
I downloaded latest version of simpletest
https://sourceforge.net/project/showfil ... _id=153280
and there is test directory with test cases...
The thing is it stalls

. I tried removing the tests with mocking objects and interfaces but no luck.
Anyone with same result?
Are you using simpletest for production environment tests.
Code: Select all
prompt$ php all_tests.php
All tests for SimpleTest 1.0.1alpha3
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 60
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 81
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 87
E_USER_WARNING: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 93
E_USER_ERROR: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 99
E_USER_ERROR: Cannot set maximum call count as no aMissingMethod() in class MockDummyWithInjectedTestCase in /storage/www/3dPartyLib/simpletest/mock_objects.php on line 505
E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /storage/www/3dPartyLib/simpletest/mock_objects.php on line 490
E_USER_NOTICE: Method [aMissingMethod] is not mocked in /storage/www/3dPartyLib/simpletest/mock_objects.php(1057) : eval()'d code on line 75
E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /storage/www/3dPartyLib/simpletest/test/interfaces_test.php on line 29 and defined in /storage/www/3dPartyLib/simpletest/mock_objects.php(1036) : eval()'d code on line 10
//........never finishes.....freezes here
Edit: Forgot to mention
Slackware 10.2.0
2.6.16.24
PHP 5.1.2 (cli) (built: May 12 2006 15:42:32)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
with DBG v2.13.1, (C) 2000,2006, by Dmitri Dmitrienko
Posted: Fri Aug 25, 2006 3:48 am
by Chris Corbyn
Marcus seems to be a bit busy and doesn't keep parts of the package up to date (apart from the core stuff). The tests used to work on PHP4 but not 5... I haven't tried the tests in alpha 3.
EDIT | Comment about other place to read docs removed. Apparently docs in the latest tarball are up-to-date.
Re: simipletest: anyone passing unit test cases of simpletes
Posted: Thu Sep 14, 2006 10:17 am
by lastcraft
Hi...
jmut wrote:...and there is test directory with test cases...
The thing is it stalls

. I tried removing the tests with mocking objects and interfaces but no luck.
This is a serious problem, as I have working tests for every setup I can manage. Do you have the rror reporting turned on? It's possibe that it ran out of memeory during the test run and this wasn't reported by PHP. Timing out is another probem, as it does live web page fetching from the LastCraft site.
Which version are you using?
Can you run just the unit tests on their own (not all_tests.php)?
yours, Marcus
Posted: Thu Sep 14, 2006 11:35 am
by jmut
Ok I guess there were some timeouts but I thought it stall.
So I waited this time longer and got results for all tests.
2.6.16.24
Slackware 10.2.0
Code: Select all
My config:
PHP Version: 5.1.2
PHP OS: Linux
Error Reporting: 2047 (E_ALL)
Register Globals: Off
Short Tags: On
Display Errors: On
Magic Quotes GPC: Off
Magic Quotes Runtime: Off
Magic Quotes Sybase: Off
Loaded Extensions:
xmlwriter libxml xmlrpc dom
xmlreader xml wddx tokenizer
sysvshm sysvsem standard SimpleXML
SPL session sockets PDO
shmop SQLite Reflection posix
pdo_sqlite pdo_mysql mhash iconv
hash gmp gd ftp
exif dbase dba date
ctype calendar bz2 bcmath
zlib pcre openssl apache
mysql mysqli dbg gettext
Code: Select all
$ php all_tests.php
All tests for SimpleTest 1.0.1alpha3
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 60
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 81
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 87
E_USER_WARNING: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 93
E_USER_ERROR: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 99
E_USER_ERROR: Cannot set maximum call count as no aMissingMethod() in class MockDummyWithInjectedTestCase in /storage/www/3dPartyLib/simpletest/mock_objects.php on line 505
E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /storage/www/3dPartyLib/simpletest/mock_objects.php on line 490
E_USER_NOTICE: Method [aMissingMethod] is not mocked in /storage/www/3dPartyLib/simpletest/mock_objects.php(1057) : eval()'d code on line 75
E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /storage/www/3dPartyLib/simpletest/test/interfaces_test.php on line 29 and defined in /storage/www/3dPartyLib/simpletest/mock_objects.php(1036) : eval()'d code on line 10
1) Nothing fetched
in testButtonSubmissionByLabel
in TestOfLiveForms
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
2) True assertion got False at [/storage/www/3dPartyLib/simpletest/test/acceptance_test.php line 692]
in testButtonSubmissionByLabel
in TestOfLiveForms
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
3) Pattern [/go=\[ButtonGo\]/s] not detected in [Boolean: false] at [/storage/www/3dPartyLib/simpletest/test/acceptance_test.php line 693]
in testButtonSubmissionByLabel
in TestOfLiveForms
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
4) Nothing fetched
in testSavantStyleHiddenFieldDefaults
in TestOfLiveMultiValueWidgets
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
5) True assertion got False at [/storage/www/3dPartyLib/simpletest/test/acceptance_test.php line 942]
in testSavantStyleHiddenFieldDefaults
in TestOfLiveMultiValueWidgets
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
6) Text [a=[a0]] not detected in [String: ] at [/storage/www/3dPartyLib/simpletest/test/acceptance_test.php line 943]
in testSavantStyleHiddenFieldDefaults
in TestOfLiveMultiValueWidgets
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
7) Text [b=[b0]] not detected in [String: ] at [/storage/www/3dPartyLib/simpletest/test/acceptance_test.php line 944]
in testSavantStyleHiddenFieldDefaults
in TestOfLiveMultiValueWidgets
in /storage/www/3dPartyLib/simpletest/test/acceptance_test.php
FAILURES!!!
Test cases run: 118/118, Passes: 2463, Failures: 7, Exceptions: 0
Posted: Fri Sep 15, 2006 4:39 am
by lastcraft
Hi...
jmut wrote:FAILURES!!!
Test cases run: 118/118, Passes: 2463, Failures: 7, Exceptions: 0
Could you run it again and see if you get the same failures. I reckon only the arguments notice will stay the same, although at this stage I'm guessing. The php.ini file on my machine recognises command line arguments, so I hadn't thought what would hapen if this was turned off. I need to supress this spurious warning.
The rest I think are networking issues, probably because my site sometimes runs rather slowly. Won't know for sure until we have another go.
yours, Marcus
Posted: Fri Sep 15, 2006 5:48 am
by jmut
lastcraft wrote:Hi...
jmut wrote:FAILURES!!!
Test cases run: 118/118, Passes: 2463, Failures: 7, Exceptions: 0
Could you run it again and see if you get the same failures. I reckon only the arguments notice will stay the same, although at this stage I'm guessing. The php.ini file on my machine recognises command line arguments, so I hadn't thought what would hapen if this was turned off. I need to supress this spurious warning.
The rest I think are networking issues, probably because my site sometimes runs rather slowly. Won't know for sure until we have another go.
yours, Marcus
Ok, you want me to run same simpletest package..or is there another version somewhere I can download? I don't see any svn or anything to use.
Posted: Fri Sep 15, 2006 10:47 am
by jmut
Anyhow I ran the same tests again...same package.
I guess it is getting better
Code: Select all
All tests for SimpleTest 1.0.1alpha3
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 60
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 81
E_USER_NOTICE: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 87
E_USER_WARNING: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 93
E_USER_ERROR: Ouch! in /storage/www/3dPartyLib/simpletest/test/errors_test.php on line 99
E_USER_ERROR: Cannot set maximum call count as no aMissingMethod() in class MockDummyWithInjectedTestCase in /storage/www/3dPartyLib/simpletest/mock_objects.php on line 505
E_USER_ERROR: Cannot set expected arguments as $args parameter is not an array in /storage/www/3dPartyLib/simpletest/mock_objects.php on line 490
E_USER_NOTICE: Method [aMissingMethod] is not mocked in /storage/www/3dPartyLib/simpletest/mock_objects.php(1057) : eval()'d code on line 75
E_WARNING: Missing argument 1 for MockDummyInterface::anotherMethod(), called in /storage/www/3dPartyLib/simpletest/test/interfaces_test.php on line 29 and defined in /storage/www/3dPartyLib/simpletest/mock_objects.php(1036) : eval()'d code on line 10
OK
Test cases run: 118/118, Passes: 2468, Failures: 0, Exceptions: 0