Skip to content

PHPUnit tests, add group for current plugin automatically #16612

@tsteur

Description

@tsteur

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?

Metadata

Metadata

Assignees

Labels

c: PlatformFor Matomo platform changes that aren't impacting any of our APIs but improve the core itself.c: Tests & QAFor issues related to automated tests or making it easier to QA & test issues.not-in-changelogFor issues or pull requests that should not be included in our release changelog on matomo.org.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions