I am Implementing Data Driven Unit Testing using xUnit. This removed lot of repetitive code from my unit test but in case of failure it’s hard to debug.
I have 10-15 data variation and i am passing custom object type as input parameters. so, if one of the test fails it required bit of work to figure out which input variation causing problem. Even after finding failed input variation during debugging process you can’t just run test for failed input. Debugger will go through each input every time I need to debug.
Another problem is that xunit run data driven test in sequential order instead of parallel which will increase time to run test.
I am looking for better setup for my problem.
Have you considered using InlineData instead of a custom object? If you think InlineData is not powerful enough, have you considered whether the code you’re testing could benefit from some simplification?
I could use inline data but i have to add some additional code to it
C# devs
null reference exceptions