...
...
...
...
Table of Contents | ||||
---|---|---|---|---|
|
Note |
---|
All the commands below have the |
Creating a session ID
Standard Session ID
Code Block |
---|
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> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Name of the application |
| The source branch of the application |
| The build label of the current build |
| Comma-separated, key-sensitive list of namespaces to include in scan. |
| Comma-separated, key-sensitive list of packages to exclude from scan. |
| Comma-separated list of files to include in scan. Default: |
Default: *.exe, *.dll
exclude
| Comma-separated list of files to exclude from scan. |
Supports wildcards (* = any string, ? = any character). For example: | |
| Optional: A user provided session ID |
| Optional: A user provided Build Session ID file. |
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Pull Request Session ID
Code Block |
---|
SL.DotNet.exe prConfig --appName <arg> --pullRequestNumber <arg> --targetBranch <arg> --latestCommit <arg> --repositoryUrl <arg> --includeNamespace <arg> [--excludeNamespace <arg>] [--include <arg>] [--exclude <arg>] [--buildSessionId <arg> | --buildSessionIdFile <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Name of the application |
| The number assigned to the Pull Request from the source control |
| The branch to which this PR will be merged into (already reported to SeaLights) |
| The full SHA of the last commit made to the Pull Request |
| The pull request URL for the PR to be scanned, up until the section before the |
| Comma-separated |
, key-sensitive list of namespaces to include in scan. | |
| Comma-separated, key-sensitive list of packages to exclude from scan. |
| Comma-separated list of files to include in scan. Default: |
Default: *.exe, *.dll
| Comma-separated list of files to exclude from scan. |
Supports wildcards (* = any string, ? = any character). For example: | |
| Optional: A user provided session ID |
| Optional: A user provided Build Session ID file. |
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Preparing a build for MSBuild
Code Block |
---|
SL.DotNet.exe prepareForMsBuild {--buildSessionId <arg> | --buildSessionIdFile <arg>} --baseDir <arg> --ignoreGeneratedCode true [--token <arg> | --tokenFile <arg>] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Base path where your solution file is |
Scanning a build
Info |
---|
The project must contain all the PDB files! |
Code Block |
---|
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> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Path to the source workspace |
| Must be provided when scanning the first module |
| A unique module ID to be used for seperate modules |
| 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 |
| Hashing algorithm to use. Available options are md5 (default), sha1, sha256, sha384, sha512 |
| The SCM that is used in order to provide integration with. Values: auto, git, none |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
| Scan additional folder to collect more runtime components (.git/dll/exe ) for scanning. The path is an absolute path. |
| Comma-separated list of absolute paths to the folders where the agent will recursively search for *.pdb files |
Ending multi-modules scan
Code Block |
---|
SL.DotNet.exe reportBuildStatus {--buildSessionId <arg> | --buildSessionIdFile <arg>} --success <true|false> [--message <arg>] [--duration <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Indicates that the build succeeded (considered failed if not specified) |
| Additional build status message to report (optional) |
| Build duration in milliseconds (optional) |
Starting a test stage
Code Block |
---|
SL.DotNet.exe startExecution {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testStage <arg> [--labId <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Name of the test stage |
| Unique ID for a set of test labs in case multiple labs are running similtaniously |
| Address of proxy to run connection through. To use the system proxy just provide the value 'system' |
| The proxy username if needed |
| The proxy password if needed |
Upload report files
Code Block |
---|
SL.DotNet.exe uploadTestReport {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testStage <arg> --report <arg> [--labId <arg>] [--token <arg> | --tokenFile <arg>] [proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Name of the test stage |
| Path to report file or directory containing all the valid reports (Non recursive). Supported formats are MSTest (TRX files), xUnit.Net and NUnit (XML files). |
| Unique ID for a set of test labs in case multiple labs are running simultaneously |
| Address of proxy to run connection through. To use the system proxy just provide the value ' |
| The proxy username if needed |
| The proxy password if needed |
Ending a test stage
Code Block |
---|
SL.DotNet.exe endExecution {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testStage <arg> [--labId <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Unique ID for a set of test labs in case multiple labs are running similtaniously |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
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.
Code Block |
---|
SL.DotNet.exe testListener {--buildSessionId <arg> | --buildSessionIdFile <arg>} --target <arg> [--workingDir <arg>] [--targetArgs <arg>] [--labId <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] [--profilerRegistrationMethod <path32|path64>] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| Name of the application to run with the test listener |
| Path to working directory. Current working directory will be used if not specified |
| Sets the COM32 profiler DLL registration method. |
| Command line arguments to pass the target application |
| Unique ID for a set of test labs in case multiple labs are running simultaneously |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Starting Background test listener
Code Block |
---|
SL.DotNet.exe startBackgroundTestListener {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testListenerSessionKey <arg> [--labId <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| A random alphanumeric ID (%RANDOM% in command line) This ID needs to be passed to any process that you want to capture cover |
| Unique ID for a set of test labs in case multiple labs are running simultaneously |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Running background processes
You need to run your process with the following environment variables:
Code Block |
---|
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> |
Parameter | Description |
---|---|
|
|
| 1 |
| For .NET 4.5+ : |
| For .NET 4.6+ : |
| A random alphanumeric ID that was provided during the startBackgroundTestListener |
| Optional: Level of logs to generate - Default is 0 (none), Fatal=1, Error=4, Debug=6, All=999 |
| Optional: Folder to save log files in |
Stop Background test listener
Code Block |
---|
SL.DotNet.exe stopBackgroundTestListener {--buildSessionId <arg> | --buildSessionIdFile <arg>} --testListenerSessionKey <arg> [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| A random alphanumeric ID that was provided during the startBackgroundTestListener |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Starting the Service test listener
Code Block |
---|
SL.DotNet.exe startCollectorServiceSession {--buildSessionId <arg> | --buildSessionIdFile <arg>} --processName <arg> [--processTag <arg>] [--includeChildProcesses] [--machine <host>] [--labId <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| The executable name of the services process. For instance IIS is: w3wp.exe |
| The application pool identity tag in IIS For non IIS services this should not be provided |
| Should be set if the service spawns child processes and coverage needs to be captured from them |
| Remote machine to start the collector service on |
| Unique ID for a set of test labs in case multiple labs are running simultaneously |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Stopping the Service test listener
Code Block |
---|
SL.DotNet.exe stopCollectorServiceSession {--buildSessionId <arg> | --buildSessionIdFile <arg>} --processName <arg> [--processTag <arg>] [--includeChildProcesses] [--machine <host>] [--labId <arg>] [--token <arg> | --tokenFile <arg>] [--proxy <arg> [--proxyUsername <arg> --proxyPassword <arg>]] |
Parameter | Description |
---|---|
| Access token generated from the SeaLights server |
| Path to file containing the access token generated from the SeaLights server |
| Session ID of configuration created |
| Path to file containing the Session ID of configuration created |
| The executable name of the services process. For instance IIS is: w3wp.exe |
| The application pool identity tag in IIS For non IIS services this should not be provided |
| Should be set if the service spawns child processes and coverage needs to be captured from them |
| Remote machine to start the collector service on |
| Unique ID for a set of test labs in case multiple labs are running simultaneously |
| Address of proxy to run connection through |
| The proxy username if needed |
| The proxy password if needed |
Logging
Agents Commands
In order to enable logs when executing direct agent commands, you can set the following parameters with any of the above commands
Parameter | Description |
---|---|
| Set to true to enable logs |
| Set to true to enable enhanced logs (prepareForMsbuild) |
| Set to true to enable log output to the console |
| Set to true to enable log output to a file |
| Provide the name of the log file (Collector) |
| Limit the number of log files to create. Default: 10 |
| Limit the size of the log file. Default: 10*1024 KB |
| Path for the Profiler log file to be created in. |
| Level of logs from the Profiler to generate as a Integer value: Default is 0 (none), Fatal=1, Error=4, Debug=6, All=999 |
IIS Collector Service and Background Listener
In order to enable logs, you can add the following environment variables to the registry in addition to the regular variables set for the Profiler as explained in the section Running background processes above
Parameter | Description |
---|---|
| Level of logs to generate as a Integer value: Default is 0 (none), Fatal=1, Error=4, Debug=6, All=999 |
| Folder to save log files in. |
Note |
---|
When enabling logs for the IIS Collector Service, please make sure to:
|