{"action":"created","issue":{"url":"https://api.github.com/repos/unclebob/fitnesse/issues/983","repository_url":"https://api.github.com/repos/unclebob/fitnesse","labels_url":"https://api.github.com/repos/unclebob/fitnesse/issues/983/labels{/name}","comments_url":"https://api.github.com/repos/unclebob/fitnesse/issues/983/comments","events_url":"https://api.github.com/repos/unclebob/fitnesse/issues/983/events","html_url":"https://github.com/unclebob/fitnesse/issues/983","id":185437180,"number":983,"title":"Customize Fitnesse-Result report with tags","user":{"login":"c3d28","id":5874401,"avatar_url":"https://avatars.githubusercontent.com/u/5874401?v=3","gravatar_id":"","url":"https://api.github.com/users/c3d28","html_url":"https://github.com/c3d28","followers_url":"https://api.github.com/users/c3d28/followers","following_url":"https://api.github.com/users/c3d28/following{/other_user}","gists_url":"https://api.github.com/users/c3d28/gists{/gist_id}","starred_url":"https://api.github.com/users/c3d28/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/c3d28/subscriptions","organizations_url":"https://api.github.com/users/c3d28/orgs","repos_url":"https://api.github.com/users/c3d28/repos","events_url":"https://api.github.com/users/c3d28/events{/privacy}","received_events_url":"https://api.github.com/users/c3d28/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-10-26T15:59:55Z","updated_at":"2016-11-29T07:39:03Z","closed_at":null,"body":"Hi all, \n\nI would like to customize the fitnesse report by Junit in order to add the tags in the table.\n\n**Context**: \nI use Junit to run my fitnesse tests with a test classe TestClasseRun.java \n\n`@RunWith(FitNesseRunner.class)\n@FitNesseRunner.Suite(systemProperty = \"suite\")\n@FitNesseRunner.FitnesseDir(\"****_\")\n@FitNesseRunner.OutputDir(\"**_****\")\npublic class TestClassRun{\n\n}`\n\nthis instruction is use : mvn clean test -Dsuite=**\\* -Dtest=TestClasseRun\n\n**Issue**: \nI overide the method's JavaFormatter.java : testStarted ans testComplete : \n\nList<String> tags = getTags(((WikiTestPage)test).getSourcePage());\n      tagsByTest.put(test.getFullPath(), tags);\n\n```\n @Override\n  public void testStarted(TestPage test) {\n    try {\n      resultsRepository.open(test.getFullPath());\n      List<String> tags = getTags(((WikiTestPage)test).getSourcePage());\n      tagsByTest.put(test.getFullPath(), tags);\n    } catch (IOException e) {\n      throw new FormatterException(\"Could not open new report file for \" + test.getFullPath(), e);\n    }\n  }\n```\n\nthe method getTags get the tags from the wikiPage :\n String tags = page.getData().getAttribute(\"Suites\");\n\nThen, the method toString becomes : \n\n```\n @Override\n    public String toString() {\n      StringBuilder sb = new StringBuilder();\n      sb.append(SUMMARY_HEADER);\n      for (String s : visitedTestPages) {\n        sb.append(summaryRow(s, testSummaries.get(s),tagsByTest.get(s)));\n      }\n      sb.append(SUMMARY_FOOTER);\n      return sb.toString();\n    }\n\n```\n# \n\nBut, i get a nullpoiterException. Maybe i don't find the method to initialize the data. \n\nCan you help me ? Or give me an other idea to add the tags in the fitnesse report.\n\nThanks a lot,\n\nCédric \n"},"comment":{"url":"https://api.github.com/repos/unclebob/fitnesse/issues/comments/263498250","html_url":"https://github.com/unclebob/fitnesse/issues/983#issuecomment-263498250","issue_url":"https://api.github.com/repos/unclebob/fitnesse/issues/983","id":263498250,"user":{"login":"amolenaar","id":96249,"avatar_url":"https://avatars.githubusercontent.com/u/96249?v=3","gravatar_id":"","url":"https://api.github.com/users/amolenaar","html_url":"https://github.com/amolenaar","followers_url":"https://api.github.com/users/amolenaar/followers","following_url":"https://api.github.com/users/amolenaar/following{/other_user}","gists_url":"https://api.github.com/users/amolenaar/gists{/gist_id}","starred_url":"https://api.github.com/users/amolenaar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amolenaar/subscriptions","organizations_url":"https://api.github.com/users/amolenaar/orgs","repos_url":"https://api.github.com/users/amolenaar/repos","events_url":"https://api.github.com/users/amolenaar/events{/privacy}","received_events_url":"https://api.github.com/users/amolenaar/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T07:39:03Z","updated_at":"2016-11-29T07:39:03Z","body":"In the line `String tags = page.getData().getAttribute(\"Suites\");`, tags could be null. What does your NPE look like?\r\n\r\nBTW. This question was better asked on the mailing list."}}
{"actor":{"display_login":"amolenaar"}}