Is there a way to test AppSync code locally and/or in CI/CD?

让人想犯罪 __ 提交于 2019-12-23 09:01:24

问题


I am looking to dive into a project using AppSync. So far I have been able to find plenty of articles and such online giving all the steps as to what buttons to click in order to get a sample project running, but none of them seem to touch on how one deals with it from a local development or in a CI/CD environment. Its probably my "old school" idea of how dev usually works, but I was expecting some way to simulate enough of the environment locally to do development and run unit tests, but I can't seem to find any way to do just that. And when I get to the UI portion I have no idea how to have a local dev instance of the backend to run against.

Do people not develop in this way anymore, opting to instead stand up a "development stack"? I just want to make sure I am not painting myself into a corner in the future.


回答1:


Here is a way to test your Appsync resolvers directly on AWS console. In the AppSync console, in the Schema tab, select a resolver and you will land into an "Edit resolver" page. Select the button "Select Test Context" to simulate a context received by your resolver. Then select "Run test".



来源:https://stackoverflow.com/questions/51776064/is-there-a-way-to-test-appsync-code-locally-and-or-in-ci-cd

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!