Macaca 成为 Macaca 项目贡献者

xdf · 2017年05月20日 · 最后由 yangyang506 回复于 2018年02月26日 · 603 次阅读
本帖已被设为精华帖!

如题,欢迎成为 Macaca 贡献者。原文:https://macacajs.com/zh/contributing

在 Macaca 开放一年之际,正式开放贡献计划,欢迎国内热情的工程师加入。
目前 Macaca 有大量的国内外用户和贡献者,而且仍将继续长期保持技术开放的形态,将技术share带给足下的国内社区。
一年前的开放计划:https://testerhome.com/topics/5001


向 Macaca 项目的贡献者们致敬!


前言

本篇文档写给正即将成为 contributor 的你。Macaca 起源于国内,长期保持技术开放的形态。整套方案涉及的语言栈很多,仅用户端就有 Java, Node.js, Python 等语言栈,工具层面也包括 C++, shell 等。开发平台涉及 Docker, iOS, Android, Chromium, x11 等多个开发平台,横跨 软件测试计算机视觉Node.js工具链WEB及客户端技术 等多领域。

无论擅长哪一个技术领域,哪一种语言,都可以尝试加入 Macaca,贡献形式不限。

贡献 Issue

在新创建 issue 和在已有 issue 下评论,请尽量描述所遇到的问题和表达的意思,尽量避免反复确认信息,请在 FAQ 先确认问题是否已知。

贡献文档

如有文档遗漏或错误,欢迎补充,形式不限。

贡献代码

第一步:Fork

选择需要修改的仓库,Fork 到自己本地,如。

$ git clone git@github.com:macacajs/macaca-ios.git
$ cd macaca-ios
$ git remote add upstream git://github.com/macacajs/macaca-ios.git

第二步:创建分支

请根据修改级别创建分支名如:features-xxxbugfix-xxx

$ git checkout -b features-xxx -t origin/master

第三步:提交

确认你的用户名和邮箱正确:

$ git config --global user.name "awesome"
$ git config --global user.email "awesome@macacajs.com"

第四步:发起 PR

github/macacajs 下的原仓库发起 pull request(PR),通过前提为当前仓库 CI 通过,github/macaca-sample 下的 sample 回归通过。

如何调试

Macaca 是很多模块是集成在一起才能运行的,环境较单一功能的开源库要复杂很多。请参考具体核心模块仓库下的 CONTRIBUTING.md 了解如何调试,比如 UIAutomatorWD/CONTRIBUTING.md

贡献者公示

贡献者将会自动公示在项目主页,遵循 git-contributor 规则,如:

加入 Github 开源组

在任意模块有意义 PR 3次以上,或解决重要问题的提交者,在征得提交者同意的情况下会邀请加入 Macaca Open Source Team

共收到 6 条回复 时间 点赞
xdf [公告] Macaca 技术开放计划 中提及了此贴 05月20日 16:27
xdf Macaca2.0 升级公告 中提及了此贴 05月20日 23:51
seveniruby 将本帖设为了精华贴 05月21日 00:37

支持达峰!

xdf Macaca App Inspector 2.0 发布 中提及了此贴 05月24日 17:40

新安装的app-inspector 2.0.5版本后,xctestwd@1.0.37的工程在xcode8.3.2版本中构建到iphone6时,一直在running xctestwd on iphone 6,
处于debug状态,
不能构建完成后退出,重装多次也没有解决,team id,bundleid都设置过,编译不报错,求大神帮看下

xdf #8 · 2017年06月17日 作者

一直running是正常的啊

xdf 回复

上个版本安装时不是这样子
running正常时,要stop吗?还是需要一直运行XCode?

编辑/usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj后
运行app-inspector -u XXX,浏览器Internal Server Error

xctest-client.js:173:14 [master] pid:6522 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:172:14 [master] pid:6522 2017-06-19 09:04:03.404 xcodebuild[6530:170827] Error Domain=IDETestOperationsObserverErrorDomain Code=4 "Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/dlxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/031599E3-CC60-4261-92FE-8EC29A3EFD65/Session-XCTestWDUITests-2017-06-19_090359-xx5jjv.log" UserInfo={NSLocalizedDescription=Test operation was canceled. If you believe this error represents a bug, please attach the log file at /Users/dlxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Logs/Test/031599E3-CC60-4261-92FE-8EC29A3EFD65/Session-XCTestWDUITests-2017-06-19_090359-xx5jjv.log}

xctest-client.js:173:14 [master] pid:6522 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:172:14 [master] pid:6522
Testing failed:

xctest-client.js:173:14 [master] pid:6522 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:172:14 [master] pid:6522 Command /bin/sh failed with exit code 162
** TEST FAILED **

The following build commands failed:
PhaseScriptExecution Run\ Script /Users/dlxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Build/Intermediates/XCTestWD.build/Debug-iphoneos/XCTestWDUITests.build/Script-7F90C8321EF231B2003F2DA0.sh
(1 failure)

xctest-client.js:173:14 [master] pid:6522 please check project: /usr/local/lib/node_modules/app-inspector/node_modules/xctestwd/XCTestWD/XCTestWD.xcodeproj
xctest-client.js:255:14 [master] pid:6522 killing deviceLogProc pid: 6527
xctest-client.js:260:14 [master] pid:6522 killing runnerProc pid: 6530
xctest-client.js:266:14 [master] pid:6522 killing iproxyProc pid: 6529
xctest-client.js:183:14 [master] pid:6522 xctest client exit with code: 65, signal: null
xctest-client.js:211:14 [master] pid:6522 iproxy exit with code: null, signal: SIGKILL
xctest-client.js:145:16 [master] pid:6522 devicelog exit with code: null, signal: SIGKILL
xctest-client.js:247:14 [master] pid:6522 Fail to start xctest: undefined
undefined
iOS device started: cbf57ea4f5a49ff38eeda6c52df395e882580b7c
inspector start at: http://192.168.1.108:5678
<-- GET /
helper.js:94:16 [master] pid:6522 xctest client proxy error with: Error: connect ECONNREFUSED 127.0.0.1:8001

Error: connect ECONNREFUSED 127.0.0.1:8001
at Object.exports._errnoException (util.js:1018:11)
at exports._exceptionWithHostPort (util.js:1041:20)
at TCPConnectWrap.afterConnect as oncomplete

dlxxdeMacBook-Pro:~ dlxx$ /Users/dlxx/Library/Developer/Xcode/DerivedData/XCTestWD-evljajykmolwzobrozpobiggeeea/Build/Intermediates/XCTestWD.build/Debug-iphoneos/XCTestWDUITests.build/Script-7F90C8321EF231B2003F2DA0.sh
No devices are booted.

xdf macaca 的一些问题请教 中提及了此贴 08月12日 16:06

server.js:16:12 [master] pid:1184 server start with config:
{ port: 5678,
verbose: true,
udid: '9963d01d',
ip: '192.168.179.1',
host: 'DESKTOP-IC7GM4G',
loaded_time: '2018-02-26 17:22:18' }
app-inspector.js:43:12 [master] pid:1184 server start at: http://192.168.179.1:5678
uiautomator-client.js:62:14 [master] pid:1184 INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
com.macaca.android.testing.UIAutomatorWD:
INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: test=MacacaTestRunner
INSTRUMENTATION_STATUS: class=com.macaca.android.testing.UIAutomatorWD
INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS_CODE: 1

uiautomator-client.js:62:14 [master] pid:1184 INSTRUMENTATION_STATUS: stream=
UIAutomatorWD->http://localhost:9001<-UIAutomatorWD
INSTRUMENTATION_STATUS_CODE: 0

UIAutomatorWD http server ready
Android device started: 9963d01d
inspector start at: http://192.168.179.1:5678
uiautomator-client.js:62:14 [master] pid:1184 INSTRUMENTATION_STATUS: numtests=1
INSTRUMENTATION_STATUS: stream=
Error in MacacaTestRunner(com.macaca.android.testing.UIAutomatorWD):
com.alibaba.fastjson.JSONException: syntax error, expect [, actual undefined, pos 0
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1103)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1090)
at com.alibaba.fastjson.JSON.parseArray(JSON.java:487)
at com.macaca.android.testing.UIAutomatorWD.MacacaTestRunner(UIAutomatorWD.java:34)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1886)

INSTRUMENTATION_STATUS: id=AndroidJUnitRunner
INSTRUMENTATION_STATUS: test=MacacaTestRunner
INSTRUMENTATION_STATUS: class=com.macaca.android.testing.UIAutomatorWD
INSTRUMENTATION_STATUS: stack=com.alibaba.fastjson.JSONException: syntax error, expect [, actual undefined, pos 0
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1103)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1090)
at com.alibaba.fastjson.JSON.parseArray(JSON.java:487)
at com.macaca.android.testing.UIAutomatorWD.MacacaTestRunner(UIAutomatorWD.java:34)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1886)

INSTRUMENTATION_STATUS: current=1
INSTRUMENTATION_STATUS_CODE: -2
INSTRUMENTATION_RESULT: stream=

Time: 0.067
There was 1 failure:
1) MacacaTestRunner(com.macaca.android.testing.UIAutomatorWD)
com.alibaba.fastjson.JSONException: syntax error, expect [, actual undefined, pos 0
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1103)
at com.alibaba.fastjson.parser.DefaultJSONParser.parseArray(DefaultJSONParser.java:1090)
at com.alibaba.fastjson.JSON.parseArray(JSON.java:487)
at com.macaca.android.testing.UIAutomatorWD.MacacaTestRunner(UIAutomatorWD.java:34)
at java.lang.reflect.Method.invoke(Native Method)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:27)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
at android.support.test.internal.runner.TestExecutor.execute(TestExecutor.java:59)
at android.support.test.runner.AndroidJUnitRunner.onStart(AndroidJUnitRunner.java:262)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1886)

FAILURES!!!
Tests run: 1, Failures: 1

INSTRUMENTATION_CODE: -1

xdf [macaca 环境篇] 初尝 macaca 意犹未尽 中提及了此贴 03月26日 15:13
xdf 基于 macaca 的遍历 NoSmoke 中提及了此贴 03月26日 15:13
xdf Macaca 试用总结 中提及了此贴 03月26日 15:13
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册