Tuesday, March 29, 2011

Neighbourhood surgeries - how can mine be improved?

This just feels like it could be better.

So I call to make an appointment at the surgery this morning and am told all morning slots are gone. So what about afternoon slots then?
Well, new slots are released at 2.30pm and you you can't book till then. This is after spending about 15 minutes in an automated telephone queue. Did I tell you that I hate them? What is the guarantee that I will be allotted a spot if I call in at 2.30pm? What if everyone also wants to call in at the same time? Sounds like a lottery arrangement. On a health service. BAD.

In the end I think an automated service should be put in place. I also think surgeries firstly should operate like normal businesses. What do the folks at the big golden arches do when loads of customers consistently walk through the door at an outlet? They scale up the site by hiring new hands and when this doesn't help they open a new one nearby. What has my friendly neighbourhood surgery done? They have resorted to handing out a 0844 number along with instituting an appointment lottery scheme. BAD.

In the end of the day, the lady on the other end of the line offers to have a doctor phone in some advice sometime in the day. She has made a judgement call that the condition doesn't warrant my being bothered to see a doctor. I am grateful for the offer but there is something faintly worrying about some lady at the other end of the phone deciding over the state of a surgery client's health (or access they get) without the proper experience. Might I add without the training for it. BAD.

Three strikes!

Enough ranting for one morning. I just thought I'd let it all out.

Be well.


UPDATE: They have called me back with an appointment. Result! That usually helps but I can't help thinking that some other guy might have been unlucky this time.


Sunday, March 06, 2011

Cucumber DSL for Selenium Testing - Take 2

After poking around with Cucumber, Cuke4Duke and Selenium, I liked what I saw and started digging around for more interesting bits. I have moved from selenium 1 to Webdriver(Selenium 2).

One of the minor problems I have had so far is that the browser windows don't get closed after my tests completed.

I saw a number of attempts at solving this including having a tagged @After hook on the last scenario in the last Feature. None of them really jumped out at me until I read a question to the group and that led me to give a JVM shutdown hooks a go (equivalent to Kernel#at_exit in Ruby land). That seems to work quite well and lives well away from the features and steps making for cleaner code. It also means that we will have a clean suite of features that don't get polluted by technical detail.


Do take a look at the full thing on GitHub. Let me know what you think.


Tuesday, March 01, 2011

Cucumber DSL for Selenium Testing - Take 1

I have had a few hours to play with Cucumber tests using cuke4duke by Aslak Helles√ły, a very useful addon to Cucumber which makes it possible to write step definitions in several JVM languages. I have gotten it to the point where I can write Cucumber Features and Scenarios for very basic tests. I hope to write in more detail about my full findings and thoughts later on.

I have set it up so that it can be built in Maven. The pom.xml file can be located here. The project structure is pretty simple and can be structured as follows:



|-features
|-brandhub.feature (source can be found here
|-src
|-test
|-java
|-sample
|-BrandHubSteps.java (full source can be found here)
|-pom.xml (source can be found here)



All you then need to do once you have the above structure is run mvn clean integration-test and you should be on your way. Your test results can be found in target/surefire-reports. I have included html and junit reports. You will also find that there is a pretty console log of your features and your scenarios.

Please note that the first time you run you will need to append the following system property to your maven command line:

-Dcucumber.installGems=true

This will make sure that the cuke4duke Ruby gem and its dependencies are installed. If you don't do this, you will most definitely get an error along the lines of:

Error opening script file: /.jruby/bin/cuke4duke

Let me know what you think.

Peace and Love.