Summary of Appium Records

Source: Internet
Author: User
Tags appium testng

1. Appium working principle, life cycle, how to execute
In general, the Appium server is used as a broker, passing the specification of the test script to the Appium server, and then communicating with the underlying tools Appium the server.
The bottom tool and the mobile phone for communication operations, the operation is completed after the results of feedback to the Appium server, the server and then feedback the results to our test script
Under Android:
1. More than 4.2 models use the Uiautomator (Appiumbootstrap.jar), a test tool for the underlying call
In the process of creating a connection between the test script and the Appium server, the Appiumbootstrap.jar package is sent to the test device and started Appiumbootstrap.jar
Create a socket service that waits for the server to pass the command, and the whole process of executing the test is to communicate with Appiumbootstrap.jar to complete the operation
After executing the test, the test script calls Driver.quit () This method to end the test and end the device Appiumbootstrap.jar

2. Under 4.2 Models the bottom of the seledroid this test tool
During the creation of a connection between the test script and the Appium server, the original test application is re-signed, a seledroid_xxx.apk is generated, and the APK is installed into the test
On the test device, with this apk to operate the APK, then the server and Seledroid communication is based on an HTTP interface service, this port is 8080
3. Mixed application WebView part with Chromedriver
The premise is that WebView debug mode is turned on in our test application source package
Hybrid applications will start a Chromedriver HTTP service when switching WebView, which is the service port of 9515,appium server and Chromedriver.
Chromedriver to communicate with our apk in WebView.
4. Chromedriver for mobile Web applications
The premise is that the chrome kernel-based browser
The test script creates a Chromedriver service directly in the process of creating a connection with the Appium server, which is the service port of 9515,appium server and Chromedriver.
Chromedriver to communicate with our mobile web

Under iOS (Xode8 below):
1. Test the native app
Based on Instruments's uiautomation, the test script communicates with the server, and the server translates the test instruction into a uiautomation script and passes it to instruments,
Instruments and mobile phone test application to communicate and complete operation
2. Hybrid App Testing
The premise is to start the Ios_webkit_debug_proxy-c 0e4b2f612b65e98c1d07d22ee08678130d345429:27753-d service
Test scripts when switching driver, start a chromedriver service that communicates with the webivew of the application
3. Testing of Mobile Web
Use the Safarilauncher app to complete the Safari browser

2. The similarities and differences between explicit wait and implicit wait
1. The same point is intelligent waiting, in a certain time range of constantly find elements, once found immediately end find continue to execute code, not found will always find the time-out until
2. The difference is that the implicit wait is the global device, and can be changed at any time, after the change to the Findxxx method after the effect, on the click, input, swipe and other operations do not work;
Explicit wait is only for a single element and is not just for lookups, but also for custom judgments on some of the attributes of an element

3. Multi-Device execution
1. Android under multi-device execution means that each device needs to correspond to a appium server, and the script part needs to implement multi-threaded access, the Appium Server Start command is as follows:
Appium-p 4490-BP 3456-u xxxx
-P indicates port for server and script communication
-BP represents the port on which the server communicates with the Appiumbootstrap.jar of the device
-U indicates which device the current service is for
2. iOS does not support multi-device execution under XCODE8 because instruments does not support multiple instances

4. TestNG Framework
1. The role of individual annotations and the order and number of executions
Note that annotations specify the tags in the configuration file, such as Beforetest refers to the initialization action to be done before the test label in the configuration file is executed, and other similar
Beforemethod and Aftermethod indicate that a test method is executed before and after each testing annotation is executed.
2. Test reports, test logs and failures
Use Jenkins's testng plug-in to parse TestNG's own generated reports, placing failures in the Tomcat directory where Jenkins is located, to achieve the results seen on HTML reports
Reportng Report
Testng-xlst's report
5. If you want to implement both Android and iOS testing, you need a Mac computer to do the server

6. Environment for automated testing
1. Need a full-time automated computer
2. If you have more devices, you need a hub, the computer configuration is high
3. USB cable quality is better

Summary of Appium Records

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.