Trumpf.Coparoo.Desktop 1.4.0

dotnet add package Trumpf.Coparoo.Desktop --version 1.4.0                
NuGet\Install-Package Trumpf.Coparoo.Desktop -Version 1.4.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Trumpf.Coparoo.Desktop" Version="1.4.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Trumpf.Coparoo.Desktop --version 1.4.0                
#r "nuget: Trumpf.Coparoo.Desktop, 1.4.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Trumpf.Coparoo.Desktop as a Cake Addin
#addin nuget:?package=Trumpf.Coparoo.Desktop&version=1.4.0

// Install Trumpf.Coparoo.Desktop as a Cake Tool
#tool nuget:?package=Trumpf.Coparoo.Desktop&version=1.4.0                

Trumpf.Coparoo.Desktop Library for .NET

logo appVeyorBuildStatus

Description

Trumpf.Coparoo.Desktop is a .NET library for C# that helps you write fast, maintainable, robust and fluent TestLeft-driven UI tests based on the control/page/root-object (Coparoo) pattern.

The library supports all kinds of UI and UI-automation technologies including WPF, WinForms, Web and UIA. In order to run tests you must ensure that the commercial SmartBear's TestLeft® product is installed (free trials are available). For building test projects, e.g. on CI build agents, technically, no license or installation is required.

The following sign-in/out test scenario illustrates how the framework facilitates writing, e.g., a Web test in a "natural" way:

var app = new GitHubWebDriver();                    // create the test driver
app.Open();                                         // open the github page in a new browser tab
app.On<Header>().SignIn.Click();                    // click the sign-in button
app.On<SignInForm>().SignIn("myUser", "abc");       // enter the user credentials ...
app.On<Header>().Profile.Click();                   // open the user profile
app.On<ProfileDrowndown>().SignOut.Click();         // sign out

Just in the same way then the other UI technologies can be tested, and even interact with each other, e.g. for testing WPF apps that integrate with the web.

If you are interested in Web tests only, the following project may be of interest to you: Trumpf.Coparoo.Web.

NuGet Package Information

To make it easier for you to develop with the Trumpf Coparoo Desktop library we release it as NuGet package. The latest library is available on https://www.nuget.org/packages/Trumpf.Coparoo.Desktop. To install, just type Install-Package Trumpf.Coparoo.Desktop in the Package Manager Console.

Getting Started

This library is a derivate of the Trumpf.Coparoo.Web project and can essentially be obtained by replacing Selenium API calls by SmartBear's TestLeft API calls, plus adding wrapper classes for the various UI technologies, like Trumpf.Coparoo.Desktop.WinForms.ViewPageObject and Trumpf.Coparoo.Desktop.WPF.ViewPageObject. Therefore, if you want to get the concepts behind this framework the documentation of the former project is a good starting point: https://github.com/trumpf-code/Trumpf.Coparoo.Web/blob/master/README.md.

The following example shows a simple test of the DemoApp test project; source file Tests.cs.

    IDemoApp app = ProcessObject.Resolve<IDemoApp>();
    app.Configuration.WaitTimeout = TimeSpan.FromMinutes(1);
    app.Configuration.PositiveWaitTimeout = TimeSpan.FromMilliseconds(500);
    app.On<IMainWindow>().VisibleOnScreen.WaitFor(TimeSpan.FromMinutes(1));
    app.On<IMainWindow>().ResetButton.Click();
    app.On<IMainWindow>().IncrementButton.Text.WaitFor(text => text == "0", "Text is '0'");
    
    foreach (var i in Enumerable.Range(1, 4))
    {
        app.On<IMainWindow>().IncrementButton.Click();
        app.On<IMainWindow>().IncrementButton.Text.WaitFor(text => text == i.ToString(), "Caption should be " + i);
    }
    
    app.On<IMainWindow>().ResetButton.Click();
    app.On<IMainWindow>().IncrementButton.Text.WaitFor(text => text == "0", "Text is '0'");

Contributors

Main development by Alexander Kaiser (alexander.kai...@trumpf.com or alexander.kai...@cs.ox.ac.uk).

Ideas and contributions by many more including

  • Daniel Knorreck, Gerald Waldherr / Additive Manufacturing, TRUMPF Laser- und Systemtechnik GmbH, Ditzingen
  • Jochen Lange, Matthias Wetzel, Markus Ament, Bernd Gschwind, Bernd Theissler, Andreas Alavi, Sebastian Mayer, Daniel Boeck / TRUMPF Werkzeugmaschinen GmbH + Co. KG, Ditzingen
  • Igor Mikhalev / Trumpf Laser Marking Systems AG, Schweiz
  • Thanikaivel Natarajan / India Metamation Software P. Ltd., India
  • Nol Zefaj, Nils Engelbach, Phi Dang, Mattanja Kern, Felix Eisele / AXOOM GmbH, Karlsruhe
  • Manuel Pfemeter / AIT – Applied Information Technologies GmbH & Co. KG, Stuttgart
  • Marie Jeutter / Hochschule Karlsruhe

License

Copyright (c) TRUMPF Werkzeugmaschinen GmbH + Co. KG. All rights reserved. 2016, 2017, 2018.

Licensed under the Apache License Version 2.0 License.

Coparoo uses the Stashbox dependency injection framework (MIT license) by Peter Csajtai, and SmartBear's TestLeft package from https://www.nuget.org/packages/SmartBear.TestLeft; see term of use: https://smartbear.com/terms-of-use.

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
.NET Framework net451 is compatible.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.4.0 6,416 4/23/2024
1.3.0-beta02 108 4/9/2024
1.2.18 1,564 10/27/2023
1.2.17 132 10/27/2023
1.2.16 134 10/26/2023
1.2.15 136 10/26/2023
1.2.14 170 10/25/2023
1.2.10 16,011 5/31/2023
1.2.9 150 5/31/2023 1.2.9 is deprecated because it has critical bugs.
1.2.8 175 5/31/2023 1.2.8 is deprecated because it has critical bugs.
1.2.7 219 4/20/2023
1.2.6 197 4/6/2023
1.2.5 226 4/6/2023
1.2.4 231 3/29/2023
1.2.3 284 3/9/2023
1.2.2 506 12/17/2020
1.2.1 5,831 12/16/2020
1.2.0 31,337 7/3/2019
1.1.0 674 2/13/2019
1.0.4 549 6/17/2019
1.0.3 704 1/28/2019
1.0.1 803 11/13/2018
1.0.0 840 10/18/2018