aboutsummaryrefslogtreecommitdiffstats
path: root/tests/RUNNING_TESTS.md
diff options
context:
space:
mode:
authorDhruv <dhruv.goel92@gmail.com>2013-06-23 21:37:54 +0530
committerDhruv <dhruv.goel92@gmail.com>2013-06-27 01:52:22 +0530
commitfe4bfd02a3f3b178130c7a8d8bcf66a4ab1c67d4 (patch)
treec853941dcb39af5fccd4934ed55aca00cde2ac85 /tests/RUNNING_TESTS.md
parent4828cb21cf86475bc45a34980e88af3db975228b (diff)
downloadforums-fe4bfd02a3f3b178130c7a8d8bcf66a4ab1c67d4.tar
forums-fe4bfd02a3f3b178130c7a8d8bcf66a4ab1c67d4.tar.gz
forums-fe4bfd02a3f3b178130c7a8d8bcf66a4ab1c67d4.tar.bz2
forums-fe4bfd02a3f3b178130c7a8d8bcf66a4ab1c67d4.tar.xz
forums-fe4bfd02a3f3b178130c7a8d8bcf66a4ab1c67d4.zip
[ticket/10838] Updated RUNNING_TESTS.md
PHPBB3-10838
Diffstat (limited to 'tests/RUNNING_TESTS.md')
-rw-r--r--tests/RUNNING_TESTS.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md
index 26a93f0430..bde1455855 100644
--- a/tests/RUNNING_TESTS.md
+++ b/tests/RUNNING_TESTS.md
@@ -114,6 +114,42 @@ only want the slow tests, run:
$ phpBB/vendor/bin/phpunit --group slow
+Functional tests
+-----------------
+
+Functional tests test software the way a user would. They simulate a user
+browsing the website, but they do these steps in an automated way.
+phpBB allows you to write such tests. This document will tell you how.
+
+Running
+=======
+
+Running the tests requires your phpBB3 repository to be accessible through a
+local web server. As of PHP 5.4 a builtin webserver is available. If you are
+on PHP 5.3 you will also need to supply the URL to a webserver of your own in
+the 'tests/test_config.php' file. This is as simple as defining the
+'$phpbb_functional_url', which contains the URL for the directory containing
+the board. Make sure you include the trailing slash. Testing makes use of a
+seperate database defined in this config file and before running the tests
+each time this database is deleted. Note that without extensive changes to the
+test framework, you cannot use a board outside of the repository on which to
+run tests.
+
+ $phpbb_functional_url = 'http://localhost/phpBB3/';
+
+On PHP 5.4 you do not need the $phpbb_functional_url parameter but you can
+configure the port the builtin webserver runs on using
+
+ $phpbb_functional_port = 8000;
+
+To then run the tests, you run PHPUnit, but use the phpunit.xml.functional
+config file instead of the default one. Specify this through the "-c" option:
+
+ phpunit -c phpunit.xml.functional
+
+This will change your board's config.php file, but it makes a backup at
+config_dev.php, so you can restore it after the test run is complete.
+
More Information
================