Skip to content
Tcl Source Code History Of Ticket 53cdb9696c
Login

History Of Ticket 53cdb9696c

Artifacts Associated With Ticket 53cdb9696c

  1. Ticket change [4eb2f2b89c] (rid 203448) by chrstphrchvz on 2022-08-29 18:49:56:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      A common feature of unit testing software is the ability to mark tests as currently known/expected to fail, while still allowing them to be run rather than completely skipped. I have not encountered this feature in the Tcl/Tk test suite, even though I think Tcl/Tk would find it useful; is this a limitation of tcltest? (If so, this ticket is an RFE.)
      
      Of course, even with this feature, it would not help for tests which crash and bring down processes shared with other tests or the test harness itself.
      
    5. foundin initialized to: "8.6.12"
    6. is_private initialized to: "0"
    7. login: "chrstphrchvz"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "chrstphrchvz"
    13. subsystem initialized to: "34. tcltest Package"
    14. title initialized to:
      tcltest: how to mark tests as known/expected to fail without skipping?
      
    15. type initialized to: "Support"
  2. Ticket change [a969f00f71] (rid 203449) by fvogel on 2022-08-29 19:07:37:

    1. icomment:
      IIUC what you are searching I think the answer is the 'knwonBug' constraint. The [https://tcl.tk/man/tcl8.4/TclCmd/tcltest.htm|tcltest man page] then suggests using
      <verbatim>
      configure -constraints knownBug \
                -limitconstraints true \
                -verbose pass
      to run exactly those tests that exercise known bugs, and discover whether any of them pass, indicating the bug had been fixed.
      </verbatim>
      
    2. login: "fvogel"
    3. mimetype: "text/x-fossil-wiki"
  3. Ticket change [89401c31de] (rid 203691) by fvogel on 2022-09-04 19:41:34:

    1. icomment:
      Is my answer below ok for you? Can I close this ticket?
      
    2. login: "fvogel"
    3. mimetype: "text/plain"
  4. Ticket change [6774c5ce96] (rid 203700) by chrstphrchvz on 2022-09-05 01:08:03:

    1. icomment:
      Thank you for pointing me to the knownBug constraint; I’m not inclined to say it completely achieves what I meant, however if the Tcl community finds it to be a satisfactory substitute, then this ticket should be closed rather than kept open as an RFE. What I had in mind would resemble things like [https://www.gnu.org/software/emacs/manual/html_node/ert/Expected-Failures.html|ERT <tt>:expected-result :failed</tt>] or [https://perlmaven.com/todo-testing-a-bug|Perl TODO] or [https://doc.qt.io/qt-6/qtest.html#QEXPECT_FAIL|Qt <tt>Q_EXPECTFAIL()</tt>]. The point of this feature would be for known/expected failing tests to run <b>by default</b> (without having to do anything like manually override constraints), and clearly indicate any tests which expectedly fail or unexpectedly pass.
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"
  5. Ticket change [dd837cd8de] (rid 203701) by sebres on 2022-09-05 10:19:09:

    1. icomment:
      I also may not fully understand the concern of expected failure in test suite. Or either what exactly do you miss.
      
      Isn't a test resulting with OK in error case a solution you're looking for?
      ```
          test set-without-args {must fail with wrong args ...} -body {
              ::set
          } -returnCodes error -match glob -result {wrong # args: *}
      ```
      This test expects an error and would pass if body throws an error and the error message matches.
      
    2. login: "sebres"
    3. mimetype: "text/x-markdown"
  6. Ticket change [7e72109b89] (rid 203723) by chrstphrchvz on 2022-09-05 21:49:50:

    1. icomment:
      No, writing a test which should generate an error in the absence of an issue is not the same marking a test as known/expected fail in the presence of an unresolved issue. The contents of a test are code which should pass if there are no unresolved issues. Known/expected fail is metadata which only the test harness should know about, not the code within the test; the results from a test harness should use this metadata to distinguish tests which expectedly fail/unexpectedly pass from tests in the existing pass/fail/skip categories.
      
      The idea is that under a workflow resembling test-driven development, when an issue (bug or missing feature) is noticed, a test is created for it which initially fails, and is marked as known/expected to fail (especially when a solution is not expected right away). But the test should always run by default and report whether it fails as expected or passes unexpectedly; short of something like uncontained crashes, there should be no reason to skip it by default. If a release is made before the solution is implemented, then it is clear to anyone running the default test suite that the maintainer is already aware that there are known/expected failing tests for issues which have yet to be addressed in a release. When the solution is implemented, the test is kept and marked as expected to pass.
      
    2. login: "chrstphrchvz"
    3. mimetype: "text/x-fossil-wiki"