Add FailsOnNoAsserts parameter to TestInsight Runner

Issue #62 resolved
Struan Judd created an issue

Could we please have a parameter to TestInsight.DUnitX.RunRegisteredTests to enable setting FailsOnNoAsserts.

i.e. procedure RunRegisteredTests(FailsOnNoAsserts: Boolean = False); begin ... runner.FailsOnNoAsserts := FailsOnNoAsserts; ... end;

Comments (5)

  1. Stefan Glienke repo owner

    Why would you want that? A test that does not check for anything is most likely not a very good test. And I think DUnitX has a mechanism to tell it to not complain about any missing asserts (in case you are just checking that something does not raise an exception for example).

  2. Struan Judd Account Deactivated reporter

    By default this flag on the DUnitX runner is set to false (thus the default value of the parameter so that current functionality isn't changed) I want to be able to enable it for the TestInsight run tests

  3. Stefan Glienke repo owner
    • changed status to open

    Hah, ok. Well I rather change it to true then to encourage people to write proper tests. Though I remember that DUnitX behaves a bit different than DUnit when no checks were made. Will investigate

  4. Log in to comment