Separate API Gateway with Lambda/ECS cluster/Cognito user pool just to enable testing.

I am using AWS API Gateway with Lambda/ECS for compute and Cognito for users,but it really hard to test such applications. May be i able to test simple Lambda and API gateway functionality With AWS SAM Local but I find it hard to test these end to end if I use API Gateway authorizers.

Looking to test such applications, I need an entire new setup just for testing? like a separate API Gateway with Lambda/ECS cluster/Cognito user pool just to enable testing? This seems very slow, and I think I will not be able to get things like a code coverage report anymore?
Any Help?
Thanks in advance.

Tagged:

Comments

    1. Unit Tests: SAM Local or some other local docker hosting with a unit testing library (mocha) would be good for this because:
      Speed. All your tests should execute quickly against a lambda function
      Example : wildrydes with mocha
    2. Integration Tests: Once you stage your changes, there's a bunch of options calling the API. I'd start off with postman to run the API tests and you can chain them together or run them in command line if needed.
    3. End to End (E2E) tests: If the API is your front end then there might not be any difference between E2E and API tests. UI, Voice, Chat front ends differ significantly as do the options so I'll suggest some options:
      .UI : Selenium (has the most support and options available to you including docker images: Selenium Hub or standalone)
      .Voice: Suggestions?
      .Text: Suggestions?
    4. Step functions :
      .allows you to visualize each step
      .retries when there are errors
      .allows you to diagnose and debug problems
Sign In or Register to comment.