Coder Social home page Coder Social logo

fayewu1005 / serverless-test-samples Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aws-samples/serverless-test-samples

0.0 0.0 0.0 15.64 MB

This repository is designed to provide guidance for implementing comprehensive test suites for serverless applications.

License: MIT No Attribution

Shell 0.12% JavaScript 2.23% Python 23.29% Java 15.99% C# 42.48% PowerShell 0.06% TypeScript 13.56% Makefile 0.86% Velocity Template Language 0.88% Groovy 0.52%

serverless-test-samples's Introduction

test: unit test: integration .NET: 6 Java: 11 python: 3.9 typescript: 4.5.5

Serverless Test Samples

Serverless Test Samples

AWS guidance and examples for testing serverless and event driven applications.

Getting Started

We recommend reviewing the companion website for this repository: Serverlessland - Testing Serverless Applications.

If you'd like to jump right into code, you can begin with a starter project in your favorite language:

Language Directories

The repository is divided into several language directories. If you would like to browse by language, you can navigate to the main page of each language directory:

Workload Types

This repository contains sample code for testing a variety of different types of workloads, including API's, Event-Driven Architectures, Service Orchestration, Data Processing, and AWS Partner Patterns.

API's

System Under Test Language
API Gateway with Lambda and DynamoDB Python
API Gateway HTTP with CDK [External] Python
API Gateway HTTP with SAM [External] Python
API Gateway REST with SAM [External] Python
Api Gateway, Lambda, DynamoDB TypeScript
API Gateway, Lambda Authorizer, Lambda, DynamoDB [External] Node.js
API Gateway, Lambda, S3 .NET
API Gateway, Lambda, DynamoDB .NET
SQS, Lambda, DynamoDB .NET
API Gateway, Lambda, DynamoDB Java
AppSync, DynamoDB Java

Event-Driven Architectures

Event-driven architectures (EDA) are an architecture style that uses events and asynchronous communication to loosely couple an application’s components. To learn more about several strategies for testing EDA's visit this guide at Serverlessland.com.

System Under Test Language Description
S3, Lambda Python This is a great starter project for learning how to test async EDA.
Schemas and Contracts TypeScript Event driven architectures decouple producers and consumers at the infrastructure layer, but these resources may still be coupled at the application layer by the event contract. Learn how to test for breaking changes in the contract.
S3, Lambda, DynamoDB .NET This example shows how to test async system by using DynamoDB during to store incoming asynchronous events during testing
S3, Lambda, SQS .NET An example to how to test asynchronous workflow by long polling the queue that resulting messages are sent to.

Architectural patterns

Pattern Services used Language Description
Hexagonal architecture API Gateway, Lambda, DynamoDB .NET Hexagonal architecture is an architectural pattern used for encapsulating domain logic and decoupling it from other implementation details, such as infrastructure or client requests.

Service Orchestration

System Under Test Language Description
Step Functions [External] Java This project shows a technique for testing an AWS Step Functions workflow in a local desktop environment.

Data Processing

System Under Test Language Description
Kinesis Data Stream, Lambda TypeScript This project shows a technique for testing a streaming data processing system.
Kinesis Data Stream, Lambda, DynamoDB .NET This pattern creates an AWS Lambda function that consumes messages from an Amazon Kinesis Data Streams and dumps them to Amazon DynamoDB using SAM and .NET 6.

AWS Partner Patterns

Partner System Under Test Language Description
Datadog API Gateway, Lambda, SQS, SNS TypeScript This example is about creating Synthetic Tests and Monitors with Datadog.

Test Containers

Testcontainers is an open source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container. These tests demonstrate how you can utilize this as part of your testing frameworks to startup, initialize and tear down emulated resources.

Emulation is not a replacement for testing against actual cloud resources, and integration tests will always run against deployed versions of your applications. However, the emulation of certain services like DynamoDB can provide fast feedback loops on your local machine.

System Under Test Language Description
API Gateway, Lambda, DynamoDB .NET This example demonstrates how you can simplify local testing and emulation using the TestContainers project.

How do I contribute?

See our Contributing guide for more detail providing additions, enhancements, and edits.

serverless-test-samples's People

Contributors

brnkrygs avatar dancfox avatar dhelper avatar guyalmog75 avatar wtromano avatar yossichai avatar dependabot[bot] avatar rohan-mehta-scf-request avatar astuyve avatar rohanmeh avatar wtromano-aws avatar khairulhabibataws avatar poprahul avatar dmahapatro avatar kathvish avatar jeastham1993 avatar gmartim avatar boyney123 avatar muraria avatar aiden-walton avatar chankina avatar vikasgz avatar arthi-j avatar amazon-auto avatar mridehalgh avatar roman-boiko avatar timcolson avatar meetreks avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.