Skip to content

Testing scraper output with reference records

Engineering · Oct 5, 2026 · BatScrape Team

Illustration accompanying testing scraper output with reference records

A reference record pairs an example input with the output you expect. It makes a useful starting point for testing a scraper because the expected behavior is visible in the test itself.

As we develop BatScrape’s Actors, we plan to use small, reviewable fixtures to check transformations and output shape. This is an approach under development, not a claim about an established production test suite.

Pick examples that reveal assumptions

Start with an ordinary record, a record missing optional fields, and a record with an unusual but valid value. Include the source context needed to explain why the expected output is correct.

Use synthetic or appropriately permitted examples, and avoid including credentials or private data in a fixture.

Fail when there is nothing to check

A test loader that finds no fixtures should report a failure. Otherwise, a renamed directory can turn a useful check into a successful run that checked nothing.

The same principle applies when the expected number of cases changes: make that change visible for review.

Keep the limits clear

Saved examples can verify parsing logic without making live requests. They cannot prove that a source still returns the same structure today. Live checks and fixture tests answer different questions, so we plan to document what each check covers as the Actors are released.

BatScrape Team

Building BatScrape

Back to blog

YOUR NEXT DATA PROJECT STARTS HERE

Explore a source. Imagine what’s next.

From public platforms to structured data. We’re building source-specific Actors for Apify, so you can spend more time on what comes next.

Building on Apify JSON / CSV

TikTok Shop, Reddit, Threads, TikTok, Douyin, FollowScores, and Realtor.com are live on Apify. The other sources in the example are planned.

LIVE & PLANNED SOURCES → EXAMPLE DATASET

BAT SCRAPE
Runs on Apify
{ } your-data.json JSON
{
  "id": "0000000000000000001",
  "description": "Example description #example",
  "createDate": "2026-09-01",
  "searchKeyword": "coffee"
}

Pick a platform. See what comes out.

your-data.json EXAMPLE
{
  "id": "0000000000000000001",
  "description": "Example description #example",
  "createDate": "2026-09-01",
  "searchKeyword": "coffee"
}