Multi-case test suites with 6 assertion types
Deploy Guard is a test automation tool that runs up to 20 test cases against any Apify actor in a single suite. Each test case defines its own input and assertions — 6 assertion types validate result counts, required fields, field types, duration limits, and empty values — for a flat fee of $0.35 per suite, regardless of how many test cases are included.
Manual actor testing requires running each input scenario separately in the Apify Console and visually inspecting output — a process that takes 5-15 minutes per scenario. Deploy Guard automates all scenarios in a single run with structured pass/fail results, per-case error isolation, and timing data for performance regression detection.
Assert that your actor returns at least N results (minResults) or no more than N results (maxResults). Catches pagination bugs, empty outputs, and runaway scrapers that return unbounded data.
Verify that specified fields exist with non-null values in at least one output item. Catches missing extractors, changed CSS selectors, and broken API endpoints that silently drop fields.
Assert that fields match expected JavaScript types: string, number, boolean, object, or array. Catches silent type coercion issues like prices stored as strings instead of numbers.
Set a maxDuration per test case in seconds. If a 10-second test starts taking 60 seconds, the assertion fails — catching performance regressions from target site changes or proxy issues.
Assert that fields are never null, undefined, empty string, or empty array. Catches scrapers that technically succeed but return blank data — a common failure mode that passes result count checks.
If one test case crashes or times out, the remaining cases still run and produce results. One bad scenario does not block the rest of the suite — each case runs as an independent actor call.
There are 4 common approaches to testing Apify actors with multiple input scenarios. Each has trade-offs in automation level, assertion coverage, and cost.
| Method | Time per scenario | Assertion types | Automation | Cost |
|---|---|---|---|---|
| Deploy Guard | 10-60 seconds (depends on actor) | 6 types: counts, fields, types, duration, empty values, isolation | Fully automated (define cases once, rerun via API) | $0.35/suite + actor compute |
| Manual Apify Console runs | 5-15 minutes | Visual inspection only (no structured assertions) | Fully manual per scenario | Free (time cost only) |
| Custom API test script | 3-6 hours (initial setup), seconds per run | Unlimited (custom code, but you build each assertion) | Automated after development | Free (development time cost) |
| Jest / Vitest unit tests | Milliseconds per test | Function-level assertions (does not test full actor on platform) | Automated (local only, no platform integration) | Free |
No single testing method catches every issue — the most reliable approach combines unit tests for logic with end-to-end platform tests for integration and performance.
{
"actorName": "ryanclinton/google-maps-email-extractor",
"totalTests": 3,
"passed": 2,
"failed": 1,
"totalDuration": 45.2,
"results": [
{
"name": "Basic search",
"passed": true,
"duration": 12.1,
"resultCount": 5,
"assertions": [
{ "assertion": "minResults >= 3", "passed": true, "actual": 5 },
{ "assertion": "field 'businessName' exists", "passed": true },
{ "assertion": "field 'email' type === string", "passed": true }
]
},
{
"name": "Location filter",
"passed": true,
"duration": 29.9,
"resultCount": 12,
"assertions": [
{ "assertion": "maxDuration <= 60", "passed": true, "actual": 29.9 },
{ "assertion": "noEmptyValues: 'phone'", "passed": true }
]
},
{
"name": "Empty input",
"passed": false,
"duration": 3.2,
"resultCount": 0,
"error": "Run status: FAILED"
}
]
}Connect your Apify API token and enter the actor ID to test
Deploy Guard runs each test case on your account with its own input and assertions
Get a structured pass/fail report with per-case timing, assertion details, and error messages — results cached for free
There are several approaches to testing Apify actors across multiple input scenarios, from fully manual to fully automated. The right choice depends on your team size, deployment frequency, and how critical your scrapers are to downstream systems.
Run the actor manually in the Apify Console with each input scenario, then inspect the output visually. Works for ad-hoc checks but does not scale — testing 5 scenarios manually takes 25-75 minutes and provides no structured assertions or regression history.
Best for: one-off debugging of a specific actor input before deployment.
Write a Node.js or Python script that calls the Apify API to run the actor with different inputs and checks the output dataset programmatically. Requires 3-6 hours of initial development and ongoing maintenance as assertions evolve.
Best for: teams with custom CI/CD pipelines who need assertions not covered by standard testing tools.
Standard JavaScript test frameworks that validate individual functions in isolation. Fast (milliseconds per test) and free, but cannot test the full actor on the Apify platform — they miss proxy issues, API rate limits, platform timeouts, and deployment-specific failures.
Best for: testing pure data transformation logic and utility functions during development.
Schedule the actor to run periodically via Apify Schedules and set up webhook alerts for failures. Catches hard failures but provides no assertion-level validation — a scraper can 'succeed' while returning incorrect data.
Best for: uptime monitoring and hard failure detection on production scrapers.
Automated multi-case test suites with 6 assertion types, per-case error isolation, and structured JSON output. Up to 20 test cases per suite at a flat $0.35. No scripting required — define cases as JSON input, trigger via UI or API.
Best for: developers who maintain multiple actors and need repeatable, assertion-based end-to-end testing.
Each approach has trade-offs in setup time, assertion depth, and maintenance burden. The right choice depends on your deployment frequency and how critical your scrapers are to downstream data pipelines.
Every suite run executes on your own Apify account at the flat pay-per-event rate of $0.35 per suite— not per test case. A suite with 20 test cases costs the same $0.35 as a suite with 1 test case. You also pay standard Apify compute costs for the individual actor runs. ApifyForge has no platform fee or subscription. Apify's free plan includes $5/month in credits, enough for approximately 14 suite runs per month.
Deploy Guard accepts a list of test cases — each with a name, actor input, and assertions — and runs them sequentially against your Apify actor on your own account. It validates output using 6 assertion types (minResults, maxResults, requiredFields, fieldTypes, maxDuration, noEmptyValues) and produces a pass/fail report with per-case timing, result counts, and specific assertion failures.
Deploy Guard supports up to 20 test cases per suite at the flat $0.35 fee. Each test case runs as an independent actor call with its own input and assertions. Since the price is per suite rather than per test case, adding more cases improves cost efficiency — 20 test cases at $0.35 works out to $0.0175 per case.
The 6 assertion types are: (1) minResults — actor must return at least N items, (2) maxResults — actor must return no more than N items, (3) requiredFields — specified fields must exist with non-null values, (4) fieldTypes — fields must match expected JavaScript types (string, number, boolean, object, array), (5) maxDuration — run must complete within N seconds, (6) noEmptyValues — fields must not be null, undefined, empty string, or empty array.
Each suite run costs $0.35, charged as a pay-per-event (PPE) fee on your own Apify account. ApifyForge has no platform fee or subscription. Apify's free tier includes $5/month in credits, enough for approximately 14 suite runs per month. You also pay standard Apify compute costs for the actor runs themselves.
Deploy Guard uses per-case error isolation. If one test case crashes, times out, or returns an actor error, the remaining test cases still run and produce results. The failed case is marked with passed: false and includes the specific error message, while passing cases report their assertions normally.
Yes. Deploy Guard runs as an Apify actor, so you can trigger it via the Apify API from any CI/CD system (GitHub Actions, GitLab CI, Jenkins). Pass your test cases as JSON input, then check the output dataset for any failed assertions. The structured JSON output makes it straightforward to parse programmatically.
Deploy Guard validates a single actor against multiple input scenarios in one run — it answers 'does my actor handle these inputs correctly?' ApifyForge Regression Tests, by contrast, runs the same actor twice (before and after a code change) and compares outputs to detect regressions. Test Runner checks correctness; Regression Tests check stability.
No. Unit tests validate individual functions in isolation, while Deploy Guard validates the full actor end-to-end on the Apify platform. They serve different purposes: unit tests catch logic errors during development, while Test Runner catches integration issues, API changes, and platform-level failures that only appear when the actor runs in production.