On Friday, August 1, 2003, at 09:07 pm, Michael G Schwern wrote: [snip]
I was thinking about inline testing, Test::Class and such and how it would
be nice if we could just write test functions right in our code, like
assertions. Like Carp::Assert::More, but I want all the Test:: stuff
available.
[snip]

Eeeeeeen-teresting... random thoughts...

- Rather than running tests at live time, I'm more often doing the opposite. I have assertions that I only want to switch on at testing time since that is when I'm exercising things that might break.

- This sort of thing always makes me think of things design-by-contract... I'm sure there is some useful intersection between automated tests and DBC - but I've yet to feel bright enough to work it out.

- I think the idea of being able to run tests as assertions is a cute one worth exploring. Just having a T::B subclass that died rather than log anything would be a boon. Giving us all the goodness of the T::B based functions for normal assertions.

- You'd probably want an option to pop a stack trace next to the test output (maybe only for failing tests?)

- Option just to log failing tests might be useful?

Nice idea!

Adrian



Reply via email to