Name: expr-1 Description: Check that number + 0 equal to number Result: 6 Test: { 6+0 }It is currently being used for testing Wind/Diesel Systems at Powercorp [1] in Darwin, NT, Australia by Phil Maker PJM. An implementation is on PTL: implementation and PTL: implementation -1.Why?The first question is why bother with a wrapper, just use tcltest; well:
- This little rubber duck does not want to write the tests. The moment I show them tcltest the users/engineers eyes glaze over and they look happy saying, "Well, we will just do the specification, Phil, and you can write the tests :-)." They seem to be happy enough with the prettified version above; must be something about too many -,{,} characters scaring them.
- The tests (well some at least) need to be written as part of the specifications which are formatted in LaTeX, and it would be nice if they looked pretty in plain text.
- Since it's just Tcl and tcltest we can do all those wonderful things such as writing our own control structures, generators, etc. One of the scary ideas was that we should write our own natural-looking test language/suite that would do what we want, the dreaded lollipop.
- Ability to ask/interact with a human being during test, e.g., to ask to open/close a switch or valve. [PTL: please]
- Ability to get a human being to check a result both during a test [PTL: check] and afterwards [PTL: Ask:]
- Generate some pretty reports which are just hacks to tcltest for now.
- And run using after provide some commands which read/write values from devices, control inverter load banks and do other magical things.
# interactive test that asks the operator Name: nice-1 Ask: is the number a nice number Test: { f 100 }These things are of course easy, it's just things like allowing for puts being aliased during a test so you have to use something else to get a message out during a test.Comments/Additions/....
- Does anyone have any useful proc/methods/hooks for tcltest out there? PJM
Category Testing