feat: add environment variable interpolation to YAML script parser
Add YAML Configuration Parser with Environment Variable Support
Environment variable interpolation is very useful when sensitive data, such as user passwords and other PII data is used in the test. This PR introduced a {{VAR_NAME}} syntax in the YAML script to interpolate the environment variables.
Changes
- Implemented environment variable interpolation in YAML configuration parser.
- Added unit tests for YAML utilities including building, parsing, and flow item brief generation
Features
- Environment variable interpolation using
{{VAR_NAME}}syntax - Throws descriptive errors for undefined environment variables
Testing
Added test suite covering:
- Environment variable interpolation
- Error handling for undefined variables
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Deploy Preview for midscene ready!
| Name | Link |
|---|---|
| Latest commit | e3a2623e11de8983422e8a636ec74251a9043dda |
| Latest deploy log | https://app.netlify.com/sites/midscene/deploys/677dacf97f2ff4000898a667 |
| Deploy Preview | https://deploy-preview-226--midscene.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Hi @georgezlei
Great job !
How about we replace the {{var_name}} syntax to the ${var_name} syntax? The ${var_name} syntax looks tidier and similar to the JavaScript template string syntax.
And remember to sign the CLA in this PR .
Thanks for the comment. Interpolation syntax is updated accordingly.
@georgezlei Remember to sign the cla so that i can merge this PR.
@yuyutaotao CLA has been signed 2 days ago. I have no idea why it still showing as pending here.
Just rechecked it and it is confirmed that CLA was signed. Would you be able to help me check if there is anything wrong?
I understand. I don't know the reason either. Let's merge it without updating the CLA status.