question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(integ_tests_alpha): Support non-TypeScript tests

See original GitHub issue

Describe the bug

I have written a simple integration test case to my stack in Python, but I am not able to run it. I used integ-runner and tried with cdk deploy --app “python integration_test.py” but it seems none of them are working. Is this feature available only with ts library?

Many thanks

Expected Behavior

Able to run my tests.

Current Behavior

yarn’s integ-runner cli uses *ts files to run tests, so with my python code it will not compile

with cdk deploy --app “python integ_tests.py” the stack deployed, but nothing happened

Reproduction Steps

app = App()

stack = Stack(app, "stack",env=default_env)
integ = IntegTest(app, "Integ", test_cases=[stack])

invoke = integ.assertions.invoke_function(
    function_name=stack.writer_lambda.function_name
)
invoke.expect(ExpectedResult.object_like({
    "Payload": "200"
}))

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.28.0 (build ba233f0)

Framework Version

No response

Node.js Version

16.15.1

OS

Mac OS 12.3.1

Language

Python

Language Version

3.9.4

Other information

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
GroovyDancommented, Aug 8, 2022

+1 for python support

0reactions
mrgraincommented, Nov 30, 2022

Thanks a lot!

And is it possible to change the generated SingletonFunctionRole’s Path attribute, or add another execution role for the lambda?

I have created an AwsApiCall, but I cannot see any possibility to parameterize the resources created inside the AwsApiCall object.

Sounds possible. Please open a new issue for this so we can track it. Pull Requests are also welcome!

Read more comments on GitHub >

github_iconTop Results From Across the Web

aws-cdk/integ-tests-alpha module
This library is meant to be used in combination with the integ-runner CLI to enable users to write and execute integration tests for...
Read more >
The Best Integration Testing Library for Serverless Projects ...
The Best Integration Testing Library for Serverless Projects Now Supports Typescript! Having a local replica of the AWS resources deployed in ...
Read more >
Testing with typescript + jest + ts-jest · Issue #8663 - GitHub
This issue is caused because jsx is not being transformed and jest doesn't know how to parse it. The fix is very simple,...
Read more >
TypeScript and CoffeeScript | Concepts | Guides | Docs
TypeScript comes with rich coding assistance, painless scalability, check-as-you-type code verification, and much more. Note. You do not need to manually ...
Read more >
Integration Testing Step Functions: Using sls-test-tools - Medium
Unit vs Integration Testing​​ Unit tests focus on testing individual pieces of code, whereas integration tests check that various pieces of our system...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found