Skip to content

Commit

Permalink
escape TC message attrib for common selenium msg
Browse files Browse the repository at this point in the history
turns:
[10:24:50][testing a failure] ##teamcity[testFailed name='testing a
failure' message='can't find element #cantfindme']
[10:24:50][testing a failure] Property value not found Valid property
list format is (name( )*=( )*'escaped_value'( )*)* where escape symbol
is "|"

into valid test/build failure msg:
[10:31:41][testing a failure] can't find element #cantfindme
  • Loading branch information
mattsonlyattack committed Jun 3, 2014
1 parent 826b44f commit 67717b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/canopy/reporters.fs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ type TeamCityReporter() =
member this.pass () = consoleReporter.pass ()

member this.fail ex id ss =
consoleReporter.describe (String.Format("##teamcity[testFailed name='{0}' message='{1}']", id, ex.Message))
consoleReporter.describe (String.Format("##teamcity[testFailed name='{0}' message='{1}']", id, ex.Message.Replace("'", "|'")))
consoleReporter.fail ex id ss

member this.describe d =
Expand Down

0 comments on commit 67717b8

Please sign in to comment.