Session Consistency

Test #19

Can your scraper log in once and return later without re-authenticating? This test verifies cross-session cookie persistence — just like a real browser that stays logged in.

Test Passing Criteria
How It Works

Real users log in once and stay logged in for days or weeks. Their browser persists cookies across tabs, restarts, and separate browsing sessions. This test checks whether your scraper can do the same.

Phase 1 — First Visit (Login & Scrape):

  1. Login via POST to /api/test/session-consistency/login with test credentials
  2. Access profile at /api/test/session-consistency/profile to get authenticated data
  3. Visit step pages (steps 2-4) to scrape content
  4. Save all cookies from your cookie jar to disk

Phase 2 — Return Visit (No Login):

  1. Load saved cookies into your scraper
  2. Go directly to /api/test/session-consistency/returning — do NOT login again
  3. If your cookies are valid, exclusive returning-visitor data is unlocked
Two-Phase Flow

Phase 1 — First Visit

LoginPOST /api/test/session-consistency/login
ProfileGET /api/test/session-consistency/profile
Step 2GET /tests/session-consistency/step/2Visit
Step 3GET /tests/session-consistency/step/3Visit
Step 4GET /tests/session-consistency/step/4Visit
Save cookies to disk

Phase 2 — Return Visit

CheckGET /api/test/session-consistency/check
ReturnGET /api/test/session-consistency/returning
Test Credentials

Username: testuser1 through testuser5

Password: password123