Guest User

Untitled

a guest
Oct 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. private void init() {
  2. ExtentHtmlReporter htmlReporter = new ExtentHtmlReporter(OUTPUT_FOLDER + FILE_NAME);
  3. String js = "$(document).ready(function() { $('.test.fatal, .test.fail').click(); })";
  4. htmlReporter.config().setDocumentTitle(Util.readPropFile("PROJECT_NAME")+" Automation Report");
  5. htmlReporter.config().setReportName(Util.readPropFile("PROJECT_NAME")+" Test Report");
  6.  
  7. htmlReporter.config().setTestViewChartLocation(ChartLocation.BOTTOM);
  8. htmlReporter.config().setTheme(Theme.DARK);
  9. htmlReporter.config().setCSS("body:not(.default) {overflow: scroll !important;}");
  10.  
  11. htmlReporter.config().setJS(js);
  12.  
  13. extent = new ExtentReports();
  14.  
  15. // extentXReporter = new ExtentXReporter("127.0.0.1",27017);
  16. extentXReporter = new ExtentXReporter(Util.readPropFile("HOST_NAME"),27017);
  17. extentXReporter.loadXMLConfig("extent-config.xml");
  18.  
  19. extentXReporter.setAnalysisStrategy(AnalysisStrategy.CLASS);
  20. extentXReporter.config().setProjectName(Util.readPropFile("PROJECT_NAME"));
  21. extentXReporter.config().setReportName(Util.readPropFile("BUILD"));
  22. extent.attachReporter(htmlReporter);
  23. extent.attachReporter(htmlReporter,extentXReporter);
  24.  
  25.  
  26. }
Add Comment
Please, Sign In to add comment