[{"data":1,"prerenderedAt":83},["ShallowReactive",2],{"content-testing-guidance-7-emulators":3},{"markdown":4,"frontMatterAttributes":5,"bodyRaw":12,"contributorPaths":13,"menuType":15,"contentName":16,"slug":17,"readingTime":18,"menu":19,"nextDocItem":69,"previousDocItem":58},"\u003Cp>Emulators are desktop applications that resemble services in the cloud. They have similar API’s to their cloud based counterparts and provide similar return values. The \u003Ca href=\"https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F\">AWS Serverless Application Model (SAM)\u003C\u002Fa> provides emulators for API Gateway (\u003Ca href=\"https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-cli-command-reference-sam-local-start-api.html\">sam local start-api\u003C\u002Fa>) and AWS Lambda (\u003Ca href=\"https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-cli-command-reference-sam-local-invoke.html\">sam local invoke\u003C\u002Fa>). Other examples of AWS supported emulators include \u003Ca href=\"https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002Fdeveloperguide\u002FDynamoDBLocal.html\">Amazon DynamoDB Local\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fsfn-local.html\">AWS Step Functions Local\u003C\u002Fa>. External vendors like \u003Ca href=\"https:\u002F\u002Flocalstack.cloud\u002F\">LocalStack\u003C\u002Fa> also provide a broad set of service emulators.\u003C\u002Fp>\n\u003Cp>While emulators can enable fast local development iterations, they also have several limitations. Emulators can require a non-trivial amount of setup and configuration effort. Emulated features and API’s typically lag service counterparts. Service aspects such as IAM policies and quotas may not be emulated. Finally, not all services will have emulators, so developers basing a testing strategy on emulators may find themselves without a satisfactory option for portions of their application.\u003C\u002Fp>\n",{"title":6,"order":7,"callout":8},"Emulators",7,{"title":9,"description":10,"link":11},"View our code samples","Our open source repository is a great place to begin.  We have serverless test samples in Java, Python, TypeScript and .NET.  Pick a language and navigate to a starter project.","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-test-samples","Emulators are desktop applications that resemble services in the cloud. They have similar API’s to their cloud based counterparts and provide similar return values. The [AWS Serverless Application Model (SAM)](https:\u002F\u002Faws.amazon.com\u002Fserverless\u002Fsam\u002F) provides emulators for API Gateway ([sam local start-api](https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-cli-command-reference-sam-local-start-api.html)) and AWS Lambda ([sam local invoke](https:\u002F\u002Fdocs.aws.amazon.com\u002Fserverless-application-model\u002Flatest\u002Fdeveloperguide\u002Fsam-cli-command-reference-sam-local-invoke.html)). Other examples of AWS supported emulators include [Amazon DynamoDB Local](https:\u002F\u002Fdocs.aws.amazon.com\u002Famazondynamodb\u002Flatest\u002Fdeveloperguide\u002FDynamoDBLocal.html) and [AWS Step Functions Local](https:\u002F\u002Fdocs.aws.amazon.com\u002Fstep-functions\u002Flatest\u002Fdg\u002Fsfn-local.html). External vendors like [LocalStack](https:\u002F\u002Flocalstack.cloud\u002F) also provide a broad set of service emulators.\n\nWhile emulators can enable fast local development iterations, they also have several limitations. Emulators can require a non-trivial amount of setup and configuration effort. Emulated features and API’s typically lag service counterparts. Service aspects such as IAM policies and quotas may not be emulated. Finally, not all services will have emulators, so developers basing a testing strategy on emulators may find themselves without a satisfactory option for portions of their application.\n\n\n",[14],"content\u002Fcontributors\u002Fdan-fox.json","LIST","Testing your serverless applications","\u002Fcontent\u002Ftesting\u002Fguidance\u002F7-emulators","1 min",[20],{"title":21,"content":22},"Testing Guide",[23,30,37,44,51,58,65,69,76],{"title":24,"order":25,"callout":26,"time":18,"path":27,"id":28,"link":29},"Introduction",1,{"title":9,"description":10,"link":11},"1-introduction","1-introduction.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F1-introduction",{"title":31,"order":32,"callout":33,"time":18,"path":34,"id":35,"link":36},"Should you test?",2,{"title":9,"description":10,"link":11},"2-should-you-test","2-should-you-test.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F2-should-you-test",{"title":38,"order":39,"callout":40,"time":18,"path":41,"id":42,"link":43},"Shared responsibility",3,{"title":9,"description":10,"link":11},"3-shared-responsibility","3-shared-responsibility.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F3-shared-responsibility",{"title":45,"order":46,"callout":47,"time":18,"path":48,"id":49,"link":50},"Three Strategies",4,{"title":9,"description":10,"link":11},"4-three-strategies","4-three-strategies.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F4-three-strategies",{"title":52,"order":53,"callout":54,"time":18,"path":55,"id":56,"link":57},"Testing in the Cloud",5,{"title":9,"description":10,"link":11},"5-testing-in-the-cloud","5-testing-in-the-cloud.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F5-testing-in-the-cloud",{"title":59,"order":60,"callout":61,"time":18,"path":62,"id":63,"link":64},"Mocks",6,{"title":9,"description":10,"link":11},"6-mocks","6-mocks.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F6-mocks",{"title":6,"order":7,"callout":66,"time":18,"path":67,"id":68,"link":17},{"title":9,"description":10,"link":11},"7-emulators","7-emulators.md",{"title":70,"order":71,"callout":72,"time":18,"path":73,"id":74,"link":75},"Our guidance",8,{"title":9,"description":10,"link":11},"8-our-guidance","8-our-guidance.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F8-our-guidance",{"title":77,"order":78,"callout":79,"time":18,"path":80,"id":81,"link":82},"Get started with code",9,{"title":9,"description":10,"link":11},"9-get-started","9-get-started.md","\u002Fcontent\u002Ftesting\u002Fguidance\u002F9-get-started",1792578874973]