Embedding Screenshots in Concordion Specifications
testing java concorcion datacom devcamp concordion
Over the weekend at the Datacom Devcamp I was discussing Concordion and the benefits of writing tests in plain english. One idea that arose from the conversations was having the ability to take screenshots of an application during test execution - this is a feature that is not natively supported by Concordion - but that's never stopped me. So during a lull in one of the sessions I wrote up a simple screenshot command and added it to my concordion-examples github project.
After configuring concordion to including the command, one can simply include in their specification document the following:
<div talios:screenshot="jpg" href="screen1.jpg"></div>
and have the current screen contents saved and inserted into the rendered specification:
The source for ScreenshotCommand.java is surprisingly easy, tho I'm not sure how one would go about capturing all displays on a machine rather than the primary screen.
Either way, this functionality will prove to be extremely handy when testing GUI applications.