0

我正在尝试在 Django 项目中更好地组织我的硒测试。

我有一个文件夹project/app/selenium_tests/,我在其中放置了一个__init__.py, 和一个tests.py包含我的硒测试的文件夹。在__init__.py我像这样导入测试:

from tests import *

但是当我这样做时,./manage.py test app.selenium_tests我得到:

ValueError: Test label 'app.selenium_tests' does not refer to a test

我在这里能错过什么?我什至在 selenium_test 包中添加了一个models.py,但没有任何乐趣。

非常感谢任何帮助。

4

1 回答 1

0

需要把文件夹放到appselenium_teststests目录下,否则默认的Django test runner是找不到的。

所以,把它project/app/selenium_tests/移到project/app/tests/selenium_tests/

于 2013-03-06T23:30:29.997 回答