网络编程
位置:首页>> 网络编程>> Python编程>> Python自动化测试基础必备知识点总结

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

作者:PY网  发布时间:2021-11-11 22:07:07 

标签:Python,自动化测试

一、自动化测试的概念

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

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

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

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

(2)数字不能开头

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

age=20 _age=20

2.python中的关键字


'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中的注释方法


age=10 #单行注释
'''age=10
aa=10
'''多行注释

4.Python行与缩进


a=10
b=20
def sum(a,b):
return a+b#符合要求
return a+b#不符合要求
print(sum(10,20))

5.多行语句


长语句以 \来实现多行语句
toal=item_one+\
  item_two\
  item_three
如果语句中包括{}[]或者()就不需要使用多行连接符号
toal=['a','c']

来源:https://www.py.cn/jishu/jichu/23699.html

0
投稿

猜你喜欢

手机版 网络编程 asp之家 www.aspxhome.com