testfx icon indicating copy to clipboard operation
testfx copied to clipboard

Possibility to treat missing dynamic data as warning?

Open fx999dev opened this issue 10 months ago • 2 comments

Hello,

we dynamically get our data for our unit test from different databases. Sometimes there is no data for specific cases on specific databases. This is not a bug and intended. However these tests do not run because of missing data. This is expected. The following message is displayed:

Property or method TestData on XyViewModelTests returns empty IEnumerable<object[]>

But these tests are then marked as failed --- is there a possibility to treat such cases (when there is not data) as warning?

Thank you!

fx999dev avatar Oct 10 '23 07:10 fx999dev

Hi @fx999dev, thanks for the suggestion! is it gonna be okay if marked as failed and attached a warning with the output? or you suggested to mark it as ignored with the output with the reason of no driven data received?

engyebrahim avatar Oct 11 '23 11:10 engyebrahim

We would prefer the second option. Mark it as ignored with the output with the reason of no driven data received.

fx999dev avatar Oct 11 '23 12:10 fx999dev

We will add a runsettings MSTest entry that will allow to consider this case as a single test returning "inconclusive" result.

Evangelink avatar Apr 08 '24 13:04 Evangelink

✅ Successfully linked to Azure Boards work item(s):

testplatform-bot avatar Apr 24 '24 11:04 testplatform-bot