Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

On This Page:

Setting Up the Test Framework.

A guide to setting up the Revive Adserver development test framework .

 


Pre-Requisites

In order to set up the Revive Adserver development test framework, you will need:

Copy & Configure the Test Configuration File

In your Revive Adserver development environment:

  • Copy the /etc/test.conf.php file to the /var directory;
  • Edit the /var/test.conf.php file:
    • In the [database] section:
      • Set the appropriate database type;
      • Set the appropriate host of your database;
      • If required, set the socket or port;
      • Set an appropriate username and password to connect to the database with (not that this username will need permissions to create, modify and drop the test database); and
      • Set the name of the test database, if a different name is needed.
  • Update the ownership or permissions of the /var/test.conf.php file to allow your web server user to write to this file.

Having problems running the tests with 500 errors? The database connection may be the cause.

Try copying the known good [database] section from your Revive Adserver development environment - but remember to update the details for the database name, at least!

Accessing the Test Framework via a Web Browser

To access the test framework via a web browser, point your browser at the /tests directory of your Revive Adserver development environment. 

So, for example, if your Revive Adserver development environment is accessible at http://www.example.com/revive-adserver, then the test framework will be available at:

Test Execution

Web Browser

To execute tests, or a group of tests, simple click on the test (or group) in the web UI.

Many of the tests, especially those that access the database, are known to leave data/the database in an invalid state that affect the running of the next test, which results in false negative test results.

This is a known issue with the Test Framework's web UI. Nevertheless, the web UI is a particularly effective way of executing tests, particularly a specific test, for the purposes of checking a specific area of functionality, or to execute a test via xdebug.

However, for bulk test execution (e.g. prior to committing code or releasing Revive Adserver), the command line is a far better way to execute all tests.

Command Line

TBA

 

  • No labels