mirror of
https://github.com/joomla/joomla-cms.git
synced 2024-08-04 18:20:29 +00:00
* Codestyle fixes for tests * fix the 5 other files * docblock fixes * more codestyle * more codestyle * update change MockObject * Update Codeception codestyle * remove exclusion on drone for tests dir * revert tests dir |
||
---|---|---|
.. | ||
_data | ||
_support | ||
acceptance | ||
api | ||
acceptance.suite.yml | ||
api.suite.yml | ||
drone-api-run.sh | ||
drone-system-run.sh | ||
README.md |
System Testing for Joomla
Abstract
Acceptance or UI tests for Joomla are present in the acceptance
folder, there are two major categories of tests
at the moment
- Installation Tests, inside the
acceptance/install
folder - Administrator Tests, inside the
acceptance/administrator
folder
Installation
Here are the steps that are needed to setup UI tests execution on localhost
Linux OS
- Checkout the Project in your document root folder, and follow the setup guide.
- Navigate to
tests/Codeception
folder and edit configuration fileacceptance.suite.yml
file.- Within the JoomlaBrowser config section change
url
point it to your localhost url - update
database host
database user
&database password
as per your localhost installed DB, these values will be used by installation tests - change
database name
make sure you have a database with this name created on your localhost DB, this will help you avoid errors withJoomlaDb
helper as well. - Within the
Helper/JoomlaDb
section, update the values forhost
dbname
user
password
as per the previous section in the config - Within the
Helper/Acceptance
section, update the values forurl
cmsPath
, point them as per your localhost setup.
- Within the JoomlaBrowser config section change
- Run
./node_modules/.bin/selenium-standalone install
in project to install selenium-standalone server in localhost - Run
./node_modules/.bin/selenium-standalone start
and wait for the messageSelenium Started
- Run the following in project root:
libraries/vendor/bin/codecept run acceptance tests/Codeception/acceptance/install
this will start Chrome in headless mode, to view the test execution in Chrome UI, removeheadless
from capabilities in configuration file
API testing for Joomla
Abstract
These are the Joomla 4 API (webservices) tests.
Installation
Run a composer install
in the joomla root directory and adjust the REST url in
tests/Api/api.suite.yml
and copy the codeception.yml
to the Joomla main directory.
Tests with authentication require a user
admin
with passwordadmin
as credentials for now.
Running
vendor/bin/codecept run api
You can also run the command with --debug
to get some extended information.