Skip to content

Commit 4a087c6

Browse files
committed
20221113 update : add test.ps1.
1 parent 333d446 commit 4a087c6

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

test.ps1

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Set_Test_Env -TestEnv $TestEnv
2+
Write-Host "Start Aspose.Cells Cloud SDK for Python"
3+
$StartTime = Get-Date
4+
$passed = 0
5+
$total =0
6+
$failed = 0
7+
$skipped =0
8+
9+
[string[]] $lines = python .\test\run_test.py
10+
foreach ($line in $lines) {
11+
if($line -match [Regex]::Escape(' ... ok'))
12+
{
13+
$passed++
14+
}
15+
if($line -match "Ran (\d+) tests"){
16+
$total=$matches[1]
17+
}
18+
}
19+
$failed = $total - $passed
20+
$EndTime = Get-Date
21+
$timespan ="{0:N2}" -f (New-TimeSpan $StartTime $EndTime).TotalSeconds
22+
Write-Host "Spent ${timespan}s on finishing test. Result : Total ${total}, Passed ${passed} , Failed ${failed} ,Skipped ${skipped} ."
23+

0 commit comments

Comments
 (0)