You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Create test plan for testing APS and auction refactoring #175
How to produce success and failure for every endpoint, with every input variation and config permutation. All tests assume fastly compute serve running on example.com.
Prerequisites
fastly compute serve
Config lives in trusted-server.toml. Every config change requires a restart.
Expected: HTTP 502, body: Auction error: Failed to parse auction request body
⚠️ Status Code Observation
JSON parse failures return 502 (Bad Gateway) because the error is wrapped in TrustedServerError::Auction, which maps to 502. This is arguably a bug -- it should be 400. Worth noting but not blocking.
Expected: HTTP 200, ad unit skipped, empty seatbid.
1.3 Wrong HTTP Method
# GET -- falls through to publisher origin proxy
curl -s -w "\n%{http_code}" http://example.com/auction
# PUT -- falls through to publisher origin proxy
curl -s -w "\n%{http_code}" -X PUT http://example.com/auction \
-H "Content-Type: application/json" -d '{}'# DELETE
curl -s -w "\n%{http_code}" -X DELETE http://example.com/auction
Expected: These do NOT hit the auction handler. They fall through to handle_publisher_request() which proxies to the publisher origin. You'll get whatever the origin returns (likely 404 or the site's homepage).
Expected: The orchestrator logs a warning "Provider 'nonexistent' not registered, skipping" and continues. If ALL providers are unregistered/skipped, you get an empty response with no bids (not an error -- the run_providers_parallel function returns an empty vec since the provider_names.is_empty() check passes but all providers are skipped in the loop).
ℹ️ Subtle Behavior providers = [] errors immediately. providers = ["nonexistent"] does NOT error -- it logs a warning and returns zero bids. The empty check is on the config list, not on actually-launched requests.
Expected: HTTP 200, Prebid returns a response but with seatbid: []. Orchestrator records BidStatus::NoBid for Prebid. Final response has empty seatbid.
Activity
jevansnyc commentedon Jan 26, 2026
explore documentation found here: https://github.com/amzn/DynamicTrafficEngine
This is not the integration we want for TS but could be helpful for req/resp models
ChristianPavilonis commentedon Feb 2, 2026
Auction Orchestration Testing Guide
How to produce success and failure for every endpoint, with every input variation and config permutation. All tests assume
fastly compute serverunning onexample.com.Prerequisites
Config lives in
trusted-server.toml. Every config change requires a restart.1.
/auction(POST) -- The Main Endpoint1.1 Successful Requests
Minimal valid request
Expected: HTTP 200, JSON body with
seatbidarray,ext.orchestratormetadata.Multiple ad units with bidder params
Expected: HTTP 200, bids for each slot, bidder params forwarded to Prebid Server.
Successful response anatomy
{ "id": "<uuid>", "seatbid": [ { "seat": "appnexus", "bid": [ { "id": "appnexus-header-banner", "impid": "header-banner", "price": 2.50, "adm": "<div>...rewritten creative HTML...</div>", "crid": "appnexus-creative", "w": 728, "h": 90, "adomain": ["advertiser.com"] } ] } ], "ext": { "orchestrator": { "strategy": "parallel_only", "providers": 1, "total_bids": 2, "time_ms": 245 } } }1.2 Invalid Request Body
Broken JSON
Expected: HTTP 502, body:
Auction error: Failed to parse auction request bodyEmpty body
Expected: HTTP 502, body:
Auction error: Failed to parse auction request bodyMissing
adUnitsfieldExpected: HTTP 502, body:
Auction error: Failed to parse auction request body(serde requiresadUnits).adUnitsis wrong typeExpected: HTTP 502, parse error.
Invalid banner size -- single element
Expected: HTTP 400, body:
Bad request: Invalid banner size; expected [width, height]Invalid banner size -- three elements
Expected: HTTP 400, same error as above.
Invalid banner size -- empty array
Expected: HTTP 400, same error.
Empty ad units array (valid JSON, no slots)
Expected: HTTP 200 with empty
seatbid: []-- the orchestrator runs with zero slots and returns no bids. Verifyext.orchestrator.total_bidsis 0.Ad unit without
mediaTypesExpected: HTTP 200, the ad unit is skipped (no formats to bid on), empty
seatbid.Ad unit with null
mediaTypesExpected: HTTP 200, ad unit skipped, empty
seatbid.1.3 Wrong HTTP Method
Expected: These do NOT hit the auction handler. They fall through to
handle_publisher_request()which proxies to the publisher origin. You'll get whatever the origin returns (likely 404 or the site's homepage).1.4 No Content-Type Header
Expected: Should still work --
serde_json::from_sliceparses bytes directly, doesn't check content-type. Verify this returns 200.2. Config Permutations
Each requires editing
trusted-server.tomland restartingfastly compute serve.No providers configured
Expected: HTTP 502, body:
Auction error: No providers configuredProvider listed but not registered
Expected: The orchestrator logs a warning
"Provider 'nonexistent' not registered, skipping"and continues. If ALL providers are unregistered/skipped, you get an empty response with no bids (not an error -- therun_providers_parallelfunction returns an empty vec since theprovider_names.is_empty()check passes but all providers are skipped in the loop).Prebid Returns No Bids (example curl)
Expected: HTTP 200, Prebid returns a response but with
seatbid: []. Orchestrator recordsBidStatus::NoBidfor Prebid. Final response has emptyseatbid.ChristianPavilonis commentedon Feb 2, 2026
Looking at this maybe we should tweek some of the behavior depending on the configuration.
Also maybe we don't need an enabled config 🤔
aram356 commentedon Feb 2, 2026
@ChristianPavilonis Test plan looks good. Let run through the plan and then we can close.
ChristianPavilonis commentedon Feb 2, 2026
ran through the tests