Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Snapshot testing support for languages other than Typescript #2000

Open
Maed223 opened this issue Aug 4, 2022 · 0 comments
Open

Add Snapshot testing support for languages other than Typescript #2000

Maed223 opened this issue Aug 4, 2022 · 0 comments
Labels
cdktf enhancement New feature or request language/c# C# language issues language/golang language/java language/python priority/awaiting-more-evidence Lowest priority. Unlikely to be worked on unless/until it gets a lot more upvotes. testing

Comments

@Maed223
Copy link
Contributor

Maed223 commented Aug 4, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Currently Snapshot testing is only available in Typescript. To my understanding this current method of snapshot testing in Typescript is not extensible to other supported languages as it is reliant on jest's functionality. I myself see two paths forward to extending this capability.

Leverage existing Snapshot testing frameworks available in each language

The main issue here being that the snapshot testing frameworks vary in level of maturity depending on the language– see the referenced links for some below. Yet, from what I've seen most would require no added work on our end as they could simply consume the json config returned by Testing.synth(STACK) to both create and check against snapshots. Depending on the maturity of each of the frameworks they could be referenced in documentation to expose users to the potential ability.

Create our own unified solution

Similar to AWS CDK we could create a general solution for supported languages other than Typescript to then be exposed via JSII. This would be a much larger undertaking, as well as having the potential to be awkward as workflows for Snapshot testing between Typescript and other languages could differ quite greatly.

References

AWS CDK Snapshot Testing

Snapshot testing in Python

Snapshot testing in C#

@Maed223 Maed223 added enhancement New feature or request testing new Un-triaged issue labels Aug 4, 2022
@ansgarm ansgarm added language/python cdktf language/java language/golang needs-priority Issue has not yet been prioritized; this will prompt team review language/c# C# language issues and removed new Un-triaged issue labels Aug 9, 2022
@DanielMSchmidt DanielMSchmidt added priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. and removed needs-priority Issue has not yet been prioritized; this will prompt team review labels Aug 12, 2022
@rhatri rhatri added priority/awaiting-more-evidence Lowest priority. Unlikely to be worked on unless/until it gets a lot more upvotes. and removed priority/important-longterm Medium priority, to be worked on within the following 1-2 business quarters. labels Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cdktf enhancement New feature or request language/c# C# language issues language/golang language/java language/python priority/awaiting-more-evidence Lowest priority. Unlikely to be worked on unless/until it gets a lot more upvotes. testing
Projects
None yet
Development

No branches or pull requests

4 participants