2016-08-03 119 views
2

任何想法如何在VSTS内运行Karma单元测试?他们必须与Visual Studio Test Runner集成吗?还是有更好的方法?Visual Studio Team Services和Karma

该项目纯粹是客户端的静态SPA网站,因此它没有Visual Studio解决方案或项目。

另外它似乎即使我试图通过NPM运行Karma它似乎像PhantomJS拒绝在代理上启动。从Build

日志:

2016-08-03T02:45:44.9647601Z webpack: bundle is now VALID. 
2016-08-03T02:45:44.9717626Z [32m03 08 2016 02:45:44.968:INFO [karma]: [39mKarma v0.13.22 server started at http://localhost:9876/ 
2016-08-03T02:45:44.9767811Z [32m03 08 2016 02:45:44.976:INFO [launcher]: [39mStarting browser PhantomJS 
2016-08-03T02:46:44.9784272Z [33m03 08 2016 02:46:44.977:WARN [launcher]: [39mPhantomJS have not captured in 60000 ms, killing. 
2016-08-03T02:46:46.9783856Z [33m03 08 2016 02:46:46.977:WARN [launcher]: [39mPhantomJS was not killed in 2000 ms, sending SIGKILL. 
2016-08-03T02:46:48.9792421Z [33m03 08 2016 02:46:48.978:WARN [launcher]: [39mPhantomJS was not killed by SIGKILL in 2000 ms, continuing. 
2016-08-03T02:46:49.1602394Z npm ERR! Test failed. See above for more details. 
2016-08-03T02:46:49.1722407Z ##[debug]rc:1 
2016-08-03T02:46:49.1722407Z ##[debug]success:false 
2016-08-03T02:46:49.1722407Z ##[debug]taskRunner fail 
2016-08-03T02:46:49.1732408Z ##[debug]task result: Failed 
2016-08-03T02:46:49.1782402Z ##[error]Npm failed with error: C:\Program Files\nodejs\npm.cmd failed with return code: 1 
2016-08-03T02:46:49.1962405Z Finishing task: Npm 
2016-08-03T02:46:49.2032405Z ##[error]System.Exception: Task Npm failed. This caused the job to fail. Look at the logs for the task for more details. 
2016-08-03T02:46:49.2042402Z ##[error] at Microsoft.TeamFoundation.DistributedTask.Worker.JobRunner.Run(IJobContext jobContext, IJobRequest job, IJobExtension jobExtension, CancellationTokenSource tokenSource) 

回答

0

我不知道什么是你的步骤配置,但它的作品在我的生成定义完美的罚款。

enter image description here

检查也是您的经纪人的能力,应该具有的Node.js和NPM能力。

相关问题