public class ReportGenerator extends Object
testNG
result XML
file.Constructor and Description |
---|
ReportGenerator(String dataDir,
String templateDir,
String outputDir)
Creates an instance of
ReportGenerator object. |
Modifier and Type | Method and Description |
---|---|
void |
createHTMLReports()
Creates HTML report.
|
static String |
getFileContent(String fileName)
Returns content of a file.
|
static void |
main(String[] args) |
static void |
writeToFile(String content,
String fileName)
Writes content to a file.
|
public ReportGenerator(String dataDir, String templateDir, String outputDir)
ReportGenerator
object.dataDir
- Directory where code>testNG result XML resides.templateDir
- Directory where HTML templates reside.outputDir
- Directory to place the HTML reports.public void createHTMLReports() throws ParserConfigurationException, SAXException, IOException
ParserConfigurationException
- if the testNG
report XML is not well formed.SAXException
- if the testNG
report XML is not
well formed.IOException
- if the testNG
report XML is not
accessible.public static void writeToFile(String content, String fileName) throws IOException
content
- Content to be written.fileName
- Name of file of which content is written to.IOException
- if content cannot be written.public static String getFileContent(String fileName) throws IOException
fileName
- Name of the file.IOException
- if connect cannot be read.public static void main(String[] args)
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.