Automated unit testing via ASDF?Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Can you expand upon why you want to keep the test files separately? I would have thought the most easy approach would have been to make a subclass of cl-source-file, say cl-source-file-with-tests that would allow you to say things like
(:file "queue" :tester "queue-tests") Then you could modify the perform method for compile on cl-source-file-for-tests that would invoke the test-op on the corresponding tester file... As an aside, one issue I have found with the test-op is that operate doesn't return anything of interest, and discards the return of perform. It would be helpful if the asdf documentation would define what should happen when a test fails. Should an exception be signalled? Should something specific be printed? And if so, to a particular stream so that we could programmatically capture it? When I run the test-op on some of my more complex systems, I find it's hard to locate the output of the tester, which is lost in the compilation messages, style warnings, etc.
I think I haven't expressed myself clearly. What I meant was that I wanted to avoid to simply include the test files as regular :file components. Instead I want to have a clean separation of regular code and test code that is reflected in the system definition.
Thanks for your suggestion, I hadn't thought about that. While it's not exactly what I'm looking for, I think it's a nicer solution than keeping all tests in a separate test-system. As I find it useful to follow a naming convention for organizing my test files, I was hoping to find a solution that wouldn't require me to specify each name of a test file but instead would just implement automated testing based on that naming convention. Finally, wrt. to your remarks about test-op: AFAICT there is nothing special about test-op, so it's probably up to you (and anybody else) to decide what should happen on a perform on test-op. I think what exactly should happen probably will also depend on the tests you have implemented/the test framework you use, so recommendations aren't easy. I, for one, will look at what output options are available with XLUNIT. Add Comment
|
QuicksearchBlog AdministrationKategorienTagsCalendar
Powered by |
|||||||||||||||||||||||||||||||||||||||||||||||||