Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPUnit tests, add group for current plugin automatically #16612

Closed
tsteur opened this issue Oct 27, 2020 · 0 comments · Fixed by #16615
Closed

PHPUnit tests, add group for current plugin automatically #16612

tsteur opened this issue Oct 27, 2020 · 0 comments · Fixed by #16615
Assignees
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.

Comments

@tsteur
Copy link
Member

tsteur commented Oct 27, 2020

I had enabled travis for a plugin and was wondering why there were no tests being executed. Until after a while I noticed I didn't have the test group set in all plugins (in my case it actually had the old plugin name in there and when renaming the plugin I didn't update the PHPunit @group tags). Also sometimes copying tests from a different plugin results in forgetting to adjust the group name 👍

/**
 * @group MyPluginName
 */
class ApiTest ...

It's easily forgotten to add this group name causing tests to not being executed on Travis and then we miss failing tests when we rely on travis.

Is there any chance we could add these tags automatically? I thought this was already the case but seems to not be or maybe it regressed. For example when the classname is Piwik\Plugins\MyPluginName\tests\Integration\ApiTest then we could automatically add MyPluginName as a group tag?

@tsteur tsteur added c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. labels Oct 27, 2020
@tsteur tsteur self-assigned this Oct 27, 2020
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: Platform For Matomo platform changes that aren't impacting any of our APIs but improve the core itself. c: Tests & QA For issues related to automated tests or making it easier to QA & test issues. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants