Add Snapshot testing support for languages other than Typescript #2000
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
Community Note
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#
The text was updated successfully, but these errors were encountered: