Make it possible to run tests with exceptions without having the IDE stop

Issue #125 wontfix
Markus Humm created an issue

When some exception happens inside a test run from the IDE the debugger will stop requiring you to interact with the IDE. Some tests one writes might want to test exception handling of some sort and it is thus expected that some exceptions occur.

Since it is not feasible to us users to always manually ignore the exceptions or add them to the ignore list of the IDE at least temporarily it would be nice if unit testing could handle with this situation in such a way, that the IDE doesn’t stop at every exception, at least not at the ones declared as expected in the testing framework used.

Comments (4)

  1. Stefan Glienke repo owner

    I have looked into this some while ago but with the current OTA it's almost impossible to achieve this in way that does not require significant work that I don't have the time to spend. The code that expects an exception would have to interact with the IDE and/or debugger to tell it about this and then use the ignored exception options to temporarily ignore them.

    If anyone wants to code this he can contribute this - until then the solution is simple: don’t run your tests under the debugger. If you need to debug some certain thing then only run one specific test that will not cause a lot of trouble by cought exceptions.

  2. Markus Humm reporter

    Ok, if that’s so much work we’d need to file an OTA QP request first so we can finally implement this in a future version, but for that one would need to know what’s missing/how it should look like.

    Another idea: the IDE nowadays has thus “run without debugger” button. That’s afaik missing in TestInsight. It might even do, if TestInsight had support for that one (if possible).

  3. Stefan Glienke repo owner

    At this point I am not even sure you know TestInsight and used it before commenting here.

    To make it clear: TestInsight has no special magic to run test projects, it just fires up the project as you do with F9 or Shift+Ctrl+F9 (well except with the “run the test under the caret one” but that’s not the subject here). And in fact when clicking the “Run all tests” button it does exactly that - it calls the “run without debugger” action.

  4. Stefan Glienke repo owner

    I suggest using GExperts for this feature and I don't plan to duplicate or improve it such as automatically ignoring expected exception which would undoubtly be interesting but simply too much work for something that already exists.

  5. Log in to comment