0

I am using Lab Center + TFS 2012 to run my automated GUI tests. I noticed that there is an option to run a script before and after the tests begin:

Lab Center configuration

  • What type of scripts can I run with this option? Is it a VB script or what?
  • Is it possible to run an application instead of a script?

I want to use this option to restore a Database before my tests begin, since I have 2 test agents and they connect to the same database.

Rafael Colucci
  • 6,018
  • 4
  • 52
  • 121

1 Answers1

1

The script can be any text file that has command line batch that saved with (.bat) extension or Powershell script, of-course you can call any exe from that file but first you will need to navigate to the path of that exe or just declar that path in the Environment variable of the Windows, here is an example of a file with (.bat) extension that will play the Windows Media Player.

cd "Program Files"

cd "Windows Media Player"

wmplayer.exe

You can also open it and send parameters as needed.

Mohamed.Radwan -MVP
  • 2,724
  • 2
  • 16
  • 24
  • @M-radwan-mvp Are you sure we can run Powershell scripts (ps1)? When I try, it doesn't run and MTM throws error 'The setup batch file exited with error code -1'. – digitguy Nov 23 '14 at 18:53
  • I think error code -1 that's mean it can't find the command you try to run during your power shell – Mohamed.Radwan -MVP Nov 27 '14 at 14:44