Quantcast
Channel: froglogic
Viewing all articles
Browse latest Browse all 398

Testing .NET Core Applications

$
0
0

Recently, Microsoft announced that .NET Core 3.0 will become .NET 5. The majority of .NET Framework libraries, including the GUI toolkits Windows Forms and WPF, are already ported. Since this seems to be the future of .NET development, we took a closer look and managed to add the initial support for Windows Forms and WPF GUI toolkits. So in the next major release, Squish will have support for applications which use these toolkits on the .NET Core platform.

Introduction

If you already have an application that can run on .NET Core, and you would like to test it with Squish, please let us know, and we will provide a snapshot package for testing. Also, feel free to let us know if you don’t have an application but just would like to try .NET Core sample applications.

Building Examples

Making .NET Core sample applications is easy. You just have to download an SDK from the download page and build an example. The building of a Windows Forms example can be done by simply issuing the following commands in the command line prompt:

<path_to_dotnet_core_sdk>\dotnet.exe new winforms
<path_to_dotnet_core_sdk>\dotnet.exe build
<path_to_dotnet_core_sdk>\dotnet.exe run

Self-Contained Applications

The .NET Core applications can also be built as “self-contained.” That is, they can be built with a “built-in” .NET Core runtime so that the runtime does not need to be present on the machines on which you want to run the application. This is a nice option when you don’t want your users to install a new runtime or until .NET Core gets released and is more widespread.

To make the sample above “self-contained,” add the following line…

<RuntimeIdentifiers>win-x64</RuntimeIdentifiers>

…into the sample’s project file winforms.csproj, under the PropertyGroup element. After this, build the sample using the publish command:

<path_to_dotnet_core_sdk>\dotnet.exe publish -c release -r win-x64 -o app

The application, and all that is needed for it to run on other computers, will be put into the folder app. You should be able just to copy (or zip/unzip) this folder onto another machine and the application should work out-of-the-box.

Testing with Squish

With this and similar applications, you should be able to use Squish in the same way as you did before with the standard .NET Framework applications: register the executable as the Application Under Test (AUT) and start recording your test scripts!

The post Testing .NET Core Applications appeared first on froglogic.


Viewing all articles
Browse latest Browse all 398

Trending Articles