Installed Drupal 6.15 and SimpleTest module. I followed the patch instructions in the README/INSTALL file. ON running the tests, these fail...

88 passes, 6 fails, and 0 exceptions

Found assertion {"SimpleTest pass.", "Other", "Pass", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 149 SimpleTestFunctionalTest->confirmStubTestResults()

Found assertion {"Created permissions: access content", "Role", "Pass", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 152 SimpleTestFunctionalTest->confirmStubTestResults()

Found assertion {"This is nothing.", "Other", "Pass", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 159 SimpleTestFunctionalTest->confirmStubTestResults()

Found assertion {"SimpleTest pass.", "Other", "Pass", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 149 SimpleTestFunctionalTest->confirmStubTestResults()

Found assertion {"Created permissions: access content", "Role", "Pass", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 152 SimpleTestFunctionalTest->confirmStubTestResults()

Found assertion {"This is nothing.", "Other", "Pass", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 159 SimpleTestFunctionalTest->confirmStubTestResults()

I have curl 7.19.4 I am essentially using the default apache set up in Mac os x 10.6

Any ideas why SimpleTest is failing it's own tests.

Comments

stewsnooze’s picture

So I've checked out d7 from CVS and this errors also, so I'll use this issue to document how I fixed the default 10.6 apache install.

Frank Steiner’s picture

Same here, although I get a much higher failure rate:
29 passes, 48 fails, and 40 exceptions

Could that be related to having our own theme, an own module etc.? Or is sth. wrong with 6.15 and the simpletest module?

dave reid’s picture

Anyone have the domain module enabled on their site? It might be responsible for some of the failures: #710978: Domain causes major testing errors

agentrickard’s picture

I get these same errors with and without Domain Access running.

I'm running MAMP 1.7.2 on OS X 10.5.8. Which provides PHP 5.2.6 and MySQL 5.0.41.

Frank Steiner’s picture

No domain module here.

stewsnooze’s picture

Mine was a completely fresh install with a fresh db

itarato’s picture

I also have this problem for a while. And I just can't get it through. Even if I run tests for only the Block module, I get this error message: http://pastebin.com/v5Rns62P
The flushed html is the login page. It occured in all my browsers (Opera, Firefox, Safari..).
I made all the necessary changes Simpletest needs (described in the INSTALL.txt). In terminal (using run-tests.sh) everything is just fine and works.

rpetrenko’s picture

Assigned: Unassigned » rpetrenko
Status: Active » Needs review
Issue tags: +Simpletest
StatusFileSize
new1.15 KB

here is a patch to eliminate 6 simpletest failures.

ronaldmulero’s picture

Status: Needs review » Reviewed & tested by the community

Tested in Drupal 6.17
Results
111 passes, 0 fails, and 0 exceptions
SimpleTest functionality
SimpleTest e-mail capturing

ilo’s picture

#8: simpletest-696552.patch queued for re-testing.

ilo’s picture

Retesting because I'm getting other errors on clean Drupal 6.19 with simpletest patched with simpletest-696552.patch.

86 passes, 8 fails, and 0 exceptions

These are the assertions failing (twice).

Found assertion {"Division by zero", "Warning", "Fail", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 156 SimpleTestFunctionalTest->confirmStubTestResults()  

Found assertion {"array_key_exists", "Warning", "Fail", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 164 SimpleTestFunctionalTest->confirmStubTestResults()  

Found assertion {"Debug: 'Foo'", "Debug", "Fail", "simpletest.test", "SimpleTestFunctionalTest->stubTest()"}. Other simpletest.test 166 SimpleTestFunctionalTest->confirmStubTestResults()  

Stub test summary is correct Other simpletest.test 169 SimpleTestFunctionalTest->confirmStubTestResults() 

And this is the result of block.test:

Results
64 passes, 0 fails, and 111 exceptions

I don't have a clean php 5.2 setup to test, perhaps it's because of php 5.3? (just in case: Apache/2.2.15 (Win32) PHP/5.3.2 ). I'll try to provide more information in the following hours.

ilo’s picture

So, I reviewed the documentation and there is nothing about error_reporting requirements for these tests to work.

changing php.ini to:
error_reporting = E_ALL | E_STRICT ( I previously had E_ERROR | E_STRICT )

I get: 78 passes, 2 fails, and 0 exceptions

Probably this is something that should go to documentation.

Now I'm only getting 2 fails:

Stub test summary is correct Other simpletest.test 171 SimpleTestFunctionalTest->confirmStubTestResults()  

Just because I'm getting: "8 passes, 2 fails, 3 exceptions, and 1 debug message" and is compared against: "8 passes, 2 fails, 2 exceptions, and 1 debug message"

I'll try to find where that exception comes from.

ilo’s picture

after some tests I've found that this part of the simpletest self-testing is very sensitive to error_reporting configuration from the server. Perhaps this should checked in hook_requirements or set error_reporting according to what the module needs, and also be documented. It is the first time I get myself in this situation.

when I put error_reporting = E_ALL in php.ini I got all test passed.

simpletest results:
82 passes, 0 fails, and 0 exceptions

block results:
64 passes, 0 fails, and 0 exceptions

edited: So, the patch works fine, I'd say

hacmx’s picture

#8: simpletest-696552.patch queued for re-testing.

sanduhrs’s picture

Title: Fresh install of Drupal 6.15 and Simpletest fails it's own tests » Simpletest fails it's own tests
Version: 6.x-2.10 » 6.x-2.x-dev

Applying the patch fixes the problem.
Running Ubuntu 10.04, PHP 5.3.2, MySQL 5.1.41.

dave reid’s picture

Status: Reviewed & tested by the community » Needs work

The proper solution for this is to use:
$ok_url = base_path() . 'misc/watchdog-ok.png';

boombatower’s picture

Status: Needs work » Fixed

Running Drupal 6-dev and all tests included in SimpleTest 6.x-2.x pass.

dave reid’s picture

Status: Fixed » Needs work

Sorry. Just ran cvs update and tests:

Passes with PHP 5.2: 111 passes, 0 fails
Fails with PHP 5.3: 88 passes, 6 fails

(had verbose enabled on php5.2 install)

boombatower’s picture

PHP 5.3.3 and works like a charm.

Is there a patch to test? Some details?

dave reid’s picture

Oh, the second install is actually PHP 5.2.13. But still fails current install, clean core with patch applied.

dave reid’s picture

The problem with mine is that SimpleTest is being run from inside a directory. So when it looks for the image URI /misc/watchdog-ok.png, that files does not exist on my webroot. I'll patch up the solution in #16.

dave reid’s picture

This can also be seen with http://qa.drupal.org/pifr/test/16784

dave reid’s picture

Assigned: rpetrenko » dave reid
Status: Needs work » Needs review
StatusFileSize
new1.09 KB
boombatower’s picture

Title: Simpletest fails it's own tests » Fix tests when run in a subdirectory.
Status: Needs review » Fixed

Committed, thanks.

Status: Fixed » Closed (fixed)
Issue tags: -Simpletest

Automatically closed -- issue fixed for 2 weeks with no activity.