测试无服务器事件驱动应用程序的有效策略 [重复].pdf

编号:1013550 PDF 15页 247.07KB 下载积分:VIP专享
下载报告请您先登录!

测试无服务器事件驱动应用程序的有效策略 [重复].pdf

1、 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.C N S 3 1 6-REffective strategies for testing serverless event-driven applicationsRohan Mehta(he/him)Worldwide Serverless Specialist Solutions ArchitectBrian Krygsma

2、n(he/him)Senior Solutions Architect 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.What developers are used toDeveloper workstation 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.Cloud-native applications are differentAWS Cloud?Developer workstation 2025,Amazo

3、n Web Services,Inc.or its affiliates.All rights reserved.Should you still create automated tests?Especially when you:will deploy to a production environmentexpect to evolve,grow,and maintain your application over timerequire quality,reliability,and development speedYes!2025,Amazon Web Services,Inc.o

4、r its affiliates.All rights reserved.Areas of focus for todayUnit testingIntegration testingAsynchronous/event-driven unless you have better ones 2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.2025,Amazon Web Services,Inc.or its affiliates.All rights reserved.Unit testing 2025,Am

5、azon Web Services,Inc.or its affiliates.All rights reserved.Example code for mockingimport boto3from moto import mock_s3mock_s3def test_lambda_handler(apigw_event:dict)-None:#set up test bucket s3_client=boto3.client(s3)test_bucket_names=test_bucket1,test_bucket2 for test_bucket_name in test_bucket_

6、names:s3_client.create_bucket(Bucket=test_bucket_name)#call lambda function handler with synthetic event test_response=app.lambda_handler(apigw_event,)test_response_data=test_responsebody.split(|)#evaluate response assert test_bucket_names0 in test_response_data assert test_bucke

友情提示

1、下载报告失败解决办法
2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
4、本站报告下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。

本文(测试无服务器事件驱动应用程序的有效策略 [重复].pdf)为本站 (明日何其多) 主动上传,三个皮匠报告文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知三个皮匠报告文库(点击联系客服),我们立即给予删除!

温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。
客服
商务合作
小程序
服务号
折叠