I am considering to write smoke tests for our WPF application. The question that I am faced is: should we use UI automation( or some other technology that creates a UI script), or is it good enough to use ViewModels directly (after all the viewmodels were created to make unit testing easier in a first place).
WPF: writing smoke tests using ViewModels
690 Views Asked by Lenik At
2
There are 2 best solutions below
Related Questions in WPF
- WPF MessageBox Cancel checkbox check
- WPF multiple control property simultaneous changes
- ObservableCollection.CollectionChanged does not select the correct DataTemplate on ToolBar
- Telerik's WPF RadColorPicker NoColorText property not working
- How to automate UI interaction during acceptance test run
- Binding to "this.property" object in VisualStateMenager
- ContextMenu Closes Immediately
- Update ObservableCollection where the items are received from another List
- change content button with trigger
- WPF - How to highlight a combobox border when focused
- Wpf No Highlight on ListBoxItem for Touch Devices
- WPF WebBrowser how best to get Tag trees
- Make a class suitable for Property Change Notification
- WPF Comparing two datatables to find matching values
- how to create folder and file with datetime in wpf application
Related Questions in MVVM
- How can I fit "ol.Map" to "Ext.panel.Panel"?
- How to not open the same Popup WPF MVVM?
- How to set data context of ViewModela View's xaml?
- Asynchronous MVVM commands
- Proper MVVM ViewModel and Model pattern
- Modeling an XML hierarchy for traversal with MVVM
- Ext JS 5 Data Binding Combobox
- Combobox and IDataErrorInfo
- Change default error message when enter non digit in a textbox requires integer
- MVVM: Updating ViewModel properties based on Model properties
- Problems related to View Models created from XAML
- Cant bind enum to combobox wpf mvvm
- RadioButtons binding on Windows Phone 8.1
- Cascading Comboboxes WPF mvvm and EF
- Update DataGrid cell if other cell changes
Related Questions in UI-AUTOMATION
- Firefox automatically choose certificate, without ui dialog
- How to automate the android phone back button using appium
- Find a windows control using partial NameProperty in windows automation
- Read a Xcode Instruments .trace file generated from Automation.tracetemplate
- Get TitleBar Caption of any application using Microsoft UI Automation?
- How To Get Window handles In Mozilla Firefox
- How to check a checkbox with microsoft uiautomation?
- How to scroll down the screen in the android espresso test? I need to validate the text present on the screen
- how to use Instrumentation under the uiautomator project?
- How would Android UiAutomator behave if it encounters "Force Close or ANR"
- How to check control visibility in WPF app using Test Studio, Ranorex or TestComplete test tool
- How to automate the Ace Editor (send keys) using WebDriver?
- Best practices for implementing Page Object model for pages with many elements
- How to make UI Automation click a button with no id?
- Automatic PL/SQL Webtool kit based application using selenium
Related Questions in SMOKE-TESTING
- Unit tests using groovy for Java REST API's
- Tracking Python program flow in smoke test
- Running UI based selenium smoke tests against an ever-changing UI
- Smoke test for iOS app
- Automating Instruments for Mac OS X?
- Given When Then Testing - Do I NEED a "When"?
- What suggestion can you make to amazon website in an automatized smoke test Selenium IDE Google Chrome extension?
- Smoke Test- "unable to obtain Resolver Configuration" in app-investigate and app-search
- WPF: writing smoke tests using ViewModels
- Automated smoke testing of windows froms
- Custom non-trivial test fixture -- Do we create user stories for it?
- Does Splunk offer any such solution to make a call to SOAP REST HTTP URL and to test their availability?
- Automating smoke, functional and regression tests for Java web apps?
- what is smoke testing? And at what circumstances we can use smoke testing in our project
- Packaging Smoke tests as an (additional) executable jar in Gradle build
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
We used to write our integration tests (smoke tests if you like) using the ViewModels directly. It worked, but we did have to deal with some interesting threading issues: what happens, for example if your ViewModel causes a Message Box to be shown - how does your test close the Message box? We had to make sure that our application was running on one thread and our tests on another.
We've now moved over to UIAutomation and those kind of problems go away because your tests and the application are explicitly running in two separate processes. There is a bit of a learning curve involved, but UIAutomation isn't as scary as it first appears: I've written a tutorial that might help you get started - follow the link, and you'll also find a few helper methods that tame the UI Automation API somewhat.