Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Environment variable support in assertion targets #315

Open
kgapos opened this issue May 31, 2023 · 1 comment
Open

Environment variable support in assertion targets #315

kgapos opened this issue May 31, 2023 · 1 comment

Comments

@kgapos
Copy link

kgapos commented May 31, 2023

Is your feature request related to a problem? Please describe.
This is not a problem or bug. I would characterize it as a feature gap.
Environment variables should be accessible in the target of an assertion as illustrated below.
image

Describe the solution you'd like
I should be able to use environment variables in assertions. This is especially powerful considering that I can set environment variables through code snippets in setup & teardown. For example, that would allow someone to assert that the value of a timestamp in a json response, is within a calculated timespan.

Describe alternatives you've considered
There are no alternatives to that as far as I know. You have to compromise with less robust assertions. Please correct me if I'm wrong.

@tnolet
Copy link
Member

tnolet commented Jun 2, 2023

hey @kgapos we don't support this now in the UI. However, you could add a teardown script with an expect function that actually does this. Have a look here https://www.checklyhq.com/docs/api-checks/teardown-script-examples#perform-additional-assertions

Also, we just moved our public roadmap to https://feedback.checklyhq.com/ and are archiving this repo. If you want, you can resubmit it over at https://feedback.checklyhq.com/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants