Is it possible to run unit test while a debug session is already open in Wolfram Workbench 2.0?

A typical use case follows: I have a debug in Workbench session open. enter image description here

I evaluate some cells in a sample Notebook. Find some bugs, fix them and write the unit test. Now I would like to run the unit tests.

enter image description here

But Workbench says enter image description here

If I terminate the Mathematica session, than the kernel state is lost and I have to re-evaluate all the notebook cells.

  • $\begingroup$ The workbench is based on an older version of the MUnit package which was available as a standalone Mathematica package before there was the workbench and which you might be able to use in an extra session as Akater suggested for his package. You can still find it deep in the directory tree of the workbench/eclipse installation (put a Print[$Path] in a test and run it). I have never checked if that MUnit package still works without the workbench but it would be the first place to look at. Maybe you'll find documentation for the older package somewhere to start off... $\endgroup$ Commented May 17, 2014 at 8:41

1 Answer 1


I had written a small package allowing to perform unit testing independently of Workbench, while also in consistency with Workbench .mt test files

It looks like this:

Simple Unit Testing

Warning: I'm not sure if Workbench uses the same .mt format. It's certainly similar but I'd appreciate comments on that. (An example of .mt file is included in the package. It's not in repository directly, however, — it gets generated by symbol QuickExampleInstall defined in the package)

By means of properly managed CellTags in notebooks, it is possible to run tests associated with specific notebook just by executing test symbol anywhere in it. This functionality, however, is not present in the package I link to, but it's not difficult to add. It may appear there in future but I happen to be losing interest in unit testing, so it probably depends on feedback.

(If this is not what you want, and you believe this is completely useless, please tell me. I don't really understand unit testing.)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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