canarytrace/documentation

In smoke mode, have the option to add a cookie.

Closed this issue · 1 comments

origin: #205
pro spousteni canarytrace v rezimu SMOKE umoznit zadat volitelne cookie. Potrebuji pro GA mit moznost odfiltrovat tyto smoke testy, aby busines mel presne informace o navstevnosti na danych strankach. (jde samozrejme o produkcni testy)

Support for setting cookies has been added to Canarytrace Smoke in version 4.24.0. It utilizes the functionality offered by Webdriver.io, so for setting options and behavior, please refer to this documentation: https://v7.webdriver.io/docs/api/browser/setCookies/

Define an environment variable in the YAML file for Kubernetes CronJob. Each cookie will be represented as a JSON object.

env:
- name: COOKIES
  value: '[{"name":"test1","value":"one","path":"/foo","domain":".example.com","secure":true,"httpOnly":true,"expiry":1551393875},{"name":"test2","value":"two"}]'

If the environment variable COOKIES is set, you will see this output in the log

[0-0] Cookies: [{"domain":".canarytrace.com","httpOnly":true,"name":"test1","path":"/","sameSite":"Lax","secure":true,"value":"one"},{"domain":".canarytrace.com","httpOnly":false,"name":"test2","path":"/","sameSite":"Lax","secure":true,"value":"two"}]

Image