janison / theBFG

A cloud-native C# unit / integration / load testing tool that clusters automatically
6 stars 1 forks source link

Code coverage of targets not included when out of process #2

Open captainjono opened 1 year ago

captainjono commented 1 year ago

Scenario:

I have a test that automates a webpage that is backed by aspnet / aspnet core. In the test I log into the system after entering a username and password. The login button is backed by a WebAPI.

When i run the bfg against that test case: thebfg target mytest.dll and fire

Expected Outcome:

The coverage report/s that are returned include data about the WebAPI as well as the test case

Actual Outcome:

It only returns a coverage report of the test case itself.

Suggested fix:

I dont just have this problem with WebAPIs, its general for any microservice I may also depend on in my test. It would be great if i could have a command similiar to:

Command Description
thebfg cover {anydotnetproces} #trigger:tag Run this on the target to collect usage information and coverage from the desired .NET process when a test with a matching tag runs
captainjono commented 1 year ago

I will be putting together the starter skeleton PR for this change including some unit tests (tdd yay). I'll also add some starting info on how this could be achieved using a profiler...