Created
June 19, 2017 13:40
-
-
Save rodneyrehm/48b87ec596a095a0ab84d624f6d90d6a to your computer and use it in GitHub Desktop.
Sentry Raven injected test metadata
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addSeleniumTags () { | |
if (!window._SELENIUM_TEST_BUILD) { | |
return | |
} | |
Raven.setTagsContext({ | |
'test.url': window._SELENIUM_BUILD_URL, | |
'test.job': window._SELENIUM_TEST_JOB, | |
'test.build': window._SELENIUM_TEST_BUILD, | |
'test.name': window._SELENIUM_TEST_NAME, | |
}) | |
} | |
const _send = Raven._send | |
Raven._send = function () { | |
addSeleniumTags() | |
return _send.apply(this, arguments) | |
} |
Yea, I'd probably do that.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
never mind… we exposed Raven globally and will just call
Raven.setTagsContext()
from the Selenium test.