python自动化ui测试套件的剧本模式库。
screenp的Python项目详细描述
屏幕截图
TITLE CARD:
"ScreenPy"
TITLE DISAPPEARS.
FADE IN:
INT. DOCUMENTATION - NIGHT
Illuminated by the computer's glow, AUDIENCE sits reading the documentation
for a Python library they haven't seen before. AUDIENCE is visibly startled
as a dulcet voice begins to speak.
NARRATOR (V.O.)
ScreenPy is a library that provides the base for an
automated test suite using Screenplay Pattern.
AUDIENCE
Wha- who are you? Where are you? And... what is
Screenplay Pattern?!
NARRATOR (V.O.)
It's a composition-based architecture pattern,
encouraging automated test writers to write more
maintainable test suites. It allows test writers to
use Gherkin-style language in Python to create
descriptive UI tests.
AUDIENCE
(reluctantly)
Ignoring how you avoided answering my first questions,
how do I get started?
NARRATOR (V.O.)
I thought you'd never ask...
FADE OUT
安装
pip install screenpy
文档
有关此模块的最新信息,请查看Read The Docs documentation!
快速启动
一旦安装,要在项目中设置一个剧本模式脚手架,cd
到您将用于套件的文件夹,并运行以下命令:
screenpy-quickstart
这将设置user_interface
、questions
、tasks
和features
目录,并用一个简单的测试填充它们。有关这些目录的用途的解释,请参见File Hierarchy documentation
诱惑整合
screenpy使用Allure来记录操作。如果您想查看您的剧本套件的诱惑力报告,请使用pytest运行测试,如下所示:
python -m pytest features --alluredir allure_report
allure serve allure_report
贡献
你想捐款吗?伟大的!以下是提交个人资料前应做的事情:
- 运行
tox
以执行测试。 - 运行
black
格式化代码。
就这样!:)