It has been a slightly quiet week but one in which I have been working on the quieter parts of development – testing and documentation.
I was helping out some colleagues by testing some existing code this week. not because I do not have any thing to do but because they are woking on something large which required some help testing and bug hunting. I worked on the test plan with my manager and extended it when I was looking at other parts of the site. This was the moment when I lost my testing “cherry” as it were and fired up the selenium IDE in Firefox.
Using its simple recording and playback facilities, I was able to reconstruct our testing steps and even add to them as I saw that assumptions had been made in the original document.
The simplest way of creating tests is to fire up Selenium and to go to the beginning of the tests that you want to run. Then click the record button and it will watch you click around the site and record a series of steps. When you click record again to stop it running, you can get it to run through all the steps or just one step using the playback buttons.
If you need to add a step, you can use the really easy interface to create or delete the steps and the actions that must take before re-running the tests that must be taken. It does take some time to set up the tests but that just be weighed up against the costs of running tests manually and perhaps missing steps.
Once the tests are complete and running, then you can save the tests using the file option and then create a folder of them to run as required. Alternatively they can be exported into various formats including jUnit and PHPUnit.
The next step will be to add unit tests into code and try to backport some tests in existing code. Set up time is outweighed by the saved time later. I suppose a future evening project will be to put this together with a Selenium server and pull code from a repository.
The other tasks has been writing documentation for recently completed projects and some ongoing and planned ones. Having written up some user stories for new ideas and also giong back over old code has made me re-evaluate some of the code and to consider it as part of something organic. It is less of a chore now and more a help to myself and colleagues so that, when the paperwork and wikis are up to date, we could in theory have a break and if something happened, one of us can dive in. Alternatively we can make out iterative process better and stronger since we are not trying to rediscover the process of something by following code until we stumble across the answer.
I did have an interesting time with HTML5 geolocation which I need to look into more deeply. Having got some code quickly working to show a position on a map, I found some dead area in Oxford whilst showing somebody else the app. I am assuming that the geolocation runs off masts and the GPS system but it does raise a caveat to the enterprise of using pure HTML5. Need to put the code onto a page and wander around the town with my phone pne Saturday.
No Comments