run test of Xamarin Studio to Xamarin Test Cloud just with the ipa without the iOS source project

AnthonyMehallelAnthonyMehallel USMember ✭✭✭

Hello,

My goal is to develop tests functions on the Xamarin Studio and after, tests will be launched on the Xamarin test cloud (for an iOS Application).

From Xamarin Studio : I create a ios project / UI Test APP - Xamarin Test Cloud.

In my project I have :
Package : Nunit (3.0.1), Xamarin.TestCloud.Agent (0.17.1), Xamarin.UITest (1.2.0)

My application (ipa), I don't have the iOS code project.

And one test file : test.cs

_using System;
using System.IO;
using System.Linq;
using NUnit.Framework;
using Xamarin.UITest;
using Xamarin.UITest.iOS;
using Xamarin.UITest.Queries;

namespace oemios
{
[TestFixture]
public class Connexion
{
iOSApp app;

[SetUp]
public void BeforeEachTest ()
{
    app = ConfigureApp
        .iOS
        .PreferIdeSettings()
        .InstalledApp("com.orange.fr.settings.orangeetmoi.ccmd")
        .StartApp ();
}

[Test]
public void connexion ()
{
    app.WaitForElement(x => x.Class("UITextField"));
    app.Tap(x => x.Class("UITextField"));
    app.Screenshot("Tapped on view UITextField");


}

}
}_

When I run test in a real terminal : it's OK.

But when I want to run the test to the test cloud, I have 2 solutions :

  • From the Xamarin Studio, right click on the test (tab unit test), Run in test Cloud --> impossible to choice my application (ipa or app).

  • with the command line obtained from the test cloud Xamarin : mono packages/Xamarin.UITest.1.2.0/tools/test-cloud.exe submit /Users/anthonymehallel/Projects/oem-ios/oem-ios/OrangeEtMoiSettings-b107-resigned.ipa API-KEY --devices c5953b64 --series "master" --locale "fr_FR" --app-name "OrangeEtMoiSettings" --user [email protected] --assembly-dir /Users/anthonymehallel/Projects/oem-ios/oem-ios/bin/Release/

With the command line : i have this error message (the same as you)

Uploading Xamarin.UITest.dll ... Already uploaded.
Uploading nunit.framework.dll ... Already uploaded.
Uploading OrangeEtMoiSettings-b107-resigned.ipa... 100%
Uploading oem-ios.dll... 100%
Upload failed. Response:
Status: 400
Contents:
{"error_message":"The .ipa file does not seem to be linked with Calabash framework."}

I see in the forum and the Xamarin web site, we must add this code in the AppDelegate's FinishedLaunching method :

# if ENABLE_TEST_CLOUD
Xamarin.calabash.start();
# endif

My question : is it possible to run test to the test cloud just with the ipa ? (as can the Xamarin recorder test) ?

Anthony M.

Posts

  • AnthonyMehallelAnthonyMehallel USMember ✭✭✭

    Answer : you Must integrate the Calabash Library in the iOS source Project to launch test automation in the Xamarin test cloud.

    It works fine

  • ChristoNelChristoNel USMember ✭✭

    @AnthonyMehallel said:
    Answer : you Must integrate the Calabash Library in the iOS source Project to launch test automation in the Xamarin test cloud.

    It works fine

    How would I go about doing this?
    I am getting the exact same error and I have tried everything I can think of.
    It worked before but now suddenly it does not and I have no idea why.

Sign In or Register to comment.