Developer GuideCookbookFull Integration Test in Sandbox

Full Integration Test in Sandbox

Run this end-to-end validation before switching any supply source (Publisher) or demand source (DSP) to live. Covers supply, demand, and Delegate integrations.

Time required: ~30 minutes Prerequisites: Supply source created in sandbox mode, demand source or Delegate strategy configured in sandbox mode.


Phase 1: Supply validation (VAST)

Fire 10 VAST requests

for i in {1..10}; do
  curl -s "https://rtb.praevis.com/vast?site_id={PUBLISHER_ID}&w=1920&h=1080&ip=203.0.113.$i&ua=TestAgent/1.0&sandbox=true" \
    -o /tmp/vast_response_$i.xml
  echo "Request $i: $(head -c 100 /tmp/vast_response_$i.xml)"
done

Check fill rate

At least 6 of 10 requests should return a filled VAST (containing <InLine> or <Wrapper>). HighBidder wins ~70–80% of sandbox auctions.

Pass: grep -l "<InLine>" /tmp/vast_response_*.xml | wc -l returns 6+.

Validate one VAST response

Pick a filled response and validate it:

cat /tmp/vast_response_1.xml

Check:

  • <VAST version= present
  • <MediaFile> URL present and reachable over HTTPS
  • <Duration> matches expected creative length
  • <Impression> tracking pixel URL present

Check sandbox metrics

Wait 65 seconds, then:

curl "https://api.praevis.com/api/supply/sources/{PUBLISHER_ID}/stats?period=1h&sandbox=true" \
  -H "X-API-Key: {YOUR_KEY}"

impressions should be 6+. If 0, impression tracking pixel isn’t firing.


Phase 2: Impression tracking validation

Manually fire an impression pixel

Take the <Impression> URL from a filled VAST response and fire it:

IMPRESSION_URL=$(grep -oP '(?<=<!\[CDATA\[)[^]]+(?=\]\]>)' /tmp/vast_response_1.xml | grep "track/impression")
curl -v "$IMPRESSION_URL"

Expected: HTTP 200 response.

Confirm revenue updated

Wait 65 seconds, re-run the stats endpoint. revenue_cents should be non-zero.


Phase 3: Empty VAST handling

Fire a request that will return empty

Set a floor above $10 to guarantee no bids:

curl -s "https://rtb.praevis.com/vast?site_id={PUBLISHER_ID}&w=1920&h=1080&ip=203.0.113.1&ua=TestAgent&sandbox=true&floor=10.00"

Expected response:

<?xml version="1.0" encoding="UTF-8"?>
<VAST version="4.0"/>

Verify your ad server handles it

Paste the empty VAST into your ad server’s VAST tester. Confirm: passback fires (or house ad shows), no JavaScript error, no player crash.


Phase 4: RTB demand validation

Skip if you’re testing a Delegate demand source — see Phase 5.

Send a test bid request to your endpoint

POST /api/sandbox/test-bid
{
  "dsp_id": "{DSP_ID}",
  "scenario": "ctv-uae-drama"
}

Verify bid response

Response includes response_status: 200, response_time_ms is under 150.

outcome should be win or below-floor (not timeout or error).

Check circuit breaker

GET /api/demand/sources/{DSP_ID}/health

circuit_breaker should be "closed".


Phase 5: Delegate strategy validation

Test all major rule branches

For each targeting segment your strategy covers, run a simulation:

# Test your primary targeting
POST /api/sandbox/simulate-auction
{
  "dsp_id": "{DSP_ID}",
  "auction": { ...your target conditions... }
}
# <span className="praevis-chk">✓</span> Expected: matched_rule = your rule name, bid_cpm > floor
 
# Test no-match scenario
POST /api/sandbox/simulate-auction
{
  "dsp_id": "{DSP_ID}",
  "auction": { "geo": { "country": "ZZ" }, "device": { "devicetype": "2" } }
}
# <span className="praevis-chk">✓</span> Expected: matched_rule = null (or fallback rule)

Test budget exhaustion

Set a $1 daily budget, fire 100 simulations. After ~5–10 simulations Guide should pause the campaign.

for i in {1..20}; do
  POST /api/sandbox/simulate-auction { "dsp_id": "{DSP_ID}", "auction": {...} }
done
GET /api/demand/sources/{DSP_ID}/health  # daily_budget_remaining_cents should reach 0

Reset and verify

POST /api/sandbox/reset  # Clear budget counter
GET /api/demand/sources/{DSP_ID}/health  # daily_budget_remaining_cents should reset

Go / No-Go checklist

CheckPass criteria
VAST fill rate≥60% in sandbox
Empty VAST handlingNo player error, passback fires
Impression pixel firesRevenue increments in stats
RTB response time<150ms, no timeouts
Circuit breakerRemains closed throughout
Delegate rules matchAll targeting segments return expected bids
Budget pacingCampaign pauses when budget exhausted
Metrics in dashboardImpressions and revenue visible after 65s

All green? Disable sandbox mode on your supply source and demand source and go live.

⚠️

After going live, monitor the dashboard for the first 30 minutes. Check fill rate, revenue, and circuit breaker state. If anything looks wrong, re-enable sandbox mode to pause live traffic while you investigate.