How to integrate sentry with selenium tests?

When my automation tests ran how can I track the error through sentry.
Is it possible to integrate selenium tests with sentry.io?

I use Robot framework to run my selenium tests

Please kindly advice!!

You may want to read this:

Hi,

Do you have any well documented steps to configure with selenium.

Looks like some information is missing to get started.

Hi,

Is Build_TAG a mandatory parameter, how do I obtain this parameter?
can I configure scope with just selenium session id?

You can configure the scope with just Selenium session id. It is also not clear to me what BUILD_TAG there should be but thankfully we can ask @ndmanvar about it easily :slight_smile:

ok, @ndmanvar could you please kindly advice
I gave read write access to project and while trying to print(json_data) it says:
‘{u’detail’: u’You do not have permission to perform this action.’}’

Hi @asubair !
BUILD_TAG is the build-name+build-number so you can figure out how many errors happened within a specific build/test-run. It is not mandatory.

2 Likes

Hmm, looks like the right permissions are not configured for that AUTH_TOKEN. Could you check what permissions have been given for that auth-token (auth-token can be tied to user, or can also be org-wide). See https://docs.sentry.io/api/auth/#id1 + https://sentry.io/settings/account/api/auth-tokens/ for more information.

Regarding permissions (https://docs.sentry.io/api/permissions/), I believe you will need org:read to get the results back from /discover

1 Like

Thanks @ndmanvar,
How do I ensure that the tag is set properly during sentry configure scope in the test setup?
Is there a way to troubleshoot through logs or console?

I think this part is pretty clear on the blog post and we’ve provided you with enough information to get started. If you need more help, I recommend finding a colleague to help you with this setup or simply more internet search + trial & error.