java.lang.ArithmeticException: / by zero

Jenkins JIRA | Daniel Wright | 4 years ago
  1. 0

    We use pytest as a test framework to generate a junitxml report that can be read by Jenkin's xunit plugin. Due to a configuration error, pytest exited before running any tests and generated an empty test report. In the build overview XUnit correctly reports that no tests were ran. In the Post Build Actions XUnit.XUnitPublisher also correctly warns that the test report is empty, but then continues to check the 'Skipped Tests' and 'Failed Tests' threshold; this aborts due to an exception: / by zero. Using xunit v1.52. {code} Archiving artifacts [xUnit] [INFO] - Starting to record. [xUnit] [INFO] - Processing JUnit [xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'TestReportUHF_ziServer2.xml' relative to 'C:\Users\ci\jenkins\workspace\97_Regression_Test_UHF_ziServer2' for the testing framework 'JUnit'. [xUnit] [WARNING] - All test reports are empty. [xUnit] [INFO] - Check 'Failed Tests' threshold. [xUnit] [INFO] - Check 'Skipped Tests' threshold. ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception java.lang.ArithmeticException: / by zero at org.jenkinsci.plugins.xunit.threshold.SkippedThreshold.getResultThresholdPercent(SkippedThreshold.java:42) at org.jenkinsci.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:353) at org.jenkinsci.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:339) at org.jenkinsci.plugins.xunit.XUnitPublisher.getBuildStatus(XUnitPublisher.java:322) at org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:125) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:93) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732) at hudson.model.Run.execute(Run.java:1568) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) {code} Feel free to contact me if you need any more information.

    Jenkins JIRA | 4 years ago | Daniel Wright
    java.lang.ArithmeticException: / by zero
  2. 0

    We use pytest as a test framework to generate a junitxml report that can be read by Jenkin's xunit plugin. Due to a configuration error, pytest exited before running any tests and generated an empty test report. In the build overview XUnit correctly reports that no tests were ran. In the Post Build Actions XUnit.XUnitPublisher also correctly warns that the test report is empty, but then continues to check the 'Skipped Tests' and 'Failed Tests' threshold; this aborts due to an exception: / by zero. Using xunit v1.52. {code} Archiving artifacts [xUnit] [INFO] - Starting to record. [xUnit] [INFO] - Processing JUnit [xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'TestReportUHF_ziServer2.xml' relative to 'C:\Users\ci\jenkins\workspace\97_Regression_Test_UHF_ziServer2' for the testing framework 'JUnit'. [xUnit] [WARNING] - All test reports are empty. [xUnit] [INFO] - Check 'Failed Tests' threshold. [xUnit] [INFO] - Check 'Skipped Tests' threshold. ERROR: Publisher org.jenkinsci.plugins.xunit.XUnitPublisher aborted due to exception java.lang.ArithmeticException: / by zero at org.jenkinsci.plugins.xunit.threshold.SkippedThreshold.getResultThresholdPercent(SkippedThreshold.java:42) at org.jenkinsci.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:353) at org.jenkinsci.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:339) at org.jenkinsci.plugins.xunit.XUnitPublisher.getBuildStatus(XUnitPublisher.java:322) at org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:125) at org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:93) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785) at hudson.model.Build$BuildExecution.post2(Build.java:183) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732) at hudson.model.Run.execute(Run.java:1568) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:236) {code} Feel free to contact me if you need any more information.

    Jenkins JIRA | 4 years ago | Daniel Wright
    java.lang.ArithmeticException: / by zero
  3. 0

    Report

    GitHub | 1 year ago | jsql-robot
    java.lang.ArithmeticException: / by zero
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [1.10.2] Crash on loading world

    GitHub | 3 months ago | Messorix
    java.lang.ArithmeticException: / by zero
  6. 0

    Shape problem

    Oracle Community | 1 decade ago | 843805
    java.lang.ArithmeticException: / by zero

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ArithmeticException

      / by zero

      at org.jenkinsci.plugins.xunit.threshold.SkippedThreshold.getResultThresholdPercent()
    2. org.jenkinsci.plugins
      XUnitPublisher.perform
      1. org.jenkinsci.plugins.xunit.threshold.SkippedThreshold.getResultThresholdPercent(SkippedThreshold.java:42)
      2. org.jenkinsci.plugins.xunit.XUnitPublisher.processResultThreshold(XUnitPublisher.java:353)
      3. org.jenkinsci.plugins.xunit.XUnitPublisher.getResultWithThreshold(XUnitPublisher.java:339)
      4. org.jenkinsci.plugins.xunit.XUnitPublisher.getBuildStatus(XUnitPublisher.java:322)
      5. org.jenkinsci.plugins.xunit.XUnitPublisher.performXUnit(XUnitPublisher.java:125)
      6. org.jenkinsci.plugins.xunit.XUnitPublisher.perform(XUnitPublisher.java:93)
      6 frames
    3. Hudson
      Executor.run
      1. hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:810)
      3. hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:785)
      4. hudson.model.Build$BuildExecution.post2(Build.java:183)
      5. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:732)
      6. hudson.model.Run.execute(Run.java:1568)
      7. hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
      8. hudson.model.ResourceController.execute(ResourceController.java:88)
      9. hudson.model.Executor.run(Executor.java:236)
      9 frames