Search code examples
selenium-webdrivertfsbuildtfs-2015

Error in Selenium tests triggered from batch script in TFS Build step


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.


Solution

  • Make sure the build agent is running in interactive mode.