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

Enhance README with step-by-step setup guide #3

Merged
merged 2 commits into from
Mar 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 47 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,66 @@
# qase-frp
This repository contains a script that allows you to create a tunnel to your private website for cloud testing in Qase. It uses the FRP client to create a tunnel to your private website. The script creates a configuration file for the FRP client and runs it. The script is written in bash and can be run on any platform that supports bash.

## Usage
## Step-by-step Guide to Setting Up Qase FRP Tunnel

Initial preparation:
### Step 1: Download and Install FRP Script

Run the following command in your terminal to download and prepare the FRP script:

```shell
wget -O frp.sh https://raw.githubusercontent.com/qase-tms/qase-frp/refs/heads/main/frp.sh && chmod +x frp.sh
```
### Step 2: Generate Authentication Token

- Visit the [Qase Personal Settings page](https://app.qase.io/user/api/token).
- Generate a new authentication token and copy it for use in the next step.

After the installation, you can run the script from the same directory with the following command on MacOS or Linux:
### Step 3: Run FRP Script to Create Tunnel

```bash
./frp.sh -l private.website.local:80 -a "auth_token"
Execute the following command from the directory where you downloaded frp.sh:

```shell
./frp.sh -l private.website.local:80 -a "your_auth_token"
```

You can generate authentication token on the [Qase personal settings page](https://app.qase.io/user/api/token).
Replace:
- `private.website.local:80` with your local website’s domain and port.
- `your_auth_token` with the token you generated in Step 2.

Optional:
To specify a custom tunnel name (should be unique), use the -t option:

```shell
./frp.sh -l private.website.local:80 -a "your_auth_token" -t custom_tunnel_name
```

If omitted, the script will generate a random name.

### Step 4: Obtain FRP URL

After the launch, the script outputs a URL, like `http://${project_name}.srv.frps.qase.dev`.

**Important:**
- This URL could be opened only within the Qase internal network and will
not work locally. It is specifically required for the cloud test generator and runner in Qase.
- The link is valid only while the script is running. If the script is stopped, the link will become invalid.

### Step 5: Configure Environment in Qase

After running the script, it will create a tunnel to your private website and output the URL to access it. You can use this URL to run cloud tests in Qase.
- Log into your Qase project.
- Create a new environment or edit an existing one.
- Set the **Host** parameter to the URL obtained in Step 4.

To do it, create a new environment or update the existing one in your Qase project. Specify URL from our script as **Host** in the environment.
**Important:**
When creating test cases, if you use a URL such as `ourhost.com` within a test step, Qase automatically replaces it
with the URL specified in the environment's **Host** variable. Ensure you set the environment **Host** variable to
the FRP-generated URL to direct tests appropriately.

Run a cloud test run in Qase and specify the created/updated environment.
### Step 6: Run Cloud Tests

You can also specify -t option to specify tunnel name. It should be unique. If you don't specify it, the script will generate a random name.
- Initiate a cloud test run in Qase.
- Select the configured environment from Step 5.
- Run your tests.

## Manual configuration