T-Plan Robot Enterprise version 3.3 introduces a new hybrid connection called "iOS Mirror".
It
allows to test Apple devices over a VNC connection where the device
screen is displayed on the local desktop using the AirPlay Mirroring
technology. This connection allows to test iOS applications which don't
work over VNC well, for example games relying on the OpenGL technology.
Device Requirements:
Jailbroken Apple device capable of screen mirroring over the
AirPlay protocol.
As of the 04th February 2013, all iOS devices
are supported (except 3rd gen Apple TV), and include iPhone 4S, 5, and iPad 2,3 running iOS 5.x or 6.x.
Any MS Windows supporting window translucency (in general,
Windows Vista and later).
AirServer or Reflector installed and
activated ("the mirror app").
AirServer is recommended because it is cheaper than Reflection and it
seems to be more stable and faster.
Java 1.7 or higher. The connection will be disabled when Robot
runs on Java 1.6.
It is recommended to use a display with resolution sufficient to
fit the device screen
both in portrait and landscape modes (iPhone 4S screen size: 640x960,
iPad 2: 1024x768). Environments which do not comply with this
requirement may take advantage of the mirror app scaling (right click
Reflector -> Scale -> "Half Size" or "Actual Size")
Robot must be running on the default Graphite Look And Feel (LAF) scheme.
The standard Oracle delivered LAFs such as Metal, Nimbus, CDE, GTK+ or Windows/Windows
Classic will not work. Other ones supported by Robot
may or may not work. To set up the LAF either click the More...
link in the Login
Dialog or navigate to Edit->Preferences
and select the Appearance & Accessibilitynode.
2. Set Up
AirServer / Reflector Set Up
When the mirror app is disconnected right click its
icon in the Windows system tray and select Preferences/Settings. Set
the options
as follows:
Full screen - OFF (Reflector only)
Always on top - ON (recommended)
Connect the Apple device to the mirror app:
Connect the device to the same network the Robot machine is
connected to (usually over the WiFi).
Reflector only: right click the app and make it display without
the skin (just a plain
screen without the white/black iPhone hard cover image).
Choose the mirror size (aspect) carefully and keep it constant.
It is recommended to set the mirror size equal to the actual device
screen one. This keeps the image blurring caused by the lossy H.264
compression at a minimum.
Connection from Robot
Start Robot, select the "iOS
Mirror"connection type, provide the
device IP address and the port of 5901 and hit Connect. If
neither AirServer nor Reflector is currently showing the device screen,
Robot will wait
for it. On a successful connection Robot will display the mirrored
screen in the desktop viewer:
To connect to a device from a test script use the Connect command (TPR scripts) or the connect()
method (Java test scripts). The argument URL must be in form of "apple://<Veency_address>:<Veency_port>".
For
example,
the
following
lines will connect you to an Apple device with
the IP of 192.168.100.1 running the Veency VNC on port 5901:
TPR test scripts: Connectapple://192.168.100.1:5901 Java test
scripts: connect("apple://192.168.100.1:5901");
Troubleshooting
Robot maintains itself as the topmost
window with the mirror application position behind its desktop viewer. If the mirror
application is not configured to stay always on top, Robot
may fail to bring it into the desktop view after the connection. To
overcome this click the mirror app icon in the Windows task bar to push
it to the front and then click the Robot's title bar to lock the
application
in the viewer.
Robot identifies the mirror application in the local OS by the window title. When the mirror app is
visible but Robot fails to establish the
connection saying "Waiting
for
AirServer/Reflector
to
start" go to Edit->Preferences
in the main UI and select the "iOS Mirror"
panel. There's a list of semicolon separated regular expressions used
to identify the mirror application title. Hover the mouse over the app
in the Windows task bar to get the actual title and update the list if
needed.
If Robot fails to display just the device screen and you can
see the application title bar and/or the surrounding frame or other
components in the desktop viewer, go to the "iOS Mirror"
panel. The inset fields will allow you to adjust the view manually.
Robot is not responsible for the AirServer or Reflector failures.
Should you have any problems with these applications please contact
their support desks.
3. Automation Tips
Avoid running other applications which use the "Always On Top"
window mode during automation. They can pop up unexpectedly and
interfere with the Robot desktop view.
Should you need to control the mirror app directly while it is
locked in the Robot view, minimize the Robot application to the task
bar. Robot will re-lock it after its window gets restored.
Keep the size of the mirrored screen constant. As template images
created against one particular screen size will not work on another
one, any later change will require you to recreate all template images
or create alternative ones for the new resolution using the Image Collections.
As the iOS device screen is mirrored using H.264 video with a lossy image compression format, the
artifacts (components) on the screen change at the pixel level. To
search for them using Robot template images use the search2 comparison method
with the pass rate of 50% or lower.
The landscape mode is supported only when the device is rotated counterclockwise (the Home button on
the iPhone is on the right). If the device is rotated clockwise no
error will be reported but the mouse clicks and drags will not be
placed correctly.
Unlike in some VNC connections, the mouse pointer is not drawn
into the local screen image which Robot works with. You don't have to
make your scripts move the mouse pointer away to perform image
comparison over a certain area.
As automation is performed on the local desktop, one machine
running Robot can be used to automate only one Apple device at a time.