• MTSC2019-深圳站 议题征集 at October 29, 2019

    扫码最后那个testerhome的二维码,添加小助手,回复大会团购;即可进群与其他同学一起拼团,享受优惠

  • 碰到的问题

    真机或者模拟器都报过这个错误,导致stf 中 ,状态一直是preparing 和disconnected

    ** 已经解决,手机没有开启stf服务**

    adb shell am start -n jp.co.cyberagent.stf/.IdentityActivity
    adb shell am startservice -n jp.co.cyberagent.stf/.Service

    2019-09-19T02:39:25.624Z FTL/device 10274 [emulator-5554] Setup had an error Error: Service had an error: "Error: Not found; no service started."
    at /usr/local/lib/node_modules/stf/lib/units/device/plugins/service.js:101:23
    at tryCatcher (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:510:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:584:18)
    at Promise._settlePromises (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:700:14)
    at Async._drainQueue (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/async.js:15:14)
    From previous event:
    at Promise._captureStackTrace (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/debuggability.js:90:23)
    at Promise._then (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:222:13)
    at Promise.then (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.11.0@bluebird/js/main/promise.js:116:17)
    at /usr/local/lib/node_modules/stf/lib/units/device/plugins/service.js:76:14
    at tryCatcher (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/promise.js:577:18)
    at Promise._settlePromises (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/promise.js:693:14)
    at Async._drainQueue (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/async.js:123:16)
    at Async._drainQueues (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/stf/node_modules/_bluebird@2.9.34@bluebird/js/main/async.js:15:14)
    at runCallback (timers.js:789:20)
    at tryOnImmediate (timers.js:751:5)
    at processImmediate [as _immediateCallback] (timers.js:722:5)
    2019-09-19T02:39:25.625Z FTL/util:lifecycle 10274 [emulator-5554] Shutting down due to fatal error
    2019-09-19T02:39:25.634Z INF/provider 10260 [*] Cleaning up device worker "emulator-5554"
    2019-09-19T02:39:25.634Z ERR/provider 10260 [*] Device worker "emulator-5554" died with code 1
    2019-09-19T02:39:25.634Z INF/provider 10260 [*] Restarting device worker "emulator-5554"

    作业1

  • 在学生生涯中,有这么一个老师,他不仅学富五车,还极有自己的想法和个性,在最关键的高三,却每个月花两个小时给我们看一部电影,并且看完之后还会给我们讲解时代背景和电影的内容,包括 肖申克的救赎,阿甘正传,小武等等,因为他说,电影是通向世界的窗口,他给我们讲《道德经》,给我们念他在大学写的诗。给我们分享他的生活,他的女儿,他是我在自我思索上的启蒙老师,短短的一年,他给了我很强的精神力量,他让我更有同理心,他引导我走向自己想走的路,他让我更加知道努力的重要性。他让我的思想,从一个小孩开始向大人转变。恩师已经去世一年多了。希望他的灵魂安好,希望他的家人剩余的日子里顺顺利利。

  • 会有appcrawler的源码剖析吗

  • Shell mock 的目的或者说实际的应用场景是什么?
    老师能否推荐一个比较好的方式去看,去了解开源的项目。从哪里开始看起?

  • 1

  • import pytest
    from appium import webdriver
    from selenium.webdriver.common.by import By
    import time
    from appium.webdriver import WebElement


    class TestXueQiu:

    def setup_method(self):
    print("**************************8")
    server = 'http://localhost:4723/wd/hub'
    # app启动参数
    desired_caps = {}
    desired_caps["platformName"] = "Android"
    desired_caps["deviceName"] = "192.168.56.103:5555"
    desired_caps["appPackage"] = "com.xueqiu.android"
    desired_caps["appActivity"] = ".view.WelcomeActivityAlias"
    desired_caps["autoGrantPermissions"] = True
    # 驱动
    self.driver = webdriver.Remote(server, desired_caps)
    time.sleep(15)
    self.driver.implicitly_wait(15)

    def teardown_method(self):
    print("*********$###################")
    # self.driver.quit()

    def into_login_page(self,phone,password):
    time.sleep(1)
    p_m1 = "//*[contains(@resource-id,'image_cancel')]"
    self.driver.find_element(By.XPATH, p_m1).click()
    p_m = "//*[contains(@resource-id, 'user_profile_container')]"
    self.driver.find_element(By.XPATH, p_m).click()
    ele3 = "//*[contains(@resource-id,'tv_login')]"
    self.driver.find_element(By.XPATH, ele3).click()
    ele4 = "//*[contains(@resource-id,'tv_login_by_phone_or_others')]"
    self.driver.find_element(By.XPATH, ele4).click()
    ele5 = "//*[contains(@resource-id,'tv_login_with_account')]"
    self.driver.find_element(By.XPATH, ele5).click()
    ele6 = "//*[contains(@resource-id,'login_account')]"
    self.driver.find_element_by_xpath(ele6).clear()
    self.driver.find_element_by_xpath(ele6).send_keys(phone)
    ele7 = "//*[contains(@resource-id,'login_password')]"
    self.driver.find_element(By.XPATH,ele7).send_keys(password)
    ele8 = "//*[contains(@resource-id,'button_next')]"
    self.driver.find_element(By.XPATH,ele8).click()
    ele9 = "//*[@text='手机号码填写错误']"
    alert = self.driver.find_element_by_xpath(ele9).text

    return alert

    def test_wrong_phone(self):
    phone = "aadasdsa"
    password = "adadsadas"
    alert = self.into_login_page(phone,password)
    ##input account and password
    assert alert == "手机号码填写错误"

    def test_wrong_password(self):
    phone = "15118156275"
    password = "adadsadas"
    alert = self.into_login_page(phone, password)
    ##input account and password
    assert alert in "用户名或密码错误"
    @pytest.mark.parametrize("product",["alibaba","xiaomi","google"])
    def test_search(self,product):
    time.sleep(3)
    p_m1 = "//*[contains(@resource-id,'image_cancel')]"
    self.driver.find_element(By.XPATH, p_m1).click()
    time.sleep(3)
    ele2 = "//*[contains(@resource-id, 'home_search')]"
    self.driver.find_element(By.XPATH, ele2).click()
    time.sleep(3)
    ele3 = "//*[contains(@resource-id, 'search_input_text')]"
    self.driver.find_element(By.XPATH, ele3).send_keys(product)
    time.sleep(5)



  • 满了哦

  • 持续集成、质量监控

  • 以后应该会有,时间还没发确定。