flank icon indicating copy to clipboard operation
flank copied to clipboard

CostReport as a structurized file like JSON, YAML, etc.

Open castus opened this issue 4 years ago • 3 comments

Author the user story for this feature

As a developer, I want to have CostReport.txt file as a structurized file like JSON or YAML so I can parse it easily to get values that I need.

Describe the solution Create for ex. JSON file with all the information:

{
  "total": 7.7,
  "currency": "USD",
  "tests": [
    {
      "type": "physical",
      "duration": 15,
      "cost": 7.3
    },
    {
      "type": "virtual",
      "duration": 5,
      "cost": 0.4
    }
  ]
}

Describe alternatives considered Separate files to easily parse content. For ex.:

  • file virtual_cost.txt with content "$0.3"
  • file virtual_duration.txt with content "10"
  • file physical_cost.txt with content "$1.1"
  • file physical_duration.txt with content "15"

castus avatar Jan 04 '22 13:01 castus

@castus Hey, I agree this would be an awesome feature. I think JSON makes sense for this. If you'd like to submit a PR with tests, I'm happy to merge it. I think it wouldn't be too difficult to serialize the reports to JSON.

bootstraponline avatar Jan 29 '22 04:01 bootstraponline

I'll be happy to contribute. Do you have some document how to set up that project and possibily mock it?

castus avatar Feb 01 '22 23:02 castus

@castus we have onboarding docs https://flank.github.io/flank/onboarding/1_environment_setup/

IntelliJ works great. For mocking, checkout some of the existing tests.

bootstraponline avatar Feb 03 '22 07:02 bootstraponline