utPLSQL / utPLSQL-cli

Command line client for invoking utPLSQL
Apache License 2.0
40 stars 15 forks source link

Add support for coverage file mapping options in a separate file #22

Open jgebal opened 7 years ago

jgebal commented 7 years ago

To complete the mapping of utPLSQL API we need to provide ability to define file mapping options as described in documentation

The static file mapping should be optionally provided as a JSON file to the command line:

utplsql run ... -file_mappings=mappings.json

The JSON could be of following format:

{
  "source_file_mappings": [
    {
      "file_name": "sources/hr/award_bonus.prc",
      "object_owner": "HR",
      "object_name": "AWARD_BONUS",
      "object_type": "PROCEDURE"
    },
    {
      "file_name": "sources/hr/betwnstr.fnc",
      "object_owner": "HR",
      "object_name": "BETWNSTR",
      "object_type": "FUNCTION"
    }
  ],
  "test_file_mappings": [
    {
      "file_name": "test/hr/ut_award_bonus.pkb",
      "object_owner": "HR",
      "object_name": "ut_award_bonus",
      "object_type": "PACKAGE BODY"
    },
    {
      "file_name": "test/hr/ut_betwnstr.pkb",
      "object_owner": "HR",
      "object_name": "ut_betwnstr",
      "object_type": "PACKAGE BODY"
    }
  ]
}
jgebal commented 7 years ago

I would consider this to be of a low priority for now