# @cherry-next/cherry-core

Latest version **1.1.0** (published 2022-03-01) · ISC license · 0 weekly downloads

## Install

```sh
npm install @cherry-next/cherry-core
pnpm add @cherry-next/cherry-core
yarn add @cherry-next/cherry-core
bun add @cherry-next/cherry-core
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-03-01 |
| First published | 2022-02-09 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 107 |
| Unpacked size | 2.9 MB |
| Known vulnerabilities | 0 (+5 in 2 direct dependencies) |
| Install scripts | no |
| Maintainers | renran |

## Links

- npm: https://www.npmjs.com/package/@cherry-next/cherry-core
- npm.io page: https://npm.io/package/@cherry-next/cherry-core

## Dependencies (107)

- [tmp](https://npm.io/package/tmp.md) ^0.2.1
- [chai](https://npm.io/package/chai.md) ^4.3.4
- [diff](https://npm.io/package/diff.md) ^5.0.0
- [mime](https://npm.io/package/mime.md) ^3.0.0
- [chalk](https://npm.io/package/chalk.md) ^2.3.0
- [debug](https://npm.io/package/debug.md) ^4.3.2
- [is-ci](https://npm.io/package/is-ci.md) ^3.0.1
- [pngjs](https://npm.io/package/pngjs.md) ^6.0.0
- [bowser](https://npm.io/package/bowser.md) ^2.11.0
- [dedent](https://npm.io/package/dedent.md) ^0.7.0
- [lodash](https://npm.io/package/lodash.md) ^4.17.21
- [moment](https://npm.io/package/moment.md) ^2.29.1
- [nanoid](https://npm.io/package/nanoid.md) ^1.0.1
- [parse5](https://npm.io/package/parse5.md) ^6.0.1
- [semver](https://npm.io/package/semver.md) ^7.3.5
- [mime-db](https://npm.io/package/mime-db.md) ^1.51.0
- [unquote](https://npm.io/package/unquote.md) ^1.1.1
- [webpack](https://npm.io/package/webpack.md) ^5.69.1
- [callsite](https://npm.io/package/callsite.md) ^1.0.0
- [emittery](https://npm.io/package/emittery.md) ^0.10.0
- [make-dir](https://npm.io/package/make-dir.md) ^3.1.0
- [testcafe](https://npm.io/package/testcafe.md) ^1.18.1
- [commander](https://npm.io/package/commander.md) ^8.3.0
- [gulp-data](https://npm.io/package/gulp-data.md) ^1.3.1
- [gulp-step](https://npm.io/package/gulp-step.md) ^1.1.0
- [is-docker](https://npm.io/package/is-docker.md) ^2.0.0
- [strip-bom](https://npm.io/package/strip-bom.md) ^2.0.0
- [tree-kill](https://npm.io/package/tree-kill.md) ^1.2.2
- [@types/tmp](https://npm.io/package/@types/tmp.md) ^0.2.2
- [gulp-clone](https://npm.io/package/gulp-clone.md) ^2.0.1
- [hammerhead](https://npm.io/package/hammerhead.md) ^1.1.5
- [replicator](https://npm.io/package/replicator.md) ^1.0.5
- [@babel/core](https://npm.io/package/@babel/core.md) ^7.15.5
- [@types/chai](https://npm.io/package/@types/chai.md) ^4.2.22
- [@types/diff](https://npm.io/package/@types/diff.md) ^5.0.1
- [graceful-fs](https://npm.io/package/graceful-fs.md) ^4.2.8
- [gulp-rename](https://npm.io/package/gulp-rename.md) ^2.0.0
- [gulp-uglify](https://npm.io/package/gulp-uglify.md) ^3.0.2
- [import-lazy](https://npm.io/package/import-lazy.md) ^4.0.0
- [resolve-cwd](https://npm.io/package/resolve-cwd.md) ^3.0.0
- [@types/chalk](https://npm.io/package/@types/chalk.md) ^2.2.0
- [@types/debug](https://npm.io/package/@types/debug.md) ^4.1.7
- [@types/pngjs](https://npm.io/package/@types/pngjs.md) ^6.0.1
- [babel-loader](https://npm.io/package/babel-loader.md) ^8.2.3
- [coffeescript](https://npm.io/package/coffeescript.md) ^2.6.1
- [device-specs](https://npm.io/package/device-specs.md) ^1.0.0
- [gulp-ll-next](https://npm.io/package/gulp-ll-next.md) ^2.1.0
- [merge-stream](https://npm.io/package/merge-stream.md) ^2.0.0
- [@types/dedent](https://npm.io/package/@types/dedent.md) ^0.7.0
- [@types/lodash](https://npm.io/package/@types/lodash.md) ^4.14.177
- [@types/nanoid](https://npm.io/package/@types/nanoid.md) ^2.1.0
- [@types/parse5](https://npm.io/package/@types/parse5.md) ^6.0.2
- [@types/semver](https://npm.io/package/@types/semver.md) ^7.3.9
- [gulp-mustache](https://npm.io/package/gulp-mustache.md) ^5.0.0
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.17.2
- [@types/is-glob](https://npm.io/package/@types/is-glob.md) ^4.0.2
- [@types/mime-db](https://npm.io/package/@types/mime-db.md) ^1.43.1
- [endpoint-utils](https://npm.io/package/endpoint-utils.md) ^1.0.2
- [@types/callsite](https://npm.io/package/@types/callsite.md) ^1.0.31
- [@types/mustache](https://npm.io/package/@types/mustache.md) ^4.1.2
- [async-exit-hook](https://npm.io/package/async-exit-hook.md) ^2.0.1
- [callsite-record](https://npm.io/package/callsite-record.md) ^4.1.3
- [playwright-core](https://npm.io/package/playwright-core.md) ^1.19.1
- [promisify-event](https://npm.io/package/promisify-event.md) ^1.0.0
- [qrcode-terminal](https://npm.io/package/qrcode-terminal.md) ^0.12.0
- [@types/strip-bom](https://npm.io/package/@types/strip-bom.md) ^4.0.1
- [@babel/preset-env](https://npm.io/package/@babel/preset-env.md) ^7.16.5
- [devtools-protocol](https://npm.io/package/devtools-protocol.md) ^0.0.943026
- [humanize-duration](https://npm.io/package/humanize-duration.md) ^3.27.0
- [sanitize-filename](https://npm.io/package/sanitize-filename.md) ^1.6.3
- [@babel/preset-flow](https://npm.io/package/@babel/preset-flow.md) ^7.16.5
- [@types/babel__core](https://npm.io/package/@types/babel__core.md) ^7.1.18
- [@types/graceful-fs](https://npm.io/package/@types/graceful-fs.md) ^4.1.5
- [read-file-relative](https://npm.io/package/read-file-relative.md) ^1.2.0
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.21
- [time-limit-promise](https://npm.io/package/time-limit-promise.md) ^1.0.4
- [@babel/preset-react](https://npm.io/package/@babel/preset-react.md) ^7.16.5
- [@types/coffeescript](https://npm.io/package/@types/coffeescript.md) ^2.5.1
- [testcafe-hammerhead](https://npm.io/package/testcafe-hammerhead.md) ^24.5.14
- [testcafe-legacy-api](https://npm.io/package/testcafe-legacy-api.md) ^5.1.2
- [@rollup/plugin-alias](https://npm.io/package/@rollup/plugin-alias.md) ^3.1.8
- [@rollup/plugin-inject](https://npm.io/package/@rollup/plugin-inject.md) ^4.0.3
- [@types/async-exit-hook](https://npm.io/package/@types/async-exit-hook.md) ^2.0.0
- [playwright-core-cherry](https://npm.io/package/playwright-core-cherry.md) ^1.0.4
- [testcafe-browser-tools](https://npm.io/package/testcafe-browser-tools.md) 2.0.21
- [@rollup/plugin-commonjs](https://npm.io/package/@rollup/plugin-commonjs.md) ^21.0.1
- [chrome-remote-interface](https://npm.io/package/chrome-remote-interface.md) ^0.31.1
- [@types/babel__code-frame](https://npm.io/package/@types/babel__code-frame.md) ^7.0.3
- [eslint-plugin-hammerhead](https://npm.io/package/eslint-plugin-hammerhead.md) 0.4.0
- [@types/source-map-support](https://npm.io/package/@types/source-map-support.md) ^0.5.4
- [rollup-plugin-typescript2](https://npm.io/package/rollup-plugin-typescript2.md) ^0.31.1
- [@rollup/plugin-node-resolve](https://npm.io/package/@rollup/plugin-node-resolve.md) ^13.0.6
- [babel-plugin-module-resolver](https://npm.io/package/babel-plugin-module-resolver.md) ^4.1.0
- [@babel/plugin-transform-for-of](https://npm.io/package/@babel/plugin-transform-for-of.md) ^7.16.5
- [@babel/plugin-transform-runtime](https://npm.io/package/@babel/plugin-transform-runtime.md) ^7.16.5
- [moment-duration-format-commonjs](https://npm.io/package/moment-duration-format-commonjs.md) ^1.0.1
- [@babel/plugin-proposal-decorators](https://npm.io/package/@babel/plugin-proposal-decorators.md) ^7.16.5
- [@types/babel__helper-plugin-utils](https://npm.io/package/@types/babel__helper-plugin-utils.md) ^7.10.0
- [@babel/plugin-transform-typescript](https://npm.io/package/@babel/plugin-transform-typescript.md) ^7.16.8
- [@babel/plugin-syntax-dynamic-import](https://npm.io/package/@babel/plugin-syntax-dynamic-import.md) ^7.8.3
- [@babel/plugin-proposal-private-methods](https://npm.io/package/@babel/plugin-proposal-private-methods.md) ^7.16.5
- [@babel/plugin-proposal-class-properties](https://npm.io/package/@babel/plugin-proposal-class-properties.md) ^7.16.5
- [@babel/plugin-proposal-object-rest-spread](https://npm.io/package/@babel/plugin-proposal-object-rest-spread.md) ^7.16.5
- [@babel/plugin-transform-async-to-generator](https://npm.io/package/@babel/plugin-transform-async-to-generator.md) ^7.16.5
- [babel-plugin-syntax-trailing-function-commas](https://npm.io/package/babel-plugin-syntax-trailing-function-commas.md) ^6.22.0
- [@babel/plugin-transform-exponentiation-operator](https://npm.io/package/@babel/plugin-transform-exponentiation-operator.md) ^7.16.5
- [@babel/plugin-proposal-async-generator-functions](https://npm.io/package/@babel/plugin-proposal-async-generator-functions.md) ^7.16.5

## Recent versions

- 1.1.0 (latest) — 2022-03-01
- 1.0.9 — 2022-02-28
- 1.0.8 — 2022-02-28
- 1.0.7 — 2022-02-25
- 1.0.6 — 2022-02-15
- 1.0.5 — 2022-02-10
- 1.0.4 — 2022-02-09

## README

# cherry-core


<div align=center><img width="150" height="150" src="https://raw.githubusercontent.com/rr13k/cherry/master/strawberry.ico"/></div>

<p align="center">
<a href="https://coding.jd.com/cherry/cherry-core/"><img alt="Tests" src="https://badgen.net/badge/cherry/core/pink?icon=github"></a>
<a href="https://coding.jd.com/cherry/cherry-core/"><img alt="Test Dependencies" src="https://badgen.net/badge/webUi/auto/red?icon=github" /></a>
<a href="https://coding.jd.com/cherry/cherry-core/"><img alt="NPM Version" src="https://badgen.net/github/status/micromatch/micromatch/4.0.1" style="max-width:100%;"></a>
<a href="https://coding.jd.com/cherry/cherry-core/"><img alt="NPM Version" src="https://badgen.net/badge/license/MIT/blue" style="max-width:100%;"></a>
</p>

<div align=center>
    <i>cherry 执行引擎
    </br>js/ts脚本执行输出</i>
</div>
<br/>

## Table of Contents

- [Background](#background)
- [Install](#install)
- [Usage](#usage)
- [主流程](#主流程)
    - [跨平台的系统通知](#跨平台的系统通知)
- [开发规范](#开发规范)
- [问题跟踪](#问题跟踪)
- [贡献](#贡献)
- [徽章](#徽章)
- [执照](#执照)
- [Creators](#Creators)
- [帮助](#帮助)


## Background
  hi, 准备开始UI自动化了吗？

  觉得难吗?

  建议你从这个库开始!
> 用简单的逻辑描述你的工作，剩下的交给我


  
## Install

推荐使用  `yarn`。十分简单。
```shell
yarn add @cherry/cherry-core
```

## Usage

```sh
cherry main.js # default use cherry-drier
cherry -b   # get local browsers
->  usable browsers: [ 'chrome', 'ie', 'firefox', 'edge', 'edge-legacy' ]
cherry chrome  main.js // use other browser
```

## 主流程

- 采用 `cli` 脚本维度进行执行。这样可以以多进程维度同时执行多个测试。
初始启动浏览器，进入待执行界面。
- 等待脚本文件执行， `page.to` 起始挂载 运行的首个测试地址。整个脚本内容为单个 `case/flow`
- 同样采用合并脚本的形式执行串联任务。
- 运行时需提供当前执行状态，是以并合执行还是普通单文件。以使用户单文件情况下也可正常调试。
- 日志逻辑相同。


> 起始命令用 `page.create` 新窗口不影响老的用例，但依旧可以继承老数据。 

### 跨平台的系统通知
> node-notifier  https://github.com/mikaelbr/node-notifier

## 开发规范

1. 复杂函数必须采用中文注释，不建议使用函数同名中文注释，注释仅表达坑点，而非实现。
2. 字符串强制使用 ' 单引号，禁止非必要的;符号。
3. 引用对象必须给明，强制类型，禁止传递any等不明确内容。
4. 新功能必须添加单元测试，上线前单元测试必须通过。
5. 禁止在非必要的时候写大函数，避免代码臃肿，单一使用的地方禁止封装函数(除非它可能被调用)。

## 问题跟踪

使用我们的 `Coding Issues` 页面 [报告错误](https://coding.jd.com/cherry/cherry-core/issues/new) 并 [提出改进建议](https://coding.jd.com/cherry/cherry-core/issues/new)

## 贡献

阅读我们的[贡献指南](https://coding.jd.com/cherry/cherry-core/blob/master/CONTRIBUTING.md) ，了解如何为项目做出贡献。

## 徽章

向大家展示您正在使用 `CherryCore`: ![Tested with CherryCore](https://img.shields.io/badge/tested%20with-CherryCore-2fa4cf.svg)

要显示此徽章，请将以下代码添加到您的存储库自述文件中：

```html
<a href="https://coding.jd.com/cherry/cherry-core/">
    <img alt="Tested with CherryCore" src="https://img.shields.io/badge/tested%20with-CherryCore-2fa4cf.svg">
</a>
```

## 执照

>Code released under the [MIT license](LICENSE).

## Creators

> 京东集团-京东零售-商业提升事业部-广告架构部-技术效能部

## 帮助

> zhouyuan11@jd.com

---
_Source: https://npm.io/package/@cherry-next/cherry-core · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
