Software Requirements and Testing Procedures

[node-title]

This technical material comes from VISTA Jack Waugh who helped design and develop a Content Management System for the Center for Technology Services at the University of Baltimore in Baltimore, MD. In Jack’s own words:

Attached is a script in Ruby that generates an HTML document that lists requirements on a software product, and lists the semiautomated test cases that test the requirements.  The value that I think this example has, for people outside the org I am serving (CCTS) is not its content, but rather, its format.  It shows a way that information about requirements and testing can be organized in one way for maintaining the information, but in another way for presentation (to, e. g., management, testers, and engineers new to the project).

This file also demonstrates that writing HTML in Ruby is easier than writing HTML in HTML.  At least, I think this format is easier to work on.

We use “Matz“‘s Ruby interpreter.  The example doesn’t use any esoteric language features, so I expect any Ruby interpreter would work with it.  If you have one downloaded, and called “ruby” (which is the conventional command), you can say something like “ruby test_plan.rb >test_plan.html” to generate the HTML presentation of the document.  I’ll attach that output as well, for your inconvenience.

The “content” part of test_plan.rb starts at line 59.  There, I dive into the first of several “areas” of the product that I intend to treat in the document.

At line 63, I introduce a “story” of how people should be able to use the subject software, a “user story”.

The  ”p” command that starts line 65, denotes a ”

” tag instance in HTML.

So, the file contains both content and script to reformat the content.

One of the effects of the script parts is to generate a table of contents.

Even laying aside the fact that this script organizes information about requirements and testing (QA concerns), it also demonstrates a more generally useful feature, of simply being able todefine a document that has sections and subsections and so on, and have it rendered in HTML with a table of contents.  The script is flexible as to the depth into the section hierarchy that should
be reflected in the TOC.  The entries in the TOC link to anchors at the respective sections.

There may be some dead code in this file.

AttachmentSize
test_plan.html23.53 KB
test_plan.rb.txt27.33 KB
Transmission Project