---
title: Test Environment and Data
tags: [testing, environment, data, secrets, bsc-testnet]
created: 2026-06-06
---

# Test Environment and Data

This page defines the shared test environment and safe test-data practices.

## Environments

| Environment | URL / location | Purpose |
|---|---|---|
| Dev web/API | `https://dev.amn.gg` | Live development deployment used for end-to-end validation. |
| Dev host | Deployment host over SSH | Docker stack, Woodpecker agent, scanner/backend/frontend containers. |
| Forgejo | `git.tbs.amn.gg` | Source of pushed backend/frontend/scanner/docs repos. |
| Woodpecker | `https://ci.tbs.amn.gg` | CI/CD for dev images and Docker stack updates. |
| BSC Testnet | chain id `97` | Real testnet chain used for token payment validation. |

## Secrets Policy

Do not write secrets into docs, commits, shell history snippets, screenshots, or
issue reports.

Secrets include:

- admin password
- CI token
- SSH private key
- wallet mnemonic
- wallet private key
- `.env` contents
- scanner API keys or webhook secrets

Safe to document:

- public wallet addresses
- public tx hashes
- token contract addresses
- chain ids
- request/payment/offer ids from test data
- command shapes with placeholder env vars

## Wallets

For live payment tests, create a fresh test wallet programmatically and store
the secret material only in an ignored local `.env`.

Required checks:

```bash
cd ~/CascadeProjects/escrow/backend
git check-ignore -v .env
git status --short --ignored .env
stat -f '%Sp %N' .env
```

Expected:

- `.env` is ignored.
- `.env` is not tracked.
- file mode is restrictive, ideally `600`.

Current funded dev test wallet public address:

```text
0x052D3D7F112A2CF1B0f65D9B8D6a91899d46e898
```

Never document its seed phrase or private key.

## BSC Testnet Tokens

| Token | Chain id | Contract | Decimals | Notes |
|---|---:|---|---:|---|
| Test USDT | `97` | `0x109F54Dab34426D5477986b0460aE5dFBA65f022` | `18` | Canonical dev tUSDT for scanner tests. |
| Test USDC | `97` | `0x64544969ed7EBf5f083679233325356EbE738930` | `18` | Secondary test token. |

The backend, scanner, and frontend must agree on the same chain/token registry.
If the wallet has tUSDT but scanner reads zero, first check that chain 97 USDT
points at `0x109F54...`, not an older faucet token.

## Test Users

Use generated users with a unique run id:

```text
amn-e2e-<YYYYMMDDHHMMSS>-buyer@example.test
amn-e2e-<YYYYMMDDHHMMSS>-seller1@example.test
amn-e2e-<YYYYMMDDHHMMSS>-seller2@example.test
amn-e2e-<YYYYMMDDHHMMSS>-seller3@example.test
```

Roles:

| Actor | Suggested role | Why |
|---|---|---|
| Buyer | `tester` | Allows testnet payment rails when dev config gates them by tester role. |
| Sellers | seller-capable test users | Submit bids and delivery evidence. |
| Admin | existing admin account | Creates users and can inspect/repair state. |

Do not commit generated passwords. If an automation creates passwords, keep the
pattern inside the local script or secret manager, not in docs.

## Run ID Convention

Every live E2E run should generate one run id and include it in:

- test user emails
- purchase request titles
- product links
- delivery proof metadata
- local log filename

Example:

```text
runId = 20260606043238
title = Scanner BSC Testnet E2E 20260606043238 R1
```

## Evidence To Capture

For every live payment round, record:

| Field | Example |
|---|---|
| run id | `20260606043238` |
| buyer email | generated `@example.test` email |
| seller emails | generated `@example.test` emails |
| purchase request id | UUID |
| selected offer id | UUID |
| payment id | UUID |
| chain id | `97` |
| token address | `0x109F54...` |
| amount base units | `260000000000000000` |
| tx hash | `0x...` |
| scanner status | `paid` / `confirmed` |
| delivery status | `delivery` / `delivered` |
| CI builds | backend/frontend/scanner pipeline numbers |

