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

TAP files considered as binary files are ignored

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Not A Defect
    • tap-plugin
    • None

    Description

      If the file type is considered as binary by Jenkins webserver then the TAP plugin doesn't consider this file for inclusion in TAP reports. This can be quite confusing and if you're not aware of this issue it can easily hide problems.

      Note: I'm not talking about file permissions but what the Jenkins webserver (Stapler?) considers the file as. If the file extension isn't something which Jenkins serves as plain text then this file is ignored by the TAP plugin.

      To reproduce this issue use the following shell execution step:

      rm -rf reports
      mkdir reports

      cat > reports/demo << EOF
      1..1
      ok 1 demo OK
      EOF

      cat > reports/demo.pl << EOF
      1..1
      ok 1 demo.pl OK
      EOF

      cat > reports/demo.txt << EOF
      1..1
      ok 1 demo.txt OK
      EOF

      and enable "reports/*" for TAP results.

      Then the following report looks like:

      http://michael-prokop.at/screeni/gkrellShoot_12-11-13_110931.png

      whereas there are 3 TAP result files available and considered for inclusion:

      http://michael-prokop.at/screeni/gkrellShoot_12-11-13_110845.png

      When clicking on the "demo" file name (not "view"!) in your browser it's considered as BIN file and download gets enforced. When clicking on demo.pl and demo.txt instead they are provided as plain-text files without forcing download to view them.

      It would be nice if such "binary files" could be also considered for TAP reports or if not at least warn in the TAP execution run and mention in the documentation that files should be preferably have suffix .tap.

      Attachments

        Activity

          First of all, thanks for detailed report, with steps to reproduce, images and very clear description.

          >When clicking on the "demo" file name (not "view"!) in your browser it's considered as BIN file and download gets
          >enforced. When clicking on demo.pl and demo.txt instead they are provided as plain-text files without forcing
          >download to view them.

          I think this is the correct behaviour in this case.

          >It would be nice if such "binary files" could be also considered for TAP reports or if not at least warn in the
          >TAP execution run and mention in the documentation that files should be preferably have suffix .tap.

          In order to warn during the plug-in execution that a file being parsed is binary (or to skip it) the plug-in would have to use the same mime-types as Jenkins (the plug-in today uses none, it simply ignores the mime-types).

          This can cause more bugs, and would be much more complicated to maintain.

          However, I do agree that we could add/mention something in the documentation. Would you be willing to write something about it in the plug-in Wiki? If you already have the login in wiki.jenkins-ci.org, go to https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin and feel free to add information that would help other users

          Thanks a lot!
          -B

          kinow Bruno P. Kinoshita added a comment - First of all, thanks for detailed report, with steps to reproduce, images and very clear description. >When clicking on the "demo" file name (not "view"!) in your browser it's considered as BIN file and download gets >enforced. When clicking on demo.pl and demo.txt instead they are provided as plain-text files without forcing >download to view them. I think this is the correct behaviour in this case. >It would be nice if such "binary files" could be also considered for TAP reports or if not at least warn in the >TAP execution run and mention in the documentation that files should be preferably have suffix .tap. In order to warn during the plug-in execution that a file being parsed is binary (or to skip it) the plug-in would have to use the same mime-types as Jenkins (the plug-in today uses none, it simply ignores the mime-types). This can cause more bugs, and would be much more complicated to maintain. However, I do agree that we could add/mention something in the documentation. Would you be willing to write something about it in the plug-in Wiki? If you already have the login in wiki.jenkins-ci.org, go to https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin and feel free to add information that would help other users Thanks a lot! -B

          Hi Bruno,

          thanks for your answer. I just added the according information at https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin (see 2nd bullet under "Known Limitations"). Feel free to close this issue.

          thanks for your work on the TAP plugin,
          regards,
          Michael

          mika Michael Prokop added a comment - Hi Bruno, thanks for your answer. I just added the according information at https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin (see 2nd bullet under "Known Limitations"). Feel free to close this issue. thanks for your work on the TAP plugin, regards, Michael

          Thanks a ton Michael! I've also updated the Wiki. The other limitation had already been implemented in a past version. Will close this issue once the next version is released (scheduled to this next Saturday).

          Thanks again!
          Bruno

          kinow Bruno P. Kinoshita added a comment - Thanks a ton Michael! I've also updated the Wiki. The other limitation had already been implemented in a past version. Will close this issue once the next version is released (scheduled to this next Saturday). Thanks again! Bruno

          Fixed in 1.8. This version will be available from update manager within few hours.

          kinow Bruno P. Kinoshita added a comment - Fixed in 1.8. This version will be available from update manager within few hours.

          People

            kinow Bruno P. Kinoshita
            mika Michael Prokop
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: