How to get a acces to the teamcity of background?
Hello everyone. I have the next question. Now I run my tests (through teamcity) from console mode, but it not always comfortable. Can I get acces to the teamcity vm, in order to change the window size (not browser). Because, some my tests always to fail at current resolution (1004x748). And need 1936x1056. Anybody can help me? Thanks!
Please sign in to leave a comment.
Hi Chentaichiquan,
I'm sorry but I think I haven't fully understood your question. Teamcity runs the builds/tests in the build agents, not in the teamcity server. If you need specific configuration for some build, you need to set it up in the build agent.
If some builds have specific requirements, you can also set them up as requirements in the build configuration on the server and then configure your build agent to make sure it meets them, so that a build will only run in a compatible agent.
For problems with builds in TeamCity that work properly in your environment, please check this entry of the documentation:
https://confluence.jetbrains.com/display/TCD10/Common+Problems#CommonProblems-BuildfailsorbehavesdifferentlyinTeamCitybutnotlocally
You can find there a list of the common checks for a build to not run properly in TeamCity while working in your development environment.
If this doesn't help, please provide more details about your setup (what do you mean by run the tests from console mode, what do you mean by teamcity vm, how is your agent setup, and any further detail that might allow us to better understand your scenario)
Denis Lapuente thanks for answer, if you have opportunity speak by Russian, it help better understand each other. If such opportunity not, then I provide more a information by a current problem.
From the looks of it, it's an OS issue, not directly a TeamCity one and TeamCity does not provide any dedicated solution to that. You should probably run the agent from the console and set the required resolution before running the build.
If you would like further assistance in Russian, I won't be able to help, but I can forward the request to a colleague that can.
Hello Denis! Apologies for the delay in answering.
The Teamcity and the build agent installed on another a PC (on windows server 2012). To start tests I should go to server, switch off the agent as service and start it from a console (agent.bat start). In this case all my tests work correct, because there is interaction with a desktop and I see a browser.
But I would like to start tests not in the console, but in background mode. I understand that tests execute with help the build agent. The build agent has a "hidden" virtual machine(vm) fixed size (resolution 1004x748), eventually my some tests fail. Whether there is a opportunity get acces to configuration it vm, that change a size.
Sorry for my English)
Hey, thanks for your answer.
TeamCity doesn't run in a hidden VM. If you are running the agent from a console (agent.bat start) and the build works successfully, the problem you have is that the environment where the regular service is started is different to that one of the console you open it with, which is the default windows behavior.
As it's stated in the link i shared before, "If running it from a console instead of a service fixes the issue, you can try to figure out why running under the service is a problem for the build. Most often this is service-specific and is not related to TeamCity directly. Also, you can setup the TeamCity agent to be run from the console all the time (e.g. configure an automatic user logon and run the agent on the user logon)."
Windows is probably creating a different environment for the service user/start than it does for your console, and this is most likely where the problem resides.
Please make sure that Windows runs the service with the same conditions that you run the console.
Hello,
I encountered this issue while running our automated tests using Teamcity to test a responsive website for one of my employer's clients. And I figured out the following code (Chrome Browser Only) to enforce headless testing using whatever screen resolution you would like bypassing the limitation of Teamcity Agent.
ChromeOptions options = new ChromeOptions();
options.AddArguments("--headless", "--window-size=1920,1080", "--window-position=0,0");
IWebDriver driver = new ChromeDriver(options);
The idea was to specify the arguments which are sent to chromium via ChromeOptions class. And my solution works perfectly when the agent is run in service mode.
Sincerely,
Yahia Salah