Skip to main content

15 docs tagged with "Testing"

View All Tags

Acceptance testing for the Moodle App

In order to run tests that carry out automated functionality testing for the Moodle App, you can write Acceptance tests. This can be useful if you want to test plugins that are compatible with the app, or you're contributing to the app core. Behat tests for the app work the same way as tests for Moodle core, but they are not run as part of a normal Behat execution and there are some differences that we'll go through in this page.

Behat

This page describes the internals of Behat and the integration with Moodle.

Browsers

This page complements Behat providing info about how to run the acceptance tests suite in different browsers.

Penetration testing

This is information for people who want to performing a penetration test of their Moodle instance as well as information for pen testers.

PHPUnit

PHPUnit by Sebastian Bergmann is an advanced unit testing framework for PHP. It is installed as Composer dependency and is not part of Moodle installation. To run PHPUnit tests, you have to manually install it on your development computer or test server.

QA testing

All the information related to the Qualify Assurance tests during the Moodle development.

Running acceptance tests

Moodle uses Behat, a php framework for automated functional testing, as part of a suite of testing tools.

Testing

All the information related to testing during the Moodle development.

Testing credits

The following people have helped with Quality Assurance (QA) testing:

Unit testing for the Moodle App

Unit tests are written in JavaScript using Jest. If you want to create a new one, Jest is already configured and you only need to create a file ending with .test.ts within the project. If you're going to do so, remember to follow the file location conventions.

Writing acceptance tests

This documentation gives some hints on writing behat tests for Moodle core, and for plugins. The focus of the documentation is on behat tests for plugins. Behat Features and Scenarios are written in a natural language, and should