zoukankan      html  css  js  c++  java
  • jQuery火箭图标返回顶部代码

    申请:本文介绍主要是针对Android.

    1.什么是Appium:

      Appium是一个开源、跨平台的测试框架,可以用来测试原生及混合的移动端应用。Appium支持IOS、Android及FirefoxOS平台。Appium使用WebDriver的json wire协议,来驱动Android系统的UIAutomator框架。

      Appium支持Selenium WebDriver支持的所有语言,如java、Object-C、JavaScript、Php、Python、Ruby、C#、Clojure,或者Perl语言,更可以使用Selenium WebDriver的Api。可实现跨平台自动化测试。

      Appium选择了client-server的设计模式。只要client能够发送http请求给server,那么的话client用什么语言来实现都是可以的,这就是appium及webdriver如何做到支持多语言的。

      官方介绍:

      Appium is an open-source tool you can use to automate mobile native, mobile web, and mobile hybrid applications on iOS and Android platforms. “Mobile native apps” are those written using the iOS or Android SDKs. “Mobile web apps” are web apps accessed using a mobile browser (Appium supports Safari on iOS and Chrome on Android). “Mobile hybrid apps” have a native wrapper around a “webview” – a native control that enables interaction with web content. Projects like Phonegap, for example, make it easy to build apps using web technologies that are then bundled into a native wrapper – these are hybrid apps. Importantly, Appium is “cross-platform”: it allows you to write tests against multiple platforms (iOS, Android), using the same API. This enables a large or total amount of code reuse between iOS and Android testsuites.

    2.Appium的工作原理:

      在Android端,appium基于WebDriver协议,利用Bootstrap.jar,最后通过调⽤用UiAutomator的命令,实现App的自动化测试。

      原理简图如下:

      

      UiAutomator测试框架是Android SDK自带的App UI自动化测试Java库。另外由于UiAutomator对H5的支持有限,appium引入了chromedriver以及safaridriver等来实现基于H5的自动化。

      Appium在Android移动端工作流

    1. client端也就是我们 test script是我们的webdriver测试脚本。

    2. 中间是起的Appium的服务,Appium在服务端起了一个Server(4723端口),跟selenium Webdriver测试框架类似, Appium⽀持标准的WebDriver JSONWireProtocol。在这里提供它提供了一套REST的接口,Appium Server接收web driver client标准rest请求,解析请求内容,调⽤用对应的框架响应操作。

    3. appium server会把请求转发给中间件Bootstrap.jar ,它是用java写的,安装在手机上的Bootstrap监听4724端口并接收appium 的命令,最终通过调⽤用UiAutomator的命令来实现(自动化测试)。

    4. 然后Bootstrap将执行的结果返回给appium server。

    5. 最后appium server再将结果返回给 appium client(测试结果)。

      

      

      

  • 相关阅读:
    ios自动布局
    Android真机调试流程
    Window phone应用中的多触点手势解读以及toolKit.dll和Microsoft.Phone.dll 冲突问题
    软件质量可视化与软件测试
    软件测试中不可忽视的 Warning
    软件测试作业1 -- 关于c++项目中类相互调用的问题与解决
    软件测试 总结
    系统测试,集成测试,单元测试的联系与区别
    白盒测试
    关于UI测试的一些实例操作
  • 原文地址:https://www.cnblogs.com/cnkemi/p/9019726.html
Copyright © 2011-2022 走看看