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

Add option to show "all tests" or "critical tests" in the Listviewcolumn that shows overall passed/failed tests in project listing

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: robot-plugin
    • Labels:
      None
    • Environment:
      plugin v1.5.0
    • Similar Issues:

      Description

      In the Listviewcolumn that shows overall passed/failed tests in project listing we see stats about "all tests", but in fact, what I am really interested about is the "critical tests" (the non-critical tests are usually known failing tests for me). I would like to see the critical tests only in the project listing.

      Here is a real use case: I have a list of project. One of them is unstable because several tests failed. If I look at the "Robot Results" column, I see something like "42 / 50 passed" but in fact I may have 7 non-critical tests in this project, so I have only 1 critical test that failed. Problem is that I have to go to the project page to have this information.

      Could we add an option in the configuration of the plugin to drive that?
      I could try to implement it.

        Attachments

          Activity

          Hide
          jpiironen jpiironen added a comment -

          Hi, this sounds like a useful option to have for quite a lot of people.

          You could probably add the configuration option to the view configuration page? It would then be something like a checkbox "Only show critical tests in pass/failed column" with all tests still being shown as the default configuration.

          If you are willing to implement this, by all means submit a pull request!

          Show
          jpiironen jpiironen added a comment - Hi, this sounds like a useful option to have for quite a lot of people. You could probably add the configuration option to the view configuration page? It would then be something like a checkbox "Only show critical tests in pass/failed column" with all tests still being shown as the default configuration. If you are willing to implement this, by all means submit a pull request!
          Hide
          laurentbristiel laurent bristiel added a comment -

          Hi Janne,
          I initiated my work on the plugin but failed to go very far. Maybe you can help me.
          Here is what I tried:
          1) install a local Jenkins with a job that launch a robot test => OK
          2) install the official robot plugin from jenkins admin and use it in my job => OK
          2) remove the official plugin + built the plugin from source (mvn clean install, with Java 7) and install it in Jenkins (upload the HPI file generated) => looks good
          3) check that the plugin works properly => not OK
          When I am on the project page I get an error like this:

          A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.
          
          Stack trace
          
          javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/Users/laurent/.jenkins/plugins/robot/WEB-INF/lib/classes.jar!/hudson/plugins/robot/RobotProjectAction/floatingBox.jelly:19:63: <st:include> No page found '/hudson/plugins/robot/robotcss.jelly' for class hudson.model.FreeStyleProject
          	at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117)
          	at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127)
          	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735)
          

          4) so I looked more carefully at the source code and in the pom.xml I saw:

            <parent>
              <groupId>org.jenkins-ci.plugins</groupId>
              <artifactId>plugin</artifactId>
              <version>1.424</version><!-- which version of Hudson is this plugin built against? -->
            </parent>
          

          => this does not match my version of Jenkins, so I changed the value to 1.598 and built again
          This time the built failed with that error:

          Downloaded: http://repo.jenkins-ci.org/public/org/codehaus/plexus/plexus-compiler-javac/1.9/plexus-compiler-javac-1.9.jar (14 KB at 38.8 KB/sec)
          [INFO] Compiling 23 source files to /Users/laurent/Development/github/robot-plugin/target/classes
          [INFO] -------------------------------------------------------------
          [ERROR] COMPILATION ERROR :
          [INFO] -------------------------------------------------------------
          [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[28,24] error: package hudson.tasks.test does not exist
          [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[50,38] error: cannot find symbol
          [ERROR]   symbol: class AbstractTestResultAction
          (...)
          [INFO] 79 errors
          [INFO] -------------------------------------------------------------
          [INFO] ------------------------------------------------------------------------
          [INFO] BUILD FAILURE
          [INFO] ------------------------------------------------------------------------
          [INFO] Total time: 2:24.074s
          [INFO] Finished at: Wed Jan 28 09:35:24 CET 2015
          [INFO] Final Memory: 28M/122M
          [INFO] ------------------------------------------------------------------------
          [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile (default-compile) on project robot: Compilation failure: Compilation failure:
          [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[28,24] error: package hudson.tasks.test does not exist
          [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[50,38] error: cannot find symbol
          [ERROR] symbol: class AbstractTestResultAction
          (...)
          

          ==> could you guide me a bit on how I should approach work on the plugin? Did I miss a step? Do my error ring a bell to you?
          Thanks in advance

          Show
          laurentbristiel laurent bristiel added a comment - Hi Janne, I initiated my work on the plugin but failed to go very far. Maybe you can help me. Here is what I tried: 1) install a local Jenkins with a job that launch a robot test => OK 2) install the official robot plugin from jenkins admin and use it in my job => OK 2) remove the official plugin + built the plugin from source (mvn clean install, with Java 7) and install it in Jenkins (upload the HPI file generated) => looks good 3) check that the plugin works properly => not OK When I am on the project page I get an error like this: A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened. Stack trace javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/Users/laurent/.jenkins/plugins/robot/WEB-INF/lib/classes.jar!/hudson/plugins/robot/RobotProjectAction/floatingBox.jelly:19:63: <st:include> No page found '/hudson/plugins/robot/robotcss.jelly' for class hudson.model.FreeStyleProject at org.kohsuke.stapler.jelly.JellyClassTearOff.serveIndexJelly(JellyClassTearOff.java:117) at org.kohsuke.stapler.jelly.JellyFacet.handleIndexRequest(JellyFacet.java:127) at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:735) 4) so I looked more carefully at the source code and in the pom.xml I saw: <parent> <groupId>org.jenkins-ci.plugins</groupId> <artifactId>plugin</artifactId> <version>1.424</version><!-- which version of Hudson is this plugin built against? --> </parent> => this does not match my version of Jenkins, so I changed the value to 1.598 and built again This time the built failed with that error: Downloaded: http: //repo.jenkins-ci.org/ public /org/codehaus/plexus/plexus-compiler-javac/1.9/plexus-compiler-javac-1.9.jar (14 KB at 38.8 KB/sec) [INFO] Compiling 23 source files to /Users/laurent/Development/github/robot-plugin/target/classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[28,24] error: package hudson.tasks.test does not exist [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[50,38] error: cannot find symbol [ERROR] symbol: class AbstractTestResultAction (...) [INFO] 79 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2:24.074s [INFO] Finished at: Wed Jan 28 09:35:24 CET 2015 [INFO] Final Memory: 28M/122M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5:compile ( default -compile) on project robot: Compilation failure: Compilation failure: [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[28,24] error: package hudson.tasks.test does not exist [ERROR] /Users/laurent/Development/github/robot-plugin/src/main/java/hudson/plugins/robot/RobotBuildAction.java:[50,38] error: cannot find symbol [ERROR] symbol: class AbstractTestResultAction (...) ==> could you guide me a bit on how I should approach work on the plugin? Did I miss a step? Do my error ring a bell to you? Thanks in advance
          Hide
          jussi_malinen Jussi Malinen added a comment - - edited

          Hi!

          Typically during development you would use:
          mvn hpi:run

          that starts a local standalone jenkins with the current development code for robot plugin in use. The jobs that you create there are not removed when you run mvn clean, so you can keep on using the jobs you created once.

          I think it would be easiest to work like that.

          Show
          jussi_malinen Jussi Malinen added a comment - - edited Hi! Typically during development you would use: mvn hpi:run that starts a local standalone jenkins with the current development code for robot plugin in use. The jobs that you create there are not removed when you run mvn clean, so you can keep on using the jobs you created once. I think it would be easiest to work like that.
          Hide
          jussi_malinen Jussi Malinen added a comment -

          And that bug about stapler you run into, I have found it earlier and am cleaning up my fix for commit right now. It should not show up if you use mvn hpi:run.

          Show
          jussi_malinen Jussi Malinen added a comment - And that bug about stapler you run into, I have found it earlier and am cleaning up my fix for commit right now. It should not show up if you use mvn hpi:run.
          Hide
          jussi_malinen Jussi Malinen added a comment -

          done already

          Show
          jussi_malinen Jussi Malinen added a comment - done already
          Hide
          laurentbristiel laurent bristiel added a comment -

          Jussi Malinen could you tell us in what version of the plugin this was done? And how this option can be set?

          Show
          laurentbristiel laurent bristiel added a comment - Jussi Malinen could you tell us in what version of the plugin this was done? And how this option can be set?
          Hide
          jussi_malinen Jussi Malinen added a comment -

          Oh damn, sorry. This was done for the graphs, not for list view. My bad.

          Show
          jussi_malinen Jussi Malinen added a comment - Oh damn, sorry. This was done for the graphs, not for list view. My bad.

            People

            • Assignee:
              jpiironen jpiironen
              Reporter:
              laurentbristiel laurent bristiel
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: