Skip to content

Only download chrome driver #18676

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

Merged
merged 4 commits into from
Feb 1, 2020
Merged

Only download chrome driver #18676

merged 4 commits into from
Feb 1, 2020

Conversation

pranavkm
Copy link
Contributor

This should avoid extra web traffic by only installing the chrome driver. Inspired by a build failure due to transient network issue:

2020-01-28T21:33:29.0255009Z YARN : error : Could not download https://github.com/mozilla/geckodriver/releases/download/v0.23.0/geckodriver-v0.23.0-win64.zip [F:\workspace\_work\1\s\src\Components\test\E2ETest\Microsoft.AspNetCore.Components.E2ETests.csproj]
2020-01-28T21:33:29.0257959Z F:\workspace\_work\1\s\src\Shared\E2ETesting\E2ETesting.targets(23,5): error : Command failed with exit code 1. [F:\workspace\_work\1\s\src\Components\test\E2ETest\Microsoft.AspNetCore.Components.E2ETests.csproj]
2020-01-28T21:33:29.2096369Z ##[error]Build failed.

@pranavkm pranavkm requested a review from javiercn January 29, 2020 23:58
@Pilchie Pilchie added the area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework label Jan 30, 2020
@@ -6,11 +6,11 @@
"private": true,
"scripts": {
"selenium-standalone": "selenium-standalone",
"prepare": "selenium-standalone install"
"prepare": "selenium-standalone install --config ..\\..\\..\\Shared\\E2ETesting\\selenium-config.json"
Copy link
Member

Choose a reason for hiding this comment

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

It's unusual to see Windows-style paths in a package.json file. Does it work with / too? If so that would be preferable as we may want this to run on other OSes too.

var psi = new ProcessStartInfo
{
FileName = "npm",
Arguments = $"run selenium-standalone start -- -- -port {port}",
Arguments = $"run selenium-standalone start -- --config \"{seleniumConfigPath}\" -- -port {port}",
Copy link
Member

Choose a reason for hiding this comment

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

If we're hardcoding the seleniumConfigPath into package.json anyway, why go to all this trouble to pass it dynamically here? Would it be simpler to modify the selenium-standalone script in package.json so that it also hardcodes the config path? Then we wouldn't need to pass it from here, and therefore wouldn't need the AssemblyMetadataAttribute, and wouldn't need the change to E2ETesting.props, etc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think the issue is that knowing the relative path inside of a test is a bit tricky. Using relative paths can mess up depending on how the test is launched and it's not always correct to assume PWD is the test directory. In other places where we need to find something relative, we do something quite similar - have the build tell us where things are.

Copy link
Member

Choose a reason for hiding this comment

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

OK, sounds like a good reason!

@SteveSandersonMS SteveSandersonMS self-requested a review January 31, 2020 16:33
@pranavkm pranavkm closed this Jan 31, 2020
@pranavkm pranavkm reopened this Jan 31, 2020
@pranavkm pranavkm merged commit 6d83fee into master Feb 1, 2020
@pranavkm pranavkm deleted the prkrishn/singleDriverInstall branch February 1, 2020 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Includes: MSBuild projects/targets, build scripts, CI, Installers and shared framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants