Hi Jeremy,
There is a dropbox folder within the extension tests
folder that allows developers
to record Selenese with the Firefox add-on Selenium IDE. You can place the recorded
macros in the folder and they will be picked up by the unit tests if it is desired.
I like the idea of a dropbox for selenese. Do you have to do any conversion in order to
get it work with your setup?
It would be great if you could do code review once it
is committed.
Sure, just give me a note when it is committed.
Cheers,
Markus
-----Ursprüngliche Nachricht-----
Von: wikitech-l-bounces(a)lists.wikimedia.org
[mailto:wikitech-l-bounces@lists.wikimedia.org] Im Auftrag von Jeremy Postlethwaite
Gesendet: Mittwoch, 21. September 2011 19:06
An: Wikimedia developers
Betreff: Re: [Wikitech-l] Brown bag - Selenium Testing
Hi Markus,
That would be great if we could work together on the Selenium testing.
I requested commit access to core today.
If it takes a while to get core access, I may ask Ryan Kaldari to commit my code (I sit
next to him in the San Francisco office). I wrote Selenium Unit Tests for CentralNotice,
an extension, Kaldari is quite familiar with.
It would be great if you could do code review once it is committed.
Here is some info about the test code:
The unit tests do use the existing PHPunit testing code, but not the existing Selenium
code in core.
I have added the class:
ExtensionsSeleniumTestCase extends PHPUnit_Extensions_SeleniumTestCase
I am using:
$wgEnableSelenium = true;
In LocalSettings.php so the code will be picked up when you run
$IP/tests/phpunit/phpunit.php.
In other projects outside of Wikimedia, I have set up unit tests to run on localhost,
development and production environments. I did this by setting an environment variable
with one of the following values:
APPLICATION_ENVIRONMENT = "localhost"
APPLICATION_ENVIRONMENT = "development"
APPLICATION_ENVIRONMENT = "production"
This variable was set in Apache httpd and on the command line.
The Selenium Unit Testing code takes screen shots and plays them in a slideshow, so it is
sometimes handy to test on live systems. Consequently, you have to flag unit testing code
as available for production, development or localhost. By default all code is considered
unsafe for production, so you must flag a method as available for production testing.
I also created custom configuration files that live in the tests folder of the extension.
There is a default file that will be used if a custom file is not set:
PSEUDO CODE
if ( file_exists( "selenium.ini" ) ) {
loadConfiguration( "selenium.ini" ); } else {
loadConfiguration( "selenium.ini.dist" ); }
This file controls which browser gets run and allows for a developer of the extension to
set other info dependent on their tests.
There is a dropbox folder within the extension tests folder that allows developers to
record Selenese with the Firefox add-on Selenium IDE. You can place the recorded macros in
the folder and they will be picked up by the unit tests if it is desired.
I think working on unit testing code is a lot of fun, so I look forward to getting this in
to core.
- Jeremy
On Mon, Sep 19, 2011 at 3:27 PM, Markus Glaser <glaser(a)hallowelt.biz> wrote:
Hi Jeremy,
I am quite interested in your work, since I wrote part of the core
Selenium support [1], which is now on hold. So, how does your code
relate to the SeleniumFramework? What are the main differences? I
still think there is a big chance in Selenium tests for extension
programmers: given the right tools, they are very easy to set up. So
why don't we just join forces? For a start, if you like me to, I could peer review
your code.
Cheers, Markus
(mglaser)
[1]
http://www.mediawiki.org/wiki/SeleniumFramework
-----Ursprüngliche Nachricht-----
Von: wikitech-l-bounces(a)lists.wikimedia.org [mailto:
wikitech-l-bounces(a)lists.wikimedia.org] Im Auftrag von Jeremy
Postlethwaite
Gesendet: Montag, 19. September 2011 17:39
An: Benedikt Kämpgen
Cc: Wikimedia developers
Betreff: Re: [Wikitech-l] Brown bag - Selenium Testing
Hi Benedikt.
I do not know anything about the new QA Lead position status. I only
know the job has been posted.
The Selenium work I did was for extensions only, since the core code
is on hold.
The work I have done has not been committed to core yet. I will post
to the mailing list when it does go live.
It would be great to get some feedback on my code.
I will also post a wiki page with details on how to implement the
Selenium test code for other extensions once it gets implemented in core.
Thanks!
On Fri, Sep 16, 2011 at 1:33 PM, Benedikt Kämpgen <
benedikt.kaempgen(a)kit.edu
wrote:
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.kaempgen(a)kit.edu
Web:
http://www.aifb.kit.edu/web/Hauptseite/en
-----Original Message-----
From: wikitech-l-bounces(a)lists.wikimedia.org [mailto:wikitech-l-
bounces(a)lists.wikimedia.org] On Behalf Of Jeremy Postlethwaite
Sent: Friday, September 02, 2011 12:49 AM
To: wikitech-l(a)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
jpostlethwaite(a)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(a)lists.wikimedia.org
Wikimedia Foundation <http://wikimediafoundation.org/>
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Jeremy Postlethwaite
jpostlethwaite(a)wikimedia.org
515-839-6885 x6790
Backend Software Developer
Wikimedia Foundation <http://wikimediafoundation.org/>
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l
--
Jeremy Postlethwaite
jpostlethwaite(a)wikimedia.org
515-839-6885 x6790
Backend Software Developer
Wikimedia Foundation <http://wikimediafoundation.org/>
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l