-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Proof of concept: test configuration management #37270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@microsoft-github-policy-service agree [company="Launix, Inh. Carl-Philip Hänsch"] |
@microsoft-github-policy-service agree company="Launix, Inh. Carl-Philip Hänsch" |
This comment has been minimized.
This comment has been minimized.
to the maintainers: please review this PR anyway, it is just a proof-of-concept. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Please start with filing a feature request that makes a case for the new functinality. |
|
Test results for "tests 1"48 failed 2 flaky46728 passed, 821 skipped Merge workflow run. |
Thanks for the proof of concept! We discussed possible improvements in this area during the team meeting today, I captured some of our thoughts in the linked issue. Since we don’t plan to introduce a .json config for the codegen, I’ll go ahead and close this PR. |
I made this fork to demonstrate a proof of concept for test configuration management.
The problem is as follows:
Deployment URLs of test instances can change as well as credentials like usernames and passwords as well as other information that will depend on the test run setting.
This fork tries to integrate support for test configuration management directly into the code generator. I implemented the following features:
npx playwright --include-conf=test/conf.json http://url-to-test
const conf = JSON.parse(require('fs').readFileSync('test/conf.json'));
await page.goto(conf.baseurl + '/');
as the first lineawait page.locator('input[name="username"]').fill(conf.username);
when the field name and field content matches the one in the configI don't expect you to merge that pull request. But I want to give the code to you as a hint for further improvements.