We have a very simple mechanism that is quite effective:

 - build a model using your actor
 - put in an instance of the Test actor (in More Libraries/RegressionTests)
 - put that Test actor in training mode
 - run the model
 - put the Test actor not in training mode
 - save the model in any of the test/auto directories (there
   are many in the tree).

The model then gets automatically run every night by our nightly
build. If the actual results differ from the training data, then the
Test actor throws an exception, which gets reported as a test failure.

Edward


At 12:22 PM 4/18/2005 -0700, Zimdars, Andrew wrote:
To date, I've taken an ad hoc approach to testing new Ptolemy actors I've written: I draft the Java implementation, put together a simple MoML model (source + new actor + sink), and inspect the output. I would rather have a more disciplined approach (possibly with JUnit), but I'm not sure how to instantiate suitable a "minimal" Ptolemy runtime, and I couldn't find any examples in the ptII-4.0.1-src tree.

Ptolemy developers (both at UCB and in the community at large): what sorts of "best practices" have you evolved for developing and testing your Ptolemy actors (including/in addition to unit tests)? Are there example test cases in the Ptolemy source distribution that I didn't see on first inspection?

Thanks,

Andy Z.

-----
Andrew Zimdars
Modeling, Simulation, and Information Sciences (Org. ABCS)
Advanced Technology Center, Lockheed Martin Space Systems Co.
Bldg. 153, Col. 2J4
1111 Lockheed Martin Way, Sunnyvale, CA  94089

w: 408/742.2111 m: 510/915.0662

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

------------
Edward A. Lee
Professor, Chair of the EE Division, Associate Chair of EECS
231 Cory Hall, UC Berkeley, Berkeley, CA 94720
phone: 510-642-0253 or 510-642-0455, fax: 510-642-2845
[EMAIL PROTECTED], http://ptolemy.eecs.berkeley.edu/~eal



---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]

Reply via email to