At IMVU, we use a suite of testrunners and enhancements that sit on top of a core of Simpletest. It’s a pretty sweet suite, filled with all sorts of fancy doodads, gewgaws, and the most lovely selenium fixture you ever did see. Convenience pours out of it’s every pore, as put there by scores of engineers over literally pairs of years.
However, we haven’t spent the time yet to pretty the ol’ girl up for public consumption (which we totally should), so I decided to just use the basic core of SimpleTest while developing (as a personal project) the third iteration of the verge 2d game engine’s website (wip).
I didn’t know what I got myself into.
Here’s some hard-earned knowledge I wrestled from the core of this beasty. These simple statements represent hours of shouting, grunting, and crying defiantly into the rain-filled sky daring a cruel god to strike me down.
1. assertFieldById() and assertFieldByName() do not work on html input elements which are improperly placed outside of <form> tags.
2. There do not appear to be out-of-the-box accessors for field values. I had to code up my own getFieldById().
3. If an element has an id, but not a name, it’s value will be inaccessible.
This list is not exhaustive
Learn these lessons, fair reader, so that you may not stub thy code-toe upon SimpleTest! And one day maybe we’ll get around to releasing IMVU’s Sweet Suite of Not-So-Simpletest.