-
Notifications
You must be signed in to change notification settings - Fork 0
Testing and Verification
This page captures the normal validation flow for PumpSync changes across the iOS app and backend.
Regenerate the Xcode project whenever files or project settings change:
xcodegen generateList schemes and destinations:
xcodebuild -list -project PumpSync.xcodeproj
xcodebuild -showdestinations -project PumpSync.xcodeproj -scheme PumpSyncRun the main iOS test lane:
xcodebuild test -project PumpSync.xcodeproj -scheme PumpSync -destination 'platform=iOS Simulator,name=iPhone 17,OS=latest'Keep validation output unfiltered. Raw xcodebuild may print Xcode/simulator runtime warnings that are useful for diagnosis.
Current unit/UI coverage includes:
- Auth service behavior.
- Backend session storage.
- Diagnostics log storage.
- Health access behavior.
- Hosted subscription presentation.
- Initial import range logic.
- JSON codec behavior.
- Native diagnostics storage.
- Support bundle construction.
- Sync view behavior.
- UI launch coverage.
For iOS changes, include focused tests for the touched area and run the full PumpSync scheme test action when possible.
Physical iPhone validation is separate from simulator validation. Resolve the connected destination each time:
xcodebuild -showdestinations -project PumpSync.xcodeproj -scheme PumpSync
xcrun devicectl list devicesBuild/install with the resolved device ID and a fresh build output path. Do not claim launch proof unless the app was installed and opened on the actual device.
Expected backend branch validation:
dotnet restore PumpSync.Backend.slnx
dotnet build PumpSync.Backend.slnx --configuration Release
dotnet test PumpSync.Backend.slnx --configuration Release
docker build -t pumpsync-backend:local .
az bicep build --file infra/bicep/main.bicep
az bicep build --file infra/bicep/main.subscription.bicepRun the API directly (a bare dotnet run fails startup validation; the minimum environment is documented in the backend's docs/configuration.md):
PumpSync__BackendMode=SelfHosted \
PumpSync__DataSourceMode=SyntheticDemo \
PumpSync__StorageProvider=Sqlite \
SqliteStorage__DatabasePath=./pumpsync.db \
PumpSync__ServiceTokenSigningKey=$(openssl rand -base64 32) \
ASPNETCORE_URLS=http://localhost:8080 \
dotnet run --project src/PumpSync.Api/PumpSync.Api.csproj
curl http://localhost:8080/api/v1/capabilities
curl http://localhost:8080/healthRun the Docker Compose demo (the placeholder signing key must be replaced first):
cp .env.example .env
sed -i.bak "s#^PumpSync__ServiceTokenSigningKey=.*#PumpSync__ServiceTokenSigningKey=$(openssl rand -base64 32)#" .env
rm .env.bak
docker compose up --build
curl http://localhost:8080/api/v1/capabilities
curl http://localhost:8080/healthHosted environment smoke tests should use the trusted base URL from deployment output or operator notes instead of copying live endpoint values into public docs. Include /api in the base URL unless the reverse proxy intentionally maps the API at the domain root.
Capabilities:
curl --fail <hosted-api-base-url>/v1/capabilitiesUnauthenticated status should return 401:
curl --silent --output /tmp/status.json --write-out '%{http_code}' <hosted-api-base-url>/v1/statusDemo capabilities:
curl --fail https://demo.pumpsync.ericslutz.dev/api/v1/capabilitiesUnauthenticated demo status should return 401:
curl --silent --output /tmp/status.json --write-out '%{http_code}' https://demo.pumpsync.ericslutz.dev/api/v1/statusAutomated tests do not replace real flow checks. For user-facing changes, verify the relevant path:
- Hosted subscription purchase/restore in the correct StoreKit environment.
- Self-host URL entry and session creation.
- Tandem credential save, validate, and delete.
- HealthKit permission request and Apple Health writes.
- Sync status, error, support, privacy, and settings copy.
- Duplicate-prevention behavior on repeated syncs.
- Synthetic demo connection with the public demo backend and demo credentials.
- Data deletion request link and installation ID support path.
A change is not complete until:
- The touched repository's focused tests pass.
- Broader iOS/backend validation is run when the behavior crosses repo boundaries.
-
git diff --checkpasses. - Route wording preserves
/api/v1as the backend route contract. - Wiki and source docs are updated when behavior or operational status changes.
PumpSync documentation: iOS repository · Backend repository · Issues