Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-5936

Need tokens to get failed tests count and total tests count, to put them in mail subject easy

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • email-ext-plugin
    • None
    • hudson 1.350, email-ext 2.5

    Description

      The ${FAILED_TESTS} token takes too much chars to put it in mail subject, so it only useful in mail body.
      It would be much better if provide tokens to get failed unit test count and total unit test count, so i can configure the mail subject like this:

      $PROJECT_NAME $BUILD_NUMBER - $BUILD_STATUS - ${FAILED_TESTS_COUNT} of ${ALL_TESTS_COUNT} tests failed
      

      BTW:
      I konw there is a solution based on an unofficial patch(http://joesondow.blogspot.com/2009/10/fancy-hudson-email.html). However, i think to provide Content-Token is much simpler, and i don't like unofficial patches.

      Attachments

        Activity

          islands islands created issue -
          islands islands made changes -
          Field Original Value New Value
          Description The ${FAILED_TESTS} token takes too much chars to put it in mail subject, so it only useful in mail body.
          It would be much better if provide tokens to get failed unit test count and total unit test count, so i can configure the mail subject like this:
          {noformat}
          $PROJECT_NAME $BUILD_NUMBER - $BUILD_STATUS - ${FAILED_TESTS_COUNT} of ${ALL_TESTS_COUNT} tests failed.
          {noformat}
          The ${FAILED_TESTS} token takes too much chars to put it in mail subject, so it only useful in mail body.
          It would be much better if provide tokens to get failed unit test count and total unit test count, so i can configure the mail subject like this:
          {noformat}
          $PROJECT_NAME $BUILD_NUMBER - $BUILD_STATUS - ${FAILED_TESTS_COUNT} of ${ALL_TESTS_COUNT} tests failed
          {noformat}

          _BTW:_
          I konw there is a solution based on an unofficial patch(http://joesondow.blogspot.com/2009/10/fancy-hudson-email.html). However, i think to provide Content-Token is much simpler, and i don't like unofficial patches.
          sogabe sogabe made changes -
          Assignee sogabe [ sogabe ]
          sogabe sogabe made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          sogabe sogabe added a comment - added ${TEST_COUNTS, var}. See https://github.com/jenkinsci/email-ext-plugin/commit/706dde27bdd25d6578a872e04d16a02e56f252c2
          sogabe sogabe made changes -
          Resolution Fixed [ 1 ]
          Status In Progress [ 3 ] Resolved [ 5 ]
          slide_o_mix Alex Earl made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 136028 ] JNJira + In-Review [ 203809 ]

          People

            sogabe sogabe
            islands islands
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: