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

How to run tests ? #8678

Closed
dhoko opened this issue Aug 31, 2015 · 7 comments
Closed

How to run tests ? #8678

dhoko opened this issue Aug 31, 2015 · 7 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@dhoko
Copy link

dhoko commented Aug 31, 2015

Hi,

I read tests/README.md in order to run tests, but it doesn't work.

$ ./console tests:run core
Executing command: cd /home/dhoko/dev/piwik/tests/PHPUnit && /home/dhoko/dev/piwik/vendor/phpunit/phpunit/phpunit   ../../tests/PHPUnit
PHP Warning:  require_once(/home/dhoko/dev/piwik/libs/PiwikTracker/PiwikTracker.php): failed to open stream: No such file or directory in /home/dhoko/dev/piwik/tests/PHPUnit/bootstrap.php on line 41
PHP Fatal error:  require_once(): Failed opening required '/home/dhoko/dev/piwik/libs/PiwikTracker/PiwikTracker.php' (include_path='/home/dhoko/dev/piwik/vendor/pear/pear_exception:/home/dhoko/dev/piwik/vendor/pear/console_getopt:/home/dhoko/dev/piwik/vendor/pear/pear-core-minimal/src:/home/dhoko/dev/piwik/vendor/pear/archive_tar:/home/dhoko/dev/piwik/vendor/phpseclib/phpseclib/phpseclib:.:/usr/share/php:/usr/share/pear:/home/dhoko/dev/piwik/vendor/bin:/home/dhoko/dev/piwik/core:/home/dhoko/dev/piwik/libs:/home/dhoko/dev/piwik/plugins') in /home/dhoko/dev/piwik/tests/PHPUnit/bootstrap.php on line 41

PiwikTracker.php does not exist 👎

$ find . -name '*.php' ! -path '*vendor*' | grep 'PiwikTracker'
./misc/others/ExamplePiwikTracker.php

PS: You need to copy Tests/Config/config.ini.php and paste it to config/ to be abe to run tests..

@sgiehl
Copy link
Member

sgiehl commented Aug 31, 2015

did you init the submodules after checking out piwik from git?

@dhoko
Copy link
Author

dhoko commented Aug 31, 2015

Nop I followed this
https://github.com/piwik/piwik/blob/master/tests/README.md
Le 31 août 2015 5:30 PM, "Stefan Giehl" notifications@github.com a écrit :

did you init the submodules after checking out piwik from git?


Reply to this email directly or view it on GitHub
#8678 (comment).

@sgiehl
Copy link
Member

sgiehl commented Aug 31, 2015

ah ok. Guess it's missing there
git submodule init

@dhoko
Copy link
Author

dhoko commented Sep 1, 2015

Hum it doesn't work too :)

We need to run git submodule update --recursive

tsteur added a commit that referenced this issue Sep 1, 2015
Instead of explaining how to setup Piwik in multiple places we should always link to the developer zone.
@dhoko
Copy link
Author

dhoko commented Sep 1, 2015

Do you have a docker for piwik ?
To run tests:

  • clone
  • fetch submodule
  • composer install + --dev
  • copy config etc.
  • php5-sqlite
  • php5-mysql
  • config db

etc.

@tsteur
Copy link
Member

tsteur commented Sep 1, 2015

FYI: I issued a PR to update docs re installing Piwik.

There are many dockers available but no official one. There's one based on vagrant though: https://github.com/piwik/piwik-dev-environment Nonetheless you should find many dockers eg via google

diosmosis added a commit that referenced this issue Sep 1, 2015
Refs #8678 fix install manual in tests readme is outdated
@mnapoli
Copy link
Contributor

mnapoli commented Sep 2, 2015

@dhoko FYI there's a branch for running Piwik and its tests with Docker: https://github.com/piwik/piwik/compare/docker Or vagrant in #8542.

@mattab mattab closed this as completed Sep 20, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Sep 20, 2015
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

5 participants