Posted by Jason
Tue, 21 Mar 2006 05:19:00 GMT
If you haven’t heard about it yet, read up the new (unfortunately named) integration testing framework being developed for Rails 1.1.
An example jamis mentions is a situation where bugs are caused by cruft building up in the session when visiting a number of pages. The integration testing framework definitely allows you to build the test once you can reproduce the bug, but reproducing is still a problem. Something I’ve faced in (non-Rails) webapps is that developers aren’t able to reproduce a bug while users can do it every time. It happens because users may use your application in different ways than developers do. (It happens, unfortunately.)
The idea is simple: let users record integration tests. My immediate vision for this feature goes like this:
- Developer starts WEBrick (or lighty) with recording enabled
- User goes in and reproduces their bug… All their steps are recorded.
- Once the user is done, the developers now have a failing Rails integration test that reproduces the bug.
Of course, I have bigger visions for this too. Like a complete user acceptance testing framework. But that all depends on the recording/generation of acceptance tests to work. The main issue I see with the generation of integration tests is whether or not the generated test will be maintainable. I don’t mind if the developer will have to clean up some of the test before checking it in – I think that’s a must for any passive code generator. I’m more concerned about tests requiring more maintenance as the application changes. But I think it’s best just to try and see how it works out.
Now I just have to turn this idea into a plugin/patch. I’m not always successful in this respect, but I must try my best. After I’ve cleaned up all my stuff from the Japan trip.
1 comment | no trackbacks
Posted by Jason
Tue, 21 Mar 2006 03:25:00 GMT
Japan trip pictures
It was a great trip, and it was great to see my bro again.
Plus it was cool to see the Oilers pick up Dwayne Roloson and Sergei Samsonov in my absence.
I guess I must eventually choose a new theme that would make it reasonable to add my Flickr photostream.
no comments | no trackbacks
Posted by Jason
Mon, 20 Mar 2006 17:41:00 GMT
I finally found a workable solution to my biggest Slackware annoyance. And since it was one of those things that wasn’t immediately available on Google, I figured it would be a service to others to blog about it.
My problem was with USB storage. I could plug in my flash drive or external hard drive in and it would all work; the device would get assigned to /dev/sdX. But it wouldn’t work if I unplugged the device and plugged it back in later. I had to reboot to get that USB device to work again. After rebooting, it was the same One And Done situation.
When first plugging in the device, I would get something like this in /var/log/messages:
Mar 20 22:01:29 crane kernel: hub.c: new USB device 00:10.4-1, assigned address 3
Mar 20 22:01:29 crane kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Mar 20 22:01:29 crane kernel: sdb: sdb1
After unplugging the device and plugging it back in, the relevant entries in the messages file would look like this:
Mar 20 21:57:07 crane kernel: hub.c: new USB device 00:10.4-1, assigned address 4
The device would show up as you’d expect in the output of lsusb in both cases, but the SCSI emulation system doesn’t to pick up the drive when it gets plugged in for the second time.
The workaround turned out to be pretty simple. Every time I need to plug in one of my USB drives, I run this command as root:
/etc/rc.d/rc.hotplug restart
Then everything’s good to go.
Since you need root/sudo access to do this, it’s not really a great solution. But it’s good enough for me. The real solution likely requires kernel updates, and I don’t have the same desire to upgrade my kernel like I did back in the day :)
no comments | no trackbacks