-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
60 lines (56 loc) · 3.46 KB
/
build.xml
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
<project name="netcore-junit-split" basedir="." xmlns:if="ant:if" xmlns:unless="ant:unless" xmlns:dn="antlib:org.apache.ant.dotnet" xmlns="antlib:org.apache.tools.ant">
<description>additonal utilities</description>
<target name="nunit.assets" description="Create the nunit asserts from mstest assets, execute only if mstest assets change">
<copy file="TestAssetsMstest/TestAssetsMstest.cs" tofile="TestAssetsNunit/TestAssetsNunit.cs" overwrite="true" />
<replace file="TestAssetsNunit/TestAssetsNunit.cs">
<replacefilter token="Microsoft.VisualStudio.TestTools.UnitTesting" value="NUnit.Framework" />
<replacefilter token="TestAssetsMstest" value="TestAssetsNunit" />
<replacefilter token="[TestClass]" value="[TestFixture]" />
<replacefilter token="[TestInitialize]" value="[SetUp]" />
<replacefilter token="[TestMethod]" value="[Test]" />
<replacefilter token="[Ignore]" value="[Ignore("")]" />
<replacefilter token="[DataTestMethod]" value="[Test]" />
<replacefilter token="[DataRow(" value="[TestCase(" />
</replace>
</target>
<target name="xunit.assets" description="Create the xunit asserts from mstest assets, execute only if mstest assets change">
<copy file="TestAssetsMstest/TestAssetsMstest.cs" tofile="TestAssetsXunit/TestAssetsXunit.cs" overwrite="true" />
<replace file="TestAssetsXunit/TestAssetsXunit.cs">
<replacefilter token="Microsoft.VisualStudio.TestTools.UnitTesting" value="Xunit" />
<replacefilter token="TestAssetsMstest" value="TestAssetsXunit" />
<replacefilter token="[TestClass]" value="//" />
<replacefilter token="[TestInitialize] public void SetupFail()" value="public ClassStp()" />
<replacefilter token="[TestMethod][Ignore]" value="[Fact(Skip="cannotbeempty")]" />
<replacefilter token="[TestMethod][Ignore(" value="[Fact(Skip=" />
<replacefilter token="[TestMethod]" value="[Fact]" />
<replacefilter token="Assert.AreEqual" value="Assert.Equal" />
<replacefilter token="Assert.Fail("" value="Assert.True(1 == 2, "" />
<replacefilter token="Assert.Equal(1, 2, "" value="Assert.True(1 == 2, "" />
<replacefilter token="[DataTestMethod]" value="[Theory]" />
<replacefilter token="[DataRow(" value="[InlineData(" />
</replace>
</target>
<target name="report" description="Genterate html reports from JUnit splitted test results">
<junitreport todir="reports/mstest-report.trx.split">
<fileset dir="reports/mstest-report.trx.split">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="reports/junit-mstest-report-frames" />
<report format="noframes" todir="reports/junit-mstest-report-noframes" />
</junitreport>
<junitreport todir="reports/nunit-report.trx.split">
<fileset dir="reports/nunit-report.trx.split">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="reports/junit-nunit-report-frames" />
<report format="noframes" todir="reports/junit-nunit-report-noframes" />
</junitreport>
<junitreport todir="reports/xunit-report.trx.split">
<fileset dir="reports/xunit-report.trx.split">
<include name="TEST-*.xml" />
</fileset>
<report format="frames" todir="reports/junit-xunit-report-frames" />
<report format="noframes" todir="reports/junit-xunit-report-noframes" />
</junitreport>
</target>
</project>