Skip to main content

No project description provided

Project description

ntscli-client

Requirements

  • python 3.6 or later with matching pip
  • NTS-CLI compatible SSL configuration

Install

Installing on the OS python:

Ubuntu only: You might need to install pip3 on Ubuntu if you haven't already:

sudo apt install -y python3-pip

Then this only requires python 3.6 or later, which is already installed on Ubuntu 18.04 and later, and macOS Catalina.

sudo pip3 install -U ntscli-client

Install your security certificate

You still need a security certificate, as documented here.. Once it's a decrypted zip file, you can now install it pretty easily with this tool:

nts ssl install ~/Downloads/cloud.zip

Manually moving it to ~/.config/netflix/cloud/(files) still works as well.

Update Often

Use the same pip3 command, but especially for the first little while there will probably be frequent updates.

We suggest updating frequently anyway. For instance, for docker images or CI systems, you can install/update every time the image is created or run. If a released update to the RAE requires matching client or client library updates, you would not require any additional work to take the update.

Versioning

We will be following standard python semantic versioning, so if you really want to pin versions, you can follow standard python practices:

pip3 install ntscli-client<=2.0.0  # don't accidentally pick up a new major version, which could include breaking changes
pip3 install ntscli-client==0.1.4  # a specific older version
pip3 install ntscli-client>=0.1.5  # anything after a specific version

Enjoy

nts --help

export RAE=r3000334
export ESN=$(nts get-devices | jq -r 'map(.esn)[0]')  # actually just the first ESN I find
# or for powershell:
$env:RAE = 'r3000334'
$env:ESN = 'NFANDROID2-PRV-SHIELDANDROIDTV-NVIDISHIELD=ANDROID=TV-15895-BB9C5AF4E97B69BC1A51654A94304D3AD88169C2BA2F1338192C20E940AE669E'

nts get-plan  # prints to stdout

# get a plan dynamically
nts run AUDIO-001-TC1 ACT-004-TC11
# get a plan and run it immediately
nts get-plan | nts run AUDIO-001-TC1 ACT-004-TC11
# save the plan via shell redirection
nts get-plan > full_plan.json

# save the plan with an arg instead
nts get-plan --save-to full_plan.json

# Choosing what to run

## Just at run:
nts run AUDIO-001-TC1 ACT-004-TC11  # gets the test plan first, then filters
nts run --testplan full_plan.json AUDIO-001-TC1 ACT-004-TC11  # saves you the 1-2 minutes getting the test plan if you already have one

## using files
nts get-plan --save-to full_plan.json
cat full_plan.json | jq -r '{target: .target, testplan: {branch: .testplan.branch, sdkVersion: .testplan.sdkVersion, testcases: [.testplan.testcases[] | select(.category | startswith("Config"))] }}' > filtered_plan.json
cat filtered_plan.json | nts run 

## built-in filtering command
nts get-plan --save-to full_plan.json
nts filter --help
nts filter AUDIO-001-TC1 < full_plan.json > filtered_plan.json
nts filter AUDIO-001-TC1 --testplan full_plan.json --save-to filtered_plan.json
nts filter --names-re "AUDIO.*TC3" full_plan.json --save-to filtered_plan.json
nts get-plan | nts filter --eyepatch --tags batch | nts run

## DIY Filtering using external tools, if you -really- want to
CURRENT_EPOCH=$(date +%s) 
nts get-plan | jq -r '{target: .target, testplan: {branch: .testplan.branch, sdkVersion: .testplan.sdkVersion, testcases: [.testplan.testcases[] | select(.category | startswith("Config"))] }}' | nts run 2>${CURRENT_EPOCH}.stderr.txt > ${CURRENT_EPOCH}.json 

Features

  • JSON goes to stdout, logging goes to stderr: nts get-devices > device_list.json
  • Typical shell exit codes for commands, mean you can use shell checks such as: nts get-devices || echo FAIL
  • Multi-OS, multi-shell compatible
  • Tab completion available (see nts completion)
  • (after release) No Netflix VPN dependencies

Alternative Installs

Pre-release installs:

sudo pip3 install -U ntscli-client --pre

Installing in an isolation environment

Python is well known for isolation environments like virtualenv, conda, pyenv, etc. These all work, and you should have no trouble using these if you prefer.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ntscli_client-0.1.6-py3-none-any.whl (20.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page