Dear monks,

One of the big problems of GUI programming is testing. It's simple to develope extensive test-suites for data munging applications, but once it comes to a GUI, we're stuck.

I have a complex GUI application for data display - it reads data from files and displays it on the screen. I want the feeling of confidence a test-suite provides for this program as well, but I just can't think of a good way to write unit tests for it. Sure, I have test suites for the non-GUI components, but sometimes, as it is in my case, the GUI itself is the bulk of the functionality.

The less frigthening way I've heard of is creating special "dump" functions for testing purposes only which dump what's on the screen to files, allowing to diff/test.

Some possibilities (like print-screening and comparing images) sound just outright scary.


In reply to testing GUIs by spurperl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.