cwk0099

Results 10 comments of cwk0099

path设置成./test_cases的话就只执行login,不执行api文件夹里面的

> 给子目录加一个空的 __init__.py 初始化文件(用来标识一个目录为 python 模块)。这样框架就能检索到子目录的用例了。 > > ``` > test_cases # 测试用例目录 > ├── __init__.py # 初始化文件 > ├── user > │ ├── __init__.py # 初始化文件 > │ ├──...

> 如果方便调试请使用 debug 模式 > > ```python > seldom.main(debug=True) > ``` > > 实际上,我在编写用的时候都会用debug模式。HTML 的报告中也有报错信息,你展开错误的报告就能看到。 问题是我debug模式看不到我接口出错的地方和断言失败的地方,必须把debug模式去掉在html里面才能看到 @defnngj

![image](https://user-images.githubusercontent.com/37758451/170618785-ba609767-55a4-478d-a475-9d8a597ea534.png) ![image](https://user-images.githubusercontent.com/37758451/170618940-5d3ce211-ea73-4cb7-aeaf-849ca497967b.png)

@defnngj ![image](https://user-images.githubusercontent.com/37758451/170808933-8c9817b0-8e6c-428c-bafe-0daf5ccdb650.png) ![image](https://user-images.githubusercontent.com/37758451/170808948-ae9de344-0028-40fd-a207-347c99be5a36.png) 这里并没有断言失败的报错,如果去掉debug,在html报告里面才能看到

@defnngj 同理我这里提取不到,也没报错,也只能在html报告里面看到 ![image](https://user-images.githubusercontent.com/37758451/170809045-7023d3fe-acf9-4bc2-8c93-3c0e146c7158.png)

> 你可以在程序的最后,加上删除报告的操作: > > ```python > import os > from seldom import BrowserConfig > > if __name__ == '__main__': > seldom.main(debug=False) > # ... > # del 报告和日志... > os.remove(BrowserConfig.REPORT_PATH)...

![image](https://user-images.githubusercontent.com/37758451/168031467-04c2ad10-a683-4417-bbc3-291ae2afd511.png)

![image](https://user-images.githubusercontent.com/37758451/168031702-45e24027-3566-43a2-9adc-1f023125b4a4.png)

![image](https://user-images.githubusercontent.com/37758451/168235766-84deb566-1cf3-4687-a72d-e9fbf4b16fd7.png) yes,i am using streamlit_javascript,i posted a pic about my code above