Re: [Wikitech-l] Brown bag - Selenium Testing
Hello Jeremy, Great that you organised a brown bag lunch on Selenium Testing. We use Selenium Testing for an extension and I would like to keep up with the status of Selenium Testing for MediaWiki. I am wondering whether there are information about discussions during this lunch available, somewhere. Since Wikimania, is there any more information about the fact that Selenium Unit Testing in the core has been put on hold until we get our new QA Lead? Regards, Benedikt -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en -Original Message- From: wikitech-l-boun...@lists.wikimedia.org [mailto:wikitech-l- boun...@lists.wikimedia.org] On Behalf Of Jeremy Postlethwaite Sent: Friday, September 02, 2011 12:49 AM To: wikitech-l@lists.wikimedia.org Subject: [Wikitech-l] Brown bag - Selenium Testing Hi everyone! I would like to hold a brown bag lunch on Selenium Unit Testing for Mediawiki extensions. I have been using phpunit and Selenium for a few years. Selenium Unit Testing in the core has been put on hold until we get our new QA Lead. I have attached an event to this email for Wednesday, September 7th from 12:30pm - 1:00pm There will be a small presentation on how we may use Selenium on the Fundraising extensions. Discussion/questions will follow. Thanks! -- Jeremy Postlethwaite jpostlethwa...@wikimedia.org 515-839-6885 x6790 Backend Software Developer Brown bag - Selenium Unit Testing Selenium Unit Testing on Mediawiki *When* Wed, September 7, 12:30pm 1:00pm GMT-07:00 *Where* SF Office Sixth floor *Who* Jeremy Postlethwaite wikitech-l@lists.wikimedia.org Wikimedia Foundation http://wikimediafoundation.org/ ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[Wikitech-l] FW: SPARK extension for MW 17.0
Hello, For MediaWiki below 17.0, replacing of variables does not work, unfortunately. Can someone tell me, whether replaceVariables($query, $frame) and recursiveTagParse( $query ) are actually the right functions to use, e.g., in MediaWiki 15.4. Regards, Benedikt -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en -Original Message- From: Benedikt Kämpgen Sent: Friday, September 02, 2011 9:54 AM To: 'rdf-sp...@googlegroups.com'; 'Jeroen De Dauw' Subject: SPARK extension for MW 17.0 Hello, I have changed the SPARK extension so that it also works for MW versions below 17.0. I basically made the extension work without Resource Loader, also. See attached the patch. Jeroen, I now, the JavaScript handling is not nice but I do not see another way at the moment; may I commit? Best, Benedikt -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en ### Eclipse Workspace Patch 1.0 #P Spark Index: Spark.class.php === --- Spark.class.php (revision 95984) +++ Spark.class.php (working copy) @@ -45,44 +45,83 @@ * * @return string */ - public function render( Parser $parser, PPFrame $frame ) { + public function render( Parser $parser, $frame ) { + global $wgVersion; + global $wgOut; + global $egSparkScriptPath; global $wgResourceModules; - - if ( array_key_exists( 'data-spark-query', $this-parameters ) ) { - $query = htmlspecialchars( $this-parameters['data-spark-query'] ); - + + // What is loaded already? + static $loadedJsses = array(); + + wfDebugLog( 'myextension', 'Parameters alright? ' . print_r($this-parameters, true) ); + if ( array_key_exists( egSparkQuery, $this-parameters ) ) { + $query = htmlspecialchars( $this-parameters[egSparkQuery] ); + // Before that, shall we allow internal parse, at least for the query? // We replace variables, templates etc. - $query = $parser-replaceVariables($query, $frame); - + if (!isset($frame)) { + $query = $parser-replaceVariables($query, null); + } else { + $query = $parser-replaceVariables($query, $frame); + } + // Replace special characters $query = str_replace( array( 'lt;', 'gt;' ), array( '', '' ), $query ); - - unset( $this-parameters['data-spark-query'] ); - + + unset( $this-parameters[egSparkQuery] ); + // Depending on the format, we possibly need to add modules - if ( array_key_exists( 'data-spark-format', $this-parameters ) ) { - $format = htmlspecialchars( $this-parameters['data-spark-format'] ); + if ( array_key_exists( egSparkFormat, $this-parameters ) ) { + $format = htmlspecialchars( $this-parameters[egSparkFormat] ); // Remove everything before spark.XXX $format = substr($format , strpos($format, spark.)); // Remove .js at the end $format = str_replace( array( '.js' ), array( '' ), $format ); $module = 'ext.'.$format; - if ( array_key_exists($module, $wgResourceModules)) { - // TODO: Do we need to check, whether module has been added already? - $parser-getOutput()-addModules( $module ); + // for older versions of MW, different + if ( version_compare( $wgVersion, '1.17', '' ) ) { + if (isset($wgResourceModules) array_key_exists($module, $wgResourceModules)) { + // only if not already loaded + if (!isset($loadedJsses[$module])) { + // scripts + foreach ($wgResourceModules[$module]['scripts'] as $script) { + $wgOut-addScript('script src='.$egSparkScriptPath./.$script.' type
[Wikitech-l] Maps/Semantic Maps - KML visualisation status
Hi Jeroen, I have seen that you released new versions of Maps/Semantic Maps, great, thanks! Could you please give me some information about the current status of KML visualisation in Maps/Semantic Maps? With the current version, I haven't been able to visualise KML files, although mentioned [1]. [1] http://mapping.referata.com/wiki/Google_Maps_v3 For 7.x I had added support for automatic centering and external/internal KML files. Do they still work? It would be great if you could give me some pointers. Or maybe I can help you improving the KML support. Best, Benedikt -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
[Wikitech-l] FW: [SMW-devel] SMW Selenium system tests available
Thanks, Sumana, for giving me this hint, that I now finally follow: We have made available Selenium tests for Semantic MediaWiki (see email below). Regards, Benedikt -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en -Original Message- From: Benedikt Kämpgen [mailto:benedikt.kaemp...@kit.edu] Sent: Wednesday, July 20, 2011 2:14 AM To: Semantic MediaWiki developers; Krzysztof Krzyżaniak Subject: [SMW-devel] SMW Selenium system tests available Hello, Semantic MediaWiki is now ready to be tested using Selenium, e.g., for regression tests after code changes: * We have uploaded one test suite with several test cases to SemanticMediaWiki/tests/selenium/suites. * We plan to upload more. * For information of how to use the test suite, see our updated documentation at [1]. * We rely on the Selenium Framework [2] recently provided by MediaWiki. The Wikimedia Foundation has not yet decided, whether it will continuously support this Selenium Framework. Still, we think Selenium system testing has potential for two reasons: * With Selenium IDE [3], it is very easy to create system tests, even for less technically-skilled or SMW-experienced people. * Also more complex Selenium system tests are possible, though in this case writing PHP code will be needed. We'd be happy to hear about your experiences. Best, Benedikt [1] http://www.semantic-mediawiki.org/wiki/SMW_System_Testing_with_Selenium [2] http://www.mediawiki.org/wiki/Selenium_Framework [3] http://seleniumhq.org/projects/ide/ -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
Re: [Wikitech-l] [Selenium] IDE test for regressing bughttps://bugzilla.wikimedia.org/show_bug.cgi?id=29310
Hi Michelle, Sorry for answering late, but I only occasionally look into Wikitech-l. Currently, I am working on integrating Selenium system tests into Semantic MediaWiki. We have created around 20 tests that I want to add to SMW to be run with the WMF Selenium framework. While doing this, I will try to have a look into your tests, also. Besides: What I still haven't managed from the documentation: How to clean up the wiki before a test? So far, I just run the tests on an empty wiki, but having a dedicated session opened for the test would be awesome. Have you managed this? Best, Benedikt -- AIFB, Karlsruhe Institute of Technology (KIT) Phone: +49 721 608-47946 Email: benedikt.kaemp...@kit.edu Web: http://www.aifb.kit.edu/web/Hauptseite/en -Original Message- From: wikitech-l-boun...@lists.wikimedia.org [mailto:wikitech-l-boun...@lists.wikimedia.org] On Behalf Of Michelle Knight Sent: Wednesday, July 06, 2011 5:02 AM To: wikitech-l@lists.wikimedia.org Subject: [Wikitech-l] [Selenium] IDE test for regressing bughttps://bugzilla.wikimedia.org/show_bug.cgi?id=29310 Hi Benedikt and Marcus, I had some time and was reading about current issues around MediaWiki. I saw an issue about tab names - Bug 29310 Namespace tab doesn't handle fallback the same way as core (breaks nstab) - and created a Selenium regression test to verify when it is fixed. It is called javascript-unit-testing-checking-tabs-and-content. It verifies that the tab names are correct. I also created a test suite - test-suite-check-tabs. The suite includes a test to check the tabs on the main media wiki site (a test that passes) and the test - javscript-unit-testing-checking-tabs-and-content. Would you provided feedback as to how useful the tests and how to improve them? Michelle Knight (503) 345-4350 mknight1...@gmail.com ___ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l