Permalink
Browse files

re issue #6 Accept duration parameter in TeamCity-TestFinished

  • Loading branch information...
1 parent 393a478 commit c67c2b2209426601ed3f6b013105bda8c6f32624 @mwrock mwrock committed Apr 6, 2012
Showing with 8 additions and 2 deletions.
  1. +8 −2 teamcity.psm1
View
10 teamcity.psm1
@@ -19,8 +19,14 @@ function TeamCity-TestStarted([string]$name) {
TeamCity-WriteServiceMessage 'testStarted' @{ name=$name }
}
-function TeamCity-TestFinished([string]$name) {
- TeamCity-WriteServiceMessage 'testFinished' @{ name=$name }
+function TeamCity-TestFinished([string]$name, [int]$duration) {
+ $messageAttributes = @{name=$name; duration=$duration}
+
+ if ($duration -gt 0) {
+ $messageAttributes.duration=$duration
+ }
+
+ TeamCity-WriteServiceMessage 'testFinished' $messageAttributes
}
function TeamCity-TestIgnored([string]$name, [string]$message='') {

0 comments on commit c67c2b2

Please sign in to comment.