
Actor Testing
Pricing
Pay per usage

Actor Testing
Test your actors with varying inputs and expected outputs, duplicates, bad output fields, or unexpected log messages using Jasmine
0.0 (0)
Pricing
Pay per usage
10
Monthly users
1
Runs succeeded
85%
Last modified
a month ago
You can access the Actor Testing programmatically from your own applications by using the Apify API. You can also choose the language preference from below. To use the Apify API, you’ll need an Apify account and your API token, found in Integrations settings in Apify Console.
1echo '{
2 "testSpec": "({ it, xit, moment, _, run, expect, expectAsync, input, describe }) => {\\n (input.resource ? [\\n '\''beta'\'',\\n ] : [\\n '\''latest'\'',\\n ]).forEach((build) => {\\n describe(`${build} version`, () => {\\n it('\''test something-task'\'', async () => {\\n const runResult = await run({\\n taskId: '\'''\'',\\n });\\n\\n await expectAsync(runResult).toHaveStatus('\''SUCCEEDED'\'');\\n await expectAsync(runResult).withLog((log) => {\\n expect(log)\\n .withContext(runResult.format('\''ReferenceError'\''))\\n .not.toContain('\''ReferenceError'\'');\\n expect(log)\\n .withContext(runResult.format('\''TypeError'\''))\\n .not.toContain('\''TypeError'\'');\\n });\\n\\n await expectAsync(runResult).withStatistics((stats) => {\\n expect(stats.requestsRetries)\\n .withContext(runResult.format('\''Request retries'\''))\\n .toBeLessThan(3);\\n\\n expect(stats.crawlerRuntimeMillis)\\n .withContext(runResult.format('\''Run time'\''))\\n .toBeWithinRange(0.1 * 60000, 10 * 60000);\\n });\\n\\n await expectAsync(runResult).withDataset(({ dataset, info }) => {\\n expect(info.cleanItemCount)\\n .withContext(runResult.format('\''Dataset cleanItemCount'\''))\\n .toBeGreaterThan(0);\\n\\n expect(dataset.items)\\n .withContext(runResult.format('\''Dataset items array'\''))\\n .toBeNonEmptyArray();\\n });\\n });\\n });\\n });\\n}",
3 "slackChannel": "#public-actors-tests-notifications",
4 "slackPrefix": "@lead-dev @actor-owner"
5}' |
6apify call pocesar/actor-testing --silent --output-dataset
Actor Testing API through CLI
The Apify CLI is the official tool that allows you to use Actor Testing locally, providing convenience functions and automatic retries on errors.
Install the Apify CLI
1npm i -g apify-cli
2apify login
Other API clients include:
Pricing
Pricing model
Pay per usageThis Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage.