mocka
mocka copied to clipboard
Escape characters in test failures
Unit tests results.xml are incorrectly generated. Escape special characters for junit report
Sample:
<testcase name="Whitelist - IP in X-Forwarded-For which is whitelisted is not blocked after reload" assertions="3" classname="api-gateway.tests.commons.ipFilterTest" status="" time="0.02">
<failure message="assertEquals failed: expected [allowed], was [{"error_code":"403013","message":"Your IP is not whitelisted"}
]" type="failure">/usr/local/share/lua/5.1/mocka.lua:600: assertEquals failed: expected [allowed], was [{"error_code":"403013","message":"Your IP is not whitelisted"}
]</failure>
</testcase>