Jenkins builds not marked unstable/failed if PHPUnit failsJenkins CI fails to initialiseMonit fails Jenkins HTTP test when Jenkins is on subdirectoryjenkins fails to connect to git repositoryJenkins - how can I fetch information about last successfull builds for all jobs in pipeline?Multi-stage CI monitoring or how can I split the deployment steps into controllable chunksJenkins build fails every odd buildJenkins - Host key verification failedHow to delete old Jenkins builds on repository branchesHow to troubleshoot “Failed to fetch slave info from Jenkins”

What are these arcade games in Ghostbusters 1984?

Python program to convert a 24 hour format to 12 hour format

Mother abusing my finances

What is the recommended way to have two characters speak simultaneously?

Is CD audio quality good enough for the final delivery of music?

Is floating in space similar to falling under gravity?

Why does the 'metric Lagrangian' approach appear to fail in classical mechanics?

Plot twist where the antagonist wins

Why are C64 games inconsistent with which joystick port they use?

What is the difference between “/private/var/vm” and “/vm”?

How to respond to an upset student?

How can people dance around bonfires on Lag Lo'Omer - it's darchei emori?

What is the largest (size) solid object ever dropped from an airplane to impact the ground in freefall?

I unknowingly submitted plagiarised work

I think I may have violated academic integrity last year - what should I do?

Boss wants me to falsify a report. How should I document this unethical demand?

What are the benefits of cryosleep?

Why do they consider the Ori false gods?

What is the most important source of natural gas? coal, oil or other?

Command to Search for Filenames Exceeding 143 Characters?

Why is desire the root of suffering?

Should I disclose a colleague's illness (that I should not know about) when others badmouth him

Where is the logic in castrating fighters?

How do I align equations in three columns, justified right, center and left?



Jenkins builds not marked unstable/failed if PHPUnit fails


Jenkins CI fails to initialiseMonit fails Jenkins HTTP test when Jenkins is on subdirectoryjenkins fails to connect to git repositoryJenkins - how can I fetch information about last successfull builds for all jobs in pipeline?Multi-stage CI monitoring or how can I split the deployment steps into controllable chunksJenkins build fails every odd buildJenkins - Host key verification failedHow to delete old Jenkins builds on repository branchesHow to troubleshoot “Failed to fetch slave info from Jenkins”






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















So, the title pretty much gives it away. We're using Jenkins 2 with PHPUnit 6.5.12 and a couple of days before, everything worked fine. Now, every build we do and has failures (or worse, errors) in the PHPUnit section is not marked as unstable / failed at all. For tests, we're using PHPUnit + Selenium Standalone 3.4.0 with the newest geckodriver. (Yeah, there are newer versions of Selenium available, but they always kill the tests with exceptions and don't run at all - 3.4.0 is working nicely.)



Part of our pipeline that runs the unit tests can be seen below:



stage ('UnitTests') 
steps
sh 'cd module/App/test/ && chmod a+r+w+x runtests.sh && ./runtests.sh'


}
post
success
slackSend color: '#458B00', message: "Build success for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"
sh 'rm -rf \"$WORKSPACE/data/cache/*\"'
sh 'rm -rf $WORKSPACE/data/cache/*'
sh 'rsync --delete -r "$WORKSPACE"/* myhost:/path

failure
slackSend color: '#8C1717', message: "Build failed for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"

unstable
slackSend color: '#FF8C00', message: "Build unstable for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"




runtests.sh essentially starts the PHPUnit tests (and also the Selenium standalone server) and kills Selenium and every remaining Firefox session in the end.



Now from what I gathered, PHPUnit SHOULD have some exit codes, like 1 for failure, 0 for success and so on. So, did something happen here? From what I've seen, no new version came out which touched any of that.



I've also read that one could possibly have PHPUnit spit out a report which in turn could be picked up by jUnit and then use this to check wether everything worked or not, but as I said - it worked before, with exactly this configuration.



Hope that anyone has some ideas, because I sure do not.










share|improve this question




























    0















    So, the title pretty much gives it away. We're using Jenkins 2 with PHPUnit 6.5.12 and a couple of days before, everything worked fine. Now, every build we do and has failures (or worse, errors) in the PHPUnit section is not marked as unstable / failed at all. For tests, we're using PHPUnit + Selenium Standalone 3.4.0 with the newest geckodriver. (Yeah, there are newer versions of Selenium available, but they always kill the tests with exceptions and don't run at all - 3.4.0 is working nicely.)



    Part of our pipeline that runs the unit tests can be seen below:



    stage ('UnitTests') 
    steps
    sh 'cd module/App/test/ && chmod a+r+w+x runtests.sh && ./runtests.sh'


    }
    post
    success
    slackSend color: '#458B00', message: "Build success for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"
    sh 'rm -rf \"$WORKSPACE/data/cache/*\"'
    sh 'rm -rf $WORKSPACE/data/cache/*'
    sh 'rsync --delete -r "$WORKSPACE"/* myhost:/path

    failure
    slackSend color: '#8C1717', message: "Build failed for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"

    unstable
    slackSend color: '#FF8C00', message: "Build unstable for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"




    runtests.sh essentially starts the PHPUnit tests (and also the Selenium standalone server) and kills Selenium and every remaining Firefox session in the end.



    Now from what I gathered, PHPUnit SHOULD have some exit codes, like 1 for failure, 0 for success and so on. So, did something happen here? From what I've seen, no new version came out which touched any of that.



    I've also read that one could possibly have PHPUnit spit out a report which in turn could be picked up by jUnit and then use this to check wether everything worked or not, but as I said - it worked before, with exactly this configuration.



    Hope that anyone has some ideas, because I sure do not.










    share|improve this question
























      0












      0








      0








      So, the title pretty much gives it away. We're using Jenkins 2 with PHPUnit 6.5.12 and a couple of days before, everything worked fine. Now, every build we do and has failures (or worse, errors) in the PHPUnit section is not marked as unstable / failed at all. For tests, we're using PHPUnit + Selenium Standalone 3.4.0 with the newest geckodriver. (Yeah, there are newer versions of Selenium available, but they always kill the tests with exceptions and don't run at all - 3.4.0 is working nicely.)



      Part of our pipeline that runs the unit tests can be seen below:



      stage ('UnitTests') 
      steps
      sh 'cd module/App/test/ && chmod a+r+w+x runtests.sh && ./runtests.sh'


      }
      post
      success
      slackSend color: '#458B00', message: "Build success for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"
      sh 'rm -rf \"$WORKSPACE/data/cache/*\"'
      sh 'rm -rf $WORKSPACE/data/cache/*'
      sh 'rsync --delete -r "$WORKSPACE"/* myhost:/path

      failure
      slackSend color: '#8C1717', message: "Build failed for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"

      unstable
      slackSend color: '#FF8C00', message: "Build unstable for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"




      runtests.sh essentially starts the PHPUnit tests (and also the Selenium standalone server) and kills Selenium and every remaining Firefox session in the end.



      Now from what I gathered, PHPUnit SHOULD have some exit codes, like 1 for failure, 0 for success and so on. So, did something happen here? From what I've seen, no new version came out which touched any of that.



      I've also read that one could possibly have PHPUnit spit out a report which in turn could be picked up by jUnit and then use this to check wether everything worked or not, but as I said - it worked before, with exactly this configuration.



      Hope that anyone has some ideas, because I sure do not.










      share|improve this question














      So, the title pretty much gives it away. We're using Jenkins 2 with PHPUnit 6.5.12 and a couple of days before, everything worked fine. Now, every build we do and has failures (or worse, errors) in the PHPUnit section is not marked as unstable / failed at all. For tests, we're using PHPUnit + Selenium Standalone 3.4.0 with the newest geckodriver. (Yeah, there are newer versions of Selenium available, but they always kill the tests with exceptions and don't run at all - 3.4.0 is working nicely.)



      Part of our pipeline that runs the unit tests can be seen below:



      stage ('UnitTests') 
      steps
      sh 'cd module/App/test/ && chmod a+r+w+x runtests.sh && ./runtests.sh'


      }
      post
      success
      slackSend color: '#458B00', message: "Build success for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"
      sh 'rm -rf \"$WORKSPACE/data/cache/*\"'
      sh 'rm -rf $WORKSPACE/data/cache/*'
      sh 'rsync --delete -r "$WORKSPACE"/* myhost:/path

      failure
      slackSend color: '#8C1717', message: "Build failed for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"

      unstable
      slackSend color: '#FF8C00', message: "Build unstable for Pipeline $env.JOB_NAME [#$env.BUILD_NUMBER]"




      runtests.sh essentially starts the PHPUnit tests (and also the Selenium standalone server) and kills Selenium and every remaining Firefox session in the end.



      Now from what I gathered, PHPUnit SHOULD have some exit codes, like 1 for failure, 0 for success and so on. So, did something happen here? From what I've seen, no new version came out which touched any of that.



      I've also read that one could possibly have PHPUnit spit out a report which in turn could be picked up by jUnit and then use this to check wether everything worked or not, but as I said - it worked before, with exactly this configuration.



      Hope that anyone has some ideas, because I sure do not.







      jenkins failed selenium automated-testing






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked May 14 at 13:50









      Philip WeiselPhilip Weisel

      31




      31




















          1 Answer
          1






          active

          oldest

          votes


















          0














          You should check the exit code of both phpunit and your script. Jenkins when using the sh step, only takes into consideration the exit code of your whole script and not anything in it. Maybe previously it worked because of a failure to kill the workers? AFAIK the other functionality you talk about is delivered by JUnit plugin.






          share|improve this answer























          • And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

            – Philip Weisel
            May 15 at 8:32











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "2"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f967222%2fjenkins-builds-not-marked-unstable-failed-if-phpunit-fails%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You should check the exit code of both phpunit and your script. Jenkins when using the sh step, only takes into consideration the exit code of your whole script and not anything in it. Maybe previously it worked because of a failure to kill the workers? AFAIK the other functionality you talk about is delivered by JUnit plugin.






          share|improve this answer























          • And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

            – Philip Weisel
            May 15 at 8:32















          0














          You should check the exit code of both phpunit and your script. Jenkins when using the sh step, only takes into consideration the exit code of your whole script and not anything in it. Maybe previously it worked because of a failure to kill the workers? AFAIK the other functionality you talk about is delivered by JUnit plugin.






          share|improve this answer























          • And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

            – Philip Weisel
            May 15 at 8:32













          0












          0








          0







          You should check the exit code of both phpunit and your script. Jenkins when using the sh step, only takes into consideration the exit code of your whole script and not anything in it. Maybe previously it worked because of a failure to kill the workers? AFAIK the other functionality you talk about is delivered by JUnit plugin.






          share|improve this answer













          You should check the exit code of both phpunit and your script. Jenkins when using the sh step, only takes into consideration the exit code of your whole script and not anything in it. Maybe previously it worked because of a failure to kill the workers? AFAIK the other functionality you talk about is delivered by JUnit plugin.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 14 at 17:28









          GothrekGothrek

          46516




          46516












          • And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

            – Philip Weisel
            May 15 at 8:32

















          • And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

            – Philip Weisel
            May 15 at 8:32
















          And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

          – Philip Weisel
          May 15 at 8:32





          And right you are. Killing any processes after the phpunit tests of course return different exit codes... could've thought of that myself. Thanks!

          – Philip Weisel
          May 15 at 8:32

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Server Fault!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f967222%2fjenkins-builds-not-marked-unstable-failed-if-phpunit-fails%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to write a 12-bar blues melodyI-IV-V blues progressionHow to play the bridges in a standard blues progressionHow does Gdim7 fit in C# minor?question on a certain chord progressionMusicology of Melody12 bar blues, spread rhythm: alternative to 6th chord to avoid finger stretchChord progressions/ Root key/ MelodiesHow to put chords (POP-EDM) under a given lead vocal melody (starting from a good knowledge in music theory)Are there “rules” for improvising with the minor pentatonic scale over 12-bar shuffle?Confusion about blues scale and chords

          What if the end-user didn't have the required library?What is setup.py?What is a clean, pythonic way to have multiple constructors in Python?What does Ruby have that Python doesn't, and vice versa?What is the reason for having '//' in Python?How do I create a namespace package in Python?How to package shared objects that python modules depend on?setuptools vs. distutils: why is distutils still a thing?Navigation in Windows 10 vs code not going to virtualenv library when the same library is installed at user levelPython create package for local usePackaging a project that uses multiple python versionsWhy is permission denied on pip install except for when “--user” is included at end of command?

          Esgonzo ibérico Índice Descrición Distribución Hábitat Ameazas Notas Véxase tamén "Acerca dos nomes dos anfibios e réptiles galegos""Chalcides bedriagai"Chalcides bedriagai en Carrascal, L. M. Salvador, A. (Eds). Enciclopedia virtual de los vertebrados españoles. Museo Nacional de Ciencias Naturales, Madrid. España.Fotos