Last modified: 2013-02-19 09:42:35 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T47112, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 45112 - Files requiring Selenium php files at nonexistent paths
Files requiring Selenium php files at nonexistent paths
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Unit tests (Other open bugs)
1.21.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-02-18 00:40 UTC by Waldir
Modified: 2013-02-19 09:42 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Waldir 2013-02-18 00:40:28 UTC
1) Running `git grep /SeleniumTestCase.php` returns the following entries:

(from tests/RunSeleniumTests.php)
require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' );

(from tests/TestsAutoLoader.php)
      'SeleniumTestCase' => "$testDir/selenium/SeleniumTestCase.php",

(from tests/selenium/SeleniumLoader.php)
              require_once( 'PHPUnit/Extensions/SeleniumTestCase.php' );

(from tests/selenium/installer/MediaWikiInstallationCommonFunction.php)
require_once 'PHPUnit/Extensions/SeleniumTestCase.php';

All of these attempt to access the SeleniumTestCase.php file at tests/selenium/installer/PHPUnit/Extensions/, but there's only one such file, at tests/selenium/SeleniumTestCase.php


2) `git grep Testing/` returns:

(from tests/selenium/Selenium.php)
require( 'Testing/Selenium.php' );

(from tests/selenium/SeleniumLoader.php)
              require_once( 'Testing/Selenium.php' );

but there is only tests/selenium/Selenium.php; tests/selenium/Testing/Selenium.php doesn't exist.


3) `git grep /Framework.php`:

(from tests/selenium/SeleniumLoader.php)
              require_once( 'PHPUnit/Framework.php' );

(from tests/selenium/installer/MediaWikiInstallerTestSuite.php)
require_once 'PHPUnit/Framework.php';

but there's no Framework.php anywhere in the mediawiki file tree.


ps - incidentally, I noticed that tests/RunSeleniumTests.php: contains a "©" instead of "©" in the initial comment. That should probably be corrected in the course of fixing this bug.
Comment 1 Platonides 2013-02-18 10:00:22 UTC
Try doing 
 pear install phpunit/PHPUnit_Selenium

That will install PHPUnit/Extensions/SeleniumTestCase.php and Testing/Selenium.php at eg. /usr/share/pear (depending of your system) It is loaded from the include_path.

Same for PHPUnit/Framework.php but when installing php.
Comment 2 Platonides 2013-02-18 10:04:41 UTC
s/when installing php/when installing phpunit/

For the © typo, see changeset 49623.
Comment 3 Waldir 2013-02-18 15:13:26 UTC
Fair enough. However, I still think there should be a README file in the tests folder, and/or a comment for the lines of code that include/require files that don't come with mediawiki (and aren't considered dependencies when installing). By the way, probably the installer should output a heads-up warning if the necessary PHPUnit stuff isn't present.
Comment 4 Waldir 2013-02-18 15:14:33 UTC
(In reply to comment #2)
> For the © typo, see changeset 49623.
link for convenience: https://gerrit.wikimedia.org/r/#/c/49623 (test: [[gerrit:49623]])
Comment 5 Platonides 2013-02-18 16:06:27 UTC
I thought the keywords which bugzilla autolinked were changeset XYZ :/

No, the installer doesn't need to warn about not having phpunit, since the normal user won't be running the tests and they aren't needed.

It's not that rare that for running tests/phpunit you need phpunit or selenium for tests/selenium, but feel free to suggest a text. tests/phpunit/README already mentions that it requires PHPUnit and links to the install instructions. We should add a similar one at tests/selenium
Comment 6 Antoine "hashar" Musso (WMF) 2013-02-18 19:29:41 UTC
(In reply to comment #5)
> I thought the keywords which bugzilla autolinked were changeset XYZ :/

Paste the URL this way we can click them in the bug email notification :D
Comment 7 Andre Klapper 2013-02-19 09:42:35 UTC
(In reply to comment #5)
> I thought the keywords which bugzilla autolinked were changeset XYZ :/

http://en.wikipedia.org/wiki/Wikipedia:Bugzilla#Links_from_within_Bugzilla

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links