【问题标题】:Only able to run Protractor Test partially via jenkins只能通过詹金斯部分运行量角器测试
【发布时间】:2016-02-11 18:55:49
【问题描述】:

我创建了一个 tern 项目来在 eclipse 中运行量角器测试。当我调用时

C:\Users\***>protractor D:\eclipseProject\sample.js

在 cmd 的上面一行,量角器运行得很好。但这里的问题是,对于每次运行,我都必须打开一个 cmd 窗口并每次都在上面的行中输入,所以我为它创建了一个批处理文件 sampleOne.bat,它工作得很好很好。现在我接下来要做的是在 jenkins 中调用这个 sampleOne.bat 文件,然后单击 Build Now(jenkins 中的选项)。jenkins 能够运行这个批处理文件,但部分运行(假设 sample.js 确实登录一个有角度的网络应用程序,然后验证下一页。)即它在编辑字段中输入用户名和密码,然后在该浏览器关闭(Chrome浏览器)和jenkins显示下面的消息

Started by user anonymous
Building in workspace D:\eclipseProject\***WebApplication\***BatchRunner
[***BatchRunner] $ cmd /c call C:\Users\***\AppData\Local\Temp\hudson4990564856015457437.bat

D:\eclipseProject\***WebApplication\***BatchRunner>sampleOne.bat
Process leaked file descriptors. See http://wiki.jenkins-ci.org/display/JENKINS/Spawning+processes+from+build for more information
Finished: SUCCESS

不确定这是不是正确的方法请帮助

【问题讨论】:

    标签: javascript angularjs jenkins protractor


    【解决方案1】:

    经过认真的研究后,我通过几个链接发现了一些可以按照上述方式工作的东西,我发现了这些链接

    https://java.net/projects/hudson/lists/users/archive/2009-08/message/447
    https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project
    

    按照这些链接,为了工作,我必须设置 BUILD_ID = dontKillMe 所以在詹金斯我做了这个并且它现在工作了

    1. Open jenkins.war  from cmd.
    2. Click Manage Jenkins.
    3. Click Configure System (first option).
    4. Under Global properties check Environment variables.Click add button
    5. Give List of key-value pairs Name = BUILD_ID and value = dontKillMe.
    6. Click apply and save.
    7. Run the project now (working in my case)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-11-24
      • 1970-01-01
      • 1970-01-01
      • 2016-08-16
      • 2016-05-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多