-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Run Blazor E2E tests on SauceLabs #18456
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've verified this works manually.
Things to do:
- Provide a config to customize which browser/platform to run on
- Add a way to report test pass/fail status to SauceLabs (right now it shows unknown)
- Setup an azure pipeline and add a .yml file for the blazor e2e tests
In the meantime, @javiercn @SteveSandersonMS can you take a look at this PR?
|
||
namespace Microsoft.AspNetCore.E2ETesting | ||
{ | ||
public class SauceConnectServer : IDisposable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of this file is copy-paste from SeleniumStandaloneServer
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there room to consolidate the two types? It might be difficult to remember to update both types if we change the code in the other.
@@ -0,0 +1,82 @@ | |||
import { EOL } from "os"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a typescript file? There's nothing typescript specific here and we shouldn't need typescript for something as simple as this.
Can we change this to be a plain JavaScript file? Any recent version of node will handle modern javascript.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took the easy path as we do similar things in SignalR which is in typescript. IMO there is no downside to using typescript for this. It is nicer :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a promising start!
A couple of things to take into account.
We likely want to run the tests on saucelabs in addition to running them locally on the CI. Does this change make that possible? It seems to me that it replaces one server with the other.
If we wanted to run them in both places we would have to have some extra step on the CI to do that, which I'm fine with, just want you to think about it.
Other than that, this is definitely going on the right direction. Great job so far!
Yes, that is the goal. I know this is currently hardcoded to
Yes, I am adding a |
3313670
to
dc8dd35
Compare
e0cce92
to
ef5129b
Compare
Updated. |
c92f4e5
to
e3bbb7e
Compare
jobDisplayName: "Blazor Daily Tests" | ||
afterBuild: | ||
# macOS/Chrome | ||
- script: 'dotnet test --filter "StandaloneAppTest"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to start with this, but is there a limitation that requires this?
@@ -461,7 +461,7 @@ async Task GetDetails(int msg_id, int object_id, CancellationToken token, string | |||
{ | |||
result = var_list | |||
}); | |||
} catch (Exception e) { | |||
} catch (Exception) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no beuno. We should fix this in Mono and flow it through. But given how small these changes are, I think we can live with this for now.
|
||
namespace Microsoft.AspNetCore.E2ETesting | ||
{ | ||
public class SauceConnectServer : IDisposable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there room to consolidate the two types? It might be difficult to remember to update both types if we change the code in the other.
6b9d5ff
to
bbdccab
Compare
bbdccab
to
fae2886
Compare
fae2886
to
9dbbddc
Compare
Merging this. Real device testing on iPhones is currently blocked on a saucelabs subscription issue. I'll send a separate PR to enable that. |
Fixes #17013
This PR sets up a remote web driver that connects to SauceLabs using a proxy.
E2ETestOptions
to accomodate SauceLabs configs