(RunTestsCommand) carefully calculate amount of not_run tests

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • jt6.0
    • Affects Version/s: jt6.0
    • Component/s: tools
    • b15

      Historically this is how the number of "not run" tests is calculated.

              int p = stats[Status.PASSED];
              int f = stats[Status.FAILED];
              int e = stats[Status.ERROR];
              int nr = stats[Status.NOT_RUN] =
                  harness.getTestsFoundCount() - p - f - e;

      However it is possible that in special circumstances the getTestsFoundCount() number could be lower than amount of passed tests - if tests are added dynamically.

      This could lead to negative number of not-run tests and could confuse stats formatter

            Assignee:
            Dmitry Bessonov
            Reporter:
            Dmitry Bessonov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: