• API接口不兼容导致的,需要自己加下接口适配

  • 貌似是骑虎的老哥,之前在奇酷软件做 华屹广告平台,投放引擎刚开始是c++写的,后来全部转golang了。

  • 直接研究源码就知道了

  • 安卓的内存我写了个ndk c工具 ,原理很简单:malloc内存 ,while卡死不释放就可以了

  • 课间作业1

    class TestDefaultSuite():
    def setup_method(self, method):
    self.driver = webdriver.Chrome()
    self.vars = {}

    def teardown_method(self, method):
    self.driver.quit()

    def test_homework1(self):
    self.driver.get("https://testerhome.com/")
    self.driver.set_window_size(1103, 770)
    self.driver.find_element(By.LINK_TEXT, "社团").click()
    self.driver.find_element(By.LINK_TEXT, "霍格沃兹测试学院").click()
    self.driver.find_element(By.CSS_SELECTOR, ".topic-21744 .title > a").click()

    ###课间作业2

    class Testhomework():
    def setup_method(self, method):
    self.driver = webdriver.Chrome()
    self.vars = {}
    self.driver.implicitly_wait(6)
    self.driver.get("https://testerhome.com/")

    def test_homework2(self):
    self.driver.set_window_size(1103, 770)
    self.driver.find_element(By.CSS_SELECTOR, ".title").click()
    self.driver.find_element(By.CSS_SELECTOR, ".toc-container > .btn").click()
    self.driver.find_element(By.CSS_SELECTOR, ".toc-item:nth-child(4) a").click()

    def teardown_method(self, method):
    sleep(20)
    self.driver.quit()
  • 课件作业1

    def div(a,b):
    return a/b
    def test_int():
    assert div(12,3) == 4
    assert div(888,444) == 2

    def test_float():
    assert div(10.0,2.0) == 5.0
    assert div(3.0,2.0) == 1.5

    def test_zero():
    assert div(10,0) == 0
    assert div(0,10)

    def test_string():
    with pytest.raises(TypeError):
    assert div('a','b')
    assert div(10,'c')
    assert div('d',2)

    ###课件作业2
    #把作业1的用例,用参数化替代下,把代码贴到回复里,生成allure报告,并把allure的首页报告截图贴到回复里

    import pytest

    from unit.div import div

    @pytest.mark.typeerror1
    @pytest.mark.parametrize("number,string",{
    (10,'a'),
    (12.5,'b'),
    (-9,'c'),
    (-5.8,'d'),
    })
    def test_div_errornumberstring_parametrize(number,string):
    with pytest.raises(TypeError):
    assert div (number,string)

    @pytest.mark.typeerror2
    @pytest.mark.parametrize("string,number",{
    ('a',20),
    ('b',19.8),
    ('c',-78),
    ('d',-679.9)
    })
    def test_div_errorstringnumber_parametrize(string,number):
    with pytest.raises(TypeError):
    assert div (string,number)


    @pytest.mark.zero
    @pytest.mark.parametrize("number,zero",{
    (10,0),
    (-189,0),
    (9.12,0),
    (-876.9,0)
    })
    def test_div_numberzero_parametrize(number,zero):
    with pytest.raises(ZeroDivisionError):
    assert div(number,zero)==None

    @pytest.mark.int
    @pytest.mark.parametrize("number1,number2,exception",{
    (10,5,2),
    (10,2,5),
    (888888,2,444444),
    (100,200,0.5),
    (20,30,5)
    })
    def test_div_int_parameterize(number1,number2,exception):
    assert div(number1,number2) == exception

    @pytest.mark.float
    @pytest.mark.parametrize("number1,number2,exception", {
    (10.6, 9, 1.1777777777777778),
    (44, 1.5, 29.333333333333332),
    (-888.888, 2.0, -444.444),
    (100.5, -200, -0.5025),
    (-87.9,-23.9, 3.677824267782427),
    (9.7,4.7,7)
    })
    def test_div_float_parameterize(number1, number2, exception):
    assert div(number1, number2) == exception

  • #课件练习 1

    curl 'https://testerhome.com/' | grep 'a title.* href.*a>' | grep -v span | grep -v img | wc -l

    过滤标题和topic:|awk -F\" '{print $2,$4}'

    #课件练习 2

    curl 'https://cn.bing.com/search?q=shell' | grep -o "[0-9].*条结果" | awk -F条 '{print $1 }'

    #课后作业3
    第一个

    [86558967@shell.testing-studio.com ~]$cat /tmp/nginx.log | awk -F\" '{print $3}' | awk 'BEGIN{FS=" "} {print $1}' | grep '404' |wc -l
    266

    [86558967@shell.testing-studio.com ~]$cat /tmp/nginx.log | awk -F\" '{print $3}' | awk 'BEGIN{FS=" "} {print $1}' | grep '500' |wc -l
    1

    [86558967@shell.testing-studio.com ~]$cat /tmp/nginx.log | awk -F\" '{print $3}' | awk 'BEGIN{FS=" "} {print $1}' | grep -E '404|500' |wc -l
    267


    #第二个

    [86558967@shell.testing-studio.com ~]$cat /tmp/nginx.log | awk '{print $1}' | sort | uniq -c | sort -nr | head -3
    282 216.244.66.241
    130 136.243.151.90
    110 127.0.0.1

    第三个

    [86558967@shell.testing-studio.com ~]$awk '{print $7}' /tmp/nginx.log | sed -e 's#/topics/[0-9]#/topics/id#' -e 's#?.##' -e 's#/[0-9]/#/id/#' -e 's#/[0-9]..#/id#' | sed -E -e 's#/[a-z0-9-]..#/id#' -e 's#/topics/id#/topics/id/udid#' -e 's#/([/])/(topics|following|replies|followers|reward|favorites|columns|id)$#/userid/\2#' -e 's#/(topics|cable)$#/\1/udid#' -e 's#/[/]+$#/userid#' | sed -e 's#/udid##' | sort | uniq -c |sort -nr |head -10
    584 /cable
    372 /topics/id
    204 /userid
    147 /topics/id/replies/id/edit
    94 /
    61 /uploads/photo/userid/id
    55 /_img/uploads/photo/userid/id
    49 /topics/id/replies/id/reply_suggest
    46 /userid/replies
    41 /topics/id/show_wechat







  • 基于 android7.0 以后的抓包 at December 04, 2019
    Author only
  • 基于 android7.0 以后的抓包 at November 26, 2019

    虚拟容器VirtualXposed安装插件JustTrustMe就可以了,我之前写了个脚本,每次可以自动更新APK,楼主需要的话可以@我。

  • Jenkins 任务

测试,开发,讲师