Testing reports

Colin Law clanlaw at googlemail.com
Tue Mar 27 04:39:27 EDT 2012


On 26 March 2012 23:14, John Ralls <jralls at ceridwen.us> wrote:
>
> On Mar 26, 2012, at 1:45 PM, Colin Law wrote:
>
>> On 26 March 2012 15:15, John Ralls <jralls at ceridwen.us> wrote:
>>> ...
>>> Do you know how to write automated tests -- in any language -- that accurately check the output format of an HTML page? Automated in this case means the test program decides whether the formatting is correct, no human involved. If you do, or know where I can learn that, please share.
>>
>> Ruby on Rails has various tools that allow automated testing of html
>> output (designed for testing web apps), but I don't know that much
>> about them or how they could be used with gnucash.  It would need a
>> working Ruby environment I believe with the appropriate Ruby Gems
>> installed and so may not be appropriate.
>
> Got a more complete pointer? A particular Gem, maybe? What I found [1][2] don't appear to do post-render checks. Most of the search results focussed on testing the Ruby rather than the HTML. That said, validating the HTML for well-formedness would be a pretty good start. There are C, Perl, and Python tools for doing that. A Ruby tool would be OK, too -- I made the Git tools that we use for synching with the Subversion repository by translating a Ruby Gem and then elaborating it.
>
> Regards,
> John Ralls
>
> [1] http://guides.rubyonrails.org/testing.html
> [2] http://strugglingwithruby.blogspot.com/2010/04/testing-for-valid-html.html

Section 4.6 Testing Views in the rails guide, [1 above] gives a brief
overview of how to check html elements.  Also there is rspec that is
considered by many the best route at the moment (for use with Rails of
course).  See [3] for a quick rundown.

[3] http://www.arailsdemo.com/posts/37

Colin L



More information about the gnucash-user mailing list