• 技术文章 >Python技术 >Python基础教程

    Python自动化测试基础必备知识点一

    2021-02-06 19:55:45原创2559

    banner55(1).png

    一、自动化测试的概念

    性能系统负载能力稳定性过载操作下的系统瓶颈自动化测试,使用程序代替人工,可以提高测试效率性,自动化测试能自动化使用代码模拟大量用户,让用户请求多页和多用户并发请求收集参数,并对系统负载能力进行统计生成报告。

    二、Python自动化测试基础必备知识点

    1.Python中的标识符(变量,类,方法等取的名字)

    (1)必须是字母,数字或者下划线组成

    (2)数字不能开头

    (3)对大小写敏感(区分大小写)true与True

    age=20 _age=20

    2.python中的关键字

    1

    2

    3

    4

    5

    6

    7

    8

    'False', 'None', 'True', 'and',

    'as', 'assert', 'async', 'await',

    'break', 'class', 'continue', 'def',

    'del', 'elif', 'else', 'except', 'finally',

    'for', 'from', 'global', 'if', 'import',

    'in', 'is', 'lambda', 'nonlocal', 'not',

    'or', 'pass', 'raise', 'return', 'try',

    'while', 'with', 'yield']

    3.python中的注释方法

    1

    2

    3

    4

    age=10 #单行注释

    '''age=10

    aa=10

    '''多行注释

    4.Python行与缩进

    1

    2

    3

    4

    5

    6

    a=10

    b=20

    def sum(a,b):

    return a+b#符合要求

    return a+b#不符合要求

    print(sum(10,20))

    5.多行语句

    1

    2

    3

    4

    5

    6

    长语句以 \来实现多行语句

    toal=item_one+\

         item_two\

         item_three

    如果语句中包括{}[]或者()就不需要使用多行连接符号

    toal=['a','c']

    专题推荐:python 自动化测试
    上一篇:python守护线程如何创建? 下一篇:python上下文管理器的基本介绍

    相关文章推荐

    • python中的upper是啥意思• jquery遍历find()方法如何使用• python有几种可视化图形库?• python中如何使用np.delete()方法?

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网