Skip to main content

Drill4Net Applications

This web page provides an overview of Drill4Net Scanner and Drill4Net Injector applications, their purposes, how to configure and utilize these applications for maximum benefit. See quick start guide to learn how you can use these applications together to minimize your regression suite.

Drill4Net Scanner#

1. Overview#

Drill4Net Scanner is a console application developed to process application under test assemblies so that it will be able to communicate with Drill4J Admin. Drill4Net Scanner is also responsible for collecting code coverage and all the required information for analyzing risks (methods changed sinse the last build) and tests that should run to cover these risks.

2. Download#

Download Drill4Net Scanner (drill4net-scanner) for your system here.

3. Configuration#

Drill4Net Scanner application can be configured using appsettings.yml file which can be found in Drill4Net Scanner directoty. Table below describes each setting.

SettingDescription
adminAgentConfig:idArbitrary agent name. Example: "test_app_1". If you are using microservices architecture you will need to run Drill4Net Scanner for each microservice and provide config value for each of them.
adminAgentConfig:serviceGroupIdArbitrary microservices group identifier to group microservices together. Example: "group_1". Leave this value blank if you are not using microservices architecture.
adminAgentConfig:buildVersionVersion of the build. Should be updated for every new build. Example: "0.0.1".
communicatorUrlCommunication URL of Drill4J Admin back-end.
coverageCollectionSettings: schedulerDelayIntervalInterval in seconds indicating how often code coverage data is sent to the Drill4J Admin. The default value is 10 seconds.
coverageCollectionSettings: collectInitProcessesCoverageSpecifies whether to collect coverage for initial processes (Background jobs, Initialization, Cron). The default value is false.

Example of the Drill4Net Scanner appsettings.yml:

adminAgentConfig:
id: 'appId-1'
serviceGroupId: ''
buildVersion: '0.0.1'
communicatorUrl: 'http://localhost:8090'
coverageCollectionSettings:
schedulerDelayInterval: 10
collectInitProcessesCoverage: false

4. Usage#

You can run Drill4Net Scanner as you would run any other console application. There are two required arguments:

  • Directory with binaries of application under test
  • Application under test executable (--target) Example for Windows:
start Drill4Net.Scanner.exe "d:\Builds\AppUnderTest\bin\Release\netcoreapp3.1" \
--target "d:\Builds\AppUnderTest\bin\Release\netcoreapp3.1\ApplicationUnderTest.exe"

There are also optional parameters described here.

Make sure not to move source files between the _application build_ step and the _Scanner_'s launch
Why is it important:
1. The Scanner application utilizes Coverlet to collect code coverage.
2. Coverlet relies on Program Database Files (PDB).
3. These PDB files contain the original paths for project sources.
4. Therefore, if you change the source files location after the _application build_ step, Scanner won't be able to locate sources and won't work properly

Drill4Net Injector#

1. Overview#

Drill4Net Injector is a console application developed to process assemblies with tests so that it will be able to send all the required information about tests to Drill4J Admin.

2. Download#

Download Drill4Net Injector (drill4net-injector-app) for your system here.

3. Configuration#

Drill4Net Injector application can be configured using drill4netsettings.yml file which can be found in Drill4Net Injector directoty. Table below describes each setting.

SettingDescription
Settings:ClientIntegration tests client. Currently only HTTP client is supported, so this setting should be HttpClient.
Settings:TestAssemblySourcePathPath to the assembly with tests, including filename. This value can also be specified as a command line argument to the Drill4Net Injector.
AdminAgentConfig:IdArbitrary agent name. Example: "test_app_1". Leave this value blank if you are using a microservices architecture.
AdminAgentConfig:ServiceGroupIdArbitrary microservices group identifier to group microservices together. Example: "group_1". Leave this value blank if you are using a monolithic architecture.
CommunicatorUrlCommunication URL of Drill4J Admin back-end.
Serilog:*Logger settings. Detailed information about Serilog configuration is available here. Note: not all settings are available as we may not have required Serilog package for specific functionality.

Note that values of AdminAgentConfig:Id, AdminAgentConfig:ServiceGroupId, AdminAgentConfig:BuildVersion and CommunicatorUrl should be same as in appsettings.yml of Drill4Net Scanner. Example of the drill4netsettings.yml:

Settings:
Client: HttpClient
TestAssemblySourcePath: d:\Builds\AppUnderTest.Tests\netcoreapp3.1\AppUnderTest.Tests.dll
Serilog:
Using:
- Serilog.Sinks.Console
- Serilog.Sinks.File
MinimumLevel: Debug
WriteTo:
- Name: Console
- Name: File
Args:
path: Logs/Drill4Net.Injector.App_.txt
rollingInterval: Day
AdminAgentConfig:
Id: 'appId-1'
ServiceGroupId: ''
CommunicatorUrl: 'http://localhost:8090'

4. Usage#

You can run Drill4Net Injector as you would run any other console application. Example for Windows:

start Drill4Net.Injector.App.exe

You can also provide TestAssemblySourcePath argument. In this case, value from drill4netsettings.yml will be overriden. Example for Windows:

start Drill4Net.Injector.App.exe "d:\Builds\AppUnderTest.Tests\netcoreapp3.1\AppUnderTest.Tests.dll"