-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalyse.build
More file actions
84 lines (66 loc) · 2.59 KB
/
analyse.build
File metadata and controls
84 lines (66 loc) · 2.59 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<project name="Analyse" xmlns="http://nant.sf.net/release/0.91/nant.xsd">
<loadtasks assembly="C:\Program Files\NCover\Build Task Plugins\NCover.NAntTasks.dll"/>
<property name="test-runner-path" value="tools\nunit\nunit-console-x86.exe" overwrite="false"/>
<property name="source-root" value="src" overwrite="false"/>
<property name="NCover.exe" value="C:\Program Files\NCover\ncover.console.exe" />
<property name="testRunnerArgs" value=" " />
<target name="run-unit-tests">
<fileset id="test-dlls">
<include name="${source-root}/**/*.Test.dll" />
<include name="${source-root}/**/*.Tests.dll" />
<exclude name="${source-root}/**/*Integration*.dll" />
<exclude name="${source-root}/**/*.Selenium*.dll" />
</fileset>
<call target="run-tests"/>
</target>
<target name="run-integration-tests">
<fileset id="test-dlls">
<include name="${source-root}/**/*Integration.Test.dll" />
<include name="${source-root}/**/*Integration.Tests.dll" />
</fileset>
<call target="run-tests"/>
</target>
<target name="run-selenium-tests">
<fileset id="test-dlls">
<include name="${source-root}/**/*Selenium.Test.dll" />
<include name="${source-root}/**/*Selenium.Tests.dll" />
</fileset>
<call target="run-tests"/>
</target>
<target name="run-tests">
<foreach item="File" property="test-dll">
<in>
<items refid="test-dlls" />
</in>
<do>
<echo message="Running tests in ${test-dll}" />
<exec program="${test-runner-path}">
<arg value="${test-dll}" />
</exec>
</do>
</foreach>
<call target="coverage"/>
</target>
<target name="coverage" description="Generate code coverage using NCover">
<foreach item="File" property="test-dll">
<in>
<items refid="test-dlls"></items>
</in>
<do>
<property name="testRunnerArgs" value="${testRunnerArgs} "${test-dll}""></property>
</do>
</foreach>
<echo message="TestRunnerArgs: ${testRunnerArgs}"></echo>
<echo message="TestRunnerEXE: ${project::get-base-directory()}\${test-runner-path}"></echo>
<mkdir dir="${source-root}/NCoverReport" />
<ncover program="C:\Program Files (x86)\NCover\NCover.Console.exe"
testRunnerExe="${project::get-base-directory()}\${test-runner-path}"
testRunnerArgs="${testRunnerArgs}"
workingDirectory="${source-root}"
appendTrendTo="coverage.trend"
htmlReportDir="${source-root}\NCoverReport"
logLevel="Verbose"
onlyAssembliesWithSource="True"
projectName="ProjectName" />
</target>
</project>