SeaLights ADO Extension - Setting up the Build scan and Unit Tests
Adding Sealights steps to your project
In the Build & Release section of your project, go into Edit
Click Add tasks... Either under All or Build you will find three SeaLights build steps:
SeaLights Prepare for Build
SeaLights Start Test Execution
SeaLights End Test Execution
Add these three to your build process. It should look like the image below:
As SeaLights is using the compilation method's bytecode signature (Hash ID) to generate a unique identifier for each method, it is important NOT to recompile the application between the scan command and the deployment. The scanned build's artifact (DLL, EXE) MUST be from the exact same compilation as the one deployed.
Configuring relevant parameters in the steps
Place the SeaLights Prepare for Build before your Build solution step and fill in the parameters:
SeaLights settings
Include Namespaces - A comma-separated list containing the namespaces you want to include in your build scan
Token - Enter an Agent token acquired from the SeaLights dashboard
Include Namespaces - A comma-separated list containing the namespaces you want to include in your build scan
Exclude Namespaces - A comma-separated list containing the namespaces you want to exclude in your build scan
Solution - Specify which solution file to work with
Save Build Session Id to file - Enter the location you want to save the build session ID file which will be used for later steps
Token - The token as copied from the SeaLights dashboard
App name - Name of the application to be displayed on the SeaLights dashboard
Branch name - Name of the branch to be displayed on the SeaLights dashboard
Build name - Name of the build to be displayed on the SeaLights dashboard. This must change per build
Excluded projects
Excluded projects - A comma-separated list containing the projects you want to exclude in your build scan
Automatically exclude projects that are detected as test projects - Check this for the SeaLights to automatically exclude projects containing tests
Sealights settings
Token - Enter an Agent token acquired from the SeaLights dashboard
SeaLights Tools Path - By default, the extension downloads the latest agent. You can override this with a local version by specifying the path to it here
Enable Log - Check this to enable printing log information
Ignore certificate errors - Check this to work around certificate issues
Specify build session Id - Enter here a unique build session ID instead of SeaLights generating one for you. It must be unique per app, branch & build
Build settings
Ignore generated code - Check this to ignore compiler-generated code like getters/setters and constructors
Debug build scan - Check this to generate extra debug information
MSBuild version - Select which MSBuild version you have (14 or 15)
Emit MSBuild version - Check this if you encounter Error MSB4025 during the build process
Place the SeaLights Start Test Execution before your Test Assemblies step
Update the Test process architecture according to the architecture of your tested code
Test Stage - Set the name of the test stage you are running as will be displayed on the SeaLights dashboard
Target Log folder - Provide the path to a folder where logs should be saved
Log level - Specify the level of logs that should be generated
Collect coverage - Check this if coverage should be captured from the following processes as in Unit Tests, or uncheck when coverage is captured from a separate process like IIS
Sealights settings
Token - Enter an Agent token acquired from the SeaLights dashboard
SeaLights Tools Path - By default, the extension downloads the latest agent. You can override this with a local version by specifying the path to it here
Enable Log - Check this to enable printing log information
Ignore certificate errors - Check this to work around certificate issues
Specify build session Id - Enter here a unique build session ID instead of SeaLights generating one for you. It must be unique per app, branch & build
Place the SeaLights End Test Execution after your Test Assemblies step
Test reports folder - If the test reports are not placed in the default locations then provide their location here
Test Stage - Set the name of the test stage you are running. This should be left blank to match the Start Test Executions that were previously run
SeaLights settings
Token - Enter an Agent token acquired from the SeaLights dashboard
SeaLights Tools Path - By default, the extension downloads the latest agent. You can override this with a local version by specifying the path to it here
Enable Log - Check this to enable printing log information
Ignore certificate errors - Check this to work around certificate issues
Specify build session Id - Enter here a unique build session ID instead of SeaLights generating one for you. It must be unique per app, branch & build