Open nohwnd opened 2 years ago
@nohwnd What kind of data source are you referring to? Could you provide a more complete example?
This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 10 days of this comment.
DataSource like the one here: https://github.com/microsoft/vstest/blob/3fac63690f8cd14e2681470639b15c527c3d09ff/test/Microsoft.TestPlatform.AcceptanceTests/ExecutionTests.cs#L21
Once your parameter is not a primitive type (RunnerInfo in the case above) it gets really difficult to make sure MSTest will expand it to multiple test cases using the new top level expansion. You need to balance all the things listed above.
@Evangelink - Is this something that can be checked with a MSTest analyzer?
After working for a while on the codebase I think this mostly boils down to the serializer that is used. It would be pretty difficult to enforce the rules by analyzer, and custom data sources are imho not that used to warrant that investment.
Description
I was trying to get the new UI in VS for data driven tests. And getting the object for the data source to correctly serialize is so painful.
My contains other objects and getting it to work took me a lot of time.
Is there any additional guidance on this? Or a method that can check if the type is eligible for the new UI?
From what I see:
[Serialize]
needs to be used for all the objects.e.g. This works:
BUT making the RunnerInfo use the Base class, it only works when we assign the BaseClass itself, but not if we create OtherInfo and assign it: