1

I have implemented a lambda project which has 4 modules/project inside it. Each module/project has python(s) files which implement module functionality.

I have to write the test cases for each module so that it goes through CircleCI and execute on themselves:

  1. That the module is starting and stopping a stepfunction.
  2. module is calling Rest service.
  3. It is writing/reading files from S3 Bucket.

Everywhere, it is like a test driven development to write unit test, but now I have completed project implementation, how do I write automated test cases for my module ?

1 Answer 1

1

When it comes to unit testing, there's nothing special you have to do about AWS Lambda projects.

You Lambda handler is a Python function. Therefore, you can import it on your tests, call it with some input, and assert the output. Just like a normal Python function.

Sign up to request clarification or add additional context in comments.

2 Comments

i was referring to ppl using aws resource mock
Then, state that in your question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.