Skip to content
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

feat: setup OS proxy #207

Merged
merged 19 commits into from
Oct 23, 2023
Merged

feat: setup OS proxy #207

merged 19 commits into from
Oct 23, 2023

Conversation

tianfeng92
Copy link
Contributor

@tianfeng92 tianfeng92 commented Oct 19, 2023

When running tests with TestCafe and Chrome, it sets up the OS network proxy.

Some notes:

  • This setting is only required for tests using Chrome and Edge with CDP enabled.
  • On Windows, the proxy server setting should be skipped for localhost to avoid disrupting the TestCafe startup process.

I checked the DNS issue via testing with our internal artifact service.

Windows results:
Chrome: https://app.saucelabs.com/tests/8ff993c424a4468b84ea9bcd0642471c
Firefox: https://app.saucelabs.com/tests/e3ff70c4adcb4a7a994e20715d4696dd
Edge: https://app.saucelabs.com/tests/02c77ca62a034f66b2e1e69fe9f2e552

Mac results:
Chrome: https://app.saucelabs.com/tests/b82fadb3c09e4b31865cb8043310eb22
Firefox: https://app.saucelabs.com/tests/7293e17e1a6b44328f542c6e41abf9cb
Edge: https://app.saucelabs.com/tests/0d265e57875b42249fa1505d0e7b60d0

@@ -20,10 +20,12 @@
"dependencies": {
"@saucelabs/testcomposer": "^2.0.0",
"@tsconfig/node20": "20.1.2",
"@types/shelljs": "^0.8.14",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If it's listed under devDependencies, it won't be installed during the npm ci --production step, leading to a failure in the npm run build step.
Although it's not a runtime dependency, a deeper solution would require adjustments to the pipeline.

@tianfeng92 tianfeng92 marked this pull request as ready for review October 21, 2023 00:39
@tianfeng92 tianfeng92 requested a review from a team as a code owner October 21, 2023 00:39
src/network-proxy.ts Outdated Show resolved Hide resolved
src/testcafe-runner.ts Outdated Show resolved Hide resolved
src/testcafe-runner.ts Outdated Show resolved Hide resolved
src/testcafe-runner.ts Show resolved Hide resolved
src/testcafe-runner.ts Show resolved Hide resolved
src/network-proxy.ts Outdated Show resolved Hide resolved
src/network-proxy.ts Outdated Show resolved Hide resolved
src/network-proxy.ts Outdated Show resolved Hide resolved
@alexplischke
Copy link
Contributor

Since the setup is rather complex, it'd be good to have an e2e test for this scenario (one for mac, one for windows) 🙏

.github/workflows/test.yml Outdated Show resolved Hide resolved
src/network-proxy.ts Outdated Show resolved Hide resolved
src/testcafe-runner.ts Outdated Show resolved Hide resolved
src/testcafe-runner.ts Outdated Show resolved Hide resolved
tianfeng92 and others added 2 commits October 23, 2023 14:06
Co-authored-by: Alex Plischke <alex.plischke@saucelabs.com>
@tianfeng92 tianfeng92 merged commit 920a542 into main Oct 23, 2023
35 checks passed
@tianfeng92 tianfeng92 deleted the devx-2579 branch October 23, 2023 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants