Run Postman's Newman in an AWS Lambda function: specify JSON export location

The Problem After getting my NodeJS application using Newman with the JSON reporter to work locally I started testing it in Lambda locally with SAM CLI. I encountered the following error: Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: EROFS: read-only file system, mkdir '/var/task/newman'","reason":{"errorType":"Error","errorMessage":"EROFS: read-only file system, mkdir '/var/task/newman'","code":"EROFS","errno":-30,"syscall":"mkdir","path":"/var/task/newman","help":"error creating path for file \"newman/newman-run-report-2020-07-09-15-46-40-040-0.json\" for json-reporter","stack":["Error: EROFS: read-only file system, mkdir '/var/task/newman'"]},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: EROFS: read-only file system, mkdir '/var/task/newman'"," at process.<anonymous> (/var/runtime/index.js:35:15)"," at process....

July 10, 2020 · 2 min · chart