mp said:
>> One approach I've thought of doing is to write mock
>> versions of all the API libraries that provide some means
>> for controlling the return values and that don't do any
>> real database access. Then, the test code would 'use'
>> these rather than the real API modules, but this doesn't
>> really feel like the best approach because there are too
>> many unknowns at this point.
Actually, that's not all that bad an idea. Mocking up the entire API and play-testing it with the User community will help shake out the quirks early on. ("Ninety precent of the time we call api_open() followed by api_read_next(). Can we get things revamped so that the usual behavior of api_open() to return the first record, unless "no-read => '1' " is passed in the call?")

Developing a useful and friendly API is a real art. The earlier you can involve your User Community, the better your chances of ending up with somthing that they will use. Also, getting something out-there for then to play with begins setting up mind-share. Play-testing breeds a level of comfort -- "this is how it's going to work; it's not all there yet, but here is what I can expect to see when I do this call." And, Folks are much less prone to adding the tag "vapor-ware" to your work-in-progress if you really do have something out there for them to poke at.

----
I Go Back to Sleep, Now.

OGB


In reply to Re: Architecting a testing framework for an API by Old_Gray_Bear
in thread Architecting a testing framework for an API by mp

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.