none
Multpile build definitions with same build but with different app.config

    Domanda

  • Hello all,

    As part of test automation, I have to run tests mutiple times on different browsers. For each run tests would be running on a difefrent browser. App.config has the configuration about which browser has to use for test run. If I have to run my tests on IE, Firefox and Chrome, I want to have app.config.ie, app.config.firefox and app.config.chrome.

    As I am going to have 3 (or more) different config files, can I have those number of build definitions which will run the tests by picking the specific app.config.[browser]. And I don't want to build the application in each build definition. All build definitions should work on a common build.

    Can any body suggest me on this?

    Thanks,
    Naresh

    giovedì 14 giugno 2012 07:55

Risposte

  • In TFS build, Project to build can pick up your solution file. Automated tests can pick up your test list. If you can create different test lists such as IE, Firefox or Chrome, you can only use 1 build definition to cover all browsers testing in TFS build.

    Otherwise, I think TFS source control need to have 3 locations for IE, Chrome and Firefox. At that time, you can use multiple build definitions.


    Ray Lin

    lunedì 18 giugno 2012 22:08

Tutte le risposte

  • Your question is a bit unclear to me;  Do you have a multiple copies of your application running, and then depending which browser is detected a different application redirects the user to the version configured for their browser type?

    You want some build definitions that just test the binary, but do not build the application.  But what kind of tests?  Are they Unit Tests or CodedUI tests?  Can we assume that the build is already deployed to IIS somewhere? 

    Are you using Lab Management?

    It may be helpful for you to look at 2 things that can help you regardless:

    Running MSTEST on the command line.  You could write a script that checks the config file and runs MSTest as appropriate on an existing build:  http://msdn.microsoft.com/en-us/library/ms182490(v=vs.110).aspx. You can even schedule such a script to run regularly using Windows.

    The Run Tests Section and MSTest activity in the Build Process Template.  Look for the section in the build workflow named Run Tests.  You can modify this section to customize the build so that it runs the tests once for each configuration you have if that makes sense:

    giovedì 14 giugno 2012 23:23
  • Hello Ryan,
    Thanks for responding.
    Tests are Nunit tests.

    I need multiple definitions with different app.config files. Each build definition would be running the tests on a different browser. Yes each build definition would be starting new instance of the application but with a different briowser.

    Regards,
    Naresh

    venerdì 15 giugno 2012 14:12
  • Hi Naresh,

    Thanks for your feedback!

    I am currently looking into this issue and will give you an update as soon as possible.
     
    Thank you for your understanding and support.


    Cathy Kong [MSFT]
    MSDN Community Support | Feedback to us

    lunedì 18 giugno 2012 09:16
    Moderatore
  • Hi.  I am looking into a similar issue, where we use different versions of the app.config file to create builds for multiple environments, and I want to automate these multi-builds in TFS Build.  I've been modifying the process template and building custom activities for this purpose, but it's just so much more complex than it should be.
    lunedì 18 giugno 2012 14:50
  • In TFS build, Project to build can pick up your solution file. Automated tests can pick up your test list. If you can create different test lists such as IE, Firefox or Chrome, you can only use 1 build definition to cover all browsers testing in TFS build.

    Otherwise, I think TFS source control need to have 3 locations for IE, Chrome and Firefox. At that time, you can use multiple build definitions.


    Ray Lin

    lunedì 18 giugno 2012 22:08
  • Hello Ray,

    Thanks for your reply. But I think I have not understood it completely.

    As you said, I am able to see 'Automated Tests'. But there how to specify different test lists and how to make sure each test list picking a different config file.

    Thanks,
    Naresh

    lunedì 2 luglio 2012 08:54