paypal / butterfly

Application transformation tool
https://paypal.github.io/butterfly/
MIT License
47 stars 50 forks source link

Support persistent transformation context attributes #305

Open fabiocarvalho777 opened 5 years ago

fabiocarvalho777 commented 5 years ago

The use case

Metrics offer great details about the transformation. However, sometimes it is important to also have access to custom specific details, gathered during the transformation and stored as transformation context. This would help increase test accuracy, and also to provide better metrics.

How to achieve that

With that in mind, Butterfly should offer an option to "persist" transformation context attributes. Persistent transformation context attributes would be saved in the transformation result metrics object, making them available to tests and persisted to any storage set to persist transformation metrics.

API changes

Add method void persist(String attributeName) to TransformationTemplate.