Skip to content
cccskills
FreePublished on GitHub

serverless-integration-test-builder

Workflow-driven skill that builds the integration-test suite for a serverless application from its IaC definition (SAM template / serverless.yml / Wrangler config / Vercel functions / Netlify functions). Walks through: identifying the function inventory + event sources, picking the right local-emulator per function (sam local / Miniflare / netlify dev / vercel dev / serverless-offline), generating test events per event source, asserting on cold-start + timeout budgets, and emitting the test directory + CI config. Use when introducing integration tests to a serverless project.

The English summary is being prepared. Showing the original description.

testland/qa13 stars(GitHub 13 + cccskills 0)

Run score Not tested

See how to install

Files included (2)

  • SKILL.md10.4 KB
  • .tessl-plugin/plugin.json733 B

SKILL.md (original)

Review the instructions the agent will receive before you install.

serverless-integration-test-builder

Overview

Serverless integration tests are awkward because the test surface is multi-tool: each platform has its own local emulator, event-source binding model, and cold-start characteristic. This skill produces a coherent test directory from the IaC definition.

The output: a test directory layout + per-function test files

  • CI config.

When to use

  • New serverless project; need integration test coverage.
  • Inherited a serverless project with no tests; need to build coverage.
  • Migrating between platforms (e.g., Lambda → Workers); need to port test discipline.

Step 1 - Inventory functions from IaC

Per platform:

PlatformIaC sourceWhere functions live
AWS SAMtemplate.yaml AWS::Serverless::FunctionResources.<name>
Serverless Frameworkserverless.yml functions:each entry
Cloudflare Workerswrangler.toml + script bindings[[durable_objects.bindings]], scripts
Vercelpages/api/ + app/api/ + middlewarefilesystem-derived
Netlifynetlify/functions/, netlify/edge-functions/filesystem-derived
# Example: SAM
yq '.Resources | to_entries | map(select(.value.Type == "AWS::Serverless::Function")) | .[].key' template.yaml

# Example: Serverless Framework
yq '.functions | keys' serverless.yml

Output: a function inventory:

functions:
  - name: get-user
    platform: aws-sam
    runtime: nodejs20.x
    handler: src/get-user.handler
    timeout: 10
    memory: 512
    events:
      - type: api
        path: /users/{id}
        method: GET
  - name: process-upload
    platform: aws-sam
    runtime: python3.12
    timeout: 300
    events:
      - type: s3
        bucket: uploads
        events: ['s3:ObjectCreated:*']

Step 2 - Pick the emulator per function

Default: pick one emulator per platform detected in Step 1's inventory - the per-platform skill below is the canonical driver for that runtime. Use multiple emulators only when the project mixes platforms (e.g., Vercel app

  • AWS Lambdas).
PlatformTest pathSkill
AWS Lambda (Node/Python/etc.)sam local invoke or direct handleraws-sam-local-testing
AWS Lambda (.NET)Amazon.Lambda.TestUtilitiesaws-sam-local-testing references/dotnet.md
Cloudflare Workersvitest-pool-workers / Miniflarecloudflare-workers-miniflare
Azure FunctionsCore Tools func start + Azuriteazure-functions-tests
Vercel Edge / Netlify / Serverless FrameworkLambda-under-the-hood; vendor dev CLI + direct handler(no dedicated skill; same patterns as SAM)

Step 3 - Generate test events per event source

Event sourceTool
API Gateway requestsam local generate-event apigateway aws-proxy
S3 object createdsam local generate-event s3 put
SQS messagesam local generate-event sqs receive-message
DynamoDB Streamssam local generate-event dynamodb update
EventBridgesam local generate-event events
Cloudflare Workers fetchnew Request('https://...') directly
Vercel/Netlifyconstruct Request object

Commit events to tests/fixtures/events/. Reference in tests.

Step 4 - Emit test scaffold per function

tests/
  integration/
    get-user.test.ts
    process-upload.test.ts
  fixtures/
    events/
      api-get-users-id.json
      s3-object-created.json
    payloads/
      user-1.json
  conftest.py             # Or jest setup
  README.md               # How to run + matrix

Per-function test:

// tests/integration/get-user.test.ts
import { handler } from '../../src/get-user';
import event from '../fixtures/events/api-get-users-id.json';

describe('get-user', () => {
  test('returns 200 for valid id', async () => {
    const response = await handler({ ...event, pathParameters: { id: '1' } } as any, {} as any);
    expect(response.statusCode).toBe(200);
  });

  test('returns 404 for missing id', async () => {
    const response = await handler({ ...event, pathParameters: { id: 'missing' } } as any, {} as any);
    expect(response.statusCode).toBe(404);
  });

  test('completes within timeout budget', async () => {
    // Per cold-start-budget-reference references/timeout-budgets.md: timeout=10s; want headroom
    const start = Date.now();
    await handler({ ...event, pathParameters: { id: '1' } } as any, {} as any);
    const elapsed = Date.now() - start;
    expect(elapsed).toBeLessThan(5000);  // 50% of timeout
  });
});

Step 5 - Cold-start + timeout budget assertions

For each function, derive a budget from cold-start-budget-reference (cold-start tables + timeout budgets in its references/timeout-budgets.md).

Typical cold starts per runtime (per AWS / Cloudflare / Vercel docs; bigger packages and memory classes skew higher):

RuntimeTypical cold start
AWS Lambda Node.js (256MB)200-700ms
AWS Lambda Python (256MB)250-800ms
AWS Lambda Java 11 (512MB, no SnapStart)1.5-6s
AWS Lambda Java 11 (512MB, SnapStart)100-300ms
AWS Lambda .NET (1GB)1-3s
AWS Lambda Go (256MB)100-300ms
AWS Lambda Rust (256MB)50-200ms
Cloudflare Workers0-5ms (V8 isolate spawn)
Vercel Edge Runtime5-30ms
Vercel Node.js Functions200-500ms (small) to 2-3s (large)
Netlify Functions300ms-2s

The upstream integration - not the function's own timeout - is usually the operational ceiling (per docs.aws.amazon.com/lambda; Lambda's hard maximum is 900s):

IntegrationTimeout ceiling
API Gateway (REST + HTTP API)29s hard - function timeout must be < 29s
Application Load Balancer4s default; configurable to 4000s
CloudFront Lambda@Edge5s viewer functions; 30s origin functions
SQS event sourcePer-queue visibility timeout (default 30s); function timeout must be below it
DynamoDB Streams6-hour batch window; per-batch function limit
EventBridge (async)Async with retry on timeout - requires idempotency
Step FunctionsPer-task timeout, default 60s
Cloudflare Workers10ms CPU (free) / 50ms CPU (paid); 30s wall-clock
Vercel Edge Functions30s wall-clock max

Set the assertion threshold at roughly 50% of the binding ceiling so a regression trips the test before it trips production:

budgets:
  get-user:
    cold_start_p99_ms: 800       # AWS Lambda Node@512MB typical
    warm_p99_ms: 200
    timeout_s: 10
    integration_timeout: api-gateway-29s   # API GW < 29s

  process-upload:
    cold_start_p99_ms: 1500
    warm_p99_ms: 2000
    timeout_s: 300
    integration_timeout: s3-event-async    # No upstream limit

These become assertion thresholds in staging-smoke tests (run against deployed functions, not local).

Step 6 - CI integration

# .github/workflows/serverless-tests.yml
jobs:
  local-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v5
      - uses: actions/setup-node@v4
      - uses: aws-actions/setup-sam@v2
      - run: sam build --use-container
      - run: npm ci && npx jest tests/integration/

  staging-deploy-and-smoke:
    if: github.ref == 'refs/heads/main'
    runs-on: ubuntu-latest
    needs: local-tests
    steps:
      - uses: actions/checkout@v5
      - run: sam deploy --stack-name staging --parameter-overrides Stage=staging
      - run: npx jest tests/staging-smoke/

Two-tier: local-fast tests on every PR; deploy + smoke on main.

Step 7 - Document coverage matrix

# Serverless Integration Test Matrix

## Functions covered

| Function | Local test | Cold-start test | Timeout test | Event sources |
|---|---|---|---|---|
| get-user | ✅ tests/integration/get-user.test.ts | staging only | ✅ <5s | API GW GET /users/{id} |
| process-upload | ✅ | staging only | ✅ <150s of 300s | S3 ObjectCreated |
| ... | | | | |

## Gaps

- `legacy-export` - no integration tests; on backlog.
- Cold-start tests not feasible locally for any function (per `cold-start-budget-reference`).

## How to add a new function

1. Add to IaC.
2. Generate event fixture.
3. Add test file following the template.
4. Update this matrix.

Anti-patterns

Anti-patternWhy it failsFix
One emulator for all functionsMixed-platform tests are awkward; some emulators miss platform-specific behaviourPer-platform emulator
No staging deploy + smoke testsLocal-pass + prod-fail gapTwo-tier CI
Hand-rolled event payloadsSchema drift; missed fieldsUse sam local generate-event or commit fixtures
Skip cold-start budget assertionsp99 spikes go unnoticedPer-function budget in staging smoke
Test directory mixed with prod codetests/ dir not in deploy artifactKeep separate
No README documenting matrixFuture maintainers can't add functions consistentlyStep 7 README
Inflate jest test timeouts to mask slow handlersHides performance regressionMatch jest timeout to function timeout
Mock AWS SDK in all testsTests pass; IAM permission bugs hideUse LocalStack or real test account

Output

This skill produces:

  • A function inventory (Step 1).
  • Per-function test files using the right emulator (Steps 2-4).
  • A budget matrix (Step 5).
  • A two-tier CI config (Step 6).
  • A coverage matrix README (Step 7).

References

  • Companion catalog: cold-start-budget-reference (cold-start + timeout budgets).
  • Per-platform tools: aws-sam-local-testing (incl. .NET in references/dotnet.md), cloudflare-workers-miniflare, azure-functions-tests.
  • Cross-plugin: testcontainers (in the qa-test-environment plugin)
    • LocalStack alternative for AWS-service emulation.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Builds a CI gate that fails the build on **new** WCAG / a11y violations introduced by a PR while grandfathering pre-existing violations on a per-rule / per-page baseline. Aggregates verdicts from axe-core / pa11y / Lighthouse a11y / WAVE / IBM Equal Access scans. Use when a project has accumulated a11y debt and a strict "zero violations" gate would block every PR - the ratchet pattern lets the team ship while preventing regressions.

The English summary is being prepared. Showing the original description.

testland/qa13Updated Oct 20, 2026

Workflow skill that builds an A/B-test validity checklist from an experiment proposal, walking the canonical design-correctness gates - pre-registered OEC/power/guardrails, randomization unit + SRM check, assignment integrity, telemetry, peeking discipline, novelty/primacy, post-experiment SRM re-check - into a per-experiment checklist + sign-off form. Use when launching, auditing, or governing an experiment. For pitfall mechanics (guardrails, peeking) see experiment-results-interpreter's references; to read an already-valid result use experiment-results-interpreter; for per-SDK harness tests use experiment-sdk-testing - this gates DESIGN, not SDK code.

The English summary is being prepared. Showing the original description.

testland/qa13Updated Oct 20, 2026

The single install-flow skill: the reference contract for the PWA install flow (installability gate fields, `beforeinstallprompt` handshake, per-platform paths - Android WebAPK / iOS Share menu / Firefox no-op - and the `display-mode` post-install signal, in references/install-flow-reference.md) plus the build-an-X workflow that emits the Add-to-Home-Screen suite. Walks the four-stage timeline, emitting one test per gate cell per [web.dev/articles/install-criteria][install-criteria], the deferred-prompt → `prompt()` → `userChoice` chain per [web.dev/articles/customize-install][customize-install], the iOS Safari manual-metadata branch (`apple-touch-icon`) per [web.dev/learn/pwa/installation][learn-pwa], and the post-install `(display-mode: standalone)` MQ assertion. Output: a Playwright spec with per-stage cells plus a coverage matrix. Use when a PWA's manifest, icons, or install handler change, when install conversion drops at an unknown stage, or when triaging a flaky install assertion.

The English summary is being prepared. Showing the original description.

testland/qa13Updated Oct 20, 2026

Build-an-X workflow that uses an LLM to map existing tests to spec sections - given a spec doc + the test suite, the LLM identifies which tests cover which sections, surfaces uncovered sections (gap), and recommends specific tests to add. Output is a coverage matrix per spec ID. Scope is mapping tests that already exist and naming the gaps, not authoring tests for new acceptance criteria. Use when a spec doc and a test suite both exist but nobody can say which requirements are actually covered - before a release sign-off, an audit, or a decision about where to spend the next round of test effort.

The English summary is being prepared. Showing the original description.

testland/qa13Updated Oct 20, 2026

Generates tests from natural-language specs (acceptance criteria, user stories, requirements) using an LLM, with confidence scoring per test case (LLM self-assessment plus heuristics: assertion quality, naming, completeness), batching uncertain cases for human review, and integration with the team's existing test framework. Use when the user asks to generate unit tests from acceptance criteria, convert user stories to test cases, automate test creation from requirements, or augment a spec-driven test suite with AI-generated stubs that are then curated before merge.

The English summary is being prepared. Showing the original description.

testland/qa13Updated Oct 20, 2026

Configures Allure Report (test-runner adapter install, `allure-results` directory wiring, `categories.json` for failure classification, `history-trend.json` retention via the copy-history-between-runs pattern), runs the Allure CLI to convert `allure-results` to a static HTML site, and uploads the report as a CI artifact. Use when the team needs richer test reporting than JUnit XML - step-level attachments, per-test history, retry tracking, and severity / epic / feature labeling across framework-agnostic adapters (pytest, Jest, JUnit, TestNG, NUnit, Mocha). As a rich static HTML report generator, it is the open-source alternative to the sunset ExtentReports (JVM/.NET per-test HTML narrative); for hosted cross-run flakiness analytics rather than a static per-run report use currents-integration.

The English summary is being prepared. Showing the original description.

testland/qa13Updated Oct 20, 2026

See all skills by testland

Report a problem with this skill