<?xml version="1.0" encoding="windows-1252"?>
<node id="370507" title="How to build a testable interface?" created="2004-06-29 11:29:15" updated="2005-08-13 07:36:26">
<type id="115">
perlquestion</type>
<author id="337075">
McMahon</author>
<data>
<field name="doctext">
In [id://370258|this node], [dragonchild] explains how he's going to build a text-based adventure game in several languages, and wonders how to test his code.  &lt;br&gt;&lt;br&gt;
[pbeckingham] recommends [id://370260|testing at the user interface] with [cpan://Expect].&lt;br&gt;&lt;br&gt;
[adrianh] recommends [id://370274|writing a common api] for each implementation and script the testing through the API.&lt;br&gt;&lt;br&gt;
[andyf] adds a recommendation to [id://370281|write a state-dumping function].&lt;br&gt;&lt;br&gt;
[sgifford] recommends [id://370315|controlling the testing with a 2-way pipe] in and out of the game. &lt;br&gt;&lt;br&gt;
[BrowserUK] suggests [id://370407|a simple but multidisciplinary approach] with a simple script recorder controlled through [cpan://Test::More].&lt;br&gt;&lt;br&gt;
That is already a lot of interfaces to test a simple command-line program, and we didn't even hear from the Haskell program-by-contract camp (who talk about testable interfaces a lot) or the FIT alternate-UI camp (who are trying to figure out how to do agile user testing). &lt;br&gt;&lt;br&gt;
So:&lt;br&gt;
Is there a best way to build an interface for testing?&lt;br&gt;
Are there contexts in which one test interface is better than another?  
</field>
</data>
</node>
