{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/809","labels_url":"https://api.github.com/repos/pytest-dev/pytest/issues/809/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest/issues/809/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest/issues/809/events","html_url":"https://github.com/pytest-dev/pytest/pull/809","id":92224740,"number":809,"title":"Add `file` and `lineno` attributes to junit-xml output.","user":{"login":"kevincox","id":494012,"avatar_url":"https://avatars.githubusercontent.com/u/494012?v=3","gravatar_id":"","url":"https://api.github.com/users/kevincox","html_url":"https://github.com/kevincox","followers_url":"https://api.github.com/users/kevincox/followers","following_url":"https://api.github.com/users/kevincox/following{/other_user}","gists_url":"https://api.github.com/users/kevincox/gists{/gist_id}","starred_url":"https://api.github.com/users/kevincox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevincox/subscriptions","organizations_url":"https://api.github.com/users/kevincox/orgs","repos_url":"https://api.github.com/users/kevincox/repos","events_url":"https://api.github.com/users/kevincox/events{/privacy}","received_events_url":"https://api.github.com/users/kevincox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-30T23:32:40Z","updated_at":"2015-07-02T18:24:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pytest-dev/pytest/pulls/809","html_url":"https://github.com/pytest-dev/pytest/pull/809","diff_url":"https://github.com/pytest-dev/pytest/pull/809.diff","patch_url":"https://github.com/pytest-dev/pytest/pull/809.patch"},"body":"This adds the `file` and `lineno` attributes to the junit-xml output\r\nwhich can be used by tooling to identify where tests come from. This can be\r\nused for many things such as IDEs jumping to failures and test\r\nrunners evenly balancing tests among multiple executors."},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest/issues/comments/118116053","html_url":"https://github.com/pytest-dev/pytest/pull/809#issuecomment-118116053","issue_url":"https://api.github.com/repos/pytest-dev/pytest/issues/809","id":118116053,"user":{"login":"nicoddemus","id":1085180,"avatar_url":"https://avatars.githubusercontent.com/u/1085180?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"created_at":"2015-07-02T18:24:18Z","updated_at":"2015-07-02T18:24:18Z","body":"@kevincox I did a quick test in a Jenkins instance using your branch, this was the file generated:\r\n\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"utf-8\"?><testsuite errors=\"0\" failures=\"0\" name=\"pytest\" skips=\"0\" tests=\"1\" time=\"0.010\"><testcase classname=\"test_foo\" file=\"test_foo.py\" lineno=\"2\" name=\"test_foo\" time=\"0.000999927520752\"/></testsuite>\r\n```\r\n\r\nBut the jobs unfortunately fails:\r\n\r\n```\r\n[xUnit] [ERROR] - The result file 'W:\\workspace\\job1\\foo-bar.xml' for the metric 'JUnit' is not valid. The result file has been skipped.\r\n```\r\n\r\nSo it seems that unfortunately Jenkins has a strict schema checking regarding this... :disappointed: "}}