Our great sponsors
-
postman-api-testing-sam
AWS Serverless Application Model for running API tests based on postman collections.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
-
serverless-application-model
The AWS Serverless Application Model (AWS SAM) transform is a AWS CloudFormation macro that transforms SAM templates into CloudFormation templates.
As you can see in the above diagram, a lambda function is scheduled to be executed periodically by EventBridge. This lambda function retrieves the assets exported from Postman (test collection, environment, and global variables), injects secrets from the secrets manager and executes the tests using the newman npm package, and, in case of failures, updates metrics in CloudWatch and stores test results in the S3 bucket. An alarm is triggered in case the metrics exceed a threshold (in this case, a count of 1).
The complete solution with SAM is available here.
The complete solution with SAM is available here.
This infrastructure can be reused for any sort of testing using Postman (HTTP, REST APIs, etc.). An example of an exported Postman collection is available here. Please notice that these files were not created manually but exported from the UI. All these files need to be placed inside the S3 bucket generated by the infrastructure in the folder defined by the TestName parameter input during the infrastructure deployment (in this case, ‘MyService’ by default).
Related posts
- API Inspection Best Practices: Ensuring API Gateway Stability and Efficiency
- Data API for Amazon Aurora Serverless v2 with AWS SDK for Java - Part 5 Basic cold and warm starts measurements
- Guide on authenticating requests with the REST API
- Make your Azure OpenAI apps compliant with RBAC
- How to send emails from your website using Twilio SendGrid