!comments

From STIQ

Jump to: navigation, search

The !comments widget renders a table of comments which are aggregated from the current page's test rows which contain the "comment" command.

Use the "-R" parameter to descend the tree and aggregate comments from all children test pages as well.

If you use the "comment" command liberally in your tests, you can generate "documentation" for the tests using the !comments widget.

For example you may have a test like this:

Verify Google button text [the first row of a test is considered the "Description" and is treated differently by the !comments widget]
comment Open the page
open http://www.google.com
comment Verify the Search button
assertText btnG Google Search
comment Verify the Lucky button
assertText btnI I'm Feeling Lucky

A !comments widget on the same page would create a table that contains only the comment values. The first row of a test is considered the test "Description" and is treated differently by the !comments widget. It would look something like this:

VerifyGoogleButtons Verify Google button text
Open the page
Verify the Search button
Verify the Lucky button

See the StoryTests page in the Tutorial for a real example.

Personal tools
Noteworthy