Table of Contents | ||||
---|---|---|---|---|
|
Onboarding the .Net CD Agent
These steps outline the onboarding steps needed on the environment, with the CD agent, added to each component that builds up the Application Under Test.
Configuration steps
Tip |
---|
When the application is up and running and the Sealights CD Agent configured, you can see it is properly running from the Cockpit -> Live Agents Monitor screen. |
Agent’s Parameters Reference
Mandatory parameters
Property (CLI) | Required | Description | Env variable | JSON | |||||
---|---|---|---|---|---|---|---|---|---|
| Yes | Name of the target application |
|
| |||||
| Yes | The source branch of the application |
|
| |||||
| Yes | The build label/version of the current artefact |
|
| |||||
| Yes | CD-only lab id |
|
| |||||
| Yes | Path to the scanned folder where all binary files are located |
|
| |||||
| Yes | Comma-separated list of namespaces to include in the scan. |
|
|
Optional parameters
These parameters may be required due to your specific configuration or environment’s limitations (e.g., proxy).
Property | Required | Description | Description | |||||
---|---|---|---|---|---|---|---|---|
| Comma-separated list of namespaces to exclude from the scan. Supports wildcard ( Default value: |
| ||||||
| Comma-separated list of files to include in scan. Supports wildcard ( Default value: |
| ||||||
| Comma-separated list of files to exclude from the scan. Supports wildcard ( |
| ||||||
| Comma-separated list of assemblies to include. Supports wildcard ( |
| ||||||
| Comma-separated list of assemblies to exclude from the scan. Supports wildcard ( Default value: |
| ||||||
| Source root directory, where all paths will be made relative to |
|
| |||||
| The name of the target application that will be started |
| ||||||
| Arguments to be passed to the target process |
| ||||||
| The path to the working directory |
|
Logging parameters
To enable logs, you can set the following parameters
Parameter | Required | Description(CLI) | Description | Env variable | JSON | |||
---|---|---|---|---|---|---|---|---|
| Log level. Default and Recommended value is
|
|
| |||||
| Enables logging profiler data to file. Requires LogLevel to be specified. |
|
|
Sample Commands
Downloading the agent
Info |
---|
The different available options to download the agent are documented in a dedicated central page: https://sealights.atlassian.net/l/cp/g0omvaoL |
For example, you can use the following commands to automate the process
Linux | Windows | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Configuration commands
Table of Contents | ||||||
---|---|---|---|---|---|---|
|
Simple Web App
This simple use case illustrates how to collect coverage with the CD agent from a web application started without parameters.
Code Block |
---|
.\net6.0\SL.DotNet.exe cdAgent --appName "TestApp" --branchName "main" --buildName "$(Get-Date -Format "yyyy-MM-dd-HH-mm-ss")" --labId "integ_main_integration_TestApp_Integration" \ --binDir "WeatherApi\bin\Debug\net6.0" --includeNamespace "WeatherApi*" \ --target "WeatherApi\bin\Debug\net6.0\WeatherApi.exe" --workingDir "WeatherApi\bin\Debug\net6.0" \ --identifyMethodsByFqn |