metrics-toolkit
metrics-toolkit copied to clipboard
Postman collection issues
When trying to execute the postman collection for the first time, the following error appears on the pre-request scripts: "TypeError: Cannot read property 'toLowerCase' of undefined", removing "toLowerCase()" from the code solves the problem. Aside from this error, having to set global variables and 1 environment variables (url) + understanding that the headers are inherited and managed by pre-request scripts seems to be a setup overhead for a standard user. Some suggestions to simplify this:
- Use environment variables for everything (avoid using globals); there are environments and usages of the metrics toolkit where multiple users / connected apps are needed per environment / account / BG
- Each request should be atomic. It should explicitly contain all the Headers needed - this is for developers' visibility (externalize values using environment variables)
- Provide an example environment file with the "keys" already filled, so that users can quickly import and modify the values instead of having to type each variable from scratch
- The Pre-request scripts should point to environment variables instead of global ones
- Postman collections documentation is a great feature from Postman, however, it is not known by everyone, I would mention in the README of the project (this GitHub repo) that the postman collection is documented in Postman itself (sounds redundant but it will help some users)