forked from scoverage/gradle-scoverage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAggregationAcceptanceTest.groovy
42 lines (30 loc) · 1.46 KB
/
AggregationAcceptanceTest.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package org.scoverage
import org.junit.Test
class AggregationAcceptanceTest extends AcceptanceTestUtils {
private static File aggregateReportDir(File baseDir) {
return new File(baseDir, 'build/scoverage-aggregate')
}
private testWater(boolean useAnt) throws Exception {
File projectDir = new File('src/test/water')
def build = setupBuild(projectDir, useAnt)
build.forTasks('clean', 'reportScoverage', 'aggregateScoverage').run()
def indexHtml = new File(aggregateReportDir(projectDir), 'index.html')
checkFile('an aggregated index HTML file', indexHtml, true)
def cobertura = new File(aggregateReportDir(projectDir), 'cobertura.xml')
checkFile('an aggregated cobertura XML file', cobertura, true)
def scoverageXml = new File(aggregateReportDir(projectDir), 'scoverage.xml')
checkFile('an aggregated scoverage XML file', scoverageXml, true)
def krillsHtml = new File(aggregateReportDir(projectDir), 'krills.html')
checkFile('a HTML file for \'krills\' sub-project', krillsHtml, true)
def whalesHtml = new File(aggregateReportDir(projectDir), 'whales.html')
checkFile('a HTML file for \'whales\' sub-project', whalesHtml, true)
}
@Test
public void testMultiProjectAggregationWithAnt() throws Exception {
testWater(true)
}
@Test
public void testMultiProjectAggregationWithZinc() throws Exception {
testWater(false)
}
}