Skip to end of metadata
Go to start of metadata

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

Compare with Current View Version History

« Previous Version 7 Next »

Commands to complete

  • nose

  • pytest

  • unit2

  • unittest

Generating a session ID

sl-python config {--token <token> | --tokenfile <file>} --appname <appname> --branch <branch> --build <build> [--buildsessionid <buildsessionid>] [--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

appname

Name of the application

branch

The source branch of the application

build

The build label of the current build

buildsessionid

Optional: A user provided session ID

proxy

Address of proxy to run connection through

help

Show Help message and exit.

Scanning a build

sl-python build {--token  <token> | --tokenfile <file>} {--buildsessionid <id> | --buildsessionidfile <file>} --workspacepath <workspacepath>  --scm {git|none} [--projectRoot <folder>] [--excludedpaths <excludedpaths>] [--uniqueModuleId <id>] [--es-modules] [--jobName <jobName>] [--logsUrl <logsUrl>] [--dependenciesFile <dependenciesFile>] [--instrumentForBrowsers --outputpath <folder> [--downloadAgent {true|false}] [--instrumentationOnly] [--labid <labid>]] [--proxy <proxy>] [--failbuild {true|false}] [--scmBaseUrl --scmProvider {github|gitlab|bitbucket} --scmVersion] [--babylonPlugins decorators-legacy]

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

workspacepath

Path to the source workspace

excludedpaths

Comma-separated list of files to exclude from scan

Supports wildcards (* = any string, ? = any character). For example: '*-with-dependencies.jar , bad-bad?.war, *-source.jar'

projectRoot

Path to the root of the project. Usually where the src folder resides

uniqueModuleId

Unique name when providing more than one build scan per build

es-modules

Indicates that you use es6 modules

jobName

Name of Jenkins job

logsUrl 

Path to Jenkins log folder

scm 

Source control used

Current options are: git, none

dependenciesFile 

A path to a json file that is in the following format:
[{"appName":"","branch":"","build":""}, {...}]

instrumentForBrowsers

Instrument the JS files for providing browser front-end coverage information. Must be used with the outputpath parameter.

downloadAgent

Set this value to 'false' in order to prevent the instrumented javascript to try and download the browser test listener (for example, when using 'Karma').

instrumentationOnly

Only instrument the javascript files, without sending the build information to the SeaLights server

outputpath

Folder to generate the instrumented JS files in when using the instrumentForBrowsers parameter

labid

Unique ID for a set of test labs in case multiple labs are running simultaneously or for an integration build.
This needs to be done during the instrumentation process when using the instrumentForBrowsers option

proxy

Address of proxy to run connection through

failbuild

Exit with an error code if an error is encountered (Default: false)

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 not provided, cloud version is assumed

babylonPlugins 

When there are decorators in the code, you should use this flag with the "decorators-legacy" value

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 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

Logging

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

Furthermore, you can set the level of logging by using the SL_LOG_LEVEL environment variable  with one of the following options error, warn, info or debug

export SL_DEBUG=true
export SL_LOG_LEVEL=info
  • No labels