Skip to content

Commit 285e5bf

Browse files
committed
feat: [POC] replace Postman with Hoppscotch
Signed-off-by: Logan Nguyen <[email protected]>
1 parent 75f8196 commit 285e5bf

File tree

11 files changed

+1548
-2519
lines changed

11 files changed

+1548
-2519
lines changed

.github/workflows/hoppscotch.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Hoppscotch Endpoint Tests
2+
3+
on:
4+
pull_request:
5+
branches: [main, release/**]
6+
push:
7+
branches: [main, release/**]
8+
tags: [v*]
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: pr-checks-${{ github.workflow }}-${{ github.head_ref || github.run_id }}
13+
cancel-in-progress: true
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
setup-local-hedera:
20+
name: Hoppscotch Endpoint Tests
21+
runs-on: hiero-smart-contracts-linux-medium
22+
permissions:
23+
contents: write
24+
actions: read
25+
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
28+
with:
29+
egress-policy: audit
30+
31+
- name: Install build tools
32+
run: sudo apt-get update && sudo apt-get install -y make gcc g++
33+
34+
- name: Setup node
35+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
36+
with:
37+
node-version: 22
38+
39+
- name: Checkout repo
40+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
41+
42+
- name: Install packages
43+
run: npm ci
44+
45+
- name: Create .env file
46+
run: cp ./packages/server/tests/localAcceptance.env .env
47+
48+
- name: Install pnpm
49+
run: npm install -g pnpm
50+
51+
- name: Build Typescript
52+
run: npx lerna run build
53+
54+
- name: Start the hedera local node
55+
run: npx hedera start -d
56+
57+
- name: Stop the local node's relay
58+
run: docker stop json-rpc-relay
59+
60+
- name: Start the local relay
61+
run: npm run start &
62+
63+
- name: Install Hoppscotch CLI
64+
run: npm install -g @hoppscotch/cli
65+
66+
- name: Run Hoppscotch Tests
67+
run: BASE_URL=http://127.0.0.1:7546 hopp test packages/server/tests/hoppscotch.json

.github/workflows/postman.yml

Lines changed: 0 additions & 75 deletions
This file was deleted.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,24 @@ run configuration. You should be able to just run that configuration, and it sho
5050

5151
- It is highly recommended to read the [Testing Guide](docs/testing-guide.md) for detailed testing strategies and best practices.
5252

53+
### Hoppscotch
54+
55+
First ensure `@hoppscotch/cli` is installed locally using `npm`, then execute `hopp`.
56+
57+
```shell
58+
npm install -g @hoppscotch/cli
59+
BASE_URL=http://localhost:7546 hopp test packages/server/tests/hoppscotch.json
60+
```
61+
62+
To enable Hoppscotch test to run via helm deployment add
63+
64+
```
65+
test:
66+
enabled: true
67+
schedule: '@daily' #How often to run the Hoppscotch test
68+
baseUrl: "http://127.0.0.1:7546" # Relay URL to run the test against
69+
```
70+
5371
### Acceptance Tests
5472

5573
The relay has a suite of acceptance tests that may be run to confirm E2E operation of the relay in either a `hedera-local-node` or deployed env.

0 commit comments

Comments
 (0)