Pytest - 没有运行任何测试

10 浏览
0 Comments

Pytest - 没有运行任何测试

我正在使用pytest和selenium。当我尝试运行我的测试脚本时:

import pytest
from selenium import webdriver
from pages import *
from locators import *
from selenium.webdriver.common.by import By
import time
class RegisterNewInstructor:
    def setup_class(cls):
        cls.driver = webdriver.Firefox()
        cls.driver.get("http://mytest.com")
    def test_01_clickBecomeTopButtom(self):
        page = HomePage(self.driver)
        page.click_become_top_button()
        self.assertTrue(page.check_instructor_form_page_loaded())
    def teardown_class(cls):
        cls.driver.close()

显示的消息是:0.84秒内没有运行任何测试

有人可以帮我运行这个简单的测试吗?

0