{"action":"closed","issue":{"url":"https://api.github.com/repos/cbeust/testng/issues/1266","repository_url":"https://api.github.com/repos/cbeust/testng","labels_url":"https://api.github.com/repos/cbeust/testng/issues/1266/labels{/name}","comments_url":"https://api.github.com/repos/cbeust/testng/issues/1266/comments","events_url":"https://api.github.com/repos/cbeust/testng/issues/1266/events","html_url":"https://github.com/cbeust/testng/issues/1266","id":194315525,"number":1266,"title":"[Bug] JUnit Reporter produces a wrong number of total test methods","user":{"login":"gdemecki","id":617283,"avatar_url":"https://avatars.githubusercontent.com/u/617283?v=3","gravatar_id":"","url":"https://api.github.com/users/gdemecki","html_url":"https://github.com/gdemecki","followers_url":"https://api.github.com/users/gdemecki/followers","following_url":"https://api.github.com/users/gdemecki/following{/other_user}","gists_url":"https://api.github.com/users/gdemecki/gists{/gist_id}","starred_url":"https://api.github.com/users/gdemecki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdemecki/subscriptions","organizations_url":"https://api.github.com/users/gdemecki/orgs","repos_url":"https://api.github.com/users/gdemecki/repos","events_url":"https://api.github.com/users/gdemecki/events{/privacy}","received_events_url":"https://api.github.com/users/gdemecki/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-08T11:45:48Z","updated_at":"2016-12-08T14:54:36Z","closed_at":"2016-12-08T14:54:36Z","body":"### TestNG Version\r\n6.10\r\n\r\n### Expected behavior\r\n\r\nAttribute `tests` inside `<testsuite>` element should also count ignored methods in the current class.\r\n\r\n<testsuite name=\"com.netadmin.service.UserSearchServiceTest\" tests=\"4\" time=\"0.174\" ignored=\"1\" failures=\"1\" skipped=\"0\" errors=\"1\"  timestamp=\"...\" hostname=\"...\" >\r\n\r\n### Actual behavior\r\n\r\nNow, in JUnit xml report file, attribute `tests` doesn't reflect the true amount of `<testcase >` elements in the file. Because I think number of disabled tests is not included.\r\n\r\n### Is the issue reproducible on runner?\r\n\r\n- [ x] Maven\r\n\r\n### Test case sample\r\n\r\n```java\r\n @Test\r\n public void should_pass() {\r\n     assertEquals(\"abc\", \"abc\");\r\n }\r\n\r\n @Test(enabled = false)\r\n public void should_be_ignored() {\r\n     assertEquals(\"abcd\", \"abc\");\r\n }\r\n```\r\n\r\nshould result in:\r\n```xml\r\n<testsuite name=\"SomeTest\" tests=\"2\"  skipped=\"1\" errors=\"0\" ...\r\n```\r\nbut now is:\r\n```xml\r\n<testsuite name=\"SomeTest\" tests=\"1\" ignored=\"1\"  skipped=\"0\" errors=\"0\" ...\r\n```\r\n\r\nMoreover: there should NOT be any `ignored=` parameter. JUnit already has a parameter for this purpose and it is called `skipped`. So please remove the `ignored` attribute from the `<testsuite>` element and use a `skipped` attribute instead.\r\n\r\nRegards"}}
{"actor":{"display_login":"cbeust"}}