microsoft / WinAppDriver

Windows Application Driver
MIT License
3.66k stars 1.4k forks source link

Getting code coverage from WinAppDriver tests #1453

Open pzgrenadier opened 3 years ago

pzgrenadier commented 3 years ago

Hi,

Is there any way to get the code coverage from a WPF application under test while using WinAppDriver? Currently this is the only obstacle preventing us from converting all the coded-UI tests to WinAppDriver based tests. Without code coverage data from production code, we can't quantitively measure our test quality.

For example, when using sample test from here, the code coverage report only provide coverage data from the testing code, not from the WPF application itself.

Is this feature supported? If so, is there any document on how I can set it up?

Regards Xuyang

kfrajtak commented 3 years ago

Instrument your assemblies before the test run and collect the coverage data later: https://github.com/SteveGilham/altcover/wiki/Examples-of-use