• Android自动化测试android-uiconductor之一:环境搭建


    1、安装依赖

    1. Jdk 8+
    2. Android SDK 28
    3. adb installed and setup correctly in the env
    4. a local/remote MySql Database
    5. Angular CLI: 1.7.4 (Currently the higher verison of Angular CLI might not work. we are working ont the migration)
    6. Node: 10.15.0

    2、启动mysql

    mysql.server start
    
    2.1、登录数据库:
    mysql -u root -p
        密码:xxx
    

    3、创建数据库

    CREATE DATABASE IF NOT EXISTS `uicddb` DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
    grant ALL PRIVILEGES on uicddb.* to root@'%' identified by '123456';
    flush privileges;
    

    3、导入数据库文件

    source "/Users/myuser/Desktop/bak/android-uiconductor/backend/src/com/google/uicd/backend/recorder/db/initdb.sql";
    

    4、修改配置文件

    在根目录的release目录下有个release/uicd.cfg文件:
    修改数据库连接字符串:
    mysqlconnectionstr=jdbc:mysql://localhost:3306/uicddb?autoReconnect=true&user=root&password=admin&useUnicode=true&characterEncoding=utf-8
    

    5、在release下面运行start.sh就可以启动

    /start.sh
    

    过程中的问题解决:

    1、osascript: mac_chrome.scpt: No such file or directory

    解决:
    打开…./bak/android-uiconductor/release/start.sh文件,里面有这一段代码,其中osascript mac_chrome.scpt是未实现的,需要实现:

    实现方法:
    /Applications/Google Chrome.app/Contents/MacOS/Google Chrome --disable-web-security --chrome-frame --user-data-dir="$PWD" --app="file://$PWD/dist/index.html"

    2、初始打开浏览器特别慢:

    原因是因为加载的一个jquery.min.js文件是从google拉取的,因为要翻墙,所以特别慢,需要改一下,使用国内的,或者下载下来放在文件目录中;
    https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js

  • 相关阅读:
    hdu 1028 Ignatius and the Princess III (n的划分)
    CodeForces
    poj 3254 Corn Fields (状压DP入门)
    HYSBZ 1040 骑士 (基环外向树DP)
    PAT 1071 Speech Patterns (25)
    PAT 1077 Kuchiguse (20)
    PAT 1043 Is It a Binary Search Tree (25)
    PAT 1053 Path of Equal Weight (30)
    c++ 常用标准库
    常见数学问题
  • 原文地址:https://www.cnblogs.com/haojile/p/12434639.html
Copyright © 2020-2023  润新知