[PD-dev] signal object test template for automated unit testing

katja katjavetter at gmail.com
Mon Oct 24 12:30:00 CEST 2011


Hello dev list,

Inspired by the intentions to set up an automated unit test procedure
for Pd-extended, we propose a template for testing signal objects.
"We" is Fred Jan Kraan and me, we've been puzzling on this together
last weekend.

As far as we could see, there is no way to generate test patches for
all signal objects with a 'one-size-fits-all' content and where you
could replace the object under test using a simple script. Conditions
are just too different per object. Instead, we opted for a template
where you manually put the object under test, together with requisites
like test signal, 'set' messages etc. Aspects of the template:

- compares signal under test with reference which is stored with the
patch (512 points)
- reference array can be recorded in the patch using a Pd known to
work well (release build for example)
- visual representation of signal under test, reference signal and diff
- standard deviation is calculated
- maximum tolerated standard deviation can be set (tolerance)
- test result is reported as a function of found standard deviation
and tolerance ('tested OK' or 'ERROR: deviation ....')
- test result is printed to Pd window and stdout
- test is automatically executed when patch is loaded
- samplerate 44100 is considered the norm, error is reported when
other samplerate is detected at patch load

The template is intended towards automated unit testing. Test patches
based on the template could be included in a setup like the
'load-every-help' test.

Attached is a .zip with the template and two examples. Please comment
on it if you have suggestions.


Katja
-------------- next part --------------
A non-text attachment was scrubbed...
Name: template~test.zip
Type: application/zip
Size: 14283 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-dev/attachments/20111024/278d58fa/attachment.zip>


More information about the Pd-dev mailing list