teamcity - 如何将 Karma 与TeamCity集成

  显示原文与译文双语对照的内容
0 0

我能够通过Karma Teamcity,因为你可以用任何可访问通过命令行中运行测试。 但是,Teamcity只报告了大体上pass/fail不报告任何失败的测试的详细信息。 如果失败的话,我就能" 进程已退出,返回代码1 " 。

在karma首页上说这里有一个,但 Teamcity集成teamcity链接还说" 不可用" 。

似乎存在一个git项目与 npm安装包 。 但是,npm install失败,对我没有多大的消息。

> npm http GET https://registry.npmjs.org/karma-teamcity-reporter npm
> http 304 https://registry.npmjs.org/karma-teamcity-reporter npm http
> GET https://registry.npmjs.org/karma npm http 304
> https://registry.npmjs.org/karma npm WARN `git config --get
> remote.origin.url` returned wrong result
> (git://github.com/vojtajina/node-di.git) undefined npm WARN `git
> config --get remote.origin.url` returned wrong result
> (git://github.com/vojtajina/node-di.git) undefined npm http GET
> https://registry.npmjs.org/chokidar npm http GET
> https://registry.npmjs.org/socket.io npm http GET
> https://registry.npmjs.org/http-proxy npm http GET
> https://registry.npmjs.org/glob npm http GET
> https://registry.npmjs.org/optimist npm http GET
> https://registry.npmjs.org/coffee-script npm http GET
> https://registry.npmjs.org/colors/0.6.0-1 npm http GET
> https://registry.npmjs.org/minimatch npm http GET
> https://registry.npmjs.org/pause/0.0.1 npm http GET
> https://registry.npmjs.org/mime npm ERR! git clone
> git://github.com/vojtajina/node-di.git undefined npm ERR! git clone
> git://github.com/vojtajina/node-di.git undefined npm http GET
> https://registry.npmjs.org/q npm http GET
> https://registry.npmjs.org/lodash npm http GET
> https://registry.npmjs.org/log4js npm http GET
> https://registry.npmjs.org/rimraf npm ERR! Error: spawn ENOENT npm
> ERR!     at errnoException (child_process.js:975:11) npm ERR!     at
> Process.ChildProcess._handle.onexit (child_process.js:766:34) npm ERR!
> If you need help, you may report this log at: npm ERR!    
> <http://github.com/isaacs/npm/issues> npm ERR! or email it to: npm
> ERR!     <npm-@googlegroups.com>
> 
> npm ERR! System Windows_NT 6.1.7601 npm ERR! command "C:Program
> Filesnodejs\node.exe" "C:Program
> Filesnodejsnode_modulesnpmbinnpm-cli.js" "install"
> "karma-teamcity-reporter" npm ERR! cwd C:Userssteve npm ERR! node -v
> v0.10.5 npm ERR! npm -v 1.2.18 npm ERR! syscall spawn npm ERR! code
> ENOENT npm ERR! errno ENOENT npm http 304
> https://registry.npmjs.org/chokidar npm http 304
> https://registry.npmjs.org/optimist npm http 304
> https://registry.npmjs.org/socket.io npm http 304
> https://registry.npmjs.org/glob npm http 304
> https://registry.npmjs.org/http-proxy npm http 304
> https://registry.npmjs.org/coffee-script npm http 304
> https://registry.npmjs.org/colors/0.6.0-1 npm http 304
> https://registry.npmjs.org/minimatch npm http 304
> https://registry.npmjs.org/mime npm http 304
> https://registry.npmjs.org/pause/0.0.1 npm http 304
> https://registry.npmjs.org/q npm http 304
> https://registry.npmjs.org/lodash npm http 304
> https://registry.npmjs.org/log4js npm http 304
> https://registry.npmjs.org/rimraf npm ERR!  npm ERR! Additional
> logging details can be found in: npm ERR!    
> C:Usersstevenpm-debug.log npm ERR! not ok code 0

我是新到npm 。 也许我做错了,npm 。 但是,即使npm安装works,然后该怎么办? 我还能期待下Teamcity运行karma的包括特殊Teamcity日志消息?

有没有人知道,它能将Karma到Teamcity怎么样?

时间:原作者:1个回答

0 0

使用稳定的karma,它包含Teamcity记者。

npm install -g karma

然后使用Teamcity记者,它将生成Teamcity输出在stdout上。

karma start --reporters teamcity --single-run
原作者:
...