Skip to content

Introducing Simpletest code coverage#82

Open
legovaer wants to merge 1 commit intoLionsAd:masterfrom
legovaer:add-coverage-support
Open

Introducing Simpletest code coverage#82
legovaer wants to merge 1 commit intoLionsAd:masterfrom
legovaer:add-coverage-support

Conversation

@legovaer
Copy link

@legovaer legovaer commented Jun 4, 2016

Introduction

This PR will allow a user to generate code coverage reports for Simpletest executions.

Features

  • Generates a code coverage report using sebastianbergmann/phpcov which generates the same report as PHPUnit.
  • Automatically creates a new branch inside the GitHub repository in order to store the coverage report.
  • Generates a badge (optional) which indicates the percentage of the code which has been covered by simpletest

New Variables

This PR introduces several new variables to the .travis.yml file:

  • DRUPAL_TI_SIMPLETEST_COVERAGE - Can be set to "1" in order to enable the code coverage reports
  • DRUPAL_TI_SIMPLETEST_COVERAGE_GENERATE_BADGES- Can be set ti "1" in order to enable a badge which indicates the percentage of the code which has been covered by Simpletest
  • DRUPAL_TI_GITHUB_EMAIL - A secured variable containing the user's e-mail address
  • DRUPAL_TI_GITHUB_EMAIL - A secured variable containing the user's full name
  • DRUPAL_TI_GITHUB_EMAIL - A secured variable containing the user's application token

Examples

Currently I have a very good example of the power of this PR:

Todo

  • Test with a D8 module
  • PHPUnit & Simpletest results should get merged

Open pull requests

Nice-to-have

  • Publish results to coveralls.io

@legovaer
Copy link
Author

legovaer commented Jun 4, 2016

Some of the tests fail because the Github credentials are not part of the .travis.yml file. Shall I use mine? I do need an application token form your end however.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling b48b627 on legovaer:add-coverage-support into 9b1253d on LionsAd:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants