Answered by:
How can TFS drives a bunch of test.exe, and import the xml files which are created by the exe to the tfs server.

Question
-
Now I have some unit tests which are exe files. I want to run them every day, after daily build to the VM, how can I setup the build defination.
Besides, I want to import and store the result.xml files from the VM to the TFS server, can I do that?
Tuesday, June 14, 2011 8:05 AM
Answers
-
Hi,
You can modify DefaultTempalte.xaml and add a Invoke Porcess activity after the compilation completes. Here you can call the exe.
You can also create a scehduled task which runs the exe at a sepecific time every day.
To upload the results to tfs, you can publish the trx file using tcm run /publish, please refer http://msdn.microsoft.com/en-us/library/ff942469.aspx
Thanks,
Anuj
- Marked as answer by Vicky SongMicrosoft employee, Moderator Friday, June 24, 2011 1:38 AM
Tuesday, June 14, 2011 4:59 PM -
Hello Winzhao,
Thanks for your post.
1). If you want to queue the build every day, you should set the build trigger to be Schedule.
Please see this article for further information about build trigger setting:
http://msdn.microsoft.com/en-us/library/hh190718.aspx
2). If you want to run the exe and msi after build, just as Anuj mentioned above, you should customize your build process template and use the InvokeProcess activity to execute exe and msi.
Open the build definition and open the toolbox and drag the InvokeProcess activity to the corresponding place in the build process workflow. For example, you can place it after the "Try Compile, Test and Associate....." activity.
Here is an example on how to use the InvokeProcess activity:
https://blogs.blackmarble.co.uk/blogs/rfennell/archive/2010/02/23/logging-results-from-invokeprocess-in-a-vs2010-team-build.aspxThanks,
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked as answer by Vicky SongMicrosoft employee, Moderator Friday, June 24, 2011 1:37 AM
Thursday, June 16, 2011 9:51 AMModerator
All replies
-
Hi,
You can modify DefaultTempalte.xaml and add a Invoke Porcess activity after the compilation completes. Here you can call the exe.
You can also create a scehduled task which runs the exe at a sepecific time every day.
To upload the results to tfs, you can publish the trx file using tcm run /publish, please refer http://msdn.microsoft.com/en-us/library/ff942469.aspx
Thanks,
Anuj
- Marked as answer by Vicky SongMicrosoft employee, Moderator Friday, June 24, 2011 1:38 AM
Tuesday, June 14, 2011 4:59 PM -
Hello Winzhao,
Thanks for your post.
1). If you want to queue the build every day, you should set the build trigger to be Schedule.
Please see this article for further information about build trigger setting:
http://msdn.microsoft.com/en-us/library/hh190718.aspx
2). If you want to run the exe and msi after build, just as Anuj mentioned above, you should customize your build process template and use the InvokeProcess activity to execute exe and msi.
Open the build definition and open the toolbox and drag the InvokeProcess activity to the corresponding place in the build process workflow. For example, you can place it after the "Try Compile, Test and Associate....." activity.
Here is an example on how to use the InvokeProcess activity:
https://blogs.blackmarble.co.uk/blogs/rfennell/archive/2010/02/23/logging-results-from-invokeprocess-in-a-vs2010-team-build.aspxThanks,
Vicky Song [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked as answer by Vicky SongMicrosoft employee, Moderator Friday, June 24, 2011 1:37 AM
Thursday, June 16, 2011 9:51 AMModerator