Exploration Through ExampleExample-driven development, Agile testing, context-driven testing, Agile programming, Ruby, and other things of interest to Brian Marick
|
Sun, 11 Dec 2005Working your way out of the automated GUI testing tarpit (part 2) In the previous installment, I described a test that looked like this:
The test doesn't tell how to get to the case display page, create an audit record, create the visit record that audit records require, etc. The code behind the scenes has to figure that out. I won't show that code. You can find it here. It's a spike, so don't give me a hard time about the lack of tests. What matters is that it works off a description of what transitions are possible in the program. They look like this:
Given a complete set of definitions, statements like this one:
name "milestones" along the path the program has to take to get ready for the test. A simple breadth-first search constructs a complete path out of the milestones. The path contains appropriate instructions to fill in fields and press buttons. Thus a declarative test is turned into a procedure. P.S. In the declaration, the button's name is given. That's wrong. It should be the HTML id. Like I said: a spike. |
|