CrossMobile



  1. Great answer and comment! I think you're making a really strong point here. I've considered and looked into all sort of platforms, I've even considered replacing bluetooth functionality with GPS but there were still more problems to consider.
  2. KOMPASS, Company directory and business data solutions. Business tools and solutions designed for the global marketplace.

Specs datasheet with technical data and performance data plus an analysis of the direct market competition of Crosley Crosmobile Station Wagon in 1949 the model with 3-door station wagon body and Line-4 724 cm3 / 44.2 cui engine size, 19.8 kW / 27 PS / 26.5 hp (SAE) offered since November 1948 for North America U.S. Specifications listing with the performance factory data and ProfessCars. CrossMobile An Open Source framework to create native mobile (iOS, Android) and Desktop (Windows, macOS, Linux Intel and ARM) applications in Java using the iOS API. Just write it once and produce sophisticated multiplatform applications.

Reference images can also often be re-used across different mobile devices and operating system versions, but sometimes references will have to be different for different devices. This document describes the situations in which different reference images will be required, and presents best practices for efficient cross-mobile scripting.

There are three situations that typically lead to different reference images being required between two devices:

    Devices in different device families render images differently (e.g., with different smoothing effects), so different reference images are required.
  1. Devices in the same device family, but with different screen resolutions, will render images that include text differently. So if a reference image includes text, and two devices have different screen resolutions, then they will need to use different reference images.
  2. Major version changes of the operating system (OS) will often change the look-and-feel of native applications, like Settings or Messaging. So reference images related to native applications might have to be different for devices using different major OS versions.

Device Families

The table below shows the most popular device families, further partitions these by resolution, and gives advice for re-using images.

Note again the huge amount of image re-use which is possible. Not only can you use the same images for all devices within a device family, you can also use the same images across all OS versions. This means that with just 8 reference images as shown above, you can cover 61 different combinations of device and OS version.

The remainder of this document presents best practices for efficient cross-mobile scripting:

    Use text searches (OCR) and search rectangles.
  • Store images for each stream of devices in a separate suite.
  • Separate out core code from OS-specific code.
  • Run an environment setup script at the start of every test.
  • Create a naming convention for devices.
  • Create tests using the core code in a separate suite.

One of the first things to do is start by using OCR. The OCR engine inside Eggplant Functional is independent of resolution, text size and color, so if any of these three things is different across your devices then you wont even need to re-capture any images.

If you know you are going to want to set lots of different rectangles throughout your test, use the code below, which allows you to easily set the rectangle to any area of the screen that you choose:

paramsTLx,TLy,BRx,BRy-- Values are between 0 and 1 and represent the proportion you want to go in the x and y direction for the top left and bottom right coordinates.

setthe searchrectangleto(TLx*ConnectionInfo().ScreenSize.x,TLy*ConnectionInfo().ScreenSize.y,BRx*ConnectionInfo().ScreenSize.x,BRy*ConnectionInfo().ScreenSize.y)

Example code to call the function is below:

Setthe searchrectangletoScreenPart(0,0,1,1)

Moveto (Text:'Clock',searchrectangle:ScreenPart(0,0,0.5,0.5)) // This will only search the top left quarter of the screen

,'Galaxy_S6_51':'577')

setthe readTextSettingsto (DPI:DeviceDPI.(DeviceName))

It might be that different screens and text work better with the DPI set and others with it not, so it is worth playing around to see what works best on each screen.

click'AppIcon'

setthe initialsuitesto'Path/To/My/iPhone_6S_91/Images/Suite'

click'AppIcon'

Separate Core Code from OS-Specific Code

Android:

setthe initialsuitesto('Path/To/My/AndroidCode/suite','Path/To/My/Galaxy_S5_51/Images/Suite')

click'AppIcon'

TurnOffWifi

,'Path/To/My/iPhone_6S_91/Images/Suite')

Click'AppIcon'

TurnOffWifi

,'Path/To/My/AndroidCode/suite','Path/To/My/Galaxy_S5_51/Images/Suite')

click'AppIcon'

VerifyPrice// This is within the core code suite

TurnOffWifi// This is within the OS-specific code suite

setthe initialsuitesto('Path/To/Core/CodeSuite','Path/To/My/iOSCode/suite','Path/To/My/iPhone_6S_91/Images/Suite')

CrossMobile

Click'AppIcon'

VerifyPrice

TurnOffWifi

As we have gone through this document, you will notice that we have been setting quite a few parameters including the DPI, initial suites and as part of initial suites we are setting the OS specific code to iOS or Android. All of this code should be placed in a script that gets run before every test to set the environment up. Now, to make everything simpler, you should have the core code suite, the OS specific code suites, the device image suites and the environment setup suite stored in the same folder. This makes it easy to go and have everything set up and initialized. Your environment setup should look something like below. In this, we determine the path to the suites using the relative path of where the suite is, so even if the suites move, the code will still work.

setDeviceNameto the name of connectioninfo()

setSuitePathto the folder of the folder of the folder of me

setDeviceDPIto (iPhone_6S_91:'401','Galaxy_S6_51':'577')

setthe readTextSettingsto (DPI:DeviceDPI.(DeviceName))

put (iPhone_6S_91:'iOS','Galaxy_S6_51':'Android') intoDeviceOSList//Define which OS a device is to pick the correct device specific functions

setDeviceOStoDeviceOSList.(DeviceName)

put (iPhone_6S_91:'iPhone_6S','Galaxy_S6_51':'Galaxy_S6') intoDeviceSuiteList//Define what suite of images a device should use

setDeviceSuitetoDeviceSuiteList.(DeviceName)

//Set up path to core functions, OS functions and device images

setthe initialsuitesto(SuitePath&'Asset_'&DeviceSuite&'_Images.suite',SuitePath&'Asset_'&'Core_Functions.suite',SuitePath&'Asset_'&DeviceOS&'_Functions'&'.suite')

You can also set up your Helper suites using relative paths, so that if you happen to move your suites to a different paths, the helper suite paths are still valid. Information on how to do this can be found here.

To be able to determine what device we are connected to, the best thing to do is create a good naming convention for your device. This should take the following format: DeviceStream_DeviceModel_OperatingSystemVersion. This makes it simple for Eggplant Functional to determine what device we are connected to and then set up the environment accordingly. A few examples are given below:

Galaxy_S6_51, where Galaxy is the device stream, S6 is the model, and 5.1 is the version of Android.

Now, you should create all of your tests from all of the core code which you have written in a separate suite. This makes maintenance easier in the future, and allows for the greatest re-use of code amongst large teams. For each test design suite that you make, you should add the environment setup suite as a helper suite, to set up all of the code paths. Your test design suites should then look quite flat, whereby you are just ordering the core functions you have written in the way you want. A few examples are shown below:

Eggplantsoftware.com | 2021