coldframe
AlphaEnd-to-end testing harness for serverless functions. Mocks cloud provider SDKs, manages ephemeral test databases, and generates coverage reports.
coldframe makes it practical to write real integration tests for serverless functions without hitting actual cloud services or paying per invocation.
The problem
Serverless functions are easy to unit test (they're just functions) but hard to integration test because they depend on cloud services — DynamoDB, S3, SQS — that are slow and expensive to hit in tests.
coldframe provides a local emulation layer for the most common AWS services, a test runner that manages lifecycle (create table → run test → drop table), and a coverage reporter that understands the invocation model.
Supported services
- DynamoDB (full expression support)
- S3 (object CRUD, presigned URLs)
- SQS (standard + FIFO queues)
- EventBridge (rule matching)
- Secrets Manager (read-only mock)
Example
import { withDynamo } from 'coldframe'
test('creates a user', withDynamo({ table: userTable }, async ({ dynamo }) => {
const result = await createUser(dynamo, { name: 'Ada' })
expect(result.id).toBeDefined()
const stored = await dynamo.get({ TableName: 'users', Key: { id: result.id } })
expect(stored.Item?.name).toBe('Ada')
}))
Status
Early alpha. DynamoDB and S3 coverage is solid; SQS and EventBridge are partial.