Forum Discussion

pensphreak's avatar
14 years ago

TestedApp path when used inside VS2010/TFS2010

I'm trying to get TestComplete to integrate with our VS 2010/TFS 2010 process but I'm having some trouble with some of the basics of TestComplete.  I've created a simple standalone GUI test with our application, but I'm confused how to move this into VS 2010 and TFS 2010 for automated testing as part of a build process.  



The hardest part that I'm having is how to tell TestComplete that the application I want to test should come from the build output when it's part of a VS2010 unit test and not from a standalone path that I enter when using TestComplete by itself

1 Reply


  • Hello Kevin,





    I can suggest a couple of solutions:





    1. Update the path to the tested application programmatically in the beginning of your script.

    In your script, you can build the logic that will find the latest application build in the build storage and update the Path property of your TestedApp element.





    2. Configure a post-build event in VS that will copy the latest build to a specific location, which is always the same.

    So, your script can automatically check where the app is located and update the TestedApp properties. This could look like this:







      var LocalAppPath = "C:\\Program Files\\App\\";  

      var BuildStoragePath = "C:\\LatestBuild\\";

        

      if (aqFileSystem.Exists(LocalAppPath + TestedApps.MyApp.FileName))

        TestedApps.MyApp.Path = LocalAppPath;

      else

        TestedApps.MyApp.Path = BuildStoragePath;







    I hope this helps.