Skip to content

Instantly share code, notes, and snippets.

public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
#if ENABLE_TEST_CLOUD
Xamarin.Calabash.Start();
#endif
Forms.Init();
LoadApplication(new App());
[Test]
public void AppLaunches()
{
app.Repl();
}
<Entry AutomationId="InputMessageEntry" Text="{Binding InputMessage, Mode=TwoWay}" Placeholder="Enter a message and submit it" VerticalOptions="Center" HorizontalOptions="FillAndExpand" />
<Button AutomationId="SubmitMessageButton" Text="Submit" Command="{Binding SubmitMessageCommand}" VerticalOptions="Center" HorizontalOptions="Center" />
<Label AutomationId="SubmittedMessageLabel" Text="{Binding SubmittedMessage}" VerticalOptions="Center" HorizontalOptions="CenterAndExpand" />
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
{
#if ENABLE_TEST_CLOUD
Xamarin.Calabash.Start();
#endif
Forms.Init();
Forms.ViewInitialized += (object sender, ViewInitializedEventArgs e) => {
// http://developer.xamarin.com/recipes/testcloud/set-accessibilityidentifier-ios/
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
global::Xamarin.Forms.Forms.Init(this, bundle);
Xamarin.Forms.Forms.ViewInitialized += (object sender, Xamarin.Forms.ViewInitializedEventArgs e) => {
if (!string.IsNullOrWhiteSpace(e.View.AutomationId))
{
e.NativeView.ContentDescription = e.View.AutomationId;
[Test]
public void EnterAndSubmitText_ItAppearsInTheSubmittedTextLabel()
{
app.EnterText(q => q.Marked("InputMessageEntry"), "Hello from Xamarin Test Cloud");
app.Screenshot("Has entered text");
app.Tap(q => q.Marked("SubmitMessageButton"));
app.Screenshot("Has taped the submit button.");
Assert.IsFalse(string.IsNullOrEmpty(app.Query(q => q.Marked("SubmittedMessageLabel")).First().Text));
}
[Test]
[Category("BasicSanity")]
public void NavigateToSettings_VerifyUserNameIsVisibleOnSettingsPage()
{
// ...
}
--category "all"
packages\Xamarin.UITest.[version]\tools\test-cloud.exe submit yourAppFile.apk [API_KEY] --devices 5fd52203 --series "master" --locale "en_US" --user first.last@email.io --assembly-dir pathToTestDllFolder
packages\Xamarin.UITest.[version]\tools\test-cloud.exe submit yourAppFile.apk [API_KEY] --devices 5fd52203 --series "master" --locale "en_US" --user first.last@email.io --assembly-dir pathToTestDllFolder --category "SmokeTest" --category = "Purchase"