I've been having a persistent reliability issue when running Cucumber\Watir-Webdriver (Ruby) tests on a TeamCity build agent.
When running the 96-step suite against the CI web app server from a local machine, all tests run green, but running the same tests against the same environment using a Build Agent produces a rash of intermittent errors such as:
Selenium::WebDriver::Error::NoSuchElementError: Unable to locate element:
Using the WW and PageObject waiting methods just produces intermittent timeouts such as:
Watir::Wait::TimeoutError: timed out after 30 seconds
It's incredibly hard to debug this as it's an intermittent problem with a lead time of about 20 minutes for feedback. In order to improve it, we've upped the RAM on the build agent's host and increased the heap memory available to the Build Agent's process to 4G using the TEAMCITY_SERVER_MEM_OPTS environment variable. This doesn't seem to have helped.