Skip to content

Commit

Permalink
20221113 update : add test.ps1.
Browse files Browse the repository at this point in the history
  • Loading branch information
roywangaspose committed Nov 13, 2022
1 parent 8785aa8 commit 7fcbb8a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
Binary file added TestData/roywang.pfx
Binary file not shown.
1 change: 0 additions & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions test.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Write-Host "Start Aspose.Cells Cloud SDK for PHP"
$StartTime = Get-Date
$passed = 0
$total = 0
$failed = 0
$skipped = 0
[string[]]$lines = .\vendor\bin\phpunit.bat --configuration ./phpunit.xml.dist
foreach ($line in $lines) {

if ($line -match "(\d+) tests,") {
$total = $matches[1]
$passed = $total
}
elseif ($line -match "Tests: (\d+), Assertions: (\d+), Errors: (\d+)") {
$total = $matches[1]
$failed = $matches[3]
$passed = $total - $failed
}
}
$EndTime = Get-Date
$timespan = "{0:N2}" -f (New-TimeSpan $StartTime $EndTime).TotalSeconds
Write-Host "Spent ${timespan}s on finishing test. Result : Total ${total}, Passed ${passed} , Failed ${failed} ,Skipped ${skipped} ."

0 comments on commit 7fcbb8a

Please sign in to comment.