Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 15 Next »

Generating a session ID

sl-python config {--token <token> | --tokenfile <file>} --appname <appname> --branchname <branch> --buildname <build> --workspacepath <path> [--include <include>] [--exclude <exclude>] [--buildsessionid <buildsessionid>] [--proxy <proxy>] [--help]

Parameter

Description

token

Access token generated from the Sealights server

tokenfile

Path to file containing access token generated from the SeaLights server

appname

Name of the application

branchname

The source branch of the application

buildname

The build label of the current build

workspacepath

Path to the workspace where the source code exists

include

Include only files whose paths match one of these patterns.
Accepts shell-style wildcards, which must be quoted.

exclude

Omit files whose paths match one of these patterns.
Accepts shell-style wildcards, which must be quoted.

buildsessionid

Optional: A user provided session ID (case-sensitive)

proxy

Address of proxy to run connection through

help

Show Help message and exit.

Scanning a build

sl-python scan {--token  <token> | --tokenfile <file>} {--buildsessionid <id> | --buildsessionidfile <file>} --scm {git|none} [--scmBaseUrl <url> --scmProvider {github|gitlab|bitbucket} [--scmVersion <version>] [--proxy <proxy>] [--help]

Parameter

Description

token

Access token generated from the SeaLights server

tokenfile

Path to file containing access token generated from the SeaLights server

buildsessionid

Session ID of configuration created

buildsessionidfile

Path to file containing the Session ID of configuration created

scm

Source control used

Current options are: git, none

scmprovider

The provider name of your Source Control Management (SCM) tool.
Values: Github, Bitbucket and Gitlab (Default is Github)

scmbaseurl

The URL to the repository which contains the code.

If not provided, the url of the remote GIT origin will be used

Example: https://my.bitbucket.com/projects/ABCD/repos/XYZ/browse/A1

scmversion

The version of your Source Control Management (SCM) tool. If left blank, cloud version is assumed. Otherwise, specify the version of your on-premise server.

proxy

Address of proxy to run connection through

help

Show Help message and exit.

Running backend server

sl-python run {--token  <token> | --tokenfile <file>} {--buildsessionid <id> | --buildsessionidfile <file>} [--cov-report <path>] [--per-test {true|false}] [--interval <interval>] [--labid <labid>] [--proxy <proxy>] [--help] args...

Parameter

Description

token

Access token generated from the SeaLights server

tokenfile

Path to file containing access token generated from the SeaLights server

buildsessionid

Session ID of configuration created

buildsessionidfile

Path to file containing the Session ID of configuration created

cov-report

Path to generate XML coverage report

per-test

Collect coverage per test (Default: false)

interval

Interval in milliseconds to send data

labid

Unique ID for a set of test labs in case multiple labs are running simultaneously (case-sensitive)

proxy

Address of proxy to run connection through

help

Show Help message and exit.

args...

Extra arguments for running the application server

Test Listener

Starting a test stage

sl-python start {--token  <token> | --tokenfile <file>} {--buildsessionid <id> | --buildsessionidfile <file>} --teststage <teststage> [--labid <labid>] [--proxy <proxy>] [--help]

Parameter

Description

token

Access token generated from the SeaLights server

tokenfile

Path to file containing access token generated from the SeaLights server

buildsessionid

Session ID of configuration created

buildsessionidfile

Path to file containing the Session ID of configuration created

teststage

Name of the test stage

labid

Unique ID for a set of test labs in case multiple labs are running simultaneously

proxy

Address of proxy to run connection through

Upload report files

Report files must be JUnit style XML reports

sl-python uploadReports {--token  <token> | --tokenfile <file>} {--buildsessionid <id> | --buildsessionidfile <file>} {--reportfile <reportFile> | --reportfilesfolder <reportFilesFolder>} [--hasmorerequests {False|True}] [--labid <labid>] [--source <source>] [--type <type>] [--proxy <proxy>] [--help]

Parameter

Description

token

Access token generated from the SeaLights server

tokenfile

Path to file containing access token generated from the SeaLights server

buildsessionid

Session ID of configuration created

buildsessionidfile

Path to file containing the Session ID of configuration created

reportfile

Path to report file. This argument can be declared multiple times in order to upload multiple files.

reportfilesfolder

Path to folder that contains nothing but report files. All files in folder will be uploaded.
This argument can be declared multiple times in order to upload multiple files from multiple folders containing report files.

Note: all files in the folder will be uploaded

hasmorerequests

Set to ‘True’ if test results contains multiple reports (Default: ‘False’).

labid

Unique ID for a set of test labs in case multiple labs are running simultaneously (case-sensitive)

source

The reports provider. If not set, the default will be 'Junit xml report'.

type

Name of testing framework type. The report type. If not set, the default will be 'JunitReport'

  • JUnitReport - For uploading JUnit test report files

  • commitLog - For uploading git style commit logs

proxy

Address of proxy to run connection through

help

Show Help message and exit.

Ending a test stage

sl-python end {--token  <token> | --tokenfile <file>} {--buildsessionid <id> | --buildsessionidfile <file>} [--labid <labid>] [--proxy <proxy>] [--failbuild {true|false}]

Parameter

Description

token

Access token generated from the SeaLights server

tokenfile

Path to file containing access token generated from the SeaLights server

buildsessionid

Session ID of configuration created

buildsessionidfile

Path to file containing the Session ID of configuration created

labid

Unique ID for a set of test labs in case multiple labs are running simultaneously

proxy

Address of proxy to run connection through

help

Show Help message and exit.

Running Tests via pytest, unittest, unit2 or nose

These commands will be documented soon, please refer to their --help option via the command below

sl-python {pytest|unittest|unit2|nose} --help

Logging

Enabling logging in Python is done using by setting the SL_DEBUG environment variable to “true”.

Messages will be written to stdout and the file, sealights-python-agent.log

export SL_DEBUG=true
  • No labels