Getting started with Visual Studio white box testing

Source: Internet
Author: User
Tags xslt
Now more and more software development uses white box testing, and C ++ has cppunit ,. net has nunit, and a test framework is also provided for us in Visual Studio. However, this test framework seems to be available only in a few versions of.

What versions does Visual Studio have? In terms of visualstudio2005, what version does he have? What are the differences between different versions?

Refer to the webpage:

Http://msdn.microsoft.com/en-us/vstudio/aa700921.aspx

The following table is copied from the webpage. Visual Studio 2005 product line overview.

Visual Studio 2005 product line Overview

Feature Express Products Visual Studio Standard Edition Visual Studio Professional Edition Visual Studio Tools for office Visual Studio team system
Intelliisense Yes Yes Yes Yes Yes
Code Editor Yes Yes Yes Yes Yes
Code snippets Yes Yes Yes Yes Yes
Programming versions ages supported DED VB, VC #, VC ++, and vj # are single language. Visual westmdes VC # and VB All All VB and VC # All
Office Development Support * No No No Support for Excel 2003, Word 2003, infopath 2003 2003 Support for Excel 2003, Word 2003, infopath 2003 2003
User Experience Simplified menu options and defaults Simplified menu options and defaults Full Full Full
Windows Forms designer VB, VC #, VC ++, VJ # Yes Yes Yes Yes
Web forms designer Visual Web Developer Yes Yes Yes Yes
Mobile Device Support * No Yes Yes No Yes
Database Design tools (Create/modify tablesprocedures) Local Local and remote Local and remote Local and remote Local and remote
Data Access designers VB, VC #, VC ++, VJ #: local, Visual Web Developer: Local Local and remote Local and remote Local and remote Local and remote
Documentation 10 MB "Getting started"; starter kitfirst-time programmers; 200 MB optional msdn Express Msdn Msdn Msdn Msdn
Class Designer/object test example * No Yes Yes Yes Yes
XML editor support XML only XML only Full XML/XSLT Full XML/XSLT Full XML/XSLT
Deployment tools Clickonce Yes Yes Yes Yes
Extensibility Use 3rd party controls and content. No macros, packages Write, record, run macros, write and consume add-ipackages (partner products) Write, record, run macros, write and consume add-ipackages (partner products) Write, record, run macros, write and consume add-ipackages (partner products) Write, record, run macros, write and consume add-ipackages (partner products)
Reporting Visual Web Developer: SQL Server reporting services add-in SQL Server Reporting Services SQL Server Reporting Services/Crystal Reports SQL Server Reporting Services SQL Server Reporting Services/Crystal Reports
Source code control No Msscci-compatible (visual sourcesafe sold separately) Msscci-compatible (visual sourcesafe sold separately) Msscci-compatible (visual sourcesafe sold separately) Msscci-compatible (effecdes visual sourcesafe, viteam Foundation server sold separately)
Debugging Local Local Local/remote Local Local/remote
64-bit compiler support (itanium) No No No No Yes
64-bit compiler support (x64) No Yes Yes No Yes
Server Explorer No No All All All
Integration of SQL Server 2005 No No Yes Yes Yes
Code profiling No No No No Yes
Static Analysis No No No No Yes
Unit testing * No No No No Yes
Code coverage No No No No Yes
Project Management No No No No Yes
Test Case Management No No No No Yes
Offline database project No No No No Yes
Data Generation No No No No Yes
Database refactoring No No No No Yes
Database schema and data compare No No No No Yes
Database deployment tools No No No No Yes
Size 80 Mb (express + SQL express +. NET Framework redist) Multiple CDs Multiple CDs Multiple CDs Multiple CDs
Additional tools supported DED SQL Server 2005 express Edition SQL Server 2005 express Edition SQL Server 2005 Developer Edition SQL Server 2005 Developer Edition; Microsoft Office developer extensions; Access 2003 runtime license SQL Server 2005 Developer Edition (supported ded with clieonly)

To put it simply, we can summarize:
Express --- trial version
Pro --- Visual Studio 2005 Professional Edition is a version suitable for small-scale use, with 8-10 people authorized.
STD --- the full name is Visual Studio Standard Edition, which is also an Authorized Version, more than pro;
Vsto --- Visual Studio 2005 tools for the Microsoft Office System, which is used to develop office products;
Vsts --- Visual Studio 2005 team system is also the most comprehensive version for all levels of Software Development
In these versions, only vsts has the unit test function. Therefore, to use Visual Studio for white-box testing, you must install vsts, which is unavailable in other versions.

After installing vsts, start writing white-box test code. Step by step:

1. Create a test project

2. modify the code in the generated unittest1.cs file ,:

In this way, we have written two test methods testmethod1 () and testmethod2 (); to let them pass and fail respectively.

3. In actual projects, there will be a lot of test methods. To facilitate management, we will create some test lists ),:

4. I forgot to mention how the test Manager workspace is displayed.

Select in view-toolbars-test tools to display the test toolbar. Then, click test Manager on the toolbar.

Then, as shown in, first select the test method to run in test Manager, and then click the button marked with a red box to run the selected test method.
After running, open the test result panel and you will be able to see the running result. We can see that the test method we wrote is passed and failed.
It's so easy to get started with white box testing.

The next article is based on this article. Please refer

Run the Visual Studio test code using scripts

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.