-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
83e4b2a
commit 690fbc5
Showing
3 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
# This script is based on the documentation from CircleCI, which does not work as written | ||
# https://circleci.com/docs/browser-testing/#interacting-with-the-browser-over-vnc | ||
|
||
set -e | ||
set -u | ||
set -o pipefail | ||
|
||
cd ~/project | ||
|
||
if [ ! -f installed.lock ]; then | ||
touch installed.lock | ||
|
||
sudo apt update | ||
sudo apt install -y fluxbox tigervnc-standalone-server | ||
|
||
export DISPLAY=:1 | ||
tigervncserver -SecurityTypes none -desktop fluxbox | ||
fbsetbg -c app/images/icon-512.png | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Debugging E2E tests by connecting to CircleCI over SSH and VNC | ||
|
||
Developers often say "I can't reproduce this CI failure locally, but it fails on CircleCI." | ||
|
||
If you find yourself in that situation, one option is to use Codespaces, which can reproduce some of these failures, and is a little bit easier to use. | ||
|
||
The other NEW option is to SSH into CircleCI and use VNC. | ||
|
||
1. You must be logged into CircleCI and have access to metamask-extension | ||
2. "Rerun job with SSH" [Documentation](https://circleci.com/docs/ssh-access-jobs/) | ||
3. Look for this instruction | ||
|
||
``` | ||
You can now SSH into this box if your SSH public key is added: | ||
$ ssh -p xxxxx xxx.xxx.xxx.xxx | ||
``` | ||
|
||
4. Copy the command that CircleCI gives you and add `-L 5902:localhost:5901` (this will tunnel the VNC connection over SSH) | ||
5. When you login to SSH, it automatically executes `/.circleci/scripts/enable-vnc.sh` to set up the connection | ||
6. Use your favorite VNC viewer on your local machine to connect to `localhost:5902` | ||
- Mac: Finder menu > GO > Connect to server (or <Cmd> + K), then use `vnc://localhost:5902` | ||
- Linux: `tigervnc-viewer` is a good package to match the server | ||
- Windows: [RealVNC Viewer](https://www.realvnc.com/en/connect/download/viewer/windows/) or [TightVNC](https://www.tightvnc.com/download.php) | ||
7. Run your E2E tests as usual and watch the browser open in VNC | ||
|
||
_Warning: be careful with parallelism. If you run "Rerun job with SSH" on a job that has `parallelism: 24`, it will rerun all 24 VMs with SSH._ | ||
|
||
_Note: this procedure was based on the documentation from CircleCI, which does not work as written https://circleci.com/docs/browser-testing/#interacting-with-the-browser-over-vnc_ |