r100392 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100391‎ | r100392 | r100393 >
Date:23:11, 20 October 2011
Author:krinkle
Status:deferred (Comments)
Tags:
Comment:
[JSTesting] Initial stab at implementing on-wiki running of unit tests with QUnit.
* Using a SpecialPage, Special:JavaScriptTest
* Disabled by default (both because it's a new feature and because tests can potentially make edits or do bad stuff not wanted on a production wiki)
* Extensions can register a test suite by registering their test suite as a regular module (e.g. 'ext.fooBar.test'), with a dependency on the module(s) being tested.
<code>
$wgHooks['ResourceLoaderTestModules'][] = 'FooBarHooks::resourceLoaderTestModules';

--- FooBar.hooks.php

public static function resourceLoaderTestModules( &$testModules, $resourceLoader ) {
&$testModules['qunit']['ext.fooBar.test'] = array(
'scripts' => 'resources/ext.fooBar.test.js',
'dependencies' => array(
'ext.fooBar.editor',
'ext.fooBar.api',
),
'remoteExtPath' => 'FooBar',
'localBasePath' => __DIR__,
);
return true;
}
</code>
* MFT r100386
Modified paths:
  • /branches/JSTesting/RELEASE-NOTES-1.19 (modified) (history)
  • /branches/JSTesting/includes/AutoLoader.php (modified) (history)
  • /branches/JSTesting/includes/DefaultSettings.php (modified) (history)
  • /branches/JSTesting/includes/Skin.php (modified) (history)
  • /branches/JSTesting/includes/SpecialPageFactory.php (modified) (history)
  • /branches/JSTesting/includes/resourceloader/ResourceLoader.php (modified) (history)
  • /branches/JSTesting/includes/specials/SpecialJavaScriptTest.php (added) (history)
  • /branches/JSTesting/languages/messages/MessagesEn.php (modified) (history)
  • /branches/JSTesting/languages/messages/MessagesQqq.php (modified) (history)
  • /branches/JSTesting/resources/Resources.php (modified) (history)
  • /branches/JSTesting/resources/mediawiki.special/mediawiki.special.javaScriptTest.js (added) (history)
  • /branches/JSTesting/tests/qunit/QUnitTestResources.php (added) (history)

Diff [purge]

Index: branches/JSTesting/RELEASE-NOTES-1.19
@@ -72,6 +72,9 @@
7373 * (bug 31297) Add support for namespaces in Special:RecentChanges subpage filter syntax.
7474 * The default user signature now contains a talk link in addition to the user link.
7575 * (bug 25306) Add link of old page title to MediaWiki:Delete_and_move_reason
 76+* (bug 30339) Implement SpecialPage for running javascript tests. Disabled by default, due to
 77+ tests potentially being harmful, not to be run on a production wiki.
 78+ Enable by setting $wgEnableJavaScriptTest to true.
7679
7780 === Bug fixes in 1.19 ===
7881 * $wgUploadNavigationUrl should be used for file redlinks if
Index: branches/JSTesting/tests/qunit/QUnitTestResources.php
@@ -0,0 +1,56 @@
 2+<?php
 3+
 4+return array(
 5+
 6+ /* Test suites for MediaWiki core modules */
 7+
 8+ 'mediawiki.tests.qunit.suites' => array(
 9+ 'scripts' => array(
 10+ 'tests/qunit/suites/resources/jquery/jquery.autoEllipsis.test.js',
 11+ 'tests/qunit/suites/resources/jquery/jquery.byteLength.test.js',
 12+ 'tests/qunit/suites/resources/jquery/jquery.byteLimit.test.js', // has mw-config def
 13+ 'tests/qunit/suites/resources/jquery/jquery.client.test.js',
 14+ 'tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js',
 15+ 'tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js',
 16+ 'tests/qunit/suites/resources/jquery/jquery.localize.test.js',
 17+ 'tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js',
 18+ 'tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js',
 19+ # jquery.tablesorter.test.js: Broken
 20+ #'tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js', // has mw-config def
 21+ 'tests/qunit/suites/resources/jquery/jquery.textSelection.test.js',
 22+ # mediawiki.test.js: Tries to load from /data/ directory, fails when ran from the
 23+ # SpecialPage since it uses regex to get the current path and loads from that + /data/
 24+ # (index.php/Data in this case..)
 25+ #'tests/qunit/suites/resources/mediawiki/mediawiki.test.js',
 26+ 'tests/qunit/suites/resources/mediawiki/mediawiki.title.test.js', // has mw-config def
 27+ 'tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js',
 28+ 'tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js',
 29+ 'tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js',
 30+
 31+ // *has mw-config def:
 32+ // This means the module overwrites/stes mw.config variables, reason being that
 33+ // the static /qunit/index.html has an empty mw.config since it's static.
 34+ // Until /qunit/index.html is fully replaceable and WMF's TestSwarm is up and running
 35+ // with Special:JavaScriptTest, untill it is important that tests do not depend on anything
 36+ // being in mw.config (not even wgServer).
 37+ ),
 38+ 'dependencies' => array(
 39+ 'jquery.autoEllipsis',
 40+ 'jquery.byteLength',
 41+ 'jquery.byteLimit',
 42+ 'jquery.client',
 43+ 'jquery.colorUtil',
 44+ 'jquery.getAttrs',
 45+ 'jquery.localize',
 46+ 'jquery.mwExtension',
 47+ 'jquery.tabIndex',
 48+ 'jquery.tablesorter',
 49+ 'jquery.textSelection',
 50+ 'mediawiki',
 51+ 'mediawiki.Title',
 52+ 'mediawiki.user',
 53+ 'mediawiki.util',
 54+ 'mediawiki.special.recentchanges',
 55+ ),
 56+ )
 57+);
Index: branches/JSTesting/includes/SpecialPageFactory.php
@@ -138,6 +138,7 @@
139139 'Blankpage' => 'SpecialBlankpage',
140140 'Blockme' => 'SpecialBlockme',
141141 'Emailuser' => 'SpecialEmailUser',
 142+ 'JavaScriptTest' => 'SpecialJavaScriptTest',
142143 'Movepage' => 'MovePageForm',
143144 'Mycontributions' => 'SpecialMycontributions',
144145 'Mypage' => 'SpecialMypage',
Index: branches/JSTesting/includes/resourceloader/ResourceLoader.php
@@ -37,6 +37,10 @@
3838
3939 /** Associative array mapping module name to info associative array */
4040 protected $moduleInfos = array();
 41+
 42+ /** Associative array mapping framework ids to a list of names of test suite modules */
 43+ /** like array( 'qunit' => array( 'mediawiki.tests.qunit.suites', 'ext.foo.tests', .. ), .. ) */
 44+ protected $testModuleNames = array();
4145
4246 /** array( 'source-id' => array( 'loadScript' => 'http://.../load.php' ) ) **/
4347 protected $sources = array();
@@ -183,7 +187,7 @@
184188 * Registers core modules and runs registration hooks.
185189 */
186190 public function __construct() {
187 - global $IP, $wgResourceModules, $wgResourceLoaderSources, $wgLoadScript;
 191+ global $IP, $wgResourceModules, $wgResourceLoaderSources, $wgLoadScript, $wgEnableJavaScriptTest;
188192
189193 wfProfileIn( __METHOD__ );
190194
@@ -199,6 +203,32 @@
200204 wfRunHooks( 'ResourceLoaderRegisterModules', array( &$this ) );
201205 $this->register( $wgResourceModules );
202206
 207+ if ( $wgEnableJavaScriptTest === true ) {
 208+
 209+ // Get core test suites
 210+ $testModules = array();
 211+ $testModules['qunit'] = include( "$IP/tests/qunit/QUnitTestResources.php" );
 212+ // Get other test suites (e.g. from extensions)
 213+ wfRunHooks( 'ResourceLoaderTestModules', array( &$testModules, &$this ) );
 214+
 215+ // Add the testrunner (which configures QUnit) to the dependencies.
 216+ // Since it must be ready before any of the test suites are executed.
 217+ foreach( $testModules['qunit'] as $moduleName => $moduleProps ) {
 218+ $testModules['qunit'][$moduleName]['dependencies'][] = 'mediawiki.tests.qunit.testrunner';
 219+ }
 220+
 221+ foreach( $testModules as $id => $names ) {
 222+ // Register test modules
 223+ $this->register( $testModules[$id] );
 224+
 225+ // Keep track of their names so that they can be loaded together
 226+ $this->testModuleNames[$id] = array_keys( $testModules[$id] );
 227+ }
 228+
 229+ }
 230+
 231+
 232+
203233 wfProfileOut( __METHOD__ );
204234 }
205235
@@ -305,6 +335,25 @@
306336 public function getModuleNames() {
307337 return array_keys( $this->moduleInfos );
308338 }
 339+
 340+ /**
 341+ * Get a list of test module names for one (or all) frameworks.
 342+ * If the given framework id is unknkown, or if the in-object variable is not an array,
 343+ * then it will return an empty array.
 344+ *
 345+ * @param $framework String: Optional. Get only the test module names for one
 346+ * particular framework.
 347+ * @return Array
 348+ */
 349+ public function getTestModuleNames( $framework = 'all' ) {
 350+ if ( $framework == 'all' ) {
 351+ return $this->testModuleNames;
 352+ } elseif ( isset( $this->testModuleNames[$framework] ) && is_array( $this->testModuleNames[$framework] ) ) {
 353+ return $this->testModuleNames[$framework];
 354+ } else {
 355+ return array();
 356+ }
 357+ }
309358
310359 /**
311360 * Get the ResourceLoaderModule object for a given module name.
Index: branches/JSTesting/includes/AutoLoader.php
@@ -777,6 +777,7 @@
778778 'SpecialExport' => 'includes/specials/SpecialExport.php',
779779 'SpecialFilepath' => 'includes/specials/SpecialFilepath.php',
780780 'SpecialImport' => 'includes/specials/SpecialImport.php',
 781+ 'SpecialJavaScriptTest' => 'includes/specials/SpecialJavaScriptTest.php',
781782 'SpecialListFiles' => 'includes/specials/SpecialListfiles.php',
782783 'SpecialListGroupRights' => 'includes/specials/SpecialListgrouprights.php',
783784 'SpecialListUsers' => 'includes/specials/SpecialListusers.php',
Index: branches/JSTesting/includes/DefaultSettings.php
@@ -4151,8 +4151,22 @@
41524152 * );
41534153 */
41544154 $wgParserTestRemote = false;
 4155+
 4156+/**
 4157+ * Allow running of javascript test suites via [[Special:JavaScriptTest]] (such as QUnit).
 4158+ */
 4159+$wgEnableJavaScriptTest = false;
41554160
 4161+/**
 4162+ * Configuration for javascript testing.
 4163+ */
 4164+$wgJavaScriptTestConfig = array(
 4165+ 'qunit' => array(
 4166+ 'documentation' => '//www.mediawiki.org/wiki/Manual:JavaScript_unit_testing',
 4167+ ),
 4168+);
41564169
 4170+
41574171 /**
41584172 * Overwrite the caching key prefix with custom value. Do not set if using
41594173 * load balancer, since it depends on the key being in certain format.
@@ -5203,6 +5217,7 @@
52045218 'Specialpages' => 'other',
52055219 'Blockme' => 'other',
52065220 'Booksources' => 'other',
 5221+ 'JavaScriptTest' => 'other',
52075222 );
52085223
52095224 /** Whether or not to sort special pages in Special:Specialpages */
Index: branches/JSTesting/includes/specials/SpecialJavaScriptTest.php
@@ -0,0 +1,124 @@
 2+<?php
 3+
 4+class SpecialJavaScriptTest extends SpecialPage {
 5+
 6+ /**
 7+ * @var $frameworks Array: Mapping of framework ids and their initilizer methods
 8+ * in this class. If a framework is requested but not in this array,
 9+ * the 'unknownframework' error is served.
 10+ */
 11+ static $frameworks = array(
 12+ 'qunit' => 'initQUnitTesting',
 13+ );
 14+
 15+ public function __construct() {
 16+ parent::__construct( 'JavaScriptTest' );
 17+ }
 18+
 19+ public function execute( $par ) {
 20+ global $wgEnableJavaScriptTest;
 21+
 22+ $out = $this->getOutput();
 23+
 24+ $this->setHeaders();
 25+ $out->disallowUserJs();
 26+
 27+ // Abort early if we're disabled
 28+ if ( $wgEnableJavaScriptTest !== true ) {
 29+ $out->addWikiMsg( 'javascripttest-disabled' );
 30+ return;
 31+ }
 32+
 33+ $out->addModules( 'mediawiki.special.javaScriptTest' );
 34+
 35+ // Determine framework
 36+ $pars = explode( '/', $par );
 37+ $framework = strtolower( $pars[0] );
 38+
 39+ // No framework specified
 40+ if ( $par == '' ) {
 41+ $out->setPagetitle( wfMsg( 'javascripttest' ) );
 42+ $summary = $this->wrapSummaryHtml(
 43+ wfMsg( 'javascripttest-pagetext-noframework' ) . $this->getFrameworkListHtml(),
 44+ 'noframework'
 45+ );
 46+ $out->addHtml( $summary );
 47+
 48+ // Matched! Display proper title and initialize the framework
 49+ } elseif ( isset( self::$frameworks[$framework] ) ) {
 50+ $out->setPagetitle( wfMsg( 'javascripttest-title', wfMsg( "javascripttest-$framework-name" ) ) );
 51+ $this->{self::$frameworks[$framework]}();
 52+
 53+ // Framework not found, display error
 54+ } else {
 55+ $out->setPagetitle( wfMsg( 'javascripttest' ) );
 56+ $summary = $this->wrapSummaryHtml( '<p class="error">'
 57+ . wfMsg( 'javascripttest-pagetext-unknownframework', $par )
 58+ . '</p>'
 59+ . $this->getFrameworkListHtml() );
 60+ $out->addHtml( $summary, 'unknownframework' );
 61+ }
 62+ }
 63+
 64+ /**
 65+ * Get a list of frameworks (including introduction paragraph and links to the framework run pages)
 66+ * @return String: HTML
 67+ */
 68+ private function getFrameworkListHtml() {
 69+ $list = '<ul>';
 70+ foreach( self::$frameworks as $framework => $initFn ) {
 71+ $list .= Html::rawElement(
 72+ 'li',
 73+ array(),
 74+ Linker::link( $this->getTitle( $framework ), wfMsg( "javascripttest-$framework-name" ) )
 75+ );
 76+ }
 77+ $list .= '</ul>';
 78+ $msg = wfMessage( 'javascripttest-pagetext-frameworks' )->rawParams( $list )->parseAsBlock();
 79+
 80+ return $msg;
 81+ }
 82+
 83+ /**
 84+ * Function to wrap the summary.
 85+ * @param $html String: The raw HTML.
 86+ * @param $state String: State, one of 'noframework', 'unknownframework' or 'frameworkfound'
 87+ */
 88+ private function wrapSummaryHtml( $html = '', $state ) {
 89+ return "<div id=\"mw-javascripttest-summary\" class=\"mw-javascripttest-$state\">$html</div>";
 90+ }
 91+
 92+ /**
 93+ * Initialize the page for QUnit.
 94+ */
 95+ private function initQUnitTesting() {
 96+ global $wgJavaScriptTestConfig;
 97+
 98+ $out = $this->getOutput();
 99+
 100+ $out->addModules( 'mediawiki.tests.qunit.testrunner' );
 101+ $qunitTestModules = $out->getResourceLoader()->getTestModuleNames( 'qunit' );
 102+ $out->addModules( $qunitTestModules );
 103+
 104+ $summary = wfMessage( 'javascripttest-qunit-intro' )
 105+ ->params( $wgJavaScriptTestConfig['qunit']['documentation'] )
 106+ ->parseAsBlock();
 107+ $header = wfMessage( 'javascripttest-qunit-heading' )->escaped();
 108+
 109+ $baseHtml = <<<HTML
 110+<div id="qunit-header">$header</div>
 111+<div id="qunit-banner"></div>
 112+<div id="qunit-testrunner-toolbar"></div>
 113+<div id="qunit-userAgent"></div>
 114+<ol id="qunit-tests"></ol>
 115+HTML;
 116+ $out->addHtml( $this->wrapSummaryHtml( $summary, 'frameworkfound' ) . $baseHtml );
 117+
 118+ }
 119+
 120+ public function isListed(){
 121+ global $wgEnableJavaScriptTest;
 122+ return $wgEnableJavaScriptTest === true;
 123+ }
 124+
 125+}
Index: branches/JSTesting/includes/Skin.php
@@ -22,7 +22,7 @@
2323
2424 /**
2525 * Fetch the set of available skins.
26 - * @return array of strings
 26+ * @return associative array of strings
2727 */
2828 static function getSkinNames() {
2929 global $wgValidSkinNames;
@@ -55,6 +55,18 @@
5656 }
5757 return $wgValidSkinNames;
5858 }
 59+
 60+ /**
 61+ * Fetch the skinname messages for available skins.
 62+ * @return array of strings
 63+ */
 64+ static function getSkinNameMessages() {
 65+ $messages = array();
 66+ foreach( self::getSkinNames() as $skinKey => $skinName ) {
 67+ $messages[] = "skinname-$skinKey";
 68+ }
 69+ return $messages;
 70+ }
5971
6072 /**
6173 * Fetch the list of usable skins in regards to $wgSkipSkins.
Index: branches/JSTesting/languages/messages/MessagesQqq.php
@@ -2970,6 +2970,16 @@
29712971 'import-logentry-upload' => 'This is the text of an entry in the Import log (and Recent Changes), after hour (and date, only in the Import log) and sysop name:
29722972 * $1 is the name of the imported file',
29732973
 2974+# JavaScriptTest
 2975+'javascripttest' => 'Title of the special page',
 2976+'javascripttest-disabled' => '{{Identical|Function disabled}}.',
 2977+'javascripttest-title' => 'Title of the special page when running a test suite. $1 is the name of the framework.',
 2978+'javascripttest-pagetext-unknownframework' => 'Error message when given framework id is not found. $1 is the if of the framework.',
 2979+'javascripttest-pagetext-frameworks' => '$1 is the if of the framework.',
 2980+'javascripttest-qunit-name' => '{{Ignore}}',
 2981+'javascripttest-qunit-intro' => '$1 is the configured url to the documentation.',
 2982+'javascripttest-qunit-heading' => '{{Optional}}',
 2983+
29742984 # Tooltip help for the actions
29752985 'tooltip-pt-userpage' => 'This text appears in the tool-tip when you hover the mouse over your the tab with you User name on it',
29762986 'tooltip-pt-mytalk' => 'Tooltip shown when hovering over the "my talk" link in your personal toolbox (upper right side).',
Index: branches/JSTesting/languages/messages/MessagesEn.php
@@ -392,6 +392,7 @@
393393 'Filepath' => array( 'FilePath' ),
394394 'Import' => array( 'Import' ),
395395 'Invalidateemail' => array( 'InvalidateEmail' ),
 396+ 'JavaScriptTest' => array( 'JavaScriptTest' ),
396397 'BlockList' => array( 'BlockList', 'ListBlocks', 'IPBlockList' ),
397398 'LinkSearch' => array( 'LinkSearch' ),
398399 'Listadmins' => array( 'ListAdmins' ),
@@ -3368,6 +3369,18 @@
33693370 'import-logentry-upload-detail' => '$1 {{PLURAL:$1|revision|revisions}}',
33703371 'import-logentry-interwiki' => 'transwikied $1',
33713372 'import-logentry-interwiki-detail' => '$1 {{PLURAL:$1|revision|revisions}} from $2',
 3373+
 3374+# JavaScriptTest
 3375+'javascripttest' => 'JavaScript Test',
 3376+'javascripttest-disabled' => 'This function is disabled.',
 3377+'javascripttest-title' => 'Running $1 tests',
 3378+'javascripttest-pagetext-noframework' => 'This page is reserved for running javascript tests.',
 3379+'javascripttest-pagetext-unknownframework' => 'Unknown framework "$1".',
 3380+'javascripttest-pagetext-frameworks' => 'Please choose one of the following frameworks: $1',
 3381+'javascripttest-pagetext-skins' => 'Available skins',
 3382+'javascripttest-qunit-name' => 'QUnit', // Ignore, do not translate
 3383+'javascripttest-qunit-intro' => 'See [$1 testing documentation] on mediawiki.org.',
 3384+'javascripttest-qunit-heading' => 'MediaWiki JavaScript QUnit Test Suite', // Optional, only translate if needed
33723385
33733386 # Keyboard access keys for power users
33743387 'accesskey-pt-userpage' => '.', # do not translate or duplicate this message to other languages
Index: branches/JSTesting/resources/Resources.php
@@ -173,6 +173,7 @@
174174 ),
175175 'jquery.qunit.completenessTest' => array(
176176 'scripts' => 'resources/jquery/jquery.qunit.completenessTest.js',
 177+ 'dependencies' => 'jquery.qunit',
177178 ),
178179 'jquery.spinner' => array(
179180 'scripts' => 'resources/jquery/jquery.spinner.js',
@@ -688,7 +689,26 @@
689690 ),
690691 'dependencies' => array( 'mediawiki.libs.jpegmeta' ),
691692 ),
 693+ 'mediawiki.special.javaScriptTest' => array(
 694+ 'scripts' => 'resources/mediawiki.special/mediawiki.special.javaScriptTest.js',
 695+ 'messages' => array_merge( Skin::getSkinNameMessages(), array(
 696+ 'colon-separator',
 697+ 'javascripttest-pagetext-skins',
 698+ ) ),
 699+ 'dependencies' => array( 'jquery.qunit' ),
 700+ ),
692701
 702+ /* Tests */
 703+
 704+ 'mediawiki.tests.qunit.testrunner' => array(
 705+ 'scripts' => 'tests/qunit/data/testrunner.js',
 706+ 'dependencies' => array(
 707+ 'jquery.qunit',
 708+ 'jquery.qunit.completenessTest',
 709+ ),
 710+ 'position' => 'top',
 711+ ),
 712+
693713 /* MediaWiki Legacy */
694714
695715 'mediawiki.legacy.ajax' => array(
Index: branches/JSTesting/resources/mediawiki.special/mediawiki.special.javaScriptTest.js
@@ -0,0 +1,33 @@
 2+/*
 3+ * JavaScript for Special:JavaScriptTest
 4+ */
 5+jQuery( document ).ready( function( $ ) {
 6+
 7+ // Create useskin dropdown menu and reload onchange to the selected skin
 8+ // (only if a framework was found, not on error pages).
 9+ $( '#mw-javascripttest-summary.mw-javascripttest-frameworkfound' ).append( function() {
 10+
 11+ var $html = $( '<p><label for="useskin">'
 12+ + mw.message( 'javascripttest-pagetext-skins' ).escaped()
 13+ + mw.message( 'colon-separator' ).plain()
 14+ + '</label></p>' ),
 15+ select = '<select name="useskin" id="useskin">';
 16+
 17+ // Build <select> further
 18+ $.each( mw.config.get( 'wgAvailableSkins' ), function( id ) {
 19+ select += '<option value="' + id + '"'
 20+ + ( mw.config.get( 'skin' ) === id ? ' selected="selected"' : '' )
 21+ + '>' + mw.message( 'skinname-' + id ).escaped() + '</option>';
 22+ } );
 23+ select += '</select>';
 24+
 25+ // Bind onchange event handler and append to form
 26+ $html.append(
 27+ $( select ).change( function() {
 28+ window.location = QUnit.url( { useskin: $(this).val() } );
 29+ } )
 30+ );
 31+
 32+ return $html;
 33+ } );
 34+} );

Sign-offs

UserFlagDate
Hasharinspected20:10, 31 October 2011
Hashartested20:10, 31 October 2011

Follow-up revisions

RevisionCommit summaryAuthorDate
r101345add a backlink on [[Special:JavaScriptTest/qunit]]hashar10:06, 31 October 2011
r101346now explicitly need to register test modules....hashar10:15, 31 October 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r100386[JSTesting] Fix dependencies. Of course jquery.qunit.completenessTest needs j...krinkle22:34, 20 October 2011

Comments

#Comment by Reedy (talk | contribs)   00:59, 21 October 2011

svn:eol-style native

#Comment by Nikerabbit (talk | contribs)   06:35, 21 October 2011
  • Extensions can register a test suite by registering their test suite as a regular module (e.g. 'ext.fooBar.test'), with a dependency on the module(s) being tested.

Yay!

#Comment by Hashar (talk | contribs)   10:08, 31 October 2011

new follow up: r101345

#Comment by Nikerabbit (talk | contribs)   14:35, 24 December 2011

What is the destiny of this branch?

#Comment by Krinkle (talk | contribs)   23:08, 24 December 2011

Trunk, but integration was delayed because it would potentially break the static qunit/index.html test suite we have. Although that is not a direct problem (since we wanna get rid of that and use the SpecialPage instead which allows much broader testing as well as API interaction) - however our TestSwarm configuration is currently still checking out static files and doesn't actually install MediaWiki yet so although bringing this into trunk is our goal and is good, we need to prepare our testing environment.

#Comment by Krinkle (talk | contribs)   23:09, 24 December 2011

Actually, that statement is outdated as of this week. The Continuous integration project has been great progress as the script Hashar and I have been working on has been deployed. I recommend we temporarily run a parallel test of this branch instead of trunk and see if it works. After some fine tuning we can then switch it around.

Status & tagging log