定制 jugid/auto-mate 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jugid/auto-mate

Composer 安装命令:

composer require jugid/auto-mate

包简介

Automation by YAML file

README 文档

README

Tests codecov Latest Stable Version Issues License PHP Version

AutoMate - Yaml automation library

Release 0.9.0 see the Changelogs

You can get help on the Wiki

Readme summary

Why AutoMate ?

At work, we need to make a lot of management acts. There is already a homemade framework which works well for this kind of actions. The thing is that it takes a long time to develop and create new scenarios. With AutoMate, I tried reducing this wasted time.

With AutoMate you can :

  • Create multiple scenarios with multiple commands
  • Run them on different browsers
  • Configure it as you need
  • Inject data into your scenario to use variables in it and repeat the scenario for each dataset
  • Get logs from files to know which data was used when the scenario failed/successed
  • Have a step by step description written on console
  • Add your own commands and plugins thanks to the event system
  • Use your own business logic using the logics
  • You can use the Launcher class for simple tests and reports.

Getting started

Installation

➡️ Install AutoMate with composer

composer require jugid/auto-mate

➡️ Get a Webdriver

➡️ Selenium Grid

You can use Selenium Grid. See Selenium Grid and Selenium Grid 4 Downloads

If you do it, please send a PR with your example and a quick guide.

Usage

To use AutoMate, you first need to :

  1. Create your yaml configuration file
  2. Create your scenario file with yaml
  3. Create some folders corresponding to the scenario
  4. Maybe create a specification csv file
  5. Run AutoMate

➡️ Create your yaml configuration file

Your configuration file should looks like this. You MUST prefer using absolute path.

➡️ Create your scenario file with yaml

A scenario is a list of steps that have to be executed by AutoMate. You also can declare variables and the browser to use for this specific scenario. You can find an example here

Your scenario needs to be named main.yaml and saved in scenario_folder/scenario_name/

➡️ Create some folders corresponding to the scenario

Now you have to create some folders corresponding to the scenario you just created.

  • logs_folder/scenario_name/ : to log the results in details
  • specs_folder/scenario_name/ : to load data in the scenario specification variables scope

➡️ Create your specification file

Specification are csv files that provide data to AutoMate. It will execute the scenario for each lines and load data inside the spec variables scope.

Your specification files need to be saved in specs_folder/scenario_name/my_spec.csv.

Your specification needs to have a header. Otherwise, your variables name will be the data at first line.

You can create the number of specification you want. If AutoMate does not run in Test mode, the spec is renamed with the suffix _PROCESSED when the scenario run ends. The specification cannot be detected if it has _PROCESSED in its name.

➡️ Run AutoMate

To run AutoMate, you can use the CLI launcher defined as :

php bin/automate run --scenario=scenario --config=/../config.yaml [--browser=NAME] [--headless] [--server=HTTP_ADRESSE] [--testMode] [--specMode]

or in a shorter way :

php bin/automate run -s scenario -c /../config.yaml [-b NAME] [-h] [-a HTTP_ADRESSE] [-t] [-m]

You can also use the more php way as defined in this example

Visual

This is what AutoMate looks like :

AutoMate Screenshot

Support

If the website has a robot control, AutoMate cannot be used. If you find a trick, please send a PR.

First, you can find help on the Wiki. Then if you don't find what you want, you can contact us.

Roadmap

See Changelogs for more information

  • Tell us your ideas ! You can directly send a PR or open an issue

Will not be implemented

  • Specific command to work with tables

Contributing

We love to have your help to make AutoMate better. See CONTRIBUTING.md for more information about contributing and developing AutoMate

License

AutoMate is under MIT License. You can find the license file at License.

Thanks

If you like AutoMate, do not hesitate to tell us how you love it and if you can, contribute.

jugid/auto-mate 适用场景与选型建议

jugid/auto-mate 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22 次下载、GitHub Stars 达 6, 最近一次更新时间为 2021 年 02 月 18 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「ui」 「selenium」 「webdriver」 「automation」 「php-webdriver」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 jugid/auto-mate 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 jugid/auto-mate 我们能提供哪些服务?
定制开发 / 二次开发

基于 jugid/auto-mate 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 22
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 18
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-18