I am testing Drupal 7.12 and contrib module using Simpletest.

I receive a number of errors for various contrib modules. All display very similar error text messages :

An AJAX HTTP error occurred. HTTP Result Code: 403 Debugging information follows. Path: /batch?id=93&op=do StatusText: Forbidden ResponseText: Access denied

and

The test did not complete due to a fatal error. Completion check

I also found test one that returns:

file_put_contents(tmp.simpletest.html) [function.file-put-contents]: failed to open stream: Permission denied

I am afraid this is very limited information I can put here right now but
I would like to ask you what should I check further to correct such errors ?

Thank you !

Comments

Refineo’s picture

What I can add is that the major part of test scenarios as such is executing correctly.
The ajax progress bar appears and in some scenarios
for example for the Token contrib module I receive no errors (40 passes, 0 fails, and 0 exceptions).
In the Token case however I received 2 error messages (although all 40 tests passed) :

after /batch?op=start&id=103 is executed

An error has occurred.
Please continue to the error page

and another large red error message box ;

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=103&op=do StatusText: OK ResponseText: (...)

and much more debug data

and then

The test run did not successfully finish.

DrMiaow’s picture

Bump... I'm getting this too...

DrMiaow’s picture

For me the issue was that SimpleTest 2 was using the 'standard' profile.

I added this line to my test setup....

    // Make sure we are using the testing profile
    $this->profile = 'testing';

.. and suddenly two days of painful frustration ended.

DrMiaow’s picture

This explains the issue we are both having... http://drupal.org/node/856598

And the reason my 'fix' works. (I am using Acquia )

dgtlmoon’s picture

bump same here

Johnnie Walker’s picture

Issue summary: View changes

Wow! Yes! DrMiaow. By jove! You did it!

That is the crucial thing that has hampered me for 2 days too.

Thanks.

As you say:

Add the following line into the setUp() method of my class that extends DrupalWebTestCase.


    // Make sure we are using the testing profile
    $this->profile = 'testing';

That solved the problem for me. It was not mentioned at all in the docs that I followed to get started.

I wonder if it is possible to specify that in the testing_api setting of the module's .info file.