Setting up IIS Listener
Coverage Collector IIS Installation
As an Administrator, install and start the coverage collector service:
SL.DotNet.CoverageCollectorService.exe install --startRegister our agent as a profiler in the IIS services (two specific services - WAS and W3SVC):
SL.DotNet.exe instrumentIIS --forcePerform IIS reset:
iisreset /restartAt the successful completion of this step, you will see a new entry appearing in the Cockpit > Agent Monitor for an entity called CollectorService for dotnet technology
Capturing coverage
During the time you want to run your tests and capture coverage, you can now start and stop the coverage collection of the SeaLights agent test listener
Starting coverage collection session
Before you start running your tests, you need to update the SeaLights Test Listener to start collecting coverage. You do so with the startCollectorServiceSession command.
Since there could be multiple applications running on a single IIS server, it is important to make note of the Application Pool name that corresponds to the hosted application from which coverage will be collected. If you are unsure what your application pool name is for the applicationPool parameter, refer to the expandable paragraph below (inside this article section) to identify it manually from your IIS Manager console.
At the successful completion of this step, you will see additional new entries appearing in the Cockpit > Agent Monitor: the CollectorServiceSession and a entity Profiler.
The Profiler will be highlighting the Application Pool it is connected to as a Tag in the dedicated column.
You can provide a star ('*') to the
applicationPoolparameter in order to capture all the Application Pools at once. This option can be used for troubleshooting or if your IIS server is dedicated to your application but is not necessarily defined as a best practice.This command can be run on a remote machine (like the CI running the tests) while providing the host to start the session on using the parameter:
--machine <IIS host>
Running your tests
Now you can run any one of your tests that run against this IIS instance and capture coverage (Don’t forget to send a start and end command with the test stage name):
Stopping coverage collection session
Uninstalling the Coverage Collector Service
Sometimes, when upgrading your agent version, you will need to uninstall the coverage collector service from your machine.
This can be done by running the following command:
Sample script
Last updated
Was this helpful?




