mvvm - Testing the View in a WPF MVMM application -
i'm getting started in exciting world of wpf development, having been c++ developer many years.
testing applications rich user interfaces has of course, been hard. 1 of problems compounding has traditionally been in windows apps, ui, ui logic , app logic interdependent, , cannot tested in isolation.
i'm drawn mvvm approach allow me separate ui application, , run large amounts of automated tests on view models, underneath logic be, view being dumb client of view model.
that's , good, , neatly separates out testing of application logic application ui. but, provides no solution testing ui itself. though view typically contain little logic, still have potential contain huge amount of bugs of various kinds.
what's current state of art in testing view itself?
thanks tom
this double edged sword. see attempting grab low hanging fruit , build there.
in theory mvvm purist state absolutely no logic exists in view's code behind. making use of prism instance can alleviate other varying frameworks out there. coming @ angle begins point of no logic existing in view...fair enough, going begin testing bindings? could, depending on sizing of app return on investment?
what think boils down draw line? instance, if testing view, hooking code, you're white box testing @ point. can argue black box angle, testing without internal hooks valid. can see becomes circular nightmare.
in general have focused on big ticket items , went there, testing possible time allotted.
think of way...with ui can begin fiasco of testing coloring on every button, along placement, etc... that's silly me. automate bulk of ui testing @ model, viewmodel, layer , if desire test bindings of view. other suggest ad-hoc manual effort every ui developer should doing @ workstation.
Comments
Post a Comment