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
693 Views Asked by Lenik At
2
There are 2 best solutions below
Related Questions in WPF
- Sorting a List by its property renames all the objects in the List
- Can't open new instance of another window in my app, in WPF .NET 8
- Binding forecolour and ToolTip to a DataGrid
- how to create Infinite Upgrades in a clicker game
- Try Catch exception is not catching the unhandled exception
- Assigning an object to another doesn't raise PropertyChanged event in WPF
- Masking input in TextBox
- What should I do if Visual Studio has a restriction on creating files with a long name or a long path to these files?
- reading configuration file (mytest.exe.config)
- WPF Windows Initializing is locking the separated thread in .Net 8
- How to bind to the DataContext ViewModel of another view?
- mouse coordinates in image go below 0 and above width
- WPF pop up is behaving differently in English language PC and Japanese language PC
- Multi level project reference using dll
- Unable to unzip archive .NET framework
Related Questions in MVVM
- TelephonyCallback.CallStateListener with LiveData and ViewModel
- Jetpack compose - how I can hookup LiveData property from ViewModel with TextField in activity?
- Jetpack compose ViewModels - should I have one ViewModel for different api calls?
- How to Display UserControl as SplitView Content? - Avalonia C#
- ViewModel property is empty even after initializing it
- How to bind to the DataContext ViewModel of another view?
- Problem updating the interface under MAUI to MVVM
- x:Bind a embeded page to the parent window viewmodel in WinUI 3
- RelayCommand not firing on MenuItem click inside DataGridTextColumn WPF MVVM
- WinUI3 CommunityToolkit MVVM Messenger calling on disposed objects?
- MAUI: How to update an observable property and wait for UI update completion before updating it again?
- Viewmodel as ILogEventSink in a Prism application
- How do I modify ViewModel data from button in swiftui
- Proper way to return value from custom UserControl's DependencyProperty and uses viewModel?
- .NET MAUI MVVM View Initialization doesn't work properly
Related Questions in UI-AUTOMATION
- How to parse data into cucumber's variables in feature file?
- Can't find UIA element with FindFirst method (VBA)
- Detect clickable areas within <img> tag in Ionic project
- includes assertion in playwright for for CSS and Attribute?
- How to find the next/child button of a div and then click it in Power Automate Desktop with Jquery selector
- How to inject a QR code image for end-to-end testing a QR code scanning app
- Why my selenium java code is throwing exceptions inconsistently?
- Is it preferred to write loops and conditions while writing my testing automation script using selenium? Is there another best practice should i use?
- Use different @BeforeMethod methods in TestNG
- How to run data driven tests parallelly in robot framework?
- Appium: Parallel execution on multiple devices - Failed to click on one device while happens in the other
- I got this error for multiremote capabilities whre I want to use object model: Error: ReferenceError: $ is not defined
- Scroll a specific scrollbar out of available ones to the item which is not visible on launch by default
- Playwright is not generating videos when we create our own context
- Insecure download blocked with TestCafe
Related Questions in SMOKE-TESTING
- What suggestion can you make to amazon website in an automatized smoke test Selenium IDE Google Chrome extension?
- How to search a product automatically in amazon in Selenium IDE Amazon website smoke test?
- How to generate smoke test cases for Java application using command line
- Efficiently Testing a Multi-Page Wizard Form with Playwright
- How to code a smoke test using Selenium IDE in this POST case, using id=nav-link-accountList as target; in a way that doesn´t get errors?
- K6 load test how to use Response.clickLink( [params] ) on button onClick event
- Smoke Test with ReactJS and Jest
- Cucumber: @SmokeTest Tagging one scenario out of a scenario outline
- Using CAS with redirect Failed asserting that the Response status code is 200
- No class Main class found . Smoke testing
- How to to do smoke testing for Azure Data Factory based pipeline
- Does Splunk offer any such solution to make a call to SOAP REST HTTP URL and to test their availability?
- How to run only smoke test cases suite in Azure Pipelines?
- I am wanting to integrate a core .Net based web application with my test suite using Azure Pipelines and just wanted to know the possibilites
- Unity Smoke Testing
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 # Hahtags
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.