26.04.2015 Views

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

Team Development with Visual Studio Team Foundation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

3. Use the Test Manager to group tests into the new Test List by dragging and dropping<br />

the tests from the Test View to the Test List in the Test Manager.<br />

4. Create a new <strong>Team</strong> Build type.<br />

5. Select the check box to run automated tests.<br />

6. Select the test project <strong>with</strong>in which your tests and test list were created<br />

7. Select the test list you want to run.<br />

Additional Resources<br />

• For more information about automatically running Build Verification Tests, see<br />

“How to: Configure and Run Build Verification Tests (BVTs)” at<br />

http://msdn2.microsoft.com/en-us/library/ms182465(VS.80).aspx<br />

• For more information about how to run automated build tests <strong>with</strong>out <strong>Visual</strong> <strong>Studio</strong><br />

Test Edition or a VSMDI file, see “How to run tests in a build <strong>with</strong>out test metadata<br />

files and test lists (.vsmdi files)” at<br />

http://blogs.msdn.com/buckh/archive/2006/11/04/how-to-run-tests-<strong>with</strong>out-testmetadata-files-and-test-lists-vsmdi-files.aspx<br />

How to Run Code Analysis as Part of the Build<br />

To turn on code analysis for a build type, you can either select the code analysis check<br />

box in the New <strong>Team</strong> Build Type Creation Wizard when you create the new <strong>Team</strong> Build<br />

type, or you can modify the TFSBuild.proj file after the build type has been created.<br />

To enable code analysis in the TFSBuild.proj file<br />

• If you want all projects to run code analysis, regardless of project settings, change the<br />

tag to Always.<br />

• If you want to run code analysis on each project based on project settings, change the<br />

tag to Default.<br />

Additional Resources<br />

• For more information about automatic code analysis as part of the build, see “How To<br />

– Automatically Run Code Analysis <strong>with</strong> <strong>Team</strong> Build in <strong>Visual</strong> <strong>Studio</strong> <strong>Team</strong><br />

<strong>Foundation</strong> <strong>Server</strong>” in this guide.<br />

• For more information about code analysis tools, see “Guidelines for Using Code<br />

Analysis Tools” at http://msdn2.microsoft.com/en-us/library/ms182023(VS.80).aspx<br />

How to Get Failed Tests to Fail a Build<br />

When a build fails because of compilation errors, a work item is created to track the<br />

failure and the build is marked as failed. When an automated test fails, however, the build<br />

does not fail. The test failure is converted into a warning and the build continues.<br />

You might want to fail the build if an associated automated test fails. You might also<br />

want to generate a work item automatically to track the failure.<br />

To fail the build upon test failure

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!