Forum Discussion

rpb's avatar
rpb
New Contributor
10 years ago

How to launch app, freshly-built by Team Build, for GUI testing?

Hi,

 

I've searched the help and forums but haven't found the answer - I'm sure this must be a silly question:

 

  1. I'm trying to schedule GUI regression testing on our applications as part of our nightly automated build.
  2. Team Build gets our C++ code from TFS each night and compiles/builds our applications.
  3. We now have a test project with test items linked to a Test Complete .pjs file located underneath the Visual Studio test project, with everything checked-in to TFS.
  4. The build service is set to run interactively so it can test the GUI.  I've added the pre-/post- build events to copy the TC folder to the target directory.
  5. Team Build builds the code on a build agent VM called \\dev-agent, and the code ends up at C:\Builds\11\TFSProject\MySolution\bin on that machine.  The TC project folder is getting copied there successfully.
  6. We also have a build drop location set up on the test controller itself, and the build output all ends up in a folder such as \\TFScontroller\Built Code\MyBuild\MyBuild_20150313.16, and again the TC project folder is getting copied there successfully.

 

My question is - what is the recommended way of launching the freshly-build application at the start of each test?  The location of the application to run changes with every build on the build controller (drop location), and the location on the build agent (where I'm assuming the tests and TestComplete will run) is also specific to that build agent (number "11" in my case, at present), and will be different if this build and these tests are run on a different agent, and also differ hugely from where they will appear on a tester/developer machine.

 

Once the app is launched, all the clicking, checkpoints, etc., should all work, but I'm not sure at the moment how to actually start the application in the first place, ready for testing.

 

Sorry if this is a stupid question - any help greatly appreciated!

 

Thanks,

 

Richard

  • Do you also have licenses for TestExecute? While there are a number of methods that could be used, assuming your automation has a notification process to send an email or post a report to a website, one approach would be to set the VM to auto logon and simply add a batch file with a command line string to run TestComplete to the VM's startup folder.  Another possibility is to use TC's distributed testing approach. This would mean that you would need two VMs, one with TestComplete as a 'Master' which controls the test run on a 'slave' VM via TestExecute. The slave VM could be created on the fly from a template but that is somewhat time intensive so a VM snapshotted in a clean, powered off state is what we use. To kick off the test, create a run once type scheduled task on the TestComplete master and the Build machine would then use PSExec or similar to execute the scheduled task on successful completion. 

    • PJ123's avatar
      PJ123
      Visitor

      Hi,

       

      I am also trying to do this. Do you have a solution that does not require a TestExecute license and does not require multiple VMs?

       

      Thanks.

    • rpb's avatar
      rpb
      New Contributor

      Hi Michael,

       

      Thanks for your response.  I was really hoping that TestComplete would have some facility built in to it for launching applications.  I wasn't expecting to have something so complex to set up, to be honest - multiple VMs, multiple licences when I'm only using one, etc.

       

      SmartBear/TestComplete say they can integrate with Team Build, but unless there's some facility within TestComplete for launching the newly-built application it seems that it's down to the user to cobble something together.  In which case we'll need to create a suitable batch file, which launches the appropriate program, at the end of the build.  Our build script could create such a batch file at a known location and then a scheduled Test Complete test step could run that known batch file.

       

      I have to admit I'm disappointed if this obvious feature isn't part of the standard TestComplete build integration.  Can it really be the case that you can build your software with Team Build/TFSBuild, and then kick off your tests automatically through TestComplete integration with TFS, but there is no facility to actually run and therefore test the software you've just built?!?