We’ve been using Selenium, Webrat, Cucumber and any number of other gems together for quite a while with very few problems. Just recently our Selenium tests just stopped working on the login step, and given our application requires users to login to do anything, it meant out test suite was basically broken from step one.
Given that we thought very little of any consequence had changed it was annoying trying to troubleshoot the problem. Typically you start off thinking it’s something you did, then maybe it’s something someone you know did, then you start to branch out and think that maybe, just maybe, it was a bug elsewhere!
I initially started to check the logs and they seemed perfect, but it wasn’t finding the user record in the database. So I loaded the database in sqlite and lo-and-behold there were no user records to be found. I started a debug session and it reported that the user had in fact been created. I thought it had to be something to do with transactions being used. Trying to insert a record into the database and being told the database was locked confirmed this.
I turned out that the Cucumber gem writer determined that there should be no more global setting for turning on or off transaction support when running tests. Previously transactions were turned off by default in Cucumber, and you’d generally turn them back on if you needed them. This change is annoying because a good chunk of our suite uses Selnium for testing and it requires transactions to be turned off. It’s also a bit odd to reverse a default option and have no way to enable it at all.
Apparently the work around is to tag all the features and scenarios that rely on non-transactional database operations with this new tag of @no-txn. After implementing this, we’ve found it does work and so our tests are back to usual condition.
So if you’re running into problems with your Selenium tests using Cucumber with Rails and your database isn’t updating within a test then check out the ‘@no-txn’ tag and see what happens after you use that.
I like to make a note when I receive great customer service. There’s nothing better as a business owner than to receive compliments from a happy customer. I’ve become more aware of it and I try and send the love back when I have a good experience too. Lately that has been a lot.
We purchased a new family car recently and opted to find an aftermarket paint protection pack. I had planned to do the procedure myself, but after finding Andrew’s website, I immediately phoned him. Within the same week, he was out on a Saturday morning, we had a good chat for half an hour, then he set to work. 2 hours, $300 one amazingly smooth vehicle, and a further chat about our business later, he was on his way. It was an all round great experience, great service and I obviously would be recommending him for any further work. I couldn’t imagine finding anyone to do a more professional job, and it’s now proven successful for Andrew as he will no doubt get more referrals.
Teneke helped with the online purchase of a new piece of exercise equipment. Within a week we had made a purchase decision online, interacted with Teneke to fulfill the order and organise payment. At every step of the way she informed us fully what was happening, and as such I wrote to the head of Fitquip to elaborate on the customer service at their organisation. The equipment arrived today and is just what I was hoping for.
After our old dishwasher decided to end its life in a cloud of black smoke, I decided to head online once more to find a replacement. I’m not really interested in driving around from store to store trying to find something that is being sold to me, so was happy to look here instead. After finding a mid-range Fisher & Paykel model at 35% off I went ahead and ordered it.
Not reading the availability section, I just assumed it would be delivered on the day I requested. After finding out I had made a mistake, I called them and they let me know it would be there the next business day, but for my inconvenience they would refund the delivery fee. I made a mistake, yet they compensated me for it.
A slight mishap laid to rest, even though they had no obligation to do so. In turn they get a positive recommendation from me, and I’ll be looking there next time I need to purchase appliances.
It seems good customer service is still something to be valued.
Our website has undergone a few changes this week. We have improved some areas that were a little rough around the edges and have reworked the content in preparation for a raft of new products and services we plan to introduce over the next 12 months.
As well as making a few visual changes to the site, we have also integrated the blog into the update design, rather than using a different design template.
If you’re having any troubles viewing any part of the site, or something that you relied on has gone missing, please let us know.