Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I've recently begun work on a purely graphical module, actually an extension to the SDL::OpenGL module to support nVidia's Cg shader language. As this is the first big XS project I've done for a good while I'm trying to be even more stringent than I normally am when it comes to testing it.

The issue comes from the fact that the only tests I can run unattended are simple 'automatic' things, whereas I'd quite like to test that the image on screen looks right ('Is the teapot green?', 'Can you see the chessboard reflected in the car's body?')

If this wasn't bad enough a lot of the functionality relies on having a valid OpenGL rendering window before it can even think of working, this means that installing without first loading the GUI is going to be strange. In essence my module cannot properly initialise itself without this kind of environment being set up. Admittedly the module itself is useless without this so I'm not quite so bothered about that, it only hurts when installing it remotely.

I'm wondering what people's opinions are with regard to the testing of modules such as this (And GUI widget modules, and keyboard input modules etc). Is there a varient to the standard testing methodology for such modules?

Should I build a complete test system and demand the user sit there whilst I show them some nice pictures to test functionality? Maybe a build system that can tell when it's running non-interactive and so skips the more advanced tests, but still runs it's non-interactive graphical tests so still needs the GUI running? Is it really acceptable to allow someone to finalise the install based on a headless connection's limited set of tests?

Obviously I will have a full test suite during development anyway to detect errors slipping into the code as it's torturously refactored and extended.

What level of testing is absolutely required to be run for a module to be installed? How much inconvenience during installation can be traded off for this safety?


In reply to How to test Interactive/Graphical Modules by Molt

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



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-26 06:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found