Jenkins + Jasmin API测试

时间:2018-11-07 20:00:10

标签: node.js jenkins jasmine continuous-integration karma-runner

我正在尝试设置Jenkins来运行我的Jasmin API测试。     遵循以下建议:https://julienprog.wordpress.com/2016/10/12/automate-unit-testing-of-javascripts-with-karma-runner/

但是当我选择运行此ssh命令时(我使用“执行Windows批处理命令”)

npm install karma-jasmine --save-dev
npm install jasmine-core --save-dev
npm install karma-phantomjs-launcher --save-dev
npm install karma-junit-reporter --save-dev
npm install karma-jasmine-html-reporter --save-dev
npm install karma-html-reporter --save-dev
cp \Users\WALL\JasmineTests\test\karma.conf.js .
karma start \Users\WALL\JasmineTests\test\karma.conf.js
echo "STARTING TESTS"

,它只执行其中的几个。

这是Jenkins的控制台输出:

Started by user admin
Building in workspace C:\Program Files (x86)\Jenkins\workspace\TestFreestyle
[TestFreestyle] $ cmd /c call C:\WINDOWS\TEMP\jenkins5792812351526246488.bat

C:\Program Files (x86)\Jenkins\workspace\TestFreestyle>npm install karma-jasmine --save-dev 
npm WARN saveError ENOENT: no such file or directory, open 'C:\Program Files 
(x86)\Jenkins\workspace\TestFreestyle\package.json'
npm WARN enoent ENOENT: no such file or directory, open 'C:\Program Files 
(x86)\Jenkins\workspace\TestFreestyle\package.json'
npm WARN TestFreestyle No description
npm WARN TestFreestyle No repository field.
npm WARN TestFreestyle No README data
npm WARN TestFreestyle No license field.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 
(node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for 
fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: 
{"os":"win32","arch":"x64"})

+ karma-jasmine@1.1.2
added 68 packages and updated 1 package in 4.308s
Finished: SUCCESS

仅出于测试原因,我将测试保留在同一台计算机上。出于这个原因,以后将使用GitHub。

如果您能帮助解决此问题,或者将推荐另一个解决方案,我将不胜感激。

谢谢。

0 个答案:

没有答案