-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Set up HTTPS testing on Browserstack #563
Comments
I wanted to help with this issue and tried to solve it, nevertheless, I was not able to run tests properly without some deeper refactoring :/. One can run tests easily with Self-signed cert (and key) can be generated with Moreover, with the settings below, I was able to run tests on BrowserStack, however, I haven't found a way to bypass the browser's check for certificate validity - Updated
|
@makma Thank you for your research! My experience shows that karma-browserstack-launcher is a very limited tool. It doesn't allow sending browser arguments, and many BrowserStack options don't work. I faced similar issues when I tried to run the tests in incognito mode. Using Selenium directly gives much more possibilities. I'd prefer to lean to Selenium to fix both this, the incognito testing and the browser detection issues. Karma is a high level tool that allows running tests in BrowserStack with little configuration, meanwhile Selenium is a low level tool that only controls a browser. Selenium requires additional tools to transpile the code for browser, run a local server, tunnel the server to the public internet, collect test results and print them to the console. Combining these tools together means creating a complete test runner like Karma. Do you know if there is a ready solution? Probably, we will make our own testing solution that combines these tools and is shipped as a separate library. If we want to fix only this issue, I will prefer the simplest solution possible as a temporary solution that will be replaced with a full-featured solution described above. |
Hi @Finesse, I believe GitHub Actions might be great for this task. Actions are for free for open source repositories and one can choose the platform - Ubuntu, Windows, or even macOS. In addition, it seems you can also generate and trust self-signed certificates - I assume this since one has sudo/administrator privileges on these machines. The cherry on the top - default virtual environments come with a lot of preinstalled browsers, mobile Safari might be problematic, though. I've created the first PoC test for Chrome (with |
Hi @makma, HTTPS testing isn't the main goal of testing. The main goal is to run the tests in a large variety of browsers, that's why we use BrowserStack. The second important goal is running a test that checks that incognito and regular modes of all supported browsers give the same result. Running the tests in HTTPS is the same important. Running browsers in GitHub Actions in addition to BrowserStack will achieve the goals partially because it will cover only some desktop browsers. But it's better than nothing, so we can implement it. We used to run browsers in GitHub Actions in v2. |
Duplicate of # |
HTTPS has been set up for almost all browsers by #874. Closed in favor of fingerprintjs/broyster#36. The test tools are now a scope of another repository. |
At the moment the tests run in insecure environment (http://localhost). Browsers behave differently in secure (HTTPS) environment and the agent is designed to work in secure environment.
A solution that will probably work:
protocol: 'https'
in the Karma configurationhttpsServerOptions
setting of the configurationbrowserStack: { acceptSslCerts: true }
in the Karma configurationThe text was updated successfully, but these errors were encountered: