Test environment & testing

EmbiPay provides a governed environment for agent financial operations. Use the public deployment for testing (no real money), or run the EmbiPay-Testing suite locally.

Public test deployment

The public deployment is a live environment you can use for testing (no real money). Use the documented URL for development; for production, use your own deployed dashboard URL. Create accounts, organizations, fleets, wallets, and run tests against the API.

  • Sign up and create a human account
  • Create or join an organization and create a fleet (fleet APIs require organization_id)
  • Register an agent via POST /api/agent/register
  • Use Admin API (with ADMIN_API_TOKEN or session) to create wallets, attach to fleet, pools, loans
  • Run the EmbiPay-Testing suite against your chosen API base URL

EmbiPay-Testing Suite

The EmbiPay-Testing folder contains automated tests and scripts:

cd EmbiPay-Testing
cp .env.example .env
# Edit .env: ADMIN_API_BASE_URL, ADMIN_API_TOKEN, TEST_AGENT_ID (your agent), etc.

npm run test:admin        # All admin API tests
npm run test:analytics:stats  # Public analytics API (no auth)
npm run add-pool-and-test # Create pool, contribute, run pool tests
npm run stress-test 5 20  # Load test (5 concurrent, 20 iterations)

See EmbiPay-Testing README for full documentation.

Environment Variables

For testing against the public deployment or your own deployment, set your API base URL (no trailing slash). Use your own admin token and an agent ID from your registered agent. Avoid committing real tokens or internal IDs.

# API base: public deployment or your deployed dashboard URL
ADMIN_API_BASE_URL=https://www.embipay.com
ADMIN_API_TOKEN=your_admin_token
# Use an agent ID from your own agent registration (integer)
TEST_AGENT_ID=1
TEST_POOL_ID=1  # optional, for pool tests

For fleet-level tests, ensure you have an organization and fleet; use the org and fleet IDs from the dashboard when calling fleet APIs.