Skip to content

Commit e1d3223

Browse files
committed
add documentation
1 parent 6822b3d commit e1d3223

File tree

1 file changed

+35
-14
lines changed

1 file changed

+35
-14
lines changed

README.md

+35-14
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,41 @@
11
# Moodle Web Installation Testing
22

3-
This project is a testing suite for the Moodle web installation process. It uses PHP, Composer, and JavaScript to perform the tests.
3+
This repository contains the testing suite for the Moodle web installation process.
44

5-
## Getting Started
6-
7-
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
8-
9-
### Prerequisites
10-
11-
- PHP
12-
- Composer
13-
- JavaScript
14-
15-
### Installing
16-
17-
Clone the repository:
5+
## Pre-requisites
6+
- A web server with PHP and a database server installed, as if you were going to install Moodle manually.
7+
- Composer installed.
8+
- The Moodle codebase, you can clone the code from the Moodle repository.
189

10+
## Getting Started
1911
```bash
12+
# Get Moodle code, you could select another version branch (skip this if you already got the code)
13+
git clone -b main git://git.moodle.org/moodle.git moodle
14+
15+
# Clone the web install repository.
2016
git clone [email protected]:lameze/moodle-webinstall.git
17+
cd moodle-webinstall
18+
19+
# Install the dependencies.
20+
composer install
21+
22+
# URL to the moodle site to be installed.
23+
export MOODLE_SITE_URL="http://localhost/moodle"
24+
25+
# Database connection details, ensure the database is created before running the tests.
26+
export DB_TYPE=pgsql
27+
export DB_HOST=localhost
28+
export DB_NAME=moodle
29+
export DB_USER=postgres
30+
export DB_PASS=moodle
31+
32+
# Ensure the site to be installed has write permissions so moodle can write the config.php file.
33+
sudo chown -R www-data:www-data /path/to/moodle
34+
35+
# Run the tests
36+
/vendor/bin/behat
37+
```
38+
The test execution usually takes around 54 seconds to complete, the common issues that might prevent the tests from passing are:
39+
- The database connection details are incorrect.
40+
- The moodle site URL is incorrect.
41+
- The moodle site directory does not have write permissions and Moodle is unable to write the config.php file.

0 commit comments

Comments
 (0)