简体   繁体   中英

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. 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:

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. Note that this is a windows build server / build agent.

[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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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