A Frustrating Day

time to read 3 min | 418 words

I did some major modifications to the project two days ago, moving properties around, adding / removing them. It was based on additional input about the model that we just got. It also meant that I had broke just about everything in the application, from the injection support to the CRUD functionality.

We have tests (not nearly enough, in my opinion, but we are working on it), but they are mostly building the UI right now, so there is a lot of focus there at the moment. We started testing with Selenium, and later moved to WatiN, this means that a lot of the stuff that I had to do with Selenium (manual waits, for instance) are not applicable. We are using a lot of ajax stuff, which meant that scattered throught the tests there were plenty of Sleep() calls, to wait for the action to complete. This caused the tests to be really slow when running the whole bunch.

I spent most of the day fixing the application and refactoring the tests. I got to go home with all the tests running green, but it had taken a long time to do it. Next week I could start new development knowing that I have a solid foundation, but I still left work feeling that I didn't do anything meaningful to the project for the last couple of days.

I did a lot of work with the data, and we are now much closer to the real domain than we were before, but it is not something that I could feel. Just to get back own good side, I implemented this:

[InjectEntity(Key="PolicyId")]
public Policy  Policy { get { ... } set { ... } }

So I would get at least some magic back.

I did learn a lof of good stuff, and our WatiN tests are now much better (and running faster). I should point out that testing Ajax actions is basically testing multi threaded code, and that is hard. I'll post shortly about the current tests, I think that I got it to a good state, but damn, it was long.