You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe that the Unidriver project tries to kill 2 birds with one shot.
Write once - test on any platform
Best-Practice API for App Testing
Currently Rejected (NOT Best-Practice)
WSR drivers are using several methods which are rejected according to UniDriver's Best-Practice approach.
Here is WSR's ReactAdapter which implements those.
These methods arte considered by WSR as methods that we DO want to expose to consumers !
Full API
I believe it's for the best to separate these 2 concerns, and thus offer 2 sets of APIs:
Full
Best-Practice
How To
Either:
Create a separate project, 'unidriver-fullthat uses@unidriver` under the hood.
Create a unidriver-full project, and have unidriver consume it under the hood, and expose only the best-practice API. (restricted)
Embed the Full-API inside unidriver, and put the bad-practice methods as nested methods such as _.
Options 3 is by far the most simple to maintain,
and could help avoid rejections of the library when it is published as Open-Source.
I think potential consumer's first concern is that this library CAN deliver its first premise (write once - test on any platform), and only think about best-practice as a secondary "nice-to-have".
I think that approach 2 should be the leading one.
De-facto, having only the best practices driver approach limits us from writing our tests. Yes, in some cases we must retrieve properties which are more than just pure interactions. For example, retrieving the attributes of some dom node.
I don't think we should have a different project trying to mimic unidriver's approach, as it means we need another testing library. also, it makes sense to abstract functionality over a full api, and not extend it.
@shlomitc I think that enabling things like.blur() on browser tests is an anti-pattern.
To implement it you will need to simulate events via scripts which is far from what an user would do.
In other words, my main point is that the "full API" you need is only needed to do "unit-ish" tests
I'd like to create an API for the user / user interface, not the DOM. My dream is using the same driver interface for both the web-app and mobile app, and not using the same test for testing internals
I suggest we do a short discussion about it, it's a really interesting topic and I think the conclusions should be documented and passed on. @shahata
2 Birds
I believe that the Unidriver project tries to kill 2 birds with one shot.
Currently Rejected (NOT Best-Practice)
WSR drivers are using several methods which are rejected according to UniDriver's Best-Practice approach.
Here is WSR's
ReactAdapter
which implements those.Full API
I believe it's for the best to separate these 2 concerns, and thus offer 2 sets of APIs:
How To
Either:
that uses
@unidriver` under the hood.unidriver-full
project, and haveunidriver
consume it under the hood, and expose only the best-practice API. (restricted)unidriver
, and put thebad-practice
methods as nested methods such as_
.Options 3 is by far the most simple to maintain,
and could help avoid rejections of the library when it is published as Open-Source.
I think potential consumer's first concern is that this library CAN deliver its first premise (write once - test on any platform), and only think about best-practice as a secondary "nice-to-have".
So...?
FYI @shlomitc @mykas
The text was updated successfully, but these errors were encountered: