Skip to content

Add json config file for utplsql-cli #23

Open

Description

@jgebal

Calling the command like utplsql run ... -config=config.json should work when we pass the configuration json file as below:

{
  "connection": {
    "user": "hr",
    "password": "hr",
    "host": "localhost",
    "port": 1521,
    "service_name": "xe"
  },
  "suite_paths": [ 
    "hr",
    "usr"
  ],

  "color": true, 
  "reporters": [
    {
      "ut_documentation_reporter": {
        "output": "results.txt",
        "screen": true
      }
    },
    {
      "ut_xunit_reporter": {
        "output": "results.json"
      }
    },
    {
      "ut_coverage_html_reporter": {
        "output": "coverage.html",
        "screen": true
      }
    }
  ],
  "sources_path": "/source",
  "tests_path": "/test"
}

-"host" is optional - default: 127.0.0.1
-"port" is optional - default: 1521
-"service_name" or "sid" must be provided
-"suite_paths" - optional
-"color" - optional
-"reporters" - optional
-"reporter parameters" - optional
-"sources_path" - optional
-"tests_path" - optional

Activity

  1. jgarec commented on Apr 25, 2018

    @jgarec

    Interesting as it allows to reduce the number of arguments on the command line.

    I think it should not be exclusive. Loading some parameters from the config file (reporters, paths, ...) and others from the command line (connection string for example).

    Would be great if this config file could also be used with the utplsql maven plugin.

  2. jgebal commented on Apr 25, 2018

    @jgebal
    MemberAuthor

    I think it would be good to allow for separation of credentials(connect string) from rest of the config.
    This would allow the config to be project bound and connection to be more CI server driven.
    Alternatively we could simply allow calling client with both config file and command line parameters.
    In that cade, explicit params would take precedence and would override config file settings.
    So project can have it's configuration file in version control and when running command on CI you could override Parana.

    I would also use a default name for the config file and do a lookup for that file.

    This way you can just invoke utplsql run if your configuration file exists. If it doesn't we could inform about missing parameters as we do today.

  3. pesse commented on Apr 25, 2018

    @pesse
    Member

    Good input, thanks to both of you :)

  4. added this to the 3.1.2 milestone on Jul 19, 2018
  5. modified the milestones: 3.1.2, 3.1.7 on Mar 25, 2019
  6. modified the milestones: 3.1.7, 3.1.8 on Jun 27, 2019
  7. modified the milestones: 3.1.8, 3.1.10 on Jan 16, 2023
  8. self-assigned this
    on Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions