aklump/check-pages
最新稳定版本:0.24.0
Composer 安装命令:
composer require aklump/check-pages
包简介
Very simple QA for websites.
README 文档
README
Very Simple QA for HTTP
Heavy Development
⚠️ Use at your own risk. This project is under heavy development and is undergoing changes pretty regularly.
Summary
This project intends to provide a process of QA testing of a website, which is very fast to implement and simple to maintain. You write your tests using YAML and they can be as simple as checking for a 200 HTTP response on the homepage. PHP is working under-the-hood, but general use does not require you to know PHP.
Simple Test Syntax
Assert the homepage loads.
- visit: /
Assert the admin section is protected.
- visit: /admin why: Make sure the `/admin` path returns 403 forbidden when not logged in. status: 403
In a third test we can assert there is one logo image on the homepage, like so:
- visit: / find: - dom: '#logo img' count: 1
Lastly, make sure there are no unprocessed tokens on the page (a.k.a. a substring does not appear):
- visit: / find: - not contains: '[site:name]'
For more code examples explore the /examples directory.
Installation
Execute the following snippet in your terminal, which will install Check Pages in your home directory. Composer is required for this to work.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/aklump/check-pages/refs/heads/master/setup-check-pages.sh)"
- Test your installaion by typing
checkpagesin a new terminal window.- If you see a Composer PHP version warning then you will need to setup an alias (see Troubleshooting)
- You should see the welcome screen if installation is working properly.
Quick Start
Initialize Your Project
cd my/project/rootmkdir bin(do this only if you want the binary(ies) to be installed here.)checkpages init- Review the output for any important messages.
Run the Demonstration Tests
bin/run_check_pages_tests.sh- If you are online, you should see passing tests.
- Try again with maximim verbosity
bin/run_check_pages_tests.sh -vvv
See Troubleshooting if you experiences problems.
Documentation
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2022-09-29
