Skip to content

Commit 903c4c4

Browse files
committed
20221111 update : add test case test and scripts.
1 parent 7604a51 commit 903c4c4

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

TestData/assemblytest.xlsx

8.12 KB
Binary file not shown.

TestData/datasource.xlsx

6.94 KB
Binary file not shown.

TestData/needUnlock.xlsx

237 KB
Binary file not shown.

test.ps1

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
[string[]]$lines =dotnet build --framework netstandard2.0 --configuration Release .\Aspose.Cells.Cloud.SDK\Aspose.Cells.Cloud.SDK.csproj
2+
foreach( $line in $lines)
3+
{
4+
if($line -match "Build succeeded")
5+
{
6+
Write-Host "Aspose.Cells.Cloud.SDK.csproj Build succeeded."
7+
break;
8+
}
9+
}
10+
[string[]]$lines =dotnet build --framework netcoreapp2.2 .\Aspose.Cells.Cloud.SDK.Test\Aspose.Cells.Cloud.SDK.Test.csproj
11+
foreach( $line in $lines)
12+
{
13+
if($line -match "Build succeeded")
14+
{
15+
Write-Host "Aspose.Cells.Cloud.SDK.Test.csproj Build succeeded."
16+
break;
17+
}
18+
}
19+
[string[]]$lines = dotnet test --framework netcoreapp2.2 .\Aspose.Cells.Cloud.SDK.Test\Aspose.Cells.Cloud.SDK.Test.csproj
20+
$total = 0
21+
$passed = 0
22+
$failed = 0
23+
foreach( $line in $lines)
24+
{
25+
Write-Host $line
26+
if($line -match "Total tests: (\d+)")
27+
{
28+
$total=$matches[1]
29+
}
30+
if($line -match "Passed: (\d+)")
31+
{
32+
$passed=$matches[1]
33+
}
34+
if($line -match "Failed: (\d+)")
35+
{
36+
$failed=$matches[1]
37+
}
38+
}
39+
40+
$EndTime = Get-Date
41+
$timespan ="{0:N2}" -f (New-TimeSpan $StartTime $EndTime).TotalSeconds
42+
Write-Host "Spent ${timespan}s on finishing test. Result : Total ${total}, Passed ${passed} , Failed ${failed} ."

0 commit comments

Comments
 (0)