Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By somersst on
I have create a DrupalWebTestCase.
When I run it from the UI, I see that the test starts, but even after 10 minutes I don't get any response.
I also tried to load it through the a command prompt with the following command.
php scripts/run-tests.sh "CDD ESB Services" --all --verbose
Then I get the following result (nothing to see in test results)
Drupal test run
---------------
All tests will run.
Test run started:
Monday, 17 April, 2017 - 17:49
Test summary
------------
Test run duration: 3 min 20 sec
Detailed test results
---------------------
Comments
Check a few basics, i.e. that
Check a few basics, i.e. that other tests run, that you have added your test file to the module's .info with the correct path, and that your test file starts with a
<?php
tag, as these things can be easy to overlook. If all basics are OK, start looking for a problem in your test code. You would probably have to post some code to get a more useful response.Digit Professionals specialising in Drupal, WordPress & CiviCRM support for publishers in non-profit and related sectors
Tests run through UI
Hi John,
the Unit Test cases work when running from the UI. But when running from the command line, I don't see any results.
For a WebTestCase, sometimes I get error from UI, and sometimes it keeps running for ever. I just do a drupalGet.
public function testInvalidRegistrationToken(){
$this->drupalGet("/en/corporate-due-dilligence?token=123456");
$this->assertResponse(200, 'User is allowed to see the contents.');
}