up9
up9 ===
Last updated 15 days ago by shahartestr .
MIT · Original npm · Tarball · package.json
$ cnpm install up9 
SYNC missed versions from official npm registry.

up9

oclif Version Downloads/week License

Usage

$ npm install -g up9
$ up9 COMMAND
running command...
$ up9 (-v|--version|version)
up9/0.36.0 darwin-x64 node-v12.15.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 tap

Manage tapping

USAGE
  $ up9 tap

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:proxy MODEL

Configures a local proxy

USAGE
  $ up9 tap:proxy MODEL

up9 tap:set-model MODEL TAPPINGSOURCEID

USAGE
  $ up9 tap:set-model MODEL TAPPINGSOURCEID

up9 tap:start-local MODEL

USAGE
  $ up9 tap:start-local MODEL

up9 test

Manage tests

USAGE
  $ up9 test

up9 test:auth-detect MODEL

USAGE
  $ up9 test:auth-detect MODEL

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 TEST_SUITE

USAGE
  $ up9 test:run-local MODEL TEST_SUITE

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

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

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

Current Tags

  • 0.36.0                                ...           latest (15 days ago)

42 Versions

  • 0.36.0                                ...           15 days ago
  • 0.35.0                                ...           20 days ago
  • 0.34.0                                ...           a month ago
  • 0.33.1                                ...           a month ago
  • 0.33.0                                ...           a month ago
  • 0.32.0                                ...           a month ago
  • 0.30.3                                ...           a month ago
  • 0.30.2                                ...           a month ago
  • 0.30.1                                ...           a month ago
  • 0.30.0                                ...           a month ago
  • 0.29.3                                ...           a month ago
  • 0.29.2                                ...           a month ago
  • 0.29.1                                ...           a month ago
  • 0.29.0                                ...           a month ago
  • 0.28.0                                ...           2 months ago
  • 0.27.2                                ...           2 months ago
  • 0.27.1                                ...           2 months ago
  • 0.27.0                                ...           2 months ago
  • 0.26.3                                ...           2 months ago
  • 0.26.2                                ...           2 months ago
  • 0.26.1                                ...           2 months ago
  • 0.26.0                                ...           2 months ago
  • 0.25.1                                ...           3 months ago
  • 0.25.0                                ...           3 months ago
  • 0.24.2                                ...           3 months ago
  • 0.24.1                                ...           3 months ago
  • 0.23.0                                ...           3 months ago
  • 0.22.0                                ...           3 months ago
  • 0.21.0                                ...           3 months ago
  • 0.20.0                                ...           3 months ago
  • 0.19.1                                ...           3 months ago
  • 0.19.0                                ...           3 months ago
  • 0.18.0                                ...           3 months ago
  • 0.0.15                                ...           3 months ago
  • 0.0.14                                ...           3 months ago
  • 0.0.13                                ...           3 months ago
  • 0.0.12                                ...           3 months ago
  • 0.0.10                                ...           3 months ago
  • 0.0.8                                ...           3 months ago
  • 0.0.7                                ...           3 months ago
  • 0.0.6                                ...           3 months ago
  • 0.0.2                                ...           3 months ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 136
Dependencies (23)
Dev Dependencies (25)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |