- Run TeamCity agent via console.
Configure the build agent machine not to launch a screensaver locking the desktop.
Note that there is a Windows limitation to accessing a remote computer via mstsc: the desktop of the remote machine will be locked on RDP disconnect, which will cause issues running tests. The VNC protocol allows you to remote control another machine without locking it.
To run GUI tests using RDP /avoid using VNCand be able to use RDP, see the workaround below.
- Configure the TeamCity agent to start automatically (e.g. configure an automatic user logon on Windows start and then configure the TeamCity agent start (via agent.bat start) on the user logon).
For graphical tests the build agent cannot be started as a service and it is recommended to configure the build agent launch with a 1 minute delay after the user auto-logon, e.g. using the "
bin\agent.bat start"command in the task scheduler and configuring the delay there.
Running automated GUI tests and using
RDP uses its own video driver overriding the one from the machine's video card for the session. Redirecting the session to console will unload the Windows graphical drivers. This can be done by adding the following step to your build configuration prior to your tests (the example below is for PowerShell, but other languages (DOS, Python) can be used too):
There is a web UI-related issue which some our users have encountered (and it cannot be reproduced on other computers) which is tied with the cached versions of content. If you have come across such problem, make sure your browser does not use cached versions of content by clearing browser caches.
Logging with Log4J in Your Tests
- Use Log4J 1.2.12
For Log4J 1.2.13+, add the
"Follow=true"parameter for console appender, used in Log4J configuration:
Code Block xml xml
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <param name="Follow" value="true"/> </appender>
Agent Service Can Exit on User Logout under Windows x64
The used version of Java Service Wrapper does not fully support Windows 64 and this causes agent launcher process to be killed on user logout. The agent itself will be function until the next restart (server upgrade or agent properties change).
Failed Build Can be Reported as a Successful One With Maven 2.0.7
:error if "%OS%"=="Windows_NT" @endlocal set ERROR_CODE=1
Most common indicators of conflicting software are errors like "Access is denied", "Permission denied" or java.io.FileNotFoundException mentioning the file that is present and is writable by the user the agent/build runs under.
Also, certain software running in background (like antiviruses) can significantly slow down build agent operations like sources checkout, artifact publishing or even build running.
- use port 80 on the system so you might not be able to use TeamCity server using default 80 port.
- corrupt layout of pages displayed in Internet Explorer. Internet Explorer Skype plugin is to blame. (TW-13052).
svn: E175002: Received fatal alert: bad_record_mac
Anyway, upgrading the JVM used to the latest available version is recommended.
NUnit 2.4.6 Performance
Due to an issue in NUnit 2.4.6, its performance may be slower than NUnit 2.4.1. For additional information, please refer to the corresponding issue in our issue tracker: TW-4709
Using StarTeam SDK 9.0 instead of StarTeam SDK 9.3 on the TeamCity server can significantly improve VCS performance when there is a slow connection between TeamCity and StarTeam servers.
Perforce 2009.2 Performance on Windows
There were fixes in JDK 1.5 and 1.6 to address various wrong timezone reporting issues.
If other web applications are available via the same hostname, a session cookie conflict can occur. This usually is visible via random user logouts or losing session-level data. (e.g. TW-12654). To resolve this, you can use different host names when accessing the applications.
The Server Does Not Start Claiming the Database is in Use
- MySQL: restart the MySQL server and then start TeamCity again.
- PostgreSQL, Oracle, MS SQL: kill the connections from the incorrectly shut down TeamCity, and then start TeamCity again.
- Internal database (HSQL): remove the
buildserver.lckfile from the
TeamCity Data Directory\systemdirectory, and then start TeamCity again.
Slow download from TeamCity server