Enrique posted on October 2, 2009 18:08

I wanted to run my tests on each project build (CTRL-SHIft-B) I accomplished it using macros, here are the steps:

Make sure that you have a window where you can run the tests from visible , in my case I’m using Test Results because I had run a couple of test already but the same approach should work using Test View or Test List Editor)

  • First we need to record a macro to lunch the Tests

MacroRecorder

the macro toolbar will appear

image 

  • while recording the macro, click on the desire option to run the test, for example in my case I’ll click on “Run All Tests in Tests Results”

RunAllTests

  • if you are using the Test List Editor for example you should click on “Run Checked Test”

TestListEditor

  • Stop recording the macro using the macro toolbar.
  • Now open the Macros IDE

image

  • Under “MyMacros” Select the recording module

image

  • Cut the code generated under TemporaryMacro() and then from “MyMacros”  select (double click) EnviromentEvents
  • From the dropdowns select  BuildEvents and then OnBuildProjConfigDone

image

  • and then paste the code generated for the RecordingModule (the code should be in you clipboard from two steps above)
  • save it and ready to go… when you build your project you should see the tests running by themselves….

Posted in: Misc  Tags: , , ,
Comments are closed

Calendar

«  March 2010  »
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234
View posts in large calendar

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2010 BizTalkAnd .Net