(I) Developer perspective: Using vsts for Application Analysis and unit testing

Source: Internet
Author: User
Visual Studio team system (hereinafter referred to as vsts) is a member of the vsts family, in addition to the architecture version, TestVersion, Database. In this article, we will explore what convenience vsts brings to developers from a developer's perspective, OthersThe version will be available later Article. If you have installed vsts, you can view the version you have installed in the "about" dialog box.

The vsts development edition focuses not only on bringing powerful functions to developers, but also on collaboration between developers and teams. Almost every function can be seamlessly integrated with Team Foundation, it is mainly reflected in the following aspects:

· Code measurement

·Unit Test

· Code analysis

· Team collaboration

Next we will introduce them separately.

Code measurement

Code measurement is a set of software measurement values, allowing developers to better understand the code they are developing. With code measurement, developers can understand which types and/or methods should be reworked or tested more thoroughly. The development team can identify potential risks, understand the current status of the project, and track the progress of software development. Perform code measurement in vsts development edition. You can click the "analysis" menu and select "Calculate code measurement value" (Note: I use the vsts English version ).

Figure 1

After you click this menu, vsts performs code measurement on the current solution. The results are displayed in the "Measurement Result" Window of the Code, as shown in Figure 2:

Figure 2

The analysis results are displayed in a tree, which can be expanded from the namespace to a specific type and a method of the most fine-grained reachable type. Note: When Using vsts for code measurement, it only analyzes projects of the "project" type and does not analyze the website. You notice that the measurement result window in Figure 2 has a warning message, this is because the project is a website.

The analysis results can be exported to excel, or a team foundation work item based on the results in the "code measurement results" window can be created. When you create a work item, vsts automatically enters the title in the "title" field, and enters the code measurement data under the "History" tab, as shown in 3:

Figure 3

From the perspective of code measurement, vsts greatly enhances developer team collaboration, and the measurement results can be seamlessly integrated directly with Team Foundation, in this way, developers can use team explorer to browse work items created through code measurement. We will also see this in the code analysis below. Code Analysis

Code analysis tools perform a large number of checks on code defects. These code defects are displayed as warnings in the error window. vsts has a rich set of built-in code analysis rules, all rules can be viewed in the code analysis window, as shown in Figure 4:

Figure 4

To perform code analysis on a project, select the project and select "run code analysis on XX Project" under the "analysis" menu, as shown in Figure 5:

Figure 5

The code analysis result is displayed in the "error" window, as shown in 6:

Figure 6

Code analysis tools provide warnings that indicate rule conflicts in the code library. These warnings are categorized into different rule fields, such as design, localization, performance, and security. Each warning identifies a conflict with a managed code analysis rule. If you want to increase the warning to an error, you can set it in the Code Analysis configuration window.

If you want to force code analysis when a project is generated, you can set it in the Project Properties window, as shown in 7:

Figure 7

The analysis results are displayed in the error window. You can still create work items for the code analysis results to team Foundation.

From: http://www.51testing.com/

 

 

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.