• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*******************************************************************************
2 * Copyright (c) 2009, 2017 Mountainminds GmbH & Co. KG and Contributors
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
7 *
8 * Contributors:
9 *    Evgeny Mandrikov - initial API and implementation
10 *
11 *******************************************************************************/
12import java.io.*;
13import org.codehaus.plexus.util.*;
14
15String projectReportsPage = FileUtils.fileRead( new File( basedir, "target/site/project-reports.html" ) );
16if ( projectReportsPage.indexOf( "JaCoCo Coverage Report." ) < 0 ) {
17    throw new RuntimeException( "project-reports.html does not contain link to JaCoCo report" );
18}
19
20File htmlReportFile = new File( basedir, "target/site/jacoco/index.html" );
21if ( !htmlReportFile.isFile() ) {
22    throw new RuntimeException( "HTML report was not created" );
23}
24
25File xmlReportFile = new File( basedir, "target/site/jacoco/jacoco.xml" );
26if ( !xmlReportFile.isFile() ) {
27    throw new RuntimeException( "XML report was not created" );
28}
29
30File csvReportFile = new File( basedir, "target/site/jacoco/jacoco.csv" );
31if ( !csvReportFile.isFile() ) {
32    throw new RuntimeException( "CSV report was not created" );
33}
34