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;
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
add a comment |
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
add a comment |
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
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
jenkins failed selenium automated-testing
asked May 14 at 13:50
Philip WeiselPhilip Weisel
31
31
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
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
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
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
add a comment |
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.
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
add a comment |
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.
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.
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
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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