我有一个关于 pytest 的问题
我想使用多个线程运行相同的 pytest 脚本。但是,我不确定如何创建和运行传递多个参数的线程。(并使用 pytest 运行线程..)
例如我有 test_web.py
from selenium import webdriver
import pytest
class SAMPLETEST:
self.browser = webdriver.Chrome()
self.browser.get(URL)
self.browser.maximize_window()
def test_title(self):
assert "Project WEB" in self.browser.title
def test_login(self):
print('Testing Login')
ID_BOX = self.broswer.find_element_by_id("ProjectemployeeId")
PW_BOX = self.broswer.find_element_by_id("projectpassword")
ID_BOX.send_keys(self.ID) # this place for ID. This param come from thread_run.py
PW_BOX.send_keys(self.PW) # this place for PW. It is not working. I am not sure how to get this data from threa_run.py
PW_BOX.submit()
Run Code Online (Sandbox Code Playgroud)
在 thread_run.py
import threading
import time
from …Run Code Online (Sandbox Code Playgroud) selenium multithreading pytest python-multithreading python-3.x
我正在学习 android 应用程序。
我正在考虑研究如何在我的应用程序中构建网络论坛。(这就像公开假装的论坛)。
是否有任何资源可供我参考以在我的应用程序中构建网络论坛?
谢谢