-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Description, WorkItem, CssIteration, CssProjectStructure should *NOT* be treated as traits. #482
Conversation
…bute, as eventually TestPropertyAttributes are treated as traits.
@AbhitejJohn : Any specific reason why these attributes were inherited from TestPropertyAttribute? |
@jayaranigarg : This seems to explain it. you might want to revise that doc if this changes any of those behaviors for the default attributes. |
@singhsarab : Can you please update that doc as well as part of this change? |
Associated changes in the docs. microsoft/testfx-docs#54 |
These appears to me as breaking changes. Was that intended? |
@dotMorten Can you please share the concerns you have around this change ? |
While changing a class to inherit from a subclass of the original class isn't a breaking change, doing the opposite as what is being done here is. Scenario: Breaking changes should only be done in major versions, ie you'd have to waif for v2.0.0 |
@dotMorten : We don't see anything breaking in this change as of now. We certainly will validate this scenario before releasing a higher version of adapter and will revert/make appropriate changes if we see any issues. |
@jayaranigarg You probably aren't seeing anything because you recompiled everything and didn't worry about binary compatibility. See the guidelines here:
|
...also any class accepting the base type can no longer pass instances of the derived attribute, so it's also a breaking change at the source code level. DescriptionAttribute da = new DescriptionAttribute();
var attribute = (TestPropertyAttribute)da; //Invalid cast
var key = da.Key; //No longer exist
var value = da.Value; //No longer exist |
@dotMoren I understand the from Oops perspective, it seems like a breaking change.
I am actually fine bumping up the version for the adapter if we really think it breaks the users. |
i agree with @dotMorten if a class public and has been released, there is no way you can presume that developers only uses the library the way you expected. Especially using reflection for code analysis. There´s no problem with the change itself, only with the version update. Changing the class hierarchy of a |
That's the thing with an API design: You don't know every possible use out there, so you have to evolve your API very defensively. That's just the harsh (and IMHO fun) nature of building APIs. But as an example I interrogate the attributes heavily in my own TestMethod to better drive execution and logging. There are also custom test runners (typical in Xamarin etc) that'll use the attributes for running the tests on devices. Now don't get me wrong: I think the change is a good change - had it been done to begin with. But IMHO that ship has sailed. |
@ahmedalejo @dotMorten I agree, in future, we will be more careful with the versioning. |
Attributes like Description should not inherit from TestPropertyAttribute, as eventually TestPropertyAttributes are treated as traits.
Fix for #478
Docs: microsoft/testfx-docs#54