⚠️ IMPORTANT WARNING🚫 DO NOT USE FOR PRODUCTION TESTING 🚫
This test suite performs CRUD operations (Create, Read, Update, Delete) that will directly modify database content. Only use in Local and Development environments.
Backend API test suite using Hurl.
api-tests/
├── .env.hurl # Environment configuration file (create your own)
├── .env.hurl.example # Environment configuration template
├── .gitignore # Git ignore settings
├── run_all.sh # Run all tests
├── run_test.sh # Run a single test
├── tests/ # Test directory
│ └── test_*.hurl # Test files for each resource
└── README.md # This file
# macOS
brew install hurl
# For other platforms: https://hurl.dev/docs/installation.htmlCreate a .env.hurl file in the project root directory:
# .env.hurl
base_url=http://localhost:8080.env.hurl is included in .gitignore. Do not commit files containing actual environment information to Git.
Double check: Ensure that base_url points to a development or testing environment. Never point to production.
# Run all tests
./run_all.sh
# Run a single test (you can omit the test_ prefix and .hurl extension)
./run_test.sh shelters
./run_test.sh health
./run_test.sh supplies# Run all tests
hurl --test --variables-file .env.hurl tests/*.hurl
# Run a single test file
hurl --test --variables-file .env.hurl tests/test_health.hurl| File | Description |
|---|---|
test_health.hurl |
Health check and system info endpoints |
test_shelters.hurl |
Shelters CRUD |
test_medical_stations.hurl |
Medical stations CRUD |
test_mental_health_resources.hurl |
Mental health resources CRUD |
test_accommodations.hurl |
Accommodations CRUD |
test_shower_stations.hurl |
Shower stations CRUD |
test_water_refill_stations.hurl |
Water refill stations CRUD |
test_restrooms.hurl |
Restrooms CRUD |
test_volunteer_organizations.hurl |
Volunteer organizations CRUD |
test_human_resources.hurl |
Human resources CRUD (includes PATCH) |
test_supplies.hurl |
Supplies CRUD (includes supply items and batch delivery) |
test_reports.hurl |
Reports CRUD (includes PATCH) |
test_admin.hurl |
Admin endpoints |
- ✅ Each test file is independent and creates its own test data
- ✅ Some tests depend on previously created resource IDs (captured via
[Captures]) - ✅ Tests will create actual data in the database
⚠️ Make sure to use a test environment to avoid polluting production data⚠️ Always verify thebase_urlsetting in.env.hurlbefore running tests
🔒 If you need to add sensitive information (such as API keys) to .env.hurl:
- Ensure
.env.hurlis included in.gitignore - Never commit configuration files containing sensitive information to version control
- Create
.env.hurl.exampleas a template for other developers to reference