David
David

Reputation: 1

Use TeamCity to run Selenium test, but not headless

I have done some research on this, but still confused.

Im using Selenium 3 (C#) with a Chromedriver, Nunit 2.6.4, Visual Studio 2015, TFS and TeamCity 9.

I would like to run a Selenium test, using TeamCity, but I want to physically see the test run. I dont want it to run as a background process. I've seem some say something about running the user agent not as a windows service or to run it manually with some script. But this is where I get confused.

Do I have to add additional code to the project or do it some other way, like a batch file. Or is there another way to run the test in a non headless browser?

Im pretty new to this, so please be gentle.

Thanks in advance.

David

Upvotes: 0

Views: 2203

Answers (2)

Kumar Rishabh
Kumar Rishabh

Reputation: 405

Go to The agent's service.properties and then set "web.app=true". It will be under the agent directory as "D:\BuildAgent3" if agent is installed on D drive. Restart your agent..

From Now onwards, you should see the browser running in headful mode. It worked for us in past, but later on we moved on to a Selenium Grid and hence this setting is not in use for us.

Let me know if it helps..!

Upvotes: 1

patricmj
patricmj

Reputation: 373

If you are running the TeamCity agent as a service they use a "hidden" desktop and you can't see them run.

You can run the the TeamCity agent as a process by opening cmd as administartor, change directory to BuildAgent\bin and write agent.bat start. Then you should be able to see the tests run. Remember to stop the service first

Upvotes: 3

Related Questions