Testing UI, Again

time to read 2 min | 320 words

I’m testing UI again, and I guess that it is going to suck this time as it did before. This time I’m using Netron for the graphs, and it’s not that bad this time, mainly because I can get into the guts of Netron and change it, and this make all the difference in the world.

The problem with that is that while Netron is a library for graphs, it is mainly for painting graphs, so it got a boat load of baggage that I don’t need when I’m doing testing. I started using the Pass Null pattern, but there seems to be lot of stuff that just can’t accept null (and doesn’t check for it).

I didn’t look too deeply into the way Netron is structure, I admit, mainly because there is quite a bit of GDI stuff that I just don’t want to get into, but I guess that I’ll have to, at least to rip out the parts that I’m not using and don’t want to maintain. The main problem I’ve with Netron is that it needs to keep a lot of state, which makes life hard when you try to understand what is going on around you. The framework is there to help you build really complex stuff, but I managed to scale it down without much trouble.

I just realize that I can just use the whole thing for testing without bother the UI bits. This mean deleting my façade code (always a pleasure) and using the real thing, and it doesn’t affect the way I’m working with the model.

All things aside, Netron looks really good, check out the sample applications screenshots. I managed to get a working sample that looked about as good as Microsoft’ Class Designer in no time, and Netron takes care of most of the details with regard to object movement, highlighting, connecting the dots, etc.