Joomla! Programmers Documentation
Manual Index
Setup your testing environment
Prepare your Workstation¶
You need a set of tools to have a good testing setup. Tools you should have:
- git
- node (16.16.0 is the current LTS)
- database (mysql 5.6+, mariaDB 10.1+, postgres 11.0+)
- PHP (good to have different versions and the ability to switch)
- Composer, Installation instructions here
- Webserver (apache 2.4+, nginx 1.18+)
- Editor (PhpStorm, Visual Studio Code)
This is pretty much the same toolset you need for unit testing
MAC OS¶
As always there are different ways of installing the listed software. One way is the use of Valet in combination with Homebrew
Now as you have all tools installed you can clone the joomla-cms repository.
- Open a terminal
- Go into a directory on you workstation.
- clone the joomla-cms repository:
git clone https://github.com/joomla/joomla-cms.git
another option here is to fork the joomla-cms repo and then clone your fork. We recommend the 2nd way because then you can make changes and Pull Request directly. - Go into the joomla-cms directory
- If you have installed valet, run
valet link
- Run
composer install
- Run
npm ci
- Create a
cypress.env.json
file. This file allows to overwrite config setting fromcypress.config.js
Here is a example cypress.env.json
{
"sitename": "Joomla CMS Test Local",
"name": "jane doe",
"email": "admin@example.com",
"username": "local-admin",
"password": "joomla-17082005",
"db_type": "MySQLi",
"db_host": "localhost",
"db_name": "test_joomla",
"db_user": "root",
"db_password": "password",
"db_prefix": "jos_"
}
You don't need all settings, just look what you have to change for your local environment compared to cypress.config.js
- Run
npx cypress open --e2e --browser=chrome --config baseUrl=http://joomla-cms.test
This will open two windows, one you can ignore and one to run the tests
In the following window you can select test and let them run. You need to install first.
Windows¶
This page is unfinished, please use the **Edit this Page** link at the bottom of this page to help make it more useful.