vsts overview
TRANSCRIPT
-
8/14/2019 VSTS Overview
1/36
Visual Studio Team System 2008
Adopting Visual Studio Team System 2008
Mickey Williams Director, Center of [email protected]
Overview
-
8/14/2019 VSTS Overview
2/36
Visual Studio Team System 2008
-
8/14/2019 VSTS Overview
3/36
Visual Studio Team System 2008 Architecture Edition
-
8/14/2019 VSTS Overview
4/36
4
Applications
ApplicationHosts
Network
Topology& OS
Hardware
System Definition Model (SDM):
A formal model of a complete system
All information pertinent to deployment and operations
Machine-readable, capturing intent ofdevelopers and IT Professionals
System topology
Developer constraints
IT policy
Installation directives
Health model
Monitoring rules
Service Level Agreements
Reports
??
-
8/14/2019 VSTS Overview
5/36
Visual Studio Team System 2008 Development Edition
-
8/14/2019 VSTS Overview
6/36
6
Code Analysis
Code Coverage
Profiling
Agenda
-
8/14/2019 VSTS Overview
7/367
Code Analysis
Code Coverage
Profiling
Agenda
-
8/14/2019 VSTS Overview
8/368
Code Analysis
Evaluating code without execution Managed & unmanaged code Integrated with IDE
Callable from the command line
Great way of finding bugs earlier in your development cycle Costs less when you find bugs early
Code review in a box
Can be used at the Team level Part of your build process
Part of your check-in policy
-
8/14/2019 VSTS Overview
9/369
Code Analysis for Managed Code
Based on FxCop
Static analysis for .NET assemblies
Supports all managed languages
Enforces Design Guidelines
Customizable
Which checks to include
Whether to report as error or warning
Create custom rules
-
8/14/2019 VSTS Overview
10/3610
Create using a VS Class Library
Reference FxCopSdk.dll and Microsoft.Cci.dll
Add a rules definition XML file
Inherit from BaseIntrospectionRule
Override the Check method
Client side installation Must be deployed on developer workstations and build servers utilizing static
analysis
Copy the rule DLL to the client machine
See http://blogs.msdn.com/fxcop/
Custom Code Analysis Rules
http://blogs.msdn.com/fxcop/http://blogs.msdn.com/fxcop/ -
8/14/2019 VSTS Overview
11/3611
Code Analysis
Code Coverage
Profiling
Agenda
-
8/14/2019 VSTS Overview
12/3612
Measure test effectiveness
Line-by-line
Block-by-Block
Assemblies must be instrumented
Done automatically by Visual Studio when needed
Results sent to viewer or XML file
Code Coverage
-
8/14/2019 VSTS Overview
13/3613
Code Analysis
Code Coverage
Profiling
Agenda
-
8/14/2019 VSTS Overview
14/3614
Gather information on application timing and performance
Integrated into VSTS
Used by many internal teams and on customer engagements
Two measurement methods
Sampling gathers information at fixed intervals on whatever is executing
Instrumentation records every call
Profiling
-
8/14/2019 VSTS Overview
15/3615
Code Analysis
Code Coverage
Profiling
Agenda
-
8/14/2019 VSTS Overview
16/3616
Code metrics
Improved profiling
HotPathing to pinpoint problem
WCF support
Load/Web test integration
Baseline support
Customize code correctness policies
Better profile report compression
Saving analysis
New Features for 2008
-
8/14/2019 VSTS Overview
17/36
The 5 Code Metrics
-
8/14/2019 VSTS Overview
18/3618
Metric: Class Coupling# of Dependencies Between Types
GUI
BusinessLogic
Transaction
Customer Account
-
8/14/2019 VSTS Overview
19/36
19
Metric: Class Inheritance
# of Base Types
Component
Control
Label
ListBox
ListControl
LinkLabelComboBox
-
8/14/2019 VSTS Overview
20/36
20
Metric: Lines of Code
# of Executing Lines of Code
1
2
3
4
5
static class Program
{
#regionApplication Entry Point
///
/// The main entry point for the application.
///
[STAThread]
static voidMain(string[] args)
{
Application.EnableVisualStyles();Application.SetCompatibleTextRenderingDefault (false);
Workflow(args);
}
#endregion
#region Static Methods
/// Primary workflow for the application.
/// Command line arguments.
private static voidWorkflow(string[] cmdargs){
// Collect the list of command line arguments
Listargs = new List(cmdargs);
// Show usage syntax if the user so asks
if (UseArg(args, "/?")) { ShowAbout(); return; }
-
8/14/2019 VSTS Overview
21/36
21
Metric: Cyclomatic Complexity
# of Branches
1
2
3
4
5
6,7
8
9
10
11
bool ParseCommandLine(string[] args)
{
if (args.Length == 0) ShowHelp(); return;
for (int i = 0; i< args.Length; i++)
switch (args[i])
{
case "/?" :
ShowHelp();return false;
case "/input" :
if (args.Length >i && File.Exists(args[i + 1]))
InputFile = args[i++];
break;
case "/c" :
Colapse = true;
break;
}return true;
}
-
8/14/2019 VSTS Overview
22/36
22
Metric: Maintainability Index
Overall indication of complexity by aggregation of several factors [Carnegie 1]
Lines of Code
Cyclomatic Complexity
Computational Complexity [Halstead 1]
Used on the Windows Code Base
[Halstead 1] Halstead, Maurice H. Elements of Software Science,Operating, and Programming Systems SeriesVolume 7. New York, NY:Elsevier, 1977.
Maintainability Index = 171 - 5.2 * log2(Halstead Volume) -0.23 * (Cyclomatic Complexity) - 16.2 * log2(Lines of Code)
[Carnegie 1] Carnegie Mellon University, Software EngineeringInstitute, Maintainability Index Technique for Measuring Program
Maintainability, http://www.sei.cmu.edu/str/descriptions/mitmpm.html
-
8/14/2019 VSTS Overview
23/36
Visual Studio Team System 2008 Database Edition
-
8/14/2019 VSTS Overview
24/36
2424
Product Overview
Database project system Supports schema and script versioning
Schema build & deploy
Schema compare
Data compare Database unit testing
Test data generator
Schema refactoring
T-SQL editor with query execution
Work item and process integration with TFS
-
8/14/2019 VSTS Overview
25/36
25
Database Development Life CycleThe cycle of life for database developers
25
Database
Project
Import database schema
Reverse engineer existing .SQL script files (*)
Create New Project
SQL
Script
Database
Project
Template
SQLServer
Database
-
8/14/2019 VSTS Overview
26/36
26
Database Development Life CycleThe cycle of life for database developers
26
Database
Project
Edit
Compare
Test
Build
DataGeneration
Deploy
Refactor
Compare
-
8/14/2019 VSTS Overview
27/36
27
Database Development Life CycleThe cycle of life for database developers
27
Database
Project
Import database schema
Reverse engineer existing .SQL script files
Create New Project
SQL
Script
Database
Project
Template
SQLServer
DatabaseDeploySQL
Script
SQLServer
Database
Build project
Deploy project
-
8/14/2019 VSTS Overview
28/36
Visual Studio Team System 2008 Test Edition
-
8/14/2019 VSTS Overview
29/36
29
Web Tests
Load Tests
Ordered Tests
Agenda
-
8/14/2019 VSTS Overview
30/36
30
Very easy to create basic web tests
Record/playback scenario
Can be converted to coded tests
Can be data-driven
Tests HTTP requests and results only
Not a UI testing tool
Will record AJAX calls New in VSTS 2008
Web Testing
-
8/14/2019 VSTS Overview
31/36
31
Fully integrated into Visual Studio Team System
Simplifies adoption and integration
Test Manager and Test View are integrated into the shell
Very easy to create a work item based on a failed test
Tests are considered equal partners to code
Can be versioned, branched, labeled
Tests have full access to .NET Framework
Tests can be written in any .NET language
Can be inspected using the Visual Studio debugger
Visual Studio Integration
-
8/14/2019 VSTS Overview
32/36
32
Web Tests
Load Tests
Ordered Tests
Agenda
-
8/14/2019 VSTS Overview
33/36
33
Scale out load generation
Enables multiple commodity machines to be used to drive load One controller, add agent machines as needed
Efficient load generation About 1000 users from a typical test machine
Supports testing against web farms Ensures that load is applied to the actual production scenario
Test controller is licensed per machine, agents per CPU Not licensed per virtual user
Results in significant cost reduction
Enables team-based load testing
Performance counters collected on load agents and machines under test
Load Test Monitor enables monitoring a test in progress
Key Benefits Load Testing
-
8/14/2019 VSTS Overview
34/36
34
A load test can contain any automated test
Web tests, unit tests
Load tests can be run on a developers machine
Load test early and often
Specialized hardware not required
Load test agents and load test agent controllers used when scaling out
Load test agent controller runs as a service
Each load test agent can test about 1000 users
Load test parameters include: Test mix
Monitored performance counters
Ramp-up, virtual users, and think times
Load Testing
-
8/14/2019 VSTS Overview
35/36
36
Test containers that incorporate other tests
Except load tests
May include manual tests
Useful when testing across test and list hierarchy
Regression test bundles
Features that cross multiple teams
Guarantees that tests are executed in a specific order One pass/fail result for the entire container
Individual results can be viewed (double click results to drill-down)
Manual tests will be bypassed when running remotely
Ordered Tests
-
8/14/2019 VSTS Overview
36/36
Questions?