Java Code Examples for org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator#create()
The following examples show how to use
org.wso2.carbon.automation.engine.frameworkutils.ReportGenerator#create() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CarbonServerManager.java From product-ei with Apache License 2.0 | 6 votes |
private void generateCoverageReport(File classesDir) throws IOException, AutomationFrameworkException { CodeCoverageUtils.executeMerge(FrameworkPathUtil.getJacocoCoverageHome(), FrameworkPathUtil.getCoverageMergeFilePath()); ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), classesDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), null); reportGenerator.create(); log.info("Jacoco coverage dump file path : " + FrameworkPathUtil.getCoverageDumpFilePath()); log.info("Jacoco class file path : " + classesDir); log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() + File.separator + "index.html"); }
Example 2
Source File: TestCoverageGenerator.java From micro-integrator with Apache License 2.0 | 5 votes |
public static void main(String[] args) throws AutomationFrameworkException, IOException { if (carbonZip == null) { carbonZip = FrameworkPathUtil.getCarbonZipLocation(); log.info("Using carbon zip file at " + carbonZip); } if (carbonZip == null) { throw new IllegalArgumentException( "carbon zip file cannot find in the given location " + FrameworkPathUtil.getCarbonZipLocation()); } String carbonHome = ArchiveExtractorUtil.setUpCarbonHome(carbonZip); File parentDirectory = new File(System.getProperty("basedir")).getParentFile(); CodeCoverageUtils.executeMerge(parentDirectory.getAbsolutePath(), FrameworkPathUtil.getCoverageMergeFilePath()); File carbonPluginDir = new File( carbonHome + File.separator + "wso2" + File.separator + "components" + File.separator + "plugins" + File.separator); ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), carbonPluginDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), null); reportGenerator.create(); File carbonHomeDir = new File(carbonHome); if (carbonHomeDir.exists()) { FileUtils.deleteQuietly(new File(carbonHome)); //delete extracted dir } log.info("Jacoco coverage merged file : " + FrameworkPathUtil.getCoverageMergeFilePath()); log.info("Jacoco class file path : " + carbonPluginDir.getAbsolutePath()); log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() + File.separator + "index.html"); }
Example 3
Source File: CarbonServerManager.java From micro-integrator with Apache License 2.0 | 5 votes |
private void generateCoverageReport(File classesDir) throws IOException, AutomationFrameworkException { CodeCoverageUtils .executeMerge(FrameworkPathUtil.getJacocoCoverageHome(), FrameworkPathUtil.getCoverageMergeFilePath()); ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), classesDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), null); reportGenerator.create(); log.info("Jacoco coverage dump file path : " + FrameworkPathUtil.getCoverageDumpFilePath()); log.info("Jacoco class file path : " + classesDir); log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() + File.separator + "index.html"); }
Example 4
Source File: TestCoverageGenerator.java From product-ei with Apache License 2.0 | 5 votes |
public static void main(String[] args) throws AutomationFrameworkException, IOException { if (carbonZip == null) { carbonZip = FrameworkPathUtil.getCarbonZipLocation(); log.info("Using carbon zip file at " + carbonZip); } if (carbonZip == null) { throw new IllegalArgumentException("carbon zip file cannot find in the given location " + FrameworkPathUtil.getCarbonZipLocation()); } String carbonHome = ArchiveExtractorUtil.setUpCarbonHome(carbonZip); File parentDirectory = new File(System.getProperty("basedir")).getParentFile(); CodeCoverageUtils.executeMerge(parentDirectory.getAbsolutePath(), FrameworkPathUtil.getCoverageMergeFilePath()); File carbonPluginDir = new File(carbonHome + File.separator + "wso2" + File.separator + "components" + File.separator + "plugins" + File.separator); ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), carbonPluginDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), null); reportGenerator.create(); File carbonHomeDir = new File(carbonHome); if (carbonHomeDir.exists()) { FileUtils.deleteQuietly(new File(carbonHome)); //delete extracted dir } log.info("Jacoco coverage merged file : " + FrameworkPathUtil.getCoverageMergeFilePath()); log.info("Jacoco class file path : " + carbonPluginDir.getAbsolutePath()); log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() + File.separator + "index.html"); }
Example 5
Source File: CarbonServerManagerExtension.java From product-iots with Apache License 2.0 | 5 votes |
private void generateCoverageReport(File classesDir) throws IOException, AutomationFrameworkException { checkJacocoDataFileSizes(FrameworkPathUtil.getJacocoCoverageHome()); CodeCoverageUtils.executeMerge(FrameworkPathUtil.getJacocoCoverageHome(), FrameworkPathUtil.getCoverageMergeFilePath()); ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), classesDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), (File)null); reportGenerator.create(); log.info("Jacoco coverage dump file path : " + FrameworkPathUtil.getCoverageDumpFilePath()); log.info("Jacoco class file path : " + classesDir); log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() + File.separator + "index.html"); }
Example 6
Source File: StratosTestServerManager.java From attic-stratos with Apache License 2.0 | 5 votes |
private void generateCoverageReport(File classesDir) throws IOException, AutomationFrameworkException { CodeCoverageUtils .executeMerge(FrameworkPathUtil.getJacocoCoverageHome(), FrameworkPathUtil.getCoverageMergeFilePath()); ReportGenerator reportGenerator = new ReportGenerator(new File(FrameworkPathUtil.getCoverageMergeFilePath()), classesDir, new File(CodeCoverageUtils.getJacocoReportDirectory()), (File) null); reportGenerator.create(); log.info("Jacoco coverage dump file path : " + FrameworkPathUtil.getCoverageDumpFilePath()); log.info("Jacoco class file path : " + classesDir); log.info("Jacoco coverage HTML report path : " + CodeCoverageUtils.getJacocoReportDirectory() + File.separator + "index.html"); }