Developer tools

Automatic functional tests

You can test all your front and admin pages without writing a line of code.

Admin functional test

$ php symfony test:functional admin dm  

The test configuration file can be found in test/functional/admin/dmTest.php

Front functional test

$ php symfony test:functional front dm  

The test configuration file can be found in test/functional/front/dmTest.php

Functional test configuration

In the configuration file, we can see

require_once realpath(dirname(__FILE__).'/../../../config/ProjectConfiguration.class.php');  
 
$config = array(  
  'login'     => true,    // whether to log a user or not at the beginning of the tests  
  'username'  => 'admin', // username to log in  
  'validate'  => false,   // perform html validation on each page, based on its doctype  
  'debug'     => true,    // use debug mode ( slower, use more memory )  
  'env'       => 'test',  // sf_environment when running tests  
);  
 
$test = new dmAdminFunctionalCoverageTest($config);  
 
$test->run();  

Feel free to customize the test configuration for your needs.

Learn more about symfony unit and functional testing.

Work in progress

This documentation page is not complete yet. We are working hard to make it available as soon as possible.

Questions and Feedback

If you need support or have a technical question, you can

  • Post to the google group
  • Come and chat on the #diem IRC channel on freenode