Download the PHP package bonwe/bonwenium without Composer

On this page you can find all versions of the php package bonwe/bonwenium. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bonwenium

bonwenium

php自动化测试框架

使用

安装浏览器(推荐chrome)
下载对应浏览器的webdriver,并驱动起来。
本项目更至最新版本,composer加载所有组件。
配置.env文件
执行 php bonwenium list 可以获取demo。

项目目录

app/actions

常规步骤组件:
例如针对个人主页测试,个人收藏测试等,都需要登录后展开,故登录等 常规操作可写于acitons。

app/scenarios

情景步骤组件:
例如针对登录进行场景测试,如手机号格式,密码格式等多样化场景测试时,写于scenarios。

app/functions

自定义步骤组件:
例如输入验证码等特殊处理操作,需要扩展代码分析,故提供functions,继承主Controller,可以处理程序同时操作当前的webdriver实例。

app/steps

生产线:
也称为组件集/步骤集,所有组件取自以上三种(常规,情景,自定义)组件,可以根据测试用例任意搭配。
一条完整的生产线可以成为一个完整需求的全套自动化测试。

config/app.php

应用常规配置:
如 测试网站入口,日志导出方式,点击停顿时间等等。

config/web_driver.php

webdriver驱动配置:
驱动url,监听端口,驱动浏览器等。

组件开发者文档

组件以字符串数组的方式实现element操作组合,一个字符串实现一个操作。

事件操作:

子集定位,以>>标识子集查找,查找类型 id,class,tag
例 >>tag:li
同级筛选,以>标识同级筛选,查找类型 tag,id,text,num,css等
例 >text:登录
例 查找第0个 >num:0
具体操作,以>>>标识具体操作, write,append,click等
例 >>>write:新概念
例 点击 >>>click
按上述可实现任何鼠标点击或者键盘写入操作,
例 tag:div>>tag:button>text:登录>>>click

常规组件/情景组件:

以事件操作数组的形式将不同事件按场景分析组合而成,遵循事件定位原则,有如下模式:

must_step:必须执行的事件。
例 "must_step" => "tag:button>text:登录>>>click"

should_step:非必须执行的事件。
例 "should_step" => "tag:button>text:登录>>>click"

sleep:停顿(秒)。
例 "sleep" => 2

usleep:停顿(微秒)。
例 "usleep" => 500000

scroll:滚动到指定位置
例 "scroll" => "0,0"

until:当某element出现/消失后。
例 "until" => "tag:input>text:验证码>>>appear"
例 "until" => "tag:button>text:重试>>>disappear"

asserts:断言。
例 "asserts"=>["tag:button>text:发送>>>exist","tag:span>text:密码错误>>>no_exist"]

function:自定义组件。
例 "function"=>"User@writeResetPwdCaptcha@{"phone":18810680772}"
调用functions下的User.php中writeResetPwdCaptcha函数,参数以json定义,框架会自动解析并存入类变量datas中。可以使用$this->datas['phone']调用

所以bonwenium极大幅度简化了开发者的代码量,只需掌握html和js基础知识,就可以编写出一个理想的自动化测试项目。

生产线:

steps:由常规组件、情景组件、自定义组件等自由组合而成。一条生产线完成一个功能甚至一个完整项目的自动化测试。


All versions of bonwenium with dependencies

PHP Build Version
Package Version
Requires bonwe/webdriver Version v1.0.3
monolog/monolog Version ^1.24
symfony/var-dumper Version ^4.2
predis/predis Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package bonwe/bonwenium contains the following files

Loading the files please wait ....