In software engineering, a jig is a tool that automates a repetitive task. Isadore is a jig intended to integration test AWS Lambda functions. Integration testing is an approach where components are tested as a group.
{
"testSubjects": [
{
"resourceNameLogical": "user-authentication-lambda",
"acts": [
{
"name": "successful-login-test",
"description": "Test successful user authentication with valid credentials",
"skip": false,
"scenes": [
{
"description": "Submit valid username and password for authentication",
"request": "valid-login-request.json",
"expected": "successful-auth-response.json"
}
],
"tokens": {
"authToken": {
"sourcePath": ["response", "data", "token"],
"defaultValue": "default-auth-token-12345"
},
"userId": {
"sourcePath": ["response", "data", "user", "id"]
},
"sessionId": {
"defaultValue": "session-abc123"
}
}
},
{
"name": "invalid-credentials-test",
"description": "Test authentication failure with invalid credentials",
"skip": false,
"scenes": [
{
"description": "Submit invalid username and password",
"request": "invalid-login-request.json",
"expected": "auth-failure-response.json"
},
{
"description": "Verify error message format",
"request": "malformed-login-request.json",
"expected": "validation-error-response.json"
}
],
"tokens": {
"errorCode": {
"sourcePath": ["response", "error", "code"]
},
"errorMessage": {
"sourcePath": ["response", "error", "message"],
"defaultValue": "Authentication failed"
}
}
}
]
},
{
"resourceNameLogical": "order-processing-lambda",
"acts": [
{
"name": "create-order-test",
"description": "Test order creation with valid product data",
"skip": false,
"scenes": [
{
"description": "Create new order with valid items",
"request": "create-order-request.json",
"expected": "order-created-response.json"
}
],
"tokens": {
"orderId": {
"sourcePath": ["response", "order", "id"]
},
"orderTotal": {
"sourcePath": ["response", "order", "total"],
"defaultValue": "0.00"
},
"customerId": {
"defaultValue": "customer-999"
}
}
},
{
"name": "inventory-check-test",
"description": "Test inventory validation during order processing",
"skip": true,
"scenes": [
{
"description": "Attempt to order out-of-stock item",
"request": "out-of-stock-request.json",
"expected": "inventory-error-response.json"
}
],
"tokens": {
"inventoryStatus": {
"sourcePath": ["response", "inventory", "status"],
"defaultValue": "available"
}
}
}
]
}
]
}