This project is not covered by Drupal’s security advisory policy.
Drupal Coverage is an online service that provides on-demand code coverage reports for both contributed and core modules.
Architecture
A new coverage report for a given project can be initiated from within the user interface of Drupal Coverage. Based upon the project which was selected, Drupal Coverage will inject environment variables into Travis CI via the REST API. Travis CI will fetch the .travis.yml file from a GitHub repository and will replace the hard-coded variables with the environment variables.
The first step of the build process is installing xdebug, phpcov-runner & Drupal TI. Drupal TI will allow Travis CI to install a fresh Drupal installation. For Drupal Coverage, we have added several other functionalities to Drupal TI to make sure that it is capable of creating a Code Coverage report for SimpleTest.
DrupalTI will perform several tasks in order to generate the code coverage report:
- Start PHPCOV-Runner so that all of the following executed code will be recorded.
- Execute Drupal's
run-tests.sh
and specify the test group which needs to be executed. - PHPCOV-Runner keeps storing all of the data of executed lines inside a local SQLite database.
- When the execution of
run-tests.sh
is completed, DrupalTI will execute the stop command on PHPCOV-Runner. Now all of the data from the SQLite database gets retrieved and a Code Coverage report is being generated. - A custom script will generate a Code Coverage badge based upon the results of the report.
- The final step of Drupal TI will add both the generated coverage report and the created badge to the same GitHub repository in a unique identified branch.
In the background, Drupal Coverage keeps checking with TravisCI if the build has been completed. When the build has been completed, the user will be able to see the results in his browser.
This is made possible by using RawGit which hosts .html files from within GitHub.
You can also have a look at our infographic about the architecture of Drupal Coverage.
Contributing
Today we are using a development environment on Acquia in order to test this project. If you would like to start contributing on this project, feel free to request access to the docroot via the issue queue.
In order to understand how this project works, have a look at legovaer's session at DrupalCamp Ghent 2016.
Project information
- Seeking new maintainer
The current maintainers are looking for new people to take ownership. - Module categories: Developer tools
- Created by legovaer on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.