locked
How to automate / integrate unit tests with build process ? RRS feed

  • Question

  • Hi,

    Can someone let me know how to automatically run unit tests for a Windows Store app ? I know there is a command line utility vstest.console but it would be helpful if i could make it run right after build completes.

    Thanks !!

    Thursday, April 24, 2014 5:15 PM

Answers

  • Hi Minu7,

    Thanks for the reply. I don't see the "Run tests after build" icon. Please note mine is a store application.

    Could you share me a screen shot about it in your Test Explorer window? Actually I use the VS2013 Ultimate version, I create a simple Windows Store unit test, and I could get it like the following screen shot.

    Please make sure that you install the VS2013 Update package.

    I'm using VS13 Professional. Is there a way to call vstest.console after custom build completes?

    Sorry for that I didn’t get the way for it from the official site. For this issue, one workaround is that use the VS IDE, another way is that we need to use the TFS-Build.

    Since I use the VS2013 Ultimate version in windows 8.1, I will check it in a VS2013 Professional version.

    Best Regard,

    Update: I test it in VS2013 Professional, it has this limitation, so if you just use the VS, I suggest you use the VS2013 Ultimate version.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, April 28, 2014 6:49 AM

All replies

  • Hi Minu7,

    Thank you for posting in the MSDN forum.

    Maybe the Team build would be a choice like this case here:

    http://social.msdn.microsoft.com/Forums/en-US/7732294f-05df-4cc6-95fe-a304bfcf2260/integrating-unit-testing-and-build?forum=vststest

    Reference:

    http://msdn.microsoft.com/en-us/library/vstudio/hh691189(v=vs.120).aspx

    If you just use the VS IDE, maybe you could use the tool “Run tests after every build” in the Test Explorer window like the following screen shot.

    Run tests from the Test Explorer toolbar

    Reference:

    http://msdn.microsoft.com/library/windows/apps/jj159320.aspx

    Have a nice weekend,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 25, 2014 7:59 AM
  • Hi,

    Thanks for the reply. I don't see the "Run tests after build" icon. Please note mine is a store application.

    I'm using VS13 Professional. Is there a way to call vstest.console after custom build completes ?

    Thanks !!

    Friday, April 25, 2014 10:00 AM
  • Hi Minu7,

    Thanks for the reply. I don't see the "Run tests after build" icon. Please note mine is a store application.

    Could you share me a screen shot about it in your Test Explorer window? Actually I use the VS2013 Ultimate version, I create a simple Windows Store unit test, and I could get it like the following screen shot.

    Please make sure that you install the VS2013 Update package.

    I'm using VS13 Professional. Is there a way to call vstest.console after custom build completes?

    Sorry for that I didn’t get the way for it from the official site. For this issue, one workaround is that use the VS IDE, another way is that we need to use the TFS-Build.

    Since I use the VS2013 Ultimate version in windows 8.1, I will check it in a VS2013 Professional version.

    Best Regard,

    Update: I test it in VS2013 Professional, it has this limitation, so if you just use the VS, I suggest you use the VS2013 Ultimate version.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, April 28, 2014 6:49 AM
  • Hi,

    Thanks for the reply. I have my metro app setup and solution is compiled on a build environment and we create appx packages there.

    Now,my clarification is if i need to automate my unit testing process, i will need to integrate it with my build environment, that is, i should be launching my unit testing from command line correct? We'll have to create a separate appx package for unit testing right ? How will do this through command line after my solution gets compiled ? Can you please help me with that and let me know if its doable?

    Thanks !!

    Wednesday, May 21, 2014 4:11 AM