Github地址:https://github.com/alibaba/uirecorder/blob/master/README_zh-cn.md
UIRecorder使用手册:https://www.yuque.com/artist/uirecorder/zslbnp
支持 android ios 和pc端的自动化脚本录制。无线native app(Android, iOS)录制是,是基于macaca实现的:https://macacajs.com
UIRecorder录制功能基于macaca实现(包含:jwebdriver、selenium-standalone等),录制生成测试脚本 ——> mocha运行测试用例。mocha-parallel-tests可以并行执行用例插件,这里还会使用chai作为断言库 ——> 然后使用macaca-reporter生成对应的测试报告。
相关插件地址:
macaca:https://macacajs.com
Mocha和chai使用:https://blog.csdn.net/m0_60027772/article/details/125738692
macaca-reporter:https://github.com/macacajs/macaca-reporter
Macaca Reporter官网:https://macacajs.github.io/macaca-reporter/
selenium-standalone:https://github.com/webdriverio/selenium-standalone
1、node环境:这里安装的时候和初始化的时候报错使用了两个版本,所以这里使用nvm来管理node环境,方便版本切换。参考安装https://blog.csdn.net/Charissa2017/article/details/104497572
2、JDK 1.8(其他版本也不太好使)
3、Android SDK:参考:https://blog.csdn.net/weixin_43665351/article/details/128780368
4、gradle:按依赖时有可能加载不上,使用brew install gradle
安装。有可能还是失败,查看安装https://blog.csdn.net/weixin_43665351/article/details/128780936
5、安装 chrome :https://www.google.com/chrome/
安装UIRecorder
这里使用的node版本是v17.9.1
npm install uirecorder mocha -g
创建新文件夹
uirecorder init # 这里使用node版本v14.20.0,缺的各种依赖一一补上,macaca-reporter安装不上,就全局安装-g
uirecorder sample/test.spec.js
./reports/index.html
./reports/index.xml (JUnit)
./reports/index.json
./截图/
安装Macaca:[https://macacajs.github.io/zh/guide/environment-setup.html#%E5%AE%89%E8%A3%85-node-js](https://macacajs.github.io/zh/guide/environment-setup.html#%E5%AE%89%E8%A3%85-node-js)
连接你的手机或模拟器:[https://macacajs.github.io/app-inspector/zh/guide/install.html#%E7%8E%AF%E5%A2%83%E9%9C%80%E8%A6%81](https://macacajs.github.io/app-inspector/zh/guide/install.html#%E7%8E%AF%E5%A2%83%E9%9C%80%E8%A6%81)
macaca server --port 4444
创建新文件夹
uirecorder init --mobile # 这里使用node版本v14.20.0,缺的各种依赖一一补上,macaca-reporter安装不上,就全局安装-g
uirecorder --mobile sample/test.spec.js
apk测试包下载:https://www.wandoujia.com/apps/32223
./reports/index.html
./reports/index.xml (JUnit)
./reports/index.json
./截图/
报错和处理记录:
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % uirecorder --mobile sample/test.spec.js
__ ______ ____ __
/ / / / _/ / __ \___ _________ _________/ /__ _____
/ / / // / / /_/ / _ \/ ___/ __ \/ ___/ __ / _ \/ ___/
/ /_/ // / / _, _/ __/ /__/ /_/ / / / /_/ / __/ /
\____/___/ /_/ |_|\___/\___/\____/_/ \__,_/\___/_/ v3.5.3
Official Site: http://uirecorder.com
------------------------------------------------------------------
? 测试脚本文件名: sample/test.spec.js
? App路径 (扩展名: apk, app, zip): /Users/sunxinyang/Desktop/android/wandoujia.apk
录制服务器监听在端口: 63311
录制浏览器已开启
tap: 同意 ( //*[@resource-id="com.wandoujia.phoenix2:id/mk"] )
✓ 执行成功
tap: 暂不开启 ( //*[@resource-id="com.wandoujia.phoenix2:id/b8e"] )
✓ 执行成功
tap: //*[@resource-id="com.wandoujia.phoenix2:id/awa"]
✓ 执行成功
------------------------------------------------------------------
共录制3个步骤
录制脚本已保存: sample/test.spec.js
录制服务器已关闭
录制浏览器已关闭
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
"macaca-reporter" reporter not found
/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mocha/lib/mocha.js:193
throw new Error('invalid reporter "' + reporter + '"');
^
Error: invalid reporter "macaca-reporter"
at Mocha.reporter (/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mocha/lib/mocha.js:193:13)
at Object.<anonymous> (/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mocha/bin/_mocha:368:7)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] singletest: `mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] singletest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_17_21_461Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js --reporter macaca-reporter --reporter-options reportJSONFilename=customReportJSONFilename
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
"macaca-reporter" reporter not found
/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mocha/lib/mocha.js:193
throw new Error('invalid reporter "' + reporter + '"');
^
Error: invalid reporter "macaca-reporter"
at Mocha.reporter (/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mocha/lib/mocha.js:193:13)
at Object.<anonymous> (/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mocha/bin/_mocha:368:7)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:75:12)
at internal/main/run_main_module.js:17:47
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] singletest: `mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] singletest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_18_44_248Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % npm i macaca-reporter --save
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN tar zlib: incorrect data check
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for sax@=0.4.2 (sha512-6Zsl4gnHjiTQfrOzsWdc0bHJepF5KJAVuM5fcyEJrqGyszkx2c55IclWP4D692rJrl1w0tExhbvYKjKNZl5wHg==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for handlebars@^4.0.1 (sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for handlebars@^4.0.1 (sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==) seems to be corrupted. Trying one more time.
npm WARN [email protected] No repository field.
npm WARN [email protected] scripts['server'] should probably be scripts['start'].
npm WARN [email protected] No license field.
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@form-data/node_modules/asynckit
npm ERR! dest /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@form-data/node_modules/asynckit
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, rename '/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@form-data/node_modules/asynckit' -> '/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@form-data/node_modules/asynckit'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_20_04_159Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % node -v
v14.20.0
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % npm i -g macaca-reporter
npm WARN deprecated [email protected]: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated [email protected]: This module is no longer maintained, try this instead:
npm WARN deprecated npm i nyc
npm WARN deprecated Visit https://istanbul.js.org/integrations for other alternatives.
npm WARN tar zlib: incorrect data check
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for sax@=0.4.2 (sha512-6Zsl4gnHjiTQfrOzsWdc0bHJepF5KJAVuM5fcyEJrqGyszkx2c55IclWP4D692rJrl1w0tExhbvYKjKNZl5wHg==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball cached data for handlebars@^4.0.1 (sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==) seems to be corrupted. Refreshing cache.
npm WARN tar zlib: incorrect data check
npm WARN tarball tarball data for handlebars@^4.0.1 (sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==) seems to be corrupted. Trying one more time.
/Users/sunxinyang/.nvm/versions/node/v14.20.0/bin/macaca-reporter -> /Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/macaca-reporter/bin/macaca-reporter.js
/Users/sunxinyang/.nvm/versions/node/v14.20.0/bin/macaca-reporter-merge -> /Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/macaca-reporter/bin/merge-reporter.js
+ [email protected]
added 15 packages from 4 contributors, removed 621 packages and updated 123 packages in 7.763s
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
(node:87027) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:87027) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
Error: Cannot find module 'chai'
Require stack:
- /Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js:4:14)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async formattedImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async Object.exports.requireOrImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async Object.exports.loadFilesAsync (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async Object.exports.handler (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run.js:370:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] singletest: `mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] singletest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_24_18_041Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % npm i chai
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@ansi-styles/node_modules/color-convert
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@asn1/node_modules/safer-buffer
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@bcrypt-pbkdf/node_modules/tweetnacl
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@bl/node_modules/inherits
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@boom/node_modules/hoek
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@brace-expansion/node_modules/balanced-match
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@brace-expansion/node_modules/concat-map
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@chalk/node_modules/ansi-styles
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@chalk/node_modules/escape-string-regexp
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@chalk/node_modules/has-ansi
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@chalk/node_modules/strip-ansi
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@chalk/node_modules/supports-color
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@cliui/node_modules/wrap-ansi
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@combined-stream/node_modules/delayed-stream
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@cross-spawn/node_modules/lru-cache
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@cross-spawn/node_modules/which
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@dashdash/node_modules/assert-plus
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@debug/node_modules/ms
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@debug/node_modules/ms
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@debug/node_modules/ms
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@ecc-jsbn/node_modules/jsbn
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@ecc-jsbn/node_modules/safer-buffer
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@end-of-stream/node_modules/once
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@find-up/node_modules/locate-path
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@generate-function/node_modules/is-property
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@generate-object-property/node_modules/is-property
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@getpass/node_modules/assert-plus
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@glob/node_modules/inflight
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@glob/node_modules/minimatch
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@glob/node_modules/once
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@glob/node_modules/path-is-absolute
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@glob/node_modules/fs.realpath
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@gm/node_modules/array-parallel
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@gm/node_modules/array-series
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@har-validator/node_modules/commander
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@har-validator/node_modules/is-my-json-valid
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@har-validator/node_modules/pinkie-promise
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@hawk/node_modules/hoek
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@hawk/node_modules/sntp
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@http-signature/node_modules/assert-plus
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@http-signature/node_modules/jsprim
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@http-signature/node_modules/sshpk
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@jszip/node_modules/pako
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mime-types/node_modules/mime-db
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@mkdirp/node_modules/minimist
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@p-limit/node_modules/p-try
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@string-width/node_modules/emoji-regex
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@string-width/node_modules/is-fullwidth-code-point
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@strip-ansi/node_modules/ansi-regex
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/jquery
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/jwebdriver
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/macaca-mocha-parallel-tests
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/mocha
npm WARN checkPermissions Missing write access to /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/chai
npm WARN [email protected] No repository field.
npm WARN [email protected] scripts['server'] should probably be scripts['start'].
npm WARN [email protected] No license field.
npm ERR! code ENOENT
npm ERR! syscall access
npm ERR! path /Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@ansi-styles/node_modules/color-convert
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, access '/Users/sunxinyang/Desktop/uirecorder_mobile/node_modules/[email protected]@ansi-styles/node_modules/color-convert'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_24_39_243Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % npm i -g chai
+ [email protected]
added 8 packages from 20 contributors in 0.79s
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
(node:87037) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:87037) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
Error: Cannot find module 'chai'
Require stack:
- /Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js:4:14)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async formattedImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async Object.exports.requireOrImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async Object.exports.loadFilesAsync (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async Object.exports.handler (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run.js:370:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] singletest: `mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] singletest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_25_01_855Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % cnpm i chai
✔ Installed 1 packages
✔ Linked 8 latest versions
✔ Run 0 scripts
✔ All packages installed (8 packages installed from npm registry, used 398ms(network 395ms), speed 0B/s, json 0(0B), tarball 0B, manifests cache hit 8, etag hit 8 / miss 0)
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
(node:87072) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:87072) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
Error: Cannot find module 'jwebdriver'
Require stack:
- /Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js:6:20)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async formattedImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async Object.exports.requireOrImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async Object.exports.loadFilesAsync (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async Object.exports.handler (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run.js:370:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] singletest: `mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] singletest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_25_50_683Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % cnpm i jwebdriver
✔ Installed 1 packages
✔ Linked 78 latest versions
✔ Run 0 scripts
deprecate [email protected] › [email protected] request has been deprecated, see https://github.com/request/request/issues/3142
deprecate [email protected] › [email protected] › har-validator@~2.0.6 this library is no longer supported
deprecate [email protected] › [email protected] › hawk@~3.1.3 This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
deprecate [email protected] › [email protected] › uuid@^3.0.0 Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
deprecate [email protected] › [email protected] › [email protected] › [email protected] This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
deprecate [email protected] › [email protected] › [email protected] › [email protected] This module moved to @hapi/sntp. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
deprecate [email protected] › [email protected] › [email protected] › [email protected] This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
deprecate [email protected] › [email protected] › [email protected] › [email protected] This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
✔ All packages installed (81 packages installed from npm registry, used 992ms(network 966ms), speed 0B/s, json 0(0B), tarball 0B, manifests cache hit 78, etag hit 78 / miss 0)
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
(node:87099) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:87099) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
Error: Cannot find module 'resemblejs-node'
Require stack:
- /Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:902:15)
at Function.Module._load (internal/modules/cjs/loader.js:746:27)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object.<anonymous> (/Users/sunxinyang/Desktop/uirecorder_mobile/sample/test.spec.js:8:18)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at ModuleWrap.<anonymous> (internal/modules/esm/translators.js:199:29)
at ModuleJob.run (internal/modules/esm/module_job.js:183:25)
at async Loader.import (internal/modules/esm/loader.js:178:24)
at async formattedImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:9:14)
at async Object.exports.requireOrImport (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:42:28)
at async Object.exports.loadFilesAsync (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/nodejs/esm-utils.js:100:20)
at async singleRun (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run-helpers.js:125:3)
at async Object.exports.handler (/Users/sunxinyang/.nvm/versions/node/v14.20.0/lib/node_modules/mocha/lib/cli/run.js:370:5)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] singletest: `mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] singletest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_26_07_077Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % cnpm i resemblejs-node
⠹ [0/1] Installing [email protected][[email protected]] download Error: incorrect data check ([email protected]) (/Users/sunxinyang/.npminstall_tarball/j/p/e/g/jpeg-js/0.2.0-53e448ec9d263e683266467e9442d2c5a2ef5482.tgz), fail count: 1
⠸ [0/1] Installing [email protected][[email protected]] format ungzip error, try to use tar format
✔ Installed 1 packages
✔ Linked 3 latest versions
✔ Run 0 scripts
✔ All packages installed (3 packages installed from npm registry, used 2s(network 2s), speed 1.86MB/s, json 0(0B), tarball 3.56MB, manifests cache hit 3, etag hit 3 / miss 0)
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
(node:87148) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:87148) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
0 passing (0ms)
>> html reporter generated: /Users/sunxinyang/Desktop/uirecorder_mobile/reports/index.html
>> json reporter generated: /Users/sunxinyang/Desktop/uirecorder_mobile/reports/index.json
>> reporter config generated: /Users/sunxinyang/Desktop/uirecorder_mobile/reports/config.json
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh
> [email protected] paralleltest /Users/sunxinyang/Desktop/uirecorder_mobile
> macaca-mocha-parallel-tests "!(node_modules)/**/*.spec.js" --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --max-parallel 5 --bail
sh: macaca-mocha-parallel-tests: command not found
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! [email protected] paralleltest: `macaca-mocha-parallel-tests "!(node_modules)/**/*.spec.js" --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --max-parallel 5 --bail`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] paralleltest script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/sunxinyang/.npm/_logs/2023-01-29T07_51_20_486Z-debug.log
sunxinyang@B-VD1SQ05P-2356 uirecorder_mobile % source run.sh sample/test.spec.js
> [email protected] singletest /Users/sunxinyang/Desktop/uirecorder_mobile
> mocha --reporter macaca-reporter --reporter-options reportJSONFilename=index,processAlwaysExitWithZero=true --bail "sample/test.spec.js"
(node:87522) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:87522) Warning: Accessing non-existent property 'VERSION' of module exports inside circular dependency
0 passing (1ms)
>> html reporter generated: /Users/sunxinyang/Desktop/uirecorder_mobile/reports/index.html
>> json reporter generated: /Users/sunxinyang/Desktop/uirecorder_mobile/reports/index.json
>> reporter config generated: /Users/sunxinyang/Desktop/uirecorder_mobile/reports/config.json