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

[InvalidArgumentException] There are no commands defined in the "tests" namespace #14156

Closed
mosdevly opened this issue Mar 1, 2019 · 4 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@mosdevly
Copy link

mosdevly commented Mar 1, 2019

I reviewed a previous issue #7356 which is similar but I didn't find any insights on how to remedy this for other namespaces. Here's a screenshot of the error:

matomo-test-error

Explanation:

  • I run ./console development:enable. - Success
  • I run ./console generate:test --testtype unit - Success
  • After entering additional info, it shows that generation was successful
  • However, no files were actually generated.
  • So I proceeded to manually add the appropriate files and folders according to the documentation here: https://developer.matomo.org/guides/tests-php
  • I run: ./console tests:run MyTest
  • This error ocurred.
  • I run: ./console tests:run plugins/MyPlugin/MyTest.php
  • Error still occurs

Running ./console list shows the error is indeed valid. The problem is I have no idea why this command isn't there nor how to add it.

Any insights on this are greatly appreciated!

@tsteur
Copy link
Member

tsteur commented Mar 2, 2019

Make sure development mode is really enabled and the plugin TestRunner needs to be enabled as well.

@mosdevly
Copy link
Author

mosdevly commented Mar 5, 2019

Thanks for your reply. Dev mode is enabled as noted above but there's no plugin named TestRunner in the plugins nor in the config.

Before posting this issue I tried searching Matomo marketplace for a test plugin as well. The only thing that pops up is A/B Testing. Tried it again today, same results.

So where can I find and install the TestRunner?

@Findus23
Copy link
Member

Findus23 commented Mar 5, 2019

Just to be sure: You are running the Matomo version from this repository and not the build zip from https://builds.matomo.org/.
Because in the latter many files only needed for tests are removed.

You can check https://developer.matomo.org/guides/getting-started-part-1 for more infos.

@tsteur
Copy link
Member

tsteur commented Mar 5, 2019

It sounds definitely like you installed Matomo from the zip. Be good to install it from GIT and then it'll work 👍

@tsteur tsteur closed this as completed Mar 5, 2019
@tsteur tsteur added the answered For when a question was asked and we referred to forum or answered it. label Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants