Thursday, 26 March 2009

Duplicate

So far we assumed that when you want to test MediaWiki and its extensions for a particular environment, you build a system from scratch, run your tests and assess if the new functionality is an improvement over the old. It turns out that the notion that a particular revision of an extension includes the whole of that extension is not sound. Several extensions can not be installed by specifying their revision.

The ability to test if an extension is complete, can be determined by comparing the difference between the functionality after an upgrade or an installation. To do this you have to be able to save an "old" environment. Another reason why the new duplicate function is useful, is because it allows us to speed up large scale automated testing

Syntax:  duplicate MW_installation MW_installation_new

Thanks,
      GerardM

Wednesday, 25 March 2009

WMF_testsystem update

The WMF_testsystem is one of the MediaWiki instances in the Wikiation Extension Testing Environment. This system is intended to mimick the English Wikipedia.

The way this configuration is build is distinctly different from the English Wikipedia. This system is scratch installed, it does not share the files needed for CentralAuth and MergeAccount, the Cite and the SpecialCite are in separate folders and last but not least, there are a few extensions that I have not figured out how to install yet.

What I really liked was that it took me only five minutes to rebuild my environment once Wikipedia was updated. Three minutes to change my installation script and two minutes to run it.
Thanks,
GerardM

Tuesday, 24 March 2009

When less is more

When I enter the command ls revisions.mediawiki: I get a long list of revisions. They are in lifo format and it is a long list. When I enter this commond from within the Wikiation Installer in PuTTY, the list has a length that is too much for the PuTTY buffer. It is possible to limit the output by adding "limit 20". This works fine.

When you run the command from Bash, like this: ./installer.py ls revisions.mediawiki: it is possible to add command separated with a pipe. I tried the less and this worked fine for me. That is until I learned that I could break the pipe by pressing the "q" to quit, that gave a traceback.

The good news is that we can inform you what revisions for MediaWiki are available. It is possible to limit the number of most recent revisions, it is even possible to use bash for this and the pipe will get some more plumming.
Thanks,
         GerardM

Monday, 23 March 2009

Proof of the pudding

One of the objectives of the Wikiation Extension Testing Environment is to have the ability to test the functionality of a specific configuration. A prerequisite is the ability to built an environment that has the same configuration.One of the missing components was the ability to install a specific revision of MediaWiki itself. The screen shot demonstrates our new ability to do this.

The way we install our extensions is different from doing it manually. We expect to be able to install and uninstall extensions and consequently each extension needs to be in its own directory. For the Cite and the Special:Cite extension it meant that they are split in seperate directories. They install successfully and do not break MediaWiki so we assume that this is fine.

At this moment we assume that things are fine when the system installs and when we can save a page. Running tests will be our goal once we can reliably build our testing environment.
Thanks,
GerardM

Friday, 20 March 2009

Installng Metavid

As we are developing and testing the Wikiation Installer, we are recreating  relevant configurations. Metavid is the open video archive of the US Congress and the Metavid software will be the basis of video support for MediaWiki. People are interested in learning about these software developments and being able to build such environment is fun.
The metavid profile brought several things to me that were new. There are programs external to MediaWiki, programs that are not part of the LAMP stack that are prerequistites. We do not want to install such programs from within the installer but we do want to be able to test for such prerequistites. At this stage, we do not test for this, we leave this on our "wish list". 
I had to install a SQL script in order to install metavid tables in the MediaWiki database. This was beyond me. Kim helped me out and now I have an example that I can copy. Now that the files install, I also needed a way to know that the files had installed. Michael Dale, the developer of Metavid suggested to use phpmyadmin. This was an attractive suggestion but, it does add to the clutter in what should be a clean environment. 
What to do.. With hindsight the answer was obvious; one of the tests checks if new tables have been added to the database. So eating our own dogfood was in order. The isolation check was revived and indeed tables proved to have been added for Metavid.
I may have done a good job. I do not know as I do not how to test the functionality of this metavid environment
Thanks,
       GerardM

Thursday, 19 March 2009

Revisions and Tags

When you are installing MediaWiki or MediaWiki extensions, it is often crucial to be able to install a particular revision or for a particular "tag". I am quite pleased to announce that the Wikiation installer is now able to install both for specific revisions or tags.

This functionality is currently very much bleeding edge. I do not know yet how to apply the tags to the scripts that I already wrote. So I will do some more documentation and some other work...
Thanks,
        GerardM

How to install RSS_Reader ?

RSS_Reader is an extension. It must be because it says so on the MetavidWiki and on the MediaWiki wiki. The problem that I face is that it has not been packaged as an extension.

That is a shame for several reasons.
The information on the MetavidWiki says that it is "version 0.2.3". Now what if I need to run the software on a previous release. I may need "version 0.2.2" and I cannot get it because it is not in SVN.

I confess that I am not a developer. But I am quite sure that when you follow the instructions, you have something that might actually work. A developer, a real one, someone who Brion trust to submit to SVN, could then make it an extension so that I could do my "monkey see, monkey do" routine.
Thanks,
      GerardM

Tuesday, 17 March 2009

Installing the UNIWIKI extensions

When you want to test software, you need to be able to set up an environment quickly and repeatedly. The Uniwiki extensions are tested by customers of Wikiation, a programmer is working on the code so it makes sense to be able to create this environment quickly.

Programming in bash is something that I did a really long time ago, so it was hard work for me to get the install scripts right. Once I had the first one working, the other nine were easy.

I am really fond of the Configure extension so I always install that one. The only thing that I have done is install the software and I leave it to you to test it.
Thanks,
GerardM

Monday, 16 March 2009

Documentation ....

Documentation is almost universally something that you may do at the end. As such it is quite similar to testing. Python has this nice little tool called pydoc. It helps you generate documentation as you are working the code and as a consequence it provides a great incentive to work on documentation from the start.

One of the nice features is a web front end to the documentation. If you are interested, have a look at our documentation. This is the documentation of the bleeding edge, so you may see things that have not even been committed to SVN. To get an updated to the latest version in SVN, use update_self from within the installer.
Thanks,
GerardM

Installing a MediaWiki system

How long does it take to install a new MediaWiki system with Semantic MediaWiki?  It takes me a minute and yes, I cheated because I automated the process. This kind of automation is extremely important to us because it is the basis for running automated tests.
Thanks,
       GerardM

Sunday, 15 March 2009

Installing SemanticForms

I created an installer script for SemanticForms, everything should work but it did not. I could not find what the problem was so I asked MinuteElectron to help me out. After some research he found that it had to do with the order in which the SemanticMediaWiki and the SemanticForms were loaded; they are loaded in alphabetical order so the SemanticForms came in first.

I have created a hack to get around this; I have renamed the SemanticForms.settings.php to xSemanticForms.settings.php. The documentation is clear; Semantic MediaWiki has to be installed and in this way MediaWiki is aware of this. Adding an x does the trick.

I wonder if this is one of those temporary solutions that will prove to be permanent.
Thanks,
     GerardM

Installing SemanticResultFormats

Programming is what I used to do a lot. The reason why I am programming again is because I am working on the documentation for the Wikiation Installer. I cannot document properly what I do not really understand and programming some installer scripts is one way of getting to grips with the issues.

I am testing in the "Fosdem" environment, this is where developers may test the existing functionality... I did install Semantic MediaWiki and I decided that I wanted to install SemanticResultFormats as well. I read the documentation and I found that due to a non standard include, I had to write an installer script. This is annoying but trivial

I tested it, the version special page reports it as being installed so I was good. However, it struck me that SemanticResultFormats has in SemanticMediaWiki a prerequisite. So I dabbled some more in the download.sh only to come to the conclusion that this is not the place where prerequisites are to be tested. The reason for this is that the include would be excercised anyway. When SemanticMediaWiki is not there, the whole installation should abort.

Writing installation scripts does help me understand the environment, it will help me write better documentation and in the mean time, I find where the software can use some more refinenment. I do confess that I am looking for the corner cases and so far I am really pleased how the installer is improving.
Thanks,
GerardM

Saturday, 14 March 2009

Working from a template

So I was bold and decided to write the install and uninstall script for another extension. I chose ConfirmAccount because of its similarity to LiquidThreads.

There were many lessons for me to learn:
It is not that hard but it really helps when things are done in a standard way.
Thanks,
       GerardM

Installing LiquidThreads

When you install LiquidThreads with the naive installer, it installs fine and it does not break MediaWiki. When you go to a talk page the system still breaks because the "thread" table is missing. When you read the documentation, it is quite obvious that LiquidThreads would fail in this way. There is a script that helps you to install the tables and as I expected that it would be relatvely easy to create a script for the complete install and uninstall of LiquidThreads I looked into this.

I asked MinuteElectron to help me out and provide me with an example, he added one line to the standard "download.sh". For the uninstall he added a few lines to the "uninstall.sh" and added a file with the names of the tables that were to be dropped.

I now have a template for creating install scripts for extensions. I will have to ask Kim or MinuteElectron to update SVN with my scripts because if I were Brion, I would not trust me with SVN either.
Thanks,
GerardM

Friday, 13 March 2009

Working with the Installer

I wanted to test a function of the installer. So I went to the fosdem.wikiation.nl and ran the "update_self" functionality. This broke the installer. So I deleted the installer directory and installed the installer again from the documentation.

This worked fine. To my delight I got the following welcome message:

****************************************
=== Wikiation installer (v. 48376) ===

(last known safe version: 48307)
Interactive mode. Automated testing is disabled.

please type a command and hit enter
help for help
^D, or quit to quit
****************************************


So there is now the latest version or the latest safe version. Now I have to learn how to install the revision that I want to test because that needs to end up in the documentation.
Thanks,
GerardM

Thursday, 12 March 2009

Debugging Extension Installation Scripts

When creating extension installation scripts for the extension testing environment, it can be difficult to analyse where issues are in the script. For example, when we were creating the Semantic MediaWiki installation script we did not know why the setup program was not running correctly. Previously, the installer would not output anything from install files and so no debugging was possible. Now, there is a debug flag which allows us to see detailed information - enabling us to find and fix issues far more efficiently than before.

To use this flag, add "debug=True" to your settings.py file.

Sunday, 8 March 2009

Getting ready for the next level of functionality

When the Wikiation Extension Testing Environment currently installs an extension, it uses the latest version of that extension. This is fine when you are testing the very latest version of MediaWiki.

We want to provide better support for all the wikis who are using stable versions of MediaWiki. To do this, we have to be able to install a particular version of an extension, the latest version of an extension for a particular release or for a stable version of an extension for a particular release.

The other thing we are actively working on is increasing the number of extensions that can be installed by the installer. MinuteElectron asked for the output of installer scripts. As Kim was already collecting this information, it was easy to add a debug flag that makes this information available. This will make it easier to get extensions to install properly.

Another improvement is that there is now a default settings handler, this is intended to prevent future updates of the software using the "update_self" functionality from breaking. This makes the installer more robust.

Our intent is that the installer may be used for installing both production and test environments of MediaWiki. As the software creates and destroys instances of a MediaWiki wiki, it is vital that you do not experiment on a production system. It is equally important that you are aware that at this stage the software is not ready for production systems.
Thanks,
GerardM