On 05.08.2010, 20:37 Markus wrote: > 1) Where are the tests located? I suggest for core to put them into > maintenance/tests/selenium. That is where they are now. For > extensions I propse a similar structure, that is > <extensiondir>/tests/selenium.
> 2) How are the tests organized? Tests are organized in testing > suites. Each suite represents a conhesive set of tests. So it is > possible to have more than one test suite per extension / core area. > Test suites are technically classes. The files should follow this > naming convention: <NameOfExtension><[Subset]>TestSuite.php. The > subset is optional. For example, in the PagedTiffHandler extension, > it would be PagedTiffHandlerTestSuite.php and > PagedTiffHandlerUploadsTestSuite.php. This should also be the name > of the class. Alternatively, we could use the word "Selenium" > somewhere in there in order to be able to divide between unit and > selenium tests. In that case I suggest to use > PagedTiffHandlerSeleniumTestSuite.php and > PagedTiffHandlerUploadsSeleniumTestSuite.php. Hmmm... this gives > pretty long names. Any suggestions? > 3) How does the framework know there are tests? The tests should be > registered with the autoloader in the extension entry file. In core, > they should be registered directly with the autoloader. I've already implemented a system allowing extensions to register their PHPUnit tests with UnitTestsList hook, and it's much more simple: a couple of lines on extension's side and one wfRunHooks() call in the test runner. -- Best regards, Max Semenik ([[User:MaxSem]]) _______________________________________________ Wikitech-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikitech-l
