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 25 Next »

All the commands below have the sltoken and sltokenfile flags as optional.
They only need to be used if you have not placed the sltoken.txt file inside the agents folder.

Creating a session ID

Usage
SL.DotNet.exe config --appName <arg> --branchName <arg> --buildName <arg> --includeNamespace <arg> [--excludeNamespace <arg>] [--include <arg>] [--exclude <arg>] [--buildSessionId <arg> | --buildSessionIdFile <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>] 
ParameterDescription
appName
Name of the application
branchName
The source branch of the application
buildName
The build label of the current build
includeNamespace

Comma-separated list of namespaces to include in scan

Supports wildcards (* = any string, ? = any character). For example: 'com.example.* ,io.*.demo, com.?ello.world'

excludeNamespace

Comma-separated list of packages to exclude from scan

Supports wildcards (* = any string, ? = any character). For example: 'com.example.* ,io.*.demo, com.?ello.world'

include

Comma-separated list of files to include in scan

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

Default: *.exe, *.dll

exclude

Comma-separated list of files to exclude from scan

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

Default: Microsoft.* System.*

buildSessionId 
Optional: A user provided session ID
buildSessionIdFile 
Optional: A user provided Build Session ID file.
tokenAccess token generated from the SeaLights server
tokenFilePath to file containing the access token generated from the SeaLights server
proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'


Preparing a build for MSBuild

Usage
SL.DotNet.exe prepareForMsBuild {--buildSessionId <arg> | --buildSessionIdFile <arg>} --baseDir <arg> --ignoreGeneratedCode true [--token  <arg> | --tokenFile <arg>] 
ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the access token generated from the SeaLights server
buildSessionId 
Session ID of configuration created
buildSessionIdFile
Path to file containing the Session ID of configuration created
baseDir

Base path where your solution file is

Scanning a build

The project must contain all the PDB files!


Usage
SL.DotNet.exe scan {--buildSessionId <arg> | --buildSessionIdFile <arg>} --workspacePath <arg> --ignoreGeneratedCode true [--firstModule {true|false}] [--uniqueModuleId <arg>] [--baseDir <arg>] [--scm <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]
ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the 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

firstModule

Must be provided when scanning the first module

uniqueModuleId
A unique module ID to be used for seperate modules
baseDir

Base path where all relative paths should start from. By default the agent searches for the solution file and uses its path for this value

hashingAlgorithmHashing algorithm to use. Available options are md5 (default), sha1, sha256, sha384, sha512 
scm

The SCM that is used in order to provide integration with. Values: auto, git, none


proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'

Starting a test stage

Usage
SL.DotNet.exe startExecution {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testStage <arg> [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]


ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the 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 similtaniously

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'


Upload report files

Usage
SL.DotNet.exe uploadTestReport {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testStage <arg> --report <arg> [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [proxy <arg>]
ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the 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

report

Path to report file or directory containing all the valid reports (Non recursive). Supported formats are MSTest, xUnit.Net and NUnit

labId

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

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'


Ending a test stage

Usage
SL.DotNet.exe endExecution {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testStage <arg> [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]
ParameterDescription
token
Access token generated from the SeaLights server
tokenfile
Path to file containing the 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 similtaniously

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'


Starting the test listener

For a single process to be run with the SeaLights agent as a test listener in order to capture the tests footprints.

Usage
SL.DotNet.exe testListener {--buildSessionId <arg> | --buildSessionIdFile <arg>} --target <arg> [--workingDir <arg>] [--targetArgs <arg>] [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>] [--profilerRegistrationMethod <path32|path64>]


ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the access token generated from the SeaLights server
buildSessionId 
Session ID of configuration created
buildSessionIdFile
Path to file containing the Session ID of configuration created
target

Name of the application to run with the test listener

workingDir

Path to working directory. Current working directory will be used if not specified

profilerRegistrationMethod
Sets the COM32 profiler DLL registration method. 
targetArgs
Command line arguments to pass the target application
labId

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

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'

Starting Background test listener

Usage
SL.DotNet.exe startBackgroundTestListener {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testListenerSessionKey <arg> [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]


ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the access token generated from the SeaLights server
buildSessionId 
Session ID of configuration created
buildSessionIdFile
Path to file containing the Session ID of configuration created
testListenerSessionKey

A random alphanumeric ID (%RANDOM% in command line)

This ID needs to be passed to any process that you want to capture cover

labId

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

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'

Running background processes

You need to run your process with the following environment variables:

Cor_Profiler={01CA2C22-DC03-4FF5-8350-59E32A3536BA}
Cor_Enable_Profiling=1
Cor_Profiler_Path={ SL.DotNet.ProfilerLib_x64.dll | SL.DotNet.ProfilerLib_x86.dll }
COR_PROFILER_PATH_32=SL.DotNet.ProfilerLib_x86.dll
COR_PROFILER_PATH_64=SL.DotNet.ProfilerLib_x64.dll
SeaLights_CollectorId=<testListenerSessionKey>
ParameterDescription
Cor_Profiler
{01CA2C22-DC03-4FF5-8350-59E32A3536BA}
Cor_Enable_Profiling
1
Cor_Profiler_Path

For .NET 4.5+ :
Path to the SeaLights profiler DLL.
Either SL.DotNet.ProfilerLib_x64.dll or SL.DotNet.ProfilerLib_x86.dll depending on your processes architecture

COR_PROFILER_PATH_32
COR_PROFILER_PATH_64
For  .NET 4.6+ :
Path to the SeaLights profiler DLL.
Both should be set and the correct one will be depending on the processes architechture
SeaLights_CollectorId
A random alphanumeric ID that was provided during the startBackgroundTestListener
SeaLights_LogLevelOptional: Level o logs to generate - Default is 0 (none), Fatal=1, Error=4, Debug=6, All=999
SeaLights_LogDirOptional: Folder to save log files in

Stop Background test listener

Usage
SL.DotNet.exe stopBackgroundTestListener {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testListenerSessionKey <arg> [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]


ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the access token generated from the SeaLights server
buildSessionId 
Session ID of configuration created
buildSessionIdFile
Path to file containing the Session ID of configuration created
testListenerSessionKeyA random alphanumeric ID that was provided during the startBackgroundTestListener
labId

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

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'

Starting the Service test listener

Usage
SL.DotNet.exe startCollectorServiceSession {--buildSessionId <arg> | --buildSessionIdFile <arg>} --processName <arg> [--processTag <arg>] [--includeChildProcesses] [--machine <host>] [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]


ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the access token generated from the SeaLights server
buildSessionId 
Session ID of configuration created
buildSessionIdFile
Path to file containing the Session ID of configuration created
processName

The executable name of the services process.

For instance IIS is: w3wp.exe

processTag

The application pool identity tag in IIS

For non IIS services this should not be provided

includeChildProcesses
Should be set if the service spawns child processes and coverage needs to be captured from them
machine
Remote machine to start the collector service on
labId

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

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'

Stopping the Service test listener

Usage
SL.DotNet.exe stopCollectorServiceSession {--buildSessionId <arg> | --buildSessionIdFile <arg>} --processName <arg> [--processTag <arg>] [--includeChildProcesses] [--machine <host>] [--labId <arg>] [--token  <arg> | --tokenFile <arg>] [--proxy <arg>]
ParameterDescription
token
Access token generated from the SeaLights server
tokenFile
Path to file containing the access token generated from the SeaLights server
buildSessionId 
Session ID of configuration created
buildSessionIdFile
Path to file containing the Session ID of configuration created
processName

The executable name of the services process.

For instance IIS is: w3wp.exe

processTag

The application pool identity tag in IIS

For non IIS services this should not be provided

includeChildProcesses
Should be set if the service spawns child processes and coverage needs to be captured from them
machine
Remote machine to start the collector service on
labId

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

proxy
Address of proxy to run connection through
To use the system proxy just provide the value 'system'

Logging

In order to enable logs you can set the following parameters with any of the above commands

ParameterDescription
logEnabled
Set to true to enable logs
logLevel

Sets the log level to one of the following: "off", "info", "warn", "error", "debug"

logAppendConsole
Set to true to enable log output to the console
logAppendFile

Set to true to enable log output to a file

logFolder
Provide a folder to save the log files in
logFilename
Provide the name of the log file
logFileCount
Limit the number of log files to create. Default: 10
logSizeLimit
Limit the size of the log file. Default: 10*1024 KB
  • No labels