Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I would like to run MUnit tests inside TestSuite constructs from the command line or a notebook interface without loading the Workbench GUI. I tried

TestRun["suite.mt"]

where suite.mt contains:

TestSuite[{"file1.mt","file2.mt"}]

and each of the fileX.mt contain standard Test[...] constructs. However, this does not run the tests; I get the output that 0 tests were run. TestRun["file1.mt"] works. I cannot find documentation for TestRun, so maybe it does not support this, but in that case, how do I run testsuite files without loading the Workbench GUI?

share|improve this question
1  
The code for MUnit package, by the look of it, seems to be really well-written and self-documenting, so, if all else fails, you can read the source and see what is needed to get it to work. What I personally did in a similar situation was that I wrote my own package to load .mt files and have a fine-grained control over them, and also a custom UI to run them in the FrontEnd, and while it worked great for me, I don't want to encourage that approach - it is probably better to use what MUnit provides since there obviously was a lot of work and thought put into that already. –  Leonid Shifrin Mar 30 '12 at 13:48
    
@Leonid There is one good use case for writing one's own .mt runner: distributing tests together with an open source application so people can run it on different platforms without needing WorkBench. I really wish MUnit were part of Mathematica. –  Szabolcs Apr 16 '13 at 2:04
add comment

1 Answer

Have a look at this post. There is a short explanation how to do it. I use this quite often and it works very well for me.

share|improve this answer
    
Thanks, but this doesn't really answer the question. I want to use the same TestSuite construct that I use in Workbench outside of Workbench. –  Ian Hinder Mar 30 '12 at 13:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.