Project

General

Profile

grading_rules #6586

Updated by UserName LastName over 1 year ago

# 检查yaml文件是否为空,如果为空待办代码报错了 
 - expr_type: python 
   expr: "[log for log in records if log is not None]" 
   weight: 20 
 # 检查是否调用selenium 
 - expr_type: python 
   expr: "[log for log in records if log.module_name=='selenium.webdriver.remote.webdriver']" 
   weight: 10 
 # 检查是否使用了po 
 - expr_type: python 
   expr: "[log for log in records if log.depth >=4]" 
   weight: 15 
 # 检查是否使用了断言 
 - expr_type: python 
   expr: "[log for log in records if log.args.get('@py_assert1',1) is None]" 
   weight: 10 
 # 检查是否使用了参数化 
 - expr_type: python 
   expr: "[log for log in records if log.args is not None]" 
   weight: 10 
 # 检查是否使用了teardown 
 - expr_type: python 
   expr: "[log for log in records if log.function_name in ['teardown','teardown_method','teardown_function','teardown_class','teardown_module']]" 
   weight: 10 
 # 检查是否使用了setup 
 - expr_type: python 
   expr: "[log for log in records if log.function_name in ['setup','setup_module','setup_function','setup_class','setup_method']]" 
   weight: 10 
 # 检查是否打开 thingsboard 
 - expr_type: python 
   expr: "[log for log in records if log.args.get('url','') in 'https://thingsboard.hogwarts.ceshiren.com/']" 
   weight: 15 
 '""' 

Back