Miss any of our Open RFC calls?Watch the recordings here! »

up9

1.3.0 • Public • Published

up9

oclif Version Downloads/week License

Usage

$ npm install -g up9
$ up9 COMMAND
running command...
$ up9 (-v|--version|version)
up9/1.3.0 linux-x64 node-v14.4.0
$ up9 --help [COMMAND]
USAGE
  $ up9 COMMAND
...

Commands

up9 agent

Manage agents

USAGE
  $ up9 agent

up9 agent:list

USAGE
  $ up9 agent:list

OPTIONS
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

up9 auth

Manage authentication to up9 api

USAGE
  $ up9 auth

up9 auth:apikey

Get an api key

USAGE
  $ up9 auth:apikey

up9 auth:login

Logs in to up9

USAGE
  $ up9 auth:login

OPTIONS
  --client-id=client-id
  --client-secret=client-secret
  --env=stg.up9.com              [INTERNAL] Set to dev env

up9 auth:logout

USAGE
  $ up9 auth:logout

up9 auth:show

Shows authentication status

USAGE
  $ up9 auth:show

up9 model:compare MODELA REVA SUBSYSA MODELB REVB SUBSYSB

USAGE
  $ up9 model:compare MODELA REVA SUBSYSA MODELB REVB SUBSYSB

up9 tap

Manage tapping

USAGE
  $ up9 tap

up9 tap:create-docker-compose MODEL

Creates a docker compose file for tapper services

USAGE
  $ up9 tap:create-docker-compose MODEL

OPTIONS
  -i, --in-compose-file=in-compose-file    path to docker-compose file containing the services to tap (defaults to
                                           docker-compose.y[a]ml if exists)

  -o, --out-compose-file=out-compose-file  path to docker-compose file that will contain the tapper services (defaults
                                           to docker-compose-up9.y[a]ml)

up9 tap:disable TAPPINGSOURCEID

USAGE
  $ up9 tap:disable TAPPINGSOURCEID

up9 tap:enable TAPPINGSOURCEID

USAGE
  $ up9 tap:enable TAPPINGSOURCEID

up9 tap:freeze MODEL

USAGE
  $ up9 tap:freeze MODEL

up9 tap:list

USAGE
  $ up9 tap:list

OPTIONS
  -x, --extended          show extra columns
  --columns=columns       only show provided columns (comma-separated)
  --csv                   output is csv format [alias: --output=csv]
  --filter=filter         filter property by partial string matching, ex: name=foo
  --no-header             hide table header from output
  --no-truncate           do not truncate output to fit screen
  --output=csv|json|yaml  output in a more machine friendly format
  --sort=sort             property to sort by (prepend '-' for descending)

up9 tap:set-model MODEL TAPPINGSOURCEID

USAGE
  $ up9 tap:set-model MODEL TAPPINGSOURCEID

up9 tap:start MODEL

Starts a browser-based tapper (puppeteer)

USAGE
  $ up9 tap:start MODEL

up9 tap:start-container MODEL

Starts a docker container tapper

USAGE
  $ up9 tap:start-container MODEL

up9 tap:start-proxy MODEL

Starts a proxy-based local (docker) tapper

USAGE
  $ up9 tap:start-proxy MODEL

up9 test

Manage tests

USAGE
  $ up9 test

up9 test:auth-detect MODEL [SUBSYSTEM]

USAGE
  $ up9 test:auth-detect MODEL [SUBSYSTEM]

up9 test:auth-verify AUTH-CONFIG-FILE

USAGE
  $ up9 test:auth-verify AUTH-CONFIG-FILE

`up9 test:run MODEL TEST_SUITE ENV_PROFILE AGENT

up9 test:run MODEL TEST_SUITE ENV_PROFILE --cloud-agent`

USAGE
  $ up9 test:run MODEL TEST_SUITE ENV_PROFILE AGENT
    up9 test:run MODEL TEST_SUITE ENV_PROFILE --cloud-agent

OPTIONS
  --cloud-agent

up9 test:run-local MODEL SUBSYSTEM

USAGE
  $ up9 test:run-local MODEL SUBSYSTEM

OPTIONS
  --auth-config-file=auth-config-file
  --auth-payload-file=auth-payload-file
  --bypass-auth
  --services-config-file=services-config-file

up9 update [CHANNEL]

update the up9 CLI

USAGE
  $ up9 update [CHANNEL]

See code: @oclif/plugin-update

Authentication Helper

When running tests with the up9 test:run-local command, it is possible to invoke an authentication helper which logs in to a form using a headless browser.

Supply a --auth-config-file flag, pointing to a .json file in the following format.

cookie will be injected as a header to each request automatically

{
    "formURL": "<URL>", // URL to display login form
    "username": "<USERNAME>", // Typed into login form
    "password": "<PASSWORD>", // Typed into login form
    // Headers needed for authenticated API requests. These will be extracted from observed HTTP requests.
    // Optional - if not supplied, only cookie header will be extracted upon successful login form submission
    "headers": {  
        "x-my-api-key": {},
        "authorization": {
            "matchHeaders": { 
                // Header ('authorization' in this case) will not be extracted unless 
                // it's seen in the same request with the 'origin' header with value 'https://domain.com'
                "origin": "https://domain.com"
            }
        }    
    },
    // Authentication will not be considered successful until the specified cookies are observed (optional)
    "cookies": { 
        "cookie-name": {}
    },
    // URLs used by the `up9:verify-auth` command to test authentication (optional)
    "testUrls": [
        { "url": "https://domain.com/myDashboard", "failCode": 302 }
    ],
    // URLs to visit after successful form submission, in case additional browsing is needed in order to generate the 
    // necessary cookies or headers
    "additionalUrls": [
        "http://myurl.com"
    ]
}

Troubleshooting

Log

Log file is located in $HOME/.config/up9/up9.log

Refer to it and share with UP9 team when you reporting any problems.

Debug output

Use -d switch to print debug output, see examples below.

Regular usage example

$ up9 auth login
Already logged in to stg.testr.io as: user@up9.com

With debug output

$ up9 auth login -d
  Login: Running command Login
  Already logged in to stg.testr.io as: user@up9.com
  AuthProvider: Logged in to environment: stg.testr.io
  Login: Command exited

Changelog

1.3.0

  • tap:create-docker-compose includes a local long-living agent (TRA-1455)

1.2.0

  • Manually provided auth helper fields will not be overridden by auth detect (TRA-1464)
  • Increased login timeout (TRA-1451)
  • Fixed dev environment image pointers (TRA-1457)

1.1.0

  • New command tap:create-docker-compose (TRA-1309)
  • Local Test-Runner supports custom networks
  • Local Test-Runner uses test//services_template.yaml if exists when generating test///service.yaml.

1.0.0

  • Marking stable release

0.59.0

  • Improved UI of model comparing
  • Fixed tap:start-container bug (TRA-1403)
  • Each test run is tied to a specific model revision (TRA-1186)

0.58.0

  • Pull Test-Runner image from master:latest (TRA-1395)

0.57.0

  • Auth helper version bump

0.56.0

  • Compare models by model:compare
  • Auth helper version bump (TRA-1303, TRA-1321)

0.55.0

  • Puppeteer now installs on first run

0.40.0

  • test:run-local missing or failed auth detections will now bypass authentication by default and present a warning (TRA-1197)
  • tap:start Browser tapper - Fixed response cookies parsing (TRA-1178)
  • Improved accuracy of auth helper extraction (TRA-1195)

0.38.3

  • Auth helper version bump (TRA-1185)

0.38.2

  • Auth helper version bump
  • Puppeteer filter fix

0.38.0

  • test:run-local will now automatically detect auth by default. You can pass the --bypass-auth flag to skip. (TRA-1130)

0.37.0

  • Added tap:start command (TRA-1056)
  • Improved test:auth-detect output
  • Renamed tap:start-local to tap:start-container
  • Renamed tap:proxy to tap:start-proxy

0.36.2

  • test:auth-detect fixes and performance improvements

0.36.1

  • Fixed links to dashboard (TRA-1093)

0.36.0

  • Support auth payload file with endpoint-specific headers in test:run-local

0.35.0

  • Support providing auth-payload-file flag in test:run-local

0.34.1

  • Support tests that were skipped in test:run-local

0.34.0

  • Experimental test:auth-detect command

0.33.1

  • Test runner version bump (fixes TRA-975)

0.33.0

  • Authentication helper now supports RFC6265 cookie format
  • Mitmproxy version bump (filter fix TRA-956)

0.32.0

  • Added auth:apikey command

0.30.3

  • Authentication helper version bump - support additional urls param

0.30.0

  • test:run-local now uploads tests results, affecting test suite summary

0.29.3

  • test:auth-verify now produces screenshots

0.29.2

  • Support agentId change in trcc in test:run

0.29.1

  • Authentication helper version bump (post data decode fix TRA-875)

0.29.0

  • New command: test:auth-verify (TRA-865)
  • Fixed passive tapper source detection bug (TRA-645)

0.28.0

  • test:run-local
    • Increased verbosity of generated pytest html report
    • Prints a table with test results after run is complete
    • Accepts a services-config-file flag to allow providing a custom file (temporary feature until implementation of environment profiles)
    • Accepts a --non-interactive or -i flag:
      • Does not offer to open browser for results
      • Fails with non-zero exit code on each test failure

0.27.0

  • Added authentication helper support for test:run-local
  • Changed model to an argument instead of flag in tap:start-local, test:run-local
  • Removed set-context command and support for default model
  • Removed support for space-delimited sub commands, e.g. up9 test run

0.26.3

  • Added linux to supported OS list
  • Fixed bug where up9 test:run-local did not take remoteURL overridden values into account

Keywords

Install

npm i up9

DownloadsWeekly Downloads

44

Version

1.3.0

License

MIT

Unpacked Size

223 kB

Total Files

126

Last publish

Collaborators

  • avatar
  • avatar