0
votes

Step 1. I have written selenium tests and bundled it into executable jar.

Step 2. When I execute this jar tests runs normally. Invokes New browser and execute all steps.

Step 3. I created bat file to execute this jar. In this case also test execution happens normally.

Step 4. TFS Build integration. (TFS 2015)
- I created new build definition in TFS
- Added build step "Batch Script"
- Entered path of bat file created in step 3 in build step
- When I Queue this build. bat file gets called and test execution
starts. But It does not open new browser..console says Started IE driver...it starts driver internal to build agent. and execution fails on setting value in textbox.

Click to see TFS Build Cosole


I can't use Visual studio tests. Requirement is to selenium tests should be triggered from jar created on Step 1.

2
Step 2 and 3 are executed on remote build server(the build agent located). Execution happens normally. Also TFS build service account used is administrator and has all permissions. - user7494481

2 Answers

0
votes

Make sure the build agent is running in interactive mode.

0
votes

First you could try to RDP to the remote build server(the build agent located) and manually run the batch file to see if it works.

If it's also not work then the issue may related the IE browser on the server.

If it works then maybe the TFS build service account don't have enough permission to run the IE driver. Please make sure the build service account has local Admin permission on the build server.