Skip to main content
All CollectionsTest
Set Device Orientation during Tests.
Set Device Orientation during Tests.

Sometimes, you might want to change the perspective to see things better.

Jihye E avatar
Written by Jihye E
Updated over 6 years ago

AppCenter Test offers the flexibility to run UI tests on a bunch of live, real devices in the cloud. The devices come in various form-factors. Some are designed to work better in a set orientation (Portrait/Landscape), because of the way they're engineered; like the placement of a Camera/Microphone.

When you choose devices, you will see a preview of how the device looks like.
Bonus: It also shows the default orientation of the Device!

So, you may have an App designed to work well only in Portrait mode, or you might want to switch the device to Landscape for one of your screens within the App.

How do you test content on the two display Orientations with devices in the cloud?

Well, testing frameworks give you a way to set device orientations, and I have tested this in the Xamarin.UITest framework. AppCenter is capable of giving you the results with the corresponding screenshots in the Orientation the device is set in. 

To do this, just make use of the SetOrientationLandscape() and SetOrientationPortrait() methods in your Test Method.
Remember to set the orientation first, followed Tests to be run.
For instance, 

will yield the following results in AppCenter,

Cheers! 

Did this answer your question?