Message Boards Message Boards

4
|
6549 Views
|
2 Replies
|
8 Total Likes
View groups...
Share
Share this post:

Workbench and Mathematica 10 on Windows

Posted 10 years ago

I have a fresh installation of Workbench 2.0 Build 126 and Mathematica 10.0.0 on Windows. When trying to run tests by right click, Run As -> Mathematica Test, I get:

enter image description here

Has anyone else encountered problems like this? Is there quick fix?

Otherwise: how can I run the test by loading the package MUnit directly and find out precisely which tests are failing and how? I can use TestRun but it won't tell me which tests failed. Also, TestRun will fail when the test file contains a TestSuite, so I ran it manually on each test file.

POSTED BY: Szabolcs Horvát
2 Replies

It looks like when loading the M10 version of MUnit (not the version shipped with WorkBench), one can do

tr = TestReport["testfile.mt"]

But I can't seem to figure out how to get reliable results from it:

enter image description here

I know for a fact that some tests have failed with messages here. Yet it's not telling me which (it claims none). tr["TestsFailedCount"] gives 2.

Can I trust the results I get from this new version of MUnit? I would feel much safer if I could just use the Workbench version which I know works fine. When I played with the test notebook interface in v10, it seemed rather glitchy, but I haven't taken the time to figure out what specifically is wrong with it (if anything) ...

Does WRI use the same version of MUnit internally for testing?

POSTED BY: Szabolcs Horvát

I came up with this sort of workaround. I don't know how safe this is (i.e. whether it will give reliable results), but it let me see the rest results in a useful way.

  1. Extract the MUnit package from Workbench and put it in some folder.
  2. Open TestRun.m, find TestRun at the end, and correct Logger to Loggers.
  3. Start a fresh M kernel. PrependTo this folder to the $Path. Don't AppendTo, otherwise M10's builtin MUnit will be loaded.
  4. Needs["MUnit`"]
  5. Use TestRun[#, Loggers -> {NotebookLogger[]}]& on test files. This will generate a test result notebook for each test file.
POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract