David Haley said: You can't really write unit tests for end-user interaction like in GUIs. It's not a question of language or of enterprise software, nor is it a question of the codebase being big. It's a question of what the code is doing.
Indeed. I never explicitly suggested unit-testing GUIs. Rather, I suggest integrating unit tests where they make sense, such as the output buffer code or the telnet layer code. That's assuming architectural issues are overcome, which isn't likely without a lot of work.
David Haley said: It's very hard to write a unit test that guarantees that a free-form scripting environment will always do "the right thing" because as Nick pointed out the space of possible inputs is basically unbounded.
Sure. The point is, if you can isolate singular components on all sides, you can test the behavior of that specific component without also relying on side effects from other parts of the code. With the scripting engine, you might write a TestScriptEngine that implements no scripting engine, but simply calls the scripting interface methods and checks that they work with a variety of input.
David Haley said: If you can show me some large piece of GUI or other user-oriented software that uses automated unit tests for its user-sensitive code, that would be nice. In the meantime I think that, no offense, you are using a buzzword and a fad and applying it everywhere without having seen it actually work.
Yeah, it's certainly possible. I don't have much hands-on experience with unit testing. But take into consideration that this isn't out of the blue: I have (recent) experience with accidentally creating bugs, with no easy way to tell if I broke something. I wanted to figure out a way to make it easier to make reliable changes. Unit testing seemed very appropriate. I am not - let me repeat that - I am not throwing things at random against a wall to see what sticks.
David Haley said:
Tsunami said: Saying unit testing is not useful on clients is also ridiculous.
Well, I'm glad that I didn't actually say that, then...!
Indeed; WillFa did. |