Posted by webchick on April 23, 2009 at 1:47am
| Project: | SimpleTest |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | webchick |
| Status: | closed (fixed) |
Issue Summary
It'd be nice to have at least one example of a working test to go from. SimpleTest module should definitely pass its own tests, anyway. :)
Comments
#2
Double checked...I get all passes on both the Block test and SimpleTest's own test (the only two included).
Please make sure you followed the INSTALL.txt instructions.
#3
Yep, I followed the instructions in INSTALL.txt and copy/pasted the first two chunks into sites/default/settings.php. The module runs fine, it just finds numerous failures.
Here are my results:
Block functionality: 20 passes, 22 fails, and 0 exceptions
Simpletest: 36 passes, 39 fails, and 33 exceptions
Here's a screenshot.
Off-hand, it appears that any time it goes to get a page it returns 0 bytes. That would certainly cause a problem. I should note that this reminds me a lot of similar problems I had in D7 back a few months ago because the cURL version included in MAMP (7.18.2) fails miserably. Core issue: #308186: cURL 7.18.2 and SimpleTest module bitterly despise one another, fixed in SimpleTest 6.x: #334278: SimpleTest fails with cURL 7.18.2 and MAMP 1.7.2 Obviously that's not the exact problem, since that patch has already been applied, but it smells related.
#4
After discussion in IRC it seems apparent that something interesting is going on in your environment. As you said, when you get some time please see if you can figure anything out.
#5
Sure thing. Just to log it, I'm using MAMP 1.7.2, and confirmed this problem continues to exist even with the latest 6.x-2.x code, which should be a straight back-port of core which does not have this problem.
#6
I was involved in those two previous issues (ie: definately had the symptom in my environment), but it POST works fine for me at the moment (ie: I can create, and login, as a normal user). Yes, I'm running MAMP 1.7.2, Simpletest 6.x-2.8 (2009-Apr-23).
However, simpletest.test also fails for me : 79 passes, 22 fails, and 34 exceptions (I'm running E_ALL, so probably get more noisy results than most). Looking now...
#7
Hmm... I uninstalled 6.x-2.8 and updated to -dev, and now get "110 passes, 0 fails, and 8 exceptions" (and those are just notices, since I run E_ALL).
webchick: Suggest you save your DB, then try uninstalling and upgrading. Perhaps it's an update issue?
#8
I used to get 100% pass with E_ALL, now I get: (twice since the test runs that code twice)
Undefined variable: classes Notice simpletest.module 504 simpletest_get_all_tests()Not sure why since it would seem D7 should get that as well...
#9
Going to try and get to the bottom of this today.
#10
Debugging info from curlExec() in D6 and D7:
$curl_options is array (
[CURLOPT_HTTPGET] => true,
[CURLOPT_URL] => http://localhost/6x/user,
[CURLOPT_NOBODY] => false,
[CURLOPT_HTTPHEADER] => array(),
)
$this->curlHandle is NULL.
$this->additionalCurlOptions is array()
CURLINFO_EFFECTIVE_URL is 1048577 (whatever that is)
The tricky thing is, the values match for both versions. Yet, the following line which is exactly the same on both copies of drupal_web_test_case.php:
$this->drupalSetContent(curl_exec($this->curlHandle), curl_getinfo($this->curlHandle, CURLINFO_EFFECTIVE_URL));...returns an empty string in D6, and the full page of contents in D7. :( WTF?
#11
Hm. When I do NOT do step 2 in INSTALL.txt, I do NOT get this problem. Block tests pass with 0 failures. SimpleTest has 1 failure and two exceptions instead of 11,000.
#12
I just added to the troubleshooting simplest documentation - http://drupal.org/node/394976 - about a problem i encountered that gave me a similar error message to the one here about "0 bytes" returned from all the GET requests. I'm running a Linux virtual box as a guest inside my Mac laptop. On the mac laptop I have entries in /etc/hosts like "6d.local" so that I can access /var/www/d6 of the Linux guest OS without referring to the "d6" subdirectory because of #340283: Abstract SimpleTest browser in to its own object (subdirectory POSTS fail).
So...I had to add 6d.local to the /etc/hosts of my Linux gues OS to get it work.
That doesn't sound like it's exactly your problem webchick, but maybe it will help spark some neurons into the right direction for a solution ;)
#13
Is this still an issue? Can we nail it down to something?
#14
Closing, please re-open or create new issue if there is further useful discussion.