I first ran the tests on my localhost installation, it ran fine:

110 passes, 0 fails, and 0 exceptions

But on my remote site,
http://sandbox.rocky-shore.net/drupal/admin/build/testing
it ends up after a few seconds with the message:

An HTTP error 500 occurred. /drupal/batch?id=16&op=do

Both run drupal 6.12 on Linux.

The sites/sandbox.rocky-shore.net/files directory, now has
2 new subdirs:

$ ls -a simpletest
.   binary-1.txt  text-1.txt  text-3.txt  text-5.txt
..  binary-2.txt  text-2.txt  text-4.txt
$ ls -a simpletest666989/
.  ..  .htaccess
$ cat simpletest666989/.htaccess 
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks

Nevertheless, I could run other modules tests:

  • Block functionality: 66 passes, 0 fails, and 0 exceptions
  • Notifications Basics: 49 passes, 0 fails, and 0 exceptions
  • Notifications Content: 163 passes, 0 fails, and 0 exceptions
  • Notifications Lite: 25 passes, 0 fails, and 0 exceptions
  • Notifications Templates: 17 passes, 1 fail, and 0 exceptions
    line 168 - NotificationsTemplatesTests->testNotificationsTemplates()
  • Messaging: 65 passes, 0 fails, and 0 exceptions

For the CCK modules, I got many exceptions related to db schema, and
the last test gave a similar HTTP 500 error.

CRUD - Basic API tests: 6 passes, 0 fails, and 5 exceptions
CRUD - Single to multiple: 61 passes, 0 fails, and 5 exceptions
CRUD - Multiple to single: 73 passes, 0 fails, and 5 exceptions
Admin UI: 131 passes, 0 fails, and 10 exceptions

Then (CCK Option widgets):

An HTTP error 500 occurred.
/drupal/batch?id=27&op=do

HTH

Best regards,

RockyRoad.

CommentFileSizeAuthor
#3 patching-testing.xml_.txt6.91 KBRockyRoad

Comments

RockyRoad’s picture

I applied seeping_module_list_fix.patch from #360925: Need to reset module_list().

Now, without having changed anything to cck files, I don't get the schema exceptions any more ...
* CRUD - Multiple to single: 73 passes, 0 fails, and 0 exceptions
* CRUD - Single to multiple: 61 passes, 0 fails, and 0 exceptions
* CRUD - Basic API tests: 6 passes, 0 fails, and 0 exceptions

But not the Admin UI test raises the HTTP 500 error !
Option widgets stills raises it.

boombatower’s picture

Status: Active » Postponed (maintainer needs more info)

Please try #472684: Install non-default modules one at a time to ensure proper module list is maintained during installation hooks.

Otherwise it may be due to the subdirectory that drupal is located in. SimpleTest does not properly deal with that and patch to fix: #340283: Abstract SimpleTest browser in to its own object

RockyRoad’s picture

StatusFileSize
new6.91 KB
Good news: both patches apply gracefully on my D6.12 .
Bad news: I'm still stuck with that HTTP error 500.

I applied first browser_3.patch from #340283: Abstract SimpleTest browser in to its own object.
It only adds stuff, so it shouldn't break anything in core.

But I think it's not yet used in simpletest 6.x-2-dev, so I'm not really surprised to get similar results:

  <TestSite uri="http://localhost/drupal" db="pgsql">
    <Note>Same results as before the patch</Note>
    <SimpleTest name="SimpleTest functionality" success="true"/>
    <SimpleTest name="Block functionality" success="true"/>
    <SimpleTest suite="CCK" passes="462" fails="0" exceptions="154">
      CRUD - Basic API tests: 6 passes, 0 fails, and 22 exceptions
      CRUD - Single to multiple: 61 passes, 0 fails, and 22 exceptions
      CRUD - Multiple to single: 73 passes, 0 fails, and 22 exceptions
      Admin UI: 131 passes, 0 fails, and 44 exceptions
      Option widgets: 191 passes, 0 fails, and 44 exceptions
    </SimpleTest>
  </TestSite>

And on my remote site :

  <TestSite uri="http://sandbox.rocky-shore.net/drupal" db="mysql">
    <Note>Same results as before the patch, except for Notifications</Note>
    <SimpleTest name="Block functionality" success="true"/>
    <SimpleTest name="SimpleTest functionality" error="HTTP 500"/>
    <SimpleTest suite="CCK" error="HTTP 500">
      CRUD - Basic API tests: 6 passes, 0 fails, and 5 exceptions
      CRUD - Single to multiple: 61 passes, 0 fails, and 5 exceptions
      CRUD - Multiple to single: 73 passes, 0 fails, and 5 exceptions
      Admin UI: 131 passes, 0 fails, and 10 exceptions
      <SimpleTest name="Options widget" error="HTTP 500"/>
    </SimpleTest>
    <SimpleTest suite="Messaging" passes="65" success="true">
      <SimpleTest name="Messaging API" passes="27" success="true"/>
      <SimpleTest name="Sending methods" passes="38" success="true"/>
    </SimpleTest>

    <SimpleTest suite="Notifications" passes="254" fails="1">
      <SimpleTest name="Notifications Basics" success="true" passes="49"/>
      <SimpleTest name="Notifications Content" success="true" passes="163"/>
      <SimpleTest name="Notifications Lite" success="true" passes="25"/>
      <SimpleTest name="Notifications Templates" fails="1" passes="17">
        <Fail filename="notifications_templates.test" line="168"/>
      </SimpleTest>
    </SimpleTest>
  </TestSite>

Then D6_472684-seperate-module-install_1.patch from #472684: Install non-default modules one at a time to ensure proper module list is maintained during installation hooks fixes CCK test exceptions, but curiously changes the results for Notifications test suite.

  <TestSite uri="http://localhost/drupal">
    <Note>Fixes CCK issues</Note>
    <SimpleTest name="SimpleTest functionality" success="true"/>
    <SimpleTest name="Block functionality" success="true" passes="66"/>
    <SimpleTest suite="CCK" passes="462" success="true"/>
  </TestSite>

  <TestSite uri="http://sandbox.rocky-shore.net/drupal">
    <Note>Same results as before the patch</Note>
    <SimpleTest name="SimpleTest functionality" error="HTTP 500"/>
    <SimpleTest name="Block functionality" success="true"/>
    <SimpleTest suite="CCK" error="HTTP 500">
      CRUD - Basic API tests: 6 passes, 0 fails, and 0 exceptions
      CRUD - Single to multiple: 61 passes, 0 fails, and 0 exceptions
      CRUD - Multiple to single: 73 passes, 0 fails, and 0 exceptions
      Admin UI: 131 passes, 0 fails, and 0 exceptions
      <SimpleTest name="Options widget" error="HTTP 500"/>
    </SimpleTest>
    <SimpleTest suite="Messaging" passes="65" success="true"/>
    <SimpleTest suite="Notifications" passes="254" fails="8">
      <SimpleTest name="Notifications Basics" success="true" passes="49"/>
      <SimpleTest name="Notifications Content" success="true" passes="163"/>
      <SimpleTest name="Notifications Lite" passes="17" fails="8">
        <Fail filename="notifications_lite.test" line="76">The message 1 is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="76">The message 2 is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="76">The message 3 is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="76">The message 4 is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="91">The message 1 subject is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="92">The message 1 body is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="91">The message 2 subject is contained in the digest</Fail>
        <Fail filename="notifications_lite.test" line="92">The message 2 body is contained in the digest</Fail>
      </SimpleTest>
      <SimpleTest name="Notifications Templates" passes="18"  success="true"/>
    </SimpleTest>
  </TestSite>

So

  • browser_3.patch applies ok on D6.12
  • D6_472684-seperate-module-install_1.patch applies fine also, but it might be useful to check why it makes test results are different.
  • None of these patches solves my HTTP error 500 issue :(

Any idea welcome.

Thanks

boombatower’s picture

Discussed in IRC, but from looking around:

1) PHP limit of 90MB will work 128MB-256MB is recommended
which would explain why some tests run like block.test
2) check if web user has access to set_time_limit()
as it tries to up the limit from 30 seconds to 3 min
RockyRoad’s picture

I cannot simply increase php memory on my remote host, but no problem to reduce it on my localhost.

I reduced, in /etc/php5/apache2/php.ini, memory_limit to 50M , to be more restrictive, checked in phpinfo() that the change was effective, and launched all tests on one request.

Block functionality: 66 passes, 0 fails, and 0 exceptions
CRUD - Basic API tests: 6 passes, 0 fails, and 0 exceptions
CRUD - Single to multiple: 61 passes, 0 fails, and 0 exceptions
CRUD - Multiple to single: 73 passes, 0 fails, and 0 exceptions
Admin UI: 131 passes, 0 fails, and 0 exceptions
Option widgets: 191 passes, 0 fails, and 0 exceptions
SimpleTest functionality: 110 passes, 0 fails, and 0 exceptions
Whoozit CRUD: 1 pass, 1 fail, and 0 exceptions (that's just a sample
from tutorial)
XML sitemap unit tests: 22 passes, 0 fails, and 0 exceptions
XML sitemap interface tests: 61 passes, 1 fail, and 4 exceptions
XML sitemap node functional tests: 98 passes, 7 fails, and 0
exceptions
XML sitemap unit tests: 22 passes, 0 fails, and 0 exceptions

Tests seem to run slower with less memory, but they complete, no HTTP error.

I didn't try yet to use set_time_limit(). Where should I put that ?

boombatower’s picture

Set limit is already in the code in DrupalWebTestCase->setUp().

Make sure you set the memory limit for PHP CLI as well many distros have them separate.

Otherwise I'm not sure what else to try.

babbage’s picture

Using MAMP Pro on my development machine, I discovered that if I ran Apache/MySQL as 'www/mysql' as recommended by MAMP Pro for security reasons, I got this error. However, setting it instead to the alternate option 'myshortusername/myshortusername' resulted in SimpleTest then working just fine. Presumably this relates to the permissions SimpleTest has depending on the user it is running as, and so this could be related to the problem experienced by the OP?

boombatower’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Please re-open if further issues...this is dead.

diya99’s picture

Hi,

As i am trying to run simpletest on my localhost i am encountering http-500 error so when i goggled around i got some solutions like
1)increasing maxredirects in .ht access file so i increased the limit
2)php memory limit between 128-256 recommended so i made 128
3)and even increased set_time_limit value to 2000 sec where it have been 180

But still facing the same problem selecting each test case like block test went fine but when i tried to select simpletest functionality then getting this error please help me how to proceed further i am strucked up here.

Thank you,

rfay’s picture

diya99, to understand a 500 error, the usual place to start is in your webserver log files. You have to figure out why the #fail happened, and that's how. But you can't find out from somebody else, unfortunately, because the 500 can mean so many things and what it means is typically specific to your own environment.

Further work on this is support, though, so following up in this issue is not the thing to do. Feel free to open a support request and point us to it in this issue if you want. Or get help on IRC. But look in those server logs.