On Thu, Dec 31, 2009 at 10:02 PM, (rkumar) Sentinel
<sentinel.2001 / gmx.com> wrote:
> As i work more on a ncurses widget library, I am wondering how does one
> do automated testing for a software that is primarily visual. Whenever i
> make changes, I need to ensure that things still show correctly - the
> cursor position on screen, widget placement, text placement, text
> wrapping, highlighting and attributes of widget, scrolling, cropping,
> navigation, key handling, etc.
>
> Currently, i have no way of knowing what's broken.
>
> 1. One thought that comes is to take some kind of screen dump and
> compare screen dumps when testing. (I am on a unix terminal, of course,
> OS X)
>
>
> 2. I don't think logging to a file and comparing logs would be of much
> benefit.
>
>
> Thoughts and pointers welcome.

I've been working on a pure-ruby terminal emulator the past few
days... unfortunately it doesn't handle many things yet, in particular
scroll regions are problematic.
If you want to try it, or contribute, grab ruby 1.9, ffi-tk, and
http://github.com/manveru/yonde
I'd be happy about anyone who has some experience with terminals, my
best reference right now is the manpage for terminfo...

Anyway, using yonde, you could test any aspect of your application
using ruby, and you can also check things like use of color or other
attributes, which a hardcopy can't give you.

-- 
Michael Fellinger
CTO, The Rubyists, LLC