At every major release of the ShareGate Migration Tool (SGMT), a part of the development team spends a few hours to do regression testing. These tests cannot be automated using UI testing tools such as Cypress, Playwright and Selenium because SGMT is a desktop application made in WPF.
I started looking for UI testing solutions for desktop applications. I quickly discarded expensive UI testing suites. WinAppDriver was very interesting, but one of the requirements was to add some kind of identifiers on every UI element that we wanted to interact with. This would have required a huge effort from the team.
I wanted a solution that does not require to modify our application. Something easy to learn, where tests could be written quickly and with low-maintenance over time as the product evolve. This is how I started working on Askaiser.Marionette, a universal UI testing library based on image and text recognition, made in C#.
Continue reading “Universal UI testing based on image and text recognition”
I’m proud to annonce the release of Pillar, a lightweight MVVM framework for Xamarin.Forms 1.x and 2.x. With this framework, you won’t have to deal with page navigation or messed up code-behind anymore. Now, it’s all about view models, and navigation between view models. It rely on Autofac for dependency injection and MvvmLight for basic MVVM features and helper classes.
Features included in Pillar:
- ViewModel navigation, you won’t need to manipulate pages in your view models
- Design your apps with unit testing in mind with dependency injection
- Flexible, you can use differents patterns: ViewModel first, Messaging, ViewModelLocator
- EventToCommand behavior and useful converters included
- Useful views: ItemsView repeater, with optional DataTemplate selector by item type
- Not intrusive, you can reuse your view models in other projects (WPF for example) with very few modifications
You can install Pillar with the Nuget package manager:
You will find the documentation and samples on the GitHub repository.
Continue reading “Pillar, a MVVM framework for Xamarin Forms”
Being able to run ASP.NET web applications or web sites on Linux operating systems now is very cool. Before that, we had to use Mono, but it does’t support the full .NET framework or .NET technologies such as MVC or async support. Now, we have the .NET Core 5.0 (dnxcore50), and we can run our cross-platform ASP.NET Core web apps with the same new web server, Kestrel. Kestrel is a web server based on libuv and works nicely. Therefore, there are a few things that discourage me using it in production as the main web server. I prefer to use a more popular web server, Nginx. I really like Nginx, it is the third most popular web server in the world, and it is often used as a reverse proxy, and this is exactly how I am going to use it with Kestrel.
Continue reading “ASP.NET Core with Nginx as reverse proxy on Linux”
MuPDF is a small, fast and free PDF library written in portable C, available for Android. You can use this library for its built-in PDF viewer, for rendering PDF pages to images with a high-quality, manipulating PDF files in various ways…
If you want to use MuPDF in your Xamarin Android application, you can use this MuPDF Xamarin Android Binding nuget package that I made.
Continue reading “MuPDF Xamarin Android binding on Nuget”
In many cases, using a caching mechanism can drastically improve performances. Processed results of methods can be stored in memory or in files so they are ready to be returned immediately when we call the methods again.
In some .NET applications, we can use the MemoryCache class from System.Runtime.Caching to store data in memory. However, using such library in a basic way may induce some problems such as:
- Adding caching in each method which needs it may result in less readable and polluted code.
- The repetitive use of such code may induce errors (especially copy-pasted code).
- Depending on the nature of projects (mobile apps, websites, web services, desktop apps), we may need a different caching approach.
In order to avoid all these problems, I have written a generic caching aspect using Autofac and Castle DynamicProxy.
Continue reading “Caching method results easily with AOP”