All Projects → Xappium → xappium.uitest

Xappium / xappium.uitest

Licence: MIT license
Xappium.UITest is a UITest helper framework built on top of Appium. This aims at making it easier to write and run UI Tests.

Programming Languages

C#
18002 projects
powershell
5483 projects
shell
77523 projects

Projects that are alternatives of or similar to xappium.uitest

Winappdriver
Windows Application Driver
Stars: ✭ 2,577 (+4195%)
Mutual labels:  appium, ui-testing
ios-ui-automation-overview
An overview of popular iOS UI testing solutions.
Stars: ✭ 23 (-61.67%)
Mutual labels:  appium, ui-testing
Animationnavigationpage
AnimationNavigationPage is a NavigationPage with custom transitions animation effects.
Stars: ✭ 235 (+291.67%)
Mutual labels:  xamarin-forms
TinyPubSub
Worlds smallest pub/sub thingy created mostly for Xamarin Forms but should also work else where...
Stars: ✭ 23 (-61.67%)
Mutual labels:  xamarin-forms
DotNetGraphQL
A sample demonstrating how to create a GraphQL Backend in .NET and consume it from a .NET mobile app created using Xamarin
Stars: ✭ 78 (+30%)
Mutual labels:  xamarin-forms
Flexbutton
Flexible button control for Xamarin.Forms
Stars: ✭ 245 (+308.33%)
Mutual labels:  xamarin-forms
FilePicker
FilePicker for Xamarin.Forms
Stars: ✭ 14 (-76.67%)
Mutual labels:  xamarin-forms
Xamarin.forms.datagrid
DataGrid Component For Xamarin.Forms Projects
Stars: ✭ 226 (+276.67%)
Mutual labels:  xamarin-forms
HackerNews
A .NET MAUI app for displaying the top posts on Hacker News that demonstrates text sentiment analysis gathered using artificial intelligence
Stars: ✭ 184 (+206.67%)
Mutual labels:  xamarin-forms
XamarinForms.VisualDebug
A library and client app to view the visual heirarchy of your Xamarin app pages as an interactive tree diagram at runtime
Stars: ✭ 22 (-63.33%)
Mutual labels:  xamarin-forms
i18n-xamarin-forms
Xamarin Localization Library for Xamarin/Xamarin.Forms
Stars: ✭ 17 (-71.67%)
Mutual labels:  xamarin-forms
onesync-reader-app
Cross-platform ebook reader built using Xamarin.Forms
Stars: ✭ 33 (-45%)
Mutual labels:  xamarin-forms
Aiforms.effects
AiForms.Effects for Xamarin.Forms
Stars: ✭ 245 (+308.33%)
Mutual labels:  xamarin-forms
TextMood
A Xamarin + IoT + Azure sample that detects the sentiment of incoming text messages, performs sentiment analysis on the text, and changes the color of a Philips Hue lightbulb
Stars: ✭ 52 (-13.33%)
Mutual labels:  xamarin-forms
Magicgradients
Draw breathtaking backgrounds in your Xamarin.Forms application. It's a kind of magic.
Stars: ✭ 236 (+293.33%)
Mutual labels:  xamarin-forms
Xamarin.Forms.MultiSelectListView
☑️ Select multiple rows in a listview with xamarin.forms
Stars: ✭ 61 (+1.67%)
Mutual labels:  xamarin-forms
Xamarinformslayoutchallenges
Sample Layouts for Xamarin Forms
Stars: ✭ 230 (+283.33%)
Mutual labels:  xamarin-forms
Connectivityplugin
Connectivity Plugin for Xamarin and Windows
Stars: ✭ 253 (+321.67%)
Mutual labels:  xamarin-forms
Xamarin
Sample Xamarin projects
Stars: ✭ 33 (-45%)
Mutual labels:  xamarin-forms
maui-samples
Samples for .NET Multi-Platform App UI (.NET MAUI)
Stars: ✭ 1,965 (+3175%)
Mutual labels:  dotnet-maui

Xappium.UITest

Writing Cross Platform (X-Plat) apps can be a challenge. Finding a way to more easily write and run integrated UI Tests can be even more challenging. Xappium.UITest aims to help solve some of these issues by building an additional layer of abstraction over Appium that makes it easier to write X-Plat UI Tests. This project is a combination of the work done independently by @dansiegel & @redth taking the best pieces of both.

This is meant to make it easier for Developers to write and integrate UI Tests with their mobile apps.

Xappium UITest!

Current State

This repo is currently evolving and may experience breaking API changes. Community feedback and contributions are welcome and encouraged. We hope that this project will serve both as a model and backbone for UI Testing for .NET Developers with classic Xamarin / Xamarin.Forms applications as well as newer .NET 6 / .NET MAUI applications.

Roadmap

Description Status
iOS Support Done
Android Support Done
WinUI Support PR Welcome
macOS Support PR Welcome
GTK Support PR Welcome
Tizen Support PR Welcome
CLI tool In process

NOTE: Android tools are tested and do work on Mac, however they do not currently work on Windows hosts. If you're an Android Guru and would like to help get this working on Windows hosts I'd love the PR!

Configuration

The UI Test AppManager is configured through a combination of local, embedded, and environment. This gives you a wide variety of configuration options and ways to customize your build. For example you may provide a uitest.json that contains common attributes for all builds... this will be automatically copied to the UI Test output directory. You may also conditionally embed a uitest.ios.json or uitest.android.json with the logical name uitest.json. Finally you may use various Environment variables to set the configuration dynamically in a CI build. The order of precedence is as follows:

  • Local uitest.json on disk (this can be overridden in the CLI)
  • Embedded uitest.json in the UITest project assembly
  • Environment Variables

Any of these properties can be set by you, however the Xappium.Cli will automatically help you build out a completed config.

{
  "platform": "Android",
  "appPath": "/<Project Path>/UITest/bin/com.avantipoint.testapp-Signed.apk",
  "appId": "com.avantipoint.testapp",
  "deviceName": "sdk_gphone_x86",
  "udid": "emulator-5554",
  "osVersion": "29",
  "settings": {
    "name": "Dan"
  },
  "capabilities": {
    "adbPort": "5037"
  }
}

Settings vs Capabilities

At first it may be confusing that the configuration has both settings and capabilities. The Capabilities are explicit to the Appium Driver configuration. It is worth noting that if you need an explicit override to the way that Xappium is configuring a particular capability you have the ability to override that here. Note that the adbPort shown above is provided as an example and should not be required for Android.

Settings on the other hand have nothing specifically to do with Xappium.UITest or Appium, but rather are exposed to try to make it easier for you to provide values that you can use for your UI Tests such as user credentials.

Writing UI Tests with Xappium

Xappium provides helpers for MSTest, NUnit, & Xunit. These each have a XappiumTestBase class that will properly handle starting and stopping the app between each test. This ensures that Appium assigns a new Test Session between each of your tests. As a result the screenshots you take will be protected from accidentally being overwritten from one test to the next.

We'll set up our tests using the Page-Object-Model. You can get more information on how this works from Sweeky's talk at the Xamarin Developer Summit. To do this we'll use a helper class from Xappium.UITest:

public class LoginPage : BasePage
{
    protected override string Trait => "LoginButton";
}

You'll notice that we provide a trait. This is generally the AutomationId of an element on the page that should be unique that page. Now let's add a test class to validate that our App Starts up and is on the LoginPage.

public class AppTests : XappiumTestBase
{
    [Fact]
    public void AppLaunches()
    {
        new LoginPage();
    }
}

Picking a Unit Test Framework

Xappium UITest actually has no requirements on which test framework you need to use as long as it's compatible with dotnet test. As a result you are able to write your UI Tests using your favorite testing frameworks.

Using the Cli Tool

NOTE: The Cli has moved to a new repo. Xappium.UITest works with or without the Cli. The Cli is meant to make running tests a breeze by taking care of all complexities of running tests and even build the UI Test and App Head if needed.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].