{"action":"created","issue":{"url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter/issues/40","repository_url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter","labels_url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter/issues/40/comments","events_url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter/issues/40/events","html_url":"https://github.com/juhovh/mocha-jenkins-reporter/issues/40","id":143322826,"number":40,"title":"Skipped test causes build to fail","user":{"login":"edhgoose","id":1108173,"avatar_url":"https://avatars.githubusercontent.com/u/1108173?v=3","gravatar_id":"","url":"https://api.github.com/users/edhgoose","html_url":"https://github.com/edhgoose","followers_url":"https://api.github.com/users/edhgoose/followers","following_url":"https://api.github.com/users/edhgoose/following{/other_user}","gists_url":"https://api.github.com/users/edhgoose/gists{/gist_id}","starred_url":"https://api.github.com/users/edhgoose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/edhgoose/subscriptions","organizations_url":"https://api.github.com/users/edhgoose/orgs","repos_url":"https://api.github.com/users/edhgoose/repos","events_url":"https://api.github.com/users/edhgoose/events{/privacy}","received_events_url":"https://api.github.com/users/edhgoose/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-03-24T18:22:03Z","updated_at":"2016-09-06T07:21:15Z","closed_at":"2016-09-06T07:21:15Z","body":"Hi,\r\n\r\nI'm seeing an issue where a skipped test caused a build to fail.\r\n\r\nIs that expected behaviour or do I have something configured wrong?\r\n\r\nHere's an example test:\r\n\r\n```js\r\ndescribe('Skip Tests', function () {\r\n        it.skip('Should not break jenkins if skipped',  function () {\r\n\r\n        });\r\n});\r\n```\r\n\r\nAnd here's what Jenkins spits out when we run it using this reporter:\r\n\r\n```\r\nnpm.test:\r\n     [echo] \r\n     [echo]             Executing NPM update and npm tests\r\n     [echo]         \r\n     [exec] npm WARN optional Skipping failed optional dependency /chokidar/fsevents:\r\n     [exec] npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.9\r\n     [exec] npm WARN js@1.0.0 No repository field.\r\n     [exec] \r\n     [exec] > js@1.0.0 test /var/lib/jenkins/jobs/Test PR/workspace\r\n     [exec] > npm run test-tag-library\r\n     [exec] \r\n     [exec] \r\n     [exec] > js@1.0.0 test-tag-library /var/lib/jenkins/jobs/Test PR/workspace\r\n     [exec] > mocha  --require src/Nora/API/APIBundle/Resources/public/js/test/setup.js 'src/Nora/API/APIBundle/Resources/public/js/test/*.js' --reporter mocha-jenkins-reporter\r\n     [exec] \r\n     [exec] \r\n     [exec]   \r\n     [exec] \r\n     [exec]   Suite duration: 0.004 s, Tests: 0\r\n     [exec] \r\n     [exec]   The popup factory returns a popup that has the core options, regardless of type\r\n     [exec]       - Should not break jenkins if skipped\r\n     [exec]       - Should not break jenkins if skipped\r\n     [exec]       - Should not break jenkins if skipped\r\n     [exec] \r\n     [exec]   Suite duration: 0.001 s, Tests: 3\r\n     [exec] \r\n     [exec]   0 passing (7ms)\r\n     [exec]   3 pending\r\n     [exec] \r\n\r\nBUILD SUCCESSFUL\r\nTotal time: 16 seconds\r\n[xUnit] [INFO] - Starting to record.\r\n[xUnit] [INFO] - Processing PHPUnit-3.x (default)\r\n[xUnit] [INFO] - [PHPUnit-3.x (default)] - 1 test report file(s) were found with the pattern 'build/junit/*-junit.xml' relative to '/var/lib/jenkins/jobs/Test PR/workspace' for the testing framework 'PHPUnit-3.x (default)'.\r\n[xUnit] [INFO] - Processing JUnit\r\n[xUnit] [INFO] - [JUnit] - 1 test report file(s) were found with the pattern 'build/npm/*.xml' relative to '/var/lib/jenkins/jobs/Test PR/workspace' for the testing framework 'JUnit'.\r\n[xUnit] [INFO] - Check 'Failed Tests' threshold.\r\n[xUnit] [INFO] - Check 'Skipped Tests' threshold.\r\n[xUnit] [INFO] - The total number of tests for this category exceeds the specified 'failure' threshold value.\r\n[xUnit] [INFO] - Setting the build status to FAILURE\r\n[xUnit] [INFO] - Stopping recording.\r\n\r\n```\r\n\r\nThe output above also has some PHPUnit tests, but I don't think they're conflicting.\r\n\r\nAnd this is how I've got xunit configured:\r\n\r\n![test_pr_config__jenkins_](https://cloud.githubusercontent.com/assets/1108173/14026917/16825730-f1ed-11e5-89b8-7ffb81fe5497.png)\r\n\r\nAnd I've also tried a Junit configuration:\r\n\r\n![test_pr_config__jenkins_](https://cloud.githubusercontent.com/assets/1108173/14026901/fac43e5a-f1ec-11e5-8ad6-9acbac2c0273.png)\r\n\r\nAnd finally, here's an example output:\r\n\r\n```xml\r\n<testsuites name=\"Mocha Tests\">\r\n<testsuite name=\"A test suite\" tests=\"3\" failures=\"0\" skipped=\"3\" timestamp=\"Thu, 24 Mar 2016 18:01:57 GMT\" time=\"0.001\">\r\n<testcase classname=\"A test case\" name=\"Should not break jenkins if skipped\">\r\n<skipped/>\r\n</testcase>\r\n</testcase>\r\n</testsuite>\r\n</testsuites>\r\n```\r\n\r\nAm I doing something wrong or is something broken?"},"comment":{"url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter/issues/comments/244869583","html_url":"https://github.com/juhovh/mocha-jenkins-reporter/issues/40#issuecomment-244869583","issue_url":"https://api.github.com/repos/juhovh/mocha-jenkins-reporter/issues/40","id":244869583,"user":{"login":"jvah","id":1647766,"avatar_url":"https://avatars.githubusercontent.com/u/1647766?v=3","gravatar_id":"","url":"https://api.github.com/users/jvah","html_url":"https://github.com/jvah","followers_url":"https://api.github.com/users/jvah/followers","following_url":"https://api.github.com/users/jvah/following{/other_user}","gists_url":"https://api.github.com/users/jvah/gists{/gist_id}","starred_url":"https://api.github.com/users/jvah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvah/subscriptions","organizations_url":"https://api.github.com/users/jvah/orgs","repos_url":"https://api.github.com/users/jvah/repos","events_url":"https://api.github.com/users/jvah/events{/privacy}","received_events_url":"https://api.github.com/users/jvah/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T07:21:15Z","updated_at":"2016-09-06T07:21:15Z","body":"I have skipped tests in my configuration and Jenkins is showing all green for me, I have no idea of what is going on here, but I cannot reproduce the problem. But I'm also not using xUnit plugin, so I guess this is somehow related to how xUnit works."}}
{"actor":{"display_login":"jvah"}}