Difference between revisions of "Proposals/Done/Acceptance testing"
From Mahara Wiki
< Proposals | Done
Line 10: | Line 10: | ||
** Selenium Server (optional). | ** Selenium Server (optional). | ||
* Instructions to run a test | * Instructions to run a test | ||
− | # | + | # Install a Mahara site |
− | + | # Launch the web server for testing | |
+ | For example, | ||
+ | # Edit htdocs/config.php adding the following lines | ||
+ | // Behat config | ||
+ | $cfg->behat_dbprefix = 'behat_'; // must not empty | ||
+ | $cfg->behat_dataroot = '<path to behat dataroot>'; | ||
+ | $cfg->behat_wwwroot = '<URL to the behat test site>'; | ||
+ | # Initilise the behat environment | ||
+ | php test/behat/scripts/init.php | ||
+ | # Run the selenium server (optional) | ||
+ | java -jar /path/to/your/selenium/server/selenium-server-standalone-2.NN.N.jar | ||
+ | # |
Revision as of 14:46, 19 September 2014
Introduction
Like Moodle [1], we integrate Behat, a behavioural driven development (BDD) tool for describing Mahara's features and automatically testing them.
Getting started guide
This guide will show you how to start running Behat tests on a Mahara site
- Requirements
- PHP 5.3+
- A standalone web server. If you are using PHP 4+, you can run the built-in PHP server insteads.
- Selenium Server (optional).
- Instructions to run a test
- Install a Mahara site
- Launch the web server for testing
For example,
- Edit htdocs/config.php adding the following lines
// Behat config $cfg->behat_dbprefix = 'behat_'; // must not empty $cfg->behat_dataroot = '<path to behat dataroot>'; $cfg->behat_wwwroot = '<URL to the behat test site>';
- Initilise the behat environment
php test/behat/scripts/init.php
- Run the selenium server (optional)
java -jar /path/to/your/selenium/server/selenium-server-standalone-2.NN.N.jar