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

Add support for --testsuite, --config, --filter to phpunit runs #100

Closed
stronk7 opened this issue May 13, 2021 · 1 comment
Closed

Add support for --testsuite, --config, --filter to phpunit runs #100

stronk7 opened this issue May 13, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@stronk7
Copy link
Member

stronk7 commented May 13, 2021

By default, phpunit is always executed with the --configuration option that uses the plugin own phpunit.xml created on init (that is executed by default with the --buildcomponentconfigs that creates those distributed files.

And that's ok 99% of times (default behavior).

No matter of that, sometimes you may want to run some other testsuite (elsewhere in code), or maybe point to another, custom, phpunit configuration file. Or, also, filter the run to any class or test.

So this issue is about to allow the phpunit command to accept and handle properly these 3 options:

  • --testsuite
  • --configuration
  • --filter

The use of any of them should stop the default behavior to be applied, getting precedence.

Ciao :-)

@stronk7 stronk7 added the enhancement New feature or request label May 13, 2021
@marinaglancy
Copy link
Member

We found an easy workaround, just call phpunit directly:

cd moodle
vendor/bin/phpunit --filter tool_dataprivacy_metadata_registry_testcase

stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Nov 4, 2023
Covered by tests that use intensively the new ->lastCmd
introduced a couple of commits ago.

Also, added a couple of TODOs about something, pre-existing, that are
1) an incorrect unit tests 2) an incorrect --testsuite component use,
some day will be investigated. Not today.

Fixes moodlehq#100
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Nov 4, 2023
Covered by tests that use intensively the new ->lastCmd
introduced a couple of commits ago.

Also, added a couple of TODOs about something, pre-existing, that are
1) an incorrect unit tests 2) an incorrect --testsuite component use,
some day will be investigated. Not today.

Fixes moodlehq#100
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Nov 4, 2023
Covered by tests that use intensively the new ->lastCmd
introduced a couple of commits ago.

Also, added a couple of TODOs about something, pre-existing, that are
1) an incorrect unit tests 2) an incorrect --testsuite component use,
some day will be investigated. Not today.

Fixes moodlehq#100
stronk7 added a commit to stronk7/moodle-plugin-ci that referenced this issue Nov 5, 2023
Covered by tests that use intensively the new ->lastCmd
introduced a couple of commits ago.

Also, added a TODO about something, pre-existing, that is
an incorrect unit tests, some day will be investigated. Not today.

Fixes moodlehq#100
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants