{"action":"created","issue":{"url":"https://api.github.com/repos/anshooarora/extentreports/issues/162","labels_url":"https://api.github.com/repos/anshooarora/extentreports/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/anshooarora/extentreports/issues/162/comments","events_url":"https://api.github.com/repos/anshooarora/extentreports/issues/162/events","html_url":"https://github.com/anshooarora/extentreports/issues/162","id":117200334,"number":162,"title":"Not able to generate reports when tests running parallel with TestNG","user":{"login":"saikrishna321","id":4045041,"avatar_url":"https://avatars.githubusercontent.com/u/4045041?v=3","gravatar_id":"","url":"https://api.github.com/users/saikrishna321","html_url":"https://github.com/saikrishna321","followers_url":"https://api.github.com/users/saikrishna321/followers","following_url":"https://api.github.com/users/saikrishna321/following{/other_user}","gists_url":"https://api.github.com/users/saikrishna321/gists{/gist_id}","starred_url":"https://api.github.com/users/saikrishna321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saikrishna321/subscriptions","organizations_url":"https://api.github.com/users/saikrishna321/orgs","repos_url":"https://api.github.com/users/saikrishna321/repos","events_url":"https://api.github.com/users/saikrishna321/events{/privacy}","received_events_url":"https://api.github.com/users/saikrishna321/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-11-16T19:32:18Z","updated_at":"2015-12-01T07:32:53Z","closed_at":"2015-11-30T19:19:40Z","body":"@anshooarora @virenv \r\n\r\nNeed some help, i'm triggering my tests in parallel using the ExecutorService and i'm not able to get any results in the ExtentReports\r\n\r\n@Test\r\n\tpublic void testReports() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tList<Class> testCases = new ArrayList<Class>();\r\n\t\ttestCases.add(Sample2Test.class);\r\n\t\ttestCases.add(SampleTest.class);\r\n\t\t\r\n\t\tExecutorService executorService = Executors.newFixedThreadPool(2);\r\n\t\tfor (final Class testFile : testCases) {\r\n\t\t\texecutorService.submit(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tSystem.out.println(\"Running test file: \" + testFile.getName());\r\n\t\t\t\t\ttestRunnerTestNg(testFile);\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\texecutorService.shutdown();\r\n\t\ttry {\r\n\t\t\texecutorService.awaitTermination(Long.MAX_VALUE, TimeUnit.NANOSECONDS);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// baseTest.convertXmlToJSon();\r\n\t\tSystem.out.println(\"ending\");\r\n\t}\r\n\tpublic static void testRunnerTestNg(Class arg) {\r\n\t\tTestNG test = new TestNG();\r\n\t\ttest.setTestClasses(new Class[] { arg });\r\n\t\ttest.run();\r\n\t}\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/anshooarora/extentreports/issues/comments/160884131","html_url":"https://github.com/anshooarora/extentreports/issues/162#issuecomment-160884131","issue_url":"https://api.github.com/repos/anshooarora/extentreports/issues/162","id":160884131,"user":{"login":"saikrishna321","id":4045041,"avatar_url":"https://avatars.githubusercontent.com/u/4045041?v=3","gravatar_id":"","url":"https://api.github.com/users/saikrishna321","html_url":"https://github.com/saikrishna321","followers_url":"https://api.github.com/users/saikrishna321/followers","following_url":"https://api.github.com/users/saikrishna321/following{/other_user}","gists_url":"https://api.github.com/users/saikrishna321/gists{/gist_id}","starred_url":"https://api.github.com/users/saikrishna321/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saikrishna321/subscriptions","organizations_url":"https://api.github.com/users/saikrishna321/orgs","repos_url":"https://api.github.com/users/saikrishna321/repos","events_url":"https://api.github.com/users/saikrishna321/events{/privacy}","received_events_url":"https://api.github.com/users/saikrishna321/received_events","type":"User","site_admin":false},"created_at":"2015-12-01T07:32:52Z","updated_at":"2015-12-01T07:32:52Z","body":"@anshooarora thanks a lot .. an other concern \r\n\r\n\r\nFrom the above zip which u shared, i also want to assign category.\r\n\r\nFor Example:: I need to know the tests that ran on thread 1 , thread 2 and so on ... \r\n\r\n\r\n\t@BeforeMethod\r\n\tpublic void beforeMethod(Method caller) throws Exception {\r\n\t    testopenBroswer();\r\n\t    System.out.println(device_udid);\r\n\t\tExtentTestManager.startTest(caller.getName(), \"This is a simple test.\").assignCategory(\"Mobile_Test\");\r\n\t}\r\n\r\nInstead of Mobile_Test i need to assign the device_udid which is different .. l= can you help me on this ?"}}