简体   繁体   English

是否有可靠的命令行或Powershell步骤格式在TeamCity上运行RSpec测试?

[英]Is there a reliable Command Line or Powershell step format to run RSpec tests on TeamCity?

We are experimenting with using RSPec for our UI tests and noted that while attempting to integrate these with TeamCity we end up with environment related errors. 我们正在尝试使用RSPec进行UI测试,并指出,在尝试将它们与TeamCity集成时,最终会遇到与环境相关的错误。 The problem is that when we run these tests locally on the build server they run without any errors. 问题是,当我们在构建服务器上本地运行这些测试时,它们运行时没有任何错误。

We are trying to execute the login test within a working directory located on the build server with a Command Line or Powershell: 我们正在尝试使用命令行或Powershell在构建服务器上的工作目录中执行登录测试:

cd D:\web_smoke_tests-master
gem install bundler
rake cloud:chrome 

We are returning the following error in our build log despite the environment containing all of the ruby dependencies. 尽管环境包含所有ruby依赖项,但我们仍在构建日志中返回以下错误。 Note that this is a windows build server / build agent. 请注意,这是Windows构建服务器/构建代理。

[21:31:30]Step 3/5: Execute login test (Command Line)
[21:31:30][Step 3/5] Starting: C:\TeamCity\buildAgent\temp\agentTmp\custom_script #edited out
[21:31:30][Step 3/5] in directory: D:\web_smoke_tests-master
[21:31:30][Step 3/5] 'gem' is not recognized as an internal or external command,
[21:31:30][Step 3/5] operable program or batch file.
[21:31:30][Step 3/5] 'rake' is not recognized as an internal or external command,
[21:31:30][Step 3/5] operable program or batch file.
[21:31:30][Step 3/5] Process exited with code 1
[21:31:30][Step 3/5] Step Execute login test (Command Line) failed

Regarding the above. 关于以上内容。 This was due to the user containing the build agent not having any ruby dependencies installed and as a result "gem" or "rake" were not recognized. 这是由于包含构建代理程序的用户未安装任何ruby依赖项,因此无法识别“ gem”或“ rake”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM