Reputation:
Some of the steps that i have done are described below:
Setup Jenkins on remote linux server.
Used own mac as a slave to run Xcode build
I have setup a Web hook on bitbucket that runs a build on Jenkins server.
Build gets triggered when i push code to repo.
I have shared scheme in the Xcode project.
But whenever i push failing tests on my repo the build passes..Shouldn't CI server fail the build..I dont know where am i missing..I have posted some screenshots for clear reference
EDIT: with more research i came to know that build fails but you need to see the test results/reports that fails.How can i see the reports? I cant see any xml files under reports section
Upvotes: 0
Views: 1311
Reputation: 3195
In your execute shell phase, you might need to add set -exo pipefail
at the top.
Upvotes: 0
Reputation: 3
The jenkins runs in a step by step fashion.Build succeeds means your build step is correct and there's no issue with that but it does not mean your test cases have also passed.You need to check that with Junit if your test cases pass or not.
Upvotes: 0
Reputation: 106
Even I have faced the same issue where build was successful even though test cases were getting failed. You can use Log Parser plugin to parse the console output and mark your build as either stable or failed based on the output.
Upvotes: 0