카테고리 없음

Download Appium Studio For Mac

diaforveferburtur 2020. 11. 12. 06:27


Skip to end of metadataGo to start of metadata
  1. Appium Client Download
  2. Download Appium Studio

System Requirements

Currently, this driver does not ship with the AppiumForMac binary, which means, in order to automate Mac apps you must manually install the AppiumForMac application and grant it the appropriate OS X Accessibility permissions. To Install Appium for Mac: 1. Download a release and unzip the application into your /Applications folder 2.

  1. This is one of the most time taking step to download and install the Android Studio. It may cause of errors in Appium if not done properly. With downloading the Android Studio, there are many other changes need to be setup. Here, we would recommend you to download the latest version of Android Studio. Download the Android Studio Download the.
  2. Appium Studio - Appium Testing Made Easy Get your Appium automation going within minutes with no hardware dependencies. Test iOS on Windows or MAC, and easily write stable tests with a Device Reflection and Object Spy.

Minimum Hardware Requirements:

  • Intel® i5 or i7 processor
  • 1 GB free hard disk space
  • 8 GB RAM
  • 1 available USB 2.0 port and USB cable

Windows OS and Software Requirements:

  • Microsoft® Windows Vista (64 bit), Windows 7 (64 bit), Windows 8 or higher
  • .Net Framework 3.5 or higher

Mac OS and Software Requirements:

  • OS X version 10.7 or higher
  • XCode along with Command Line Developer Tools must be installed

Supported Devices

  • Android 4.4 and above
  • iOS 9 and above

How to install Appium Studio Community Edition (Windows or Mac):

Step 1: Download the application.

Step 2:Launch the installation wizard.

How to install Appium Studio Enterprise Edition (Windows or Mac):

Step 1: Download SeeTestAutomation.

Step 2:Launch the installation wizard.

When prompted, uncheck 'Run SeeTestAutomation'

Step 3: To launch Appium Studio Enterprise Edition:

  • For Windows: Go to Program Files (x86) → Experitest → SeeTest → locate AppiumStudioEnterprise.exe and run the program.
  • For Mac: Open Finder → Applications → SeeTest → locate AppiumStudioEnterprise and run the program.



The integration with Appium allows you to run Appium scripts utilizing the features of UFT Mobile. Note that iOS versions earlier than 9.3 are not supported.

Prepare your environment

Appium Client Download

To prepare your environment to run an automated Appium test, you need to configure your working environment such as Visual Studio or Eclipse to recognize the Appium project.

Visual Studio

To set up your Visual Studio environment with Appium, follow these steps:

  1. Create a new Unit Test project in Visual Studio.
  2. Right click on References in the Solution Explorer and select Add Manage Nuget Packages.
  3. Search for ‘Appium Webdriver’ and click Install. This updates the references to include the Appium drivers.
  4. Search for ‘Selenium WebDriver’ and click Install. This updates the references to include the Selenium drivers.
  5. Instantiate the Appium web driver.
  6. Set the desired capabilities as described in UFT Mobile Appium Capabilities.
Eclipse

To set up your Eclipse environment, follow these steps:

  1. Download the latest archive files:

    1. The Selenium WebDriver Java Client

    2. The Java-Client for Appium Mobile WebDriver

  2. Extract the contents of the downloaded archive files.
  3. In Eclipse, select your Appium project and choose Select Properties from the right-click menu.
  4. Click on the Java Build Path node and select the Libraries tab.
  5. Click on Add External JARs and add the downloaded jars, one at a time:

    1. the Java-client jar file extracted from the Selenium Java client download

    2. the jar files in the libs folder of the extracted Selenium client download

    3. the Java-client jar file extracted from the Java-Client for Appium download

  6. Click OK to close the Properties dialog box.

Prepare your Appium test

To prepare your Appium test to run on UFT Mobile:

  • In the code that starts the session, replace the Appium server URL and port with the URL and port of UFT Mobile using the following format (see below for an example):

    driver = new AndroidDriver(new URL('http://<my UFT Mobile Server>:<port>/wd/hub'), capabilities);

    driver = new IOSDriver(new URL('http://<my UFT Mobile Server>:<port>/wd/hub'), capabilities);

  • Make your apps available for the test by uploading them to UFT Mobile. For details, see View, upload, and manage apps.

Note: You do not need a Mac machine to install apps on an iOS device.

Appium script execution

When you run an Appium test anonymously, the user is assigned to the Default workspace. For details see Workspace management. Note that Appium anonymous access is not supported with LDAP.

Download Appium Studio For Mac

Download Appium Studio

When running your Appium tests through UFT Mobile, you can indicate the method of automation to use during script execution.

iOS

UFT Mobile allows you to run tests on iOS devices without requiring a Mac machine. The default automation method used for iOS is XCUITest.

If you explicitly want to use UIA automation, set the automationName Appium capability to uiAutomation. This capability is only available for iOS versions 9.3 through 11.1. In iOS versions higher than 11.1, the capability is not supported and all tests will use XCUITest.

Android

Android OS 5.0 & higher

UiAutomator2 is the default automation engine. The uiautomator2 driver uses Google's UiAutomator2 technology to allow automation on a device or emulator. To overwrite the default and use UiAutomator1, set the automationName Appium capability to 'android'.

Android OS < 5.0

UiAutomator1 ('android') is the default for Android OS < 5.0. You can only use UiAutomator1 as the automation engine.

Appium setup code snippets

The following code snippets show sample setups for Android native apps, Chrome, iOS native apps, and iOS Safari. The bolded lines are mandatory.

Tip: Refer to the See Also section for links to more examples.

For a list of the common capabilities and their support in UFT Mobile, see UFT Mobile Appium Capabilities.

Android native/hybrid app

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability('platformName', 'Android');

capabilities.setCapability('oathClientId', 'oauth2-…');

capabilities.setCapability('oathClientSecret', 'ke1SUI…');

capabilities.setCapability('appPackage', 'com.Advantage.aShopping');

capabilities.setCapability('appActivity', 'com.Advantage.aShopping.SplashActivity');

Android Chrome browser

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability('platformName', 'Android');

capabilities.setCapability('oathClientId', 'oauth2-…');

capabilities.setCapability('oathClientSecret', 'ke1SUI…');

capabilities.setCapability('browserName', 'chrome');

iOS native/hybrid app

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability('platformName', 'iOS');

capabilities.setCapability('oathClientId', 'oauth2-…');

capabilities.setCapability('oathClientSecret', 'ke1SUI…');

Download Appium Studio For Mac

capabilities.setCapability('bundleId', 'com.Advantage.aShopping');

iOS Safari browser

DesiredCapabilities capabilities = new DesiredCapabilities();

capabilities.setCapability('platformName', 'iOS');

capabilities.setCapability('oathClientId', 'oauth2-…');

capabilities.setCapability('oathClientSecret', 'ke1SUI…');

capabilities.setCapability('browserName', 'safari');

Common Appium API calls

Use the following Appium API calls to manage your apps or add network virtualization capabilities within UFT Mobile.

Tip: Refer to the See Also section for links to more examples.

Kill application

The Kill API call stops the application. It does not simply minimize the app—it terminates the process. The script name is mc:application:kill, and must use one of the following arguments:

  • “appPackage” (Android) or “bundleId” (iOS) as used with the Appium capabilities
  • “id” or “uuid” as used in the UFT Mobile REST API (Install / Uninstall)

The following sample code terminates the Advantage app:

Map<String, Object> params = new HashMap<String, Object>();

params.put('bundleId', 'com.Advantage.aShopping');

appiumDriver.executeScript('mc:application:kill', params);

Change a network virtualization profile

This API call lets you switch emulated networks while a test is running. This allows you to test and compare your app's behavior under different network conditions.

The available parameters are:

  • “profileName” (required) as described in Define NV profiles
  • “scenarioName” (optional) a name for the scenario. If you leave out this parameter, the scenario uses the name of the profile.

The following sample code switches to an emulation of a 4G typical network:

Map<String,String> map = new HashMap<>();

map.put('profileName', “4G typical”);

driver.executeScript('mc:net:changeProfile', map);

Generate a network virtualization report

This API call stops the NV emulation and retrieves the NV Analytics HTML report as a zip file encoded as a base64 string. The script name is mc:net:getReport and uses no parameters.

Note: Since the calling of this API stops NV emulation, the rest of your Appium test will run without network emulation.

The following sample code generates the nv_report.zip file containing the NV Analytics HTML report.

String fileName = 'C:nv_report.zip';

Object response = driver.executeScript('mc:net:getReport');

String base64Str = (String) response;

byte[] bytes = Base64.getDecoder().decode(base64Str);

IOUtils.write(bytes, new FileOutputStream(new File(fileName)));

Generate a network virtualization HAR (HTTP Archive) file

This API call stops the NV emulation and retrieves the HAR file captured by the Network Virtualization proxy, as a zip file encoded in base64. You can use the HAR file to create a test in StormRunner Load or in LoadRunner to generate mobile load testing scripts.

The script name is mc:net:getHAR and uses no parameters.

Note: Since the calling of this API stops NV emulation, the rest of your Appium test will run without network emulation.

The following sample generates the nv_har.zip archive file, containing the HAR file.

String fileName = 'C:nv_har.zip';

Object response = driver.executeScript('mc:net:getHAR');

String base64Str = (String) response;

byte[] bytes = Base64.getDecoder().decode(base64Str);

IOUtils.write(bytes, new FileOutputStream(new File(fileName)));

Retrieve Appium logs

Download Appium Studio For MacDownload Appium Studio For Mac

A log file is generated during the execution of your Appium tests.

To retrieve the log, use the mc-wd:downloadLogs script and specify the encoding.

When the connector receives this command, logs are retrieved for all sessions in the current Appium process. Attach the string to the response body.

The Appium user's test code uses the string from the response body and processes it accordingly.

For example:

HashMap<String, String> encoding= new HashMap<String, String>();

encoding.put('encoding', 'UTF-8');

String logFileContents = (String) wd.executeScript('mc-wd: downloadLogs', encoding);

Parallel tests

You can run parallel Appium and Selenium tests on UFT Mobile.

You can do this through coding, or using your CI (Continuous Integration) tools such as Jenkins. For an example of how to run parallel tests in Jenkins, see the Jenkins Wiki.

See also: