450 likes | 557 Views
06 | Develop Customer Value with High Quality. Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence. Module Overview. Define code quality indicators Incorporate unit testing Develop code Validate quality Customize a team project.
E N D
06 | Develop Customer Value with High Quality Anthony Borton | ALM Consultant, Enhance ALM Steven Borg | Co-founder & Strategist, Northwest Cadence
Module Overview • Define code quality indicators • Incorporate unit testing • Develop code • Validate quality • Customize a team project
What the Study Guide says… • Define code quality indicators • performing code review, including security and performance analysis • analyzingcode for common defects • calculating code coverage • performing architecture validation
Code reviews • Full workflow backed Code review experience • Send requests to one or more team members • Great new Diff experience • Inline mode • Side-by-Side mode • Line highlighting including sub-line highlighting • Full Intellisense within Diff Tool • Accept or decline code review requests from others
What the Study Guide says… • Incorporate unit testing • establishing unit test standards • developing a strategy for adding unit tests to existing applications • selecting the unit test type • establishing the code coverage target
Unit Testing Architecture Visual Studio Unit Test Explorer Command Line Runner TeamBuild Unit Test Activity Visual Studio Unit Test Platform MS-Test Managed MS-Test Native NUnit xUnit.net QUnit MORE!
Developer Focused Unit Test Experience Search Red-Green Bar Most important tests shown first Timings Shows tests from any framework Run Details
Code coverage in VS2012 • Analyze your code coverage with a single click • Analyze for selected tests to help find how specific tests are covering your system • Supports native code (via the MS-Test Native framework) • Works with third party managed & native frameworks
Code Clone Analysis • New feature in Visual Studio 2012 • Looks for semantically similar code using a heuristic search technique • More than just simply searching for exact matches
What the Study Guide says… • Develop code • developing maintainable code • defining coding standards • defining application architecture • defining configuration management process and tooling (source control tree, branching strategy, solution structure, source control/check-in policy)
Branching Guidance • ALM Rangers Guidance Document • http://vsarbranchingguide.codeplex.com/
What the Study Guide says… • Validate quality • organizing test artifacts such as test cases, suites, plans, and requirements • defining test strategy • managing test execution • identifying test types and associated tools • identifying and configuring environments • Analyzingtest runs
Test Plans • Test plans allow you to group your test suites, test cases and configurations into a convenient group Test Plan Test Suites TEST SUITE A TEST SUITE B TEST SUITE C TESTCASES TESTCASES TESTCASES Test Configurations XP and IE7 Vista and IE8 XP and IE8 Win2K8 and IE8
Test Suites • Test suites are groups of related test cases • There are three types of Test Suites • Requirements based test suite • Static Test Suite • Query-based Test Suite
Understanding each test type in Visual Studio • In this section we’ll look at each of the following type types • Unit tests • Manual tests • Coded UI tests • Ordered tests • Generic tests • Web performance tests • Load tests
Unit tests • Written by programmers for use by programmers • Can be run manually or automatically, usually as part of a build process. (Eg. Continuous Integration) • Become a form of code documentation by detailing the behaviour of application logic
Manual tests • Are lists of steps to be manually performed by a tester • Manual tests are created as Test Case work items in Team Foundation Server • Contain expected results that a manual tester must choose to pass or fail • Manual tests are primarily worked on using Microsoft Test Manager (MTM)
Coded UI tests • Automated tests of the user interface (UI) are known as coded UI tests. • Provide functional testing of the UI and validation of UI controls. • You can create coded UI tests to determine that the UI is functioning correctly after code changes. • Can be created by recording your actions or from an action recording on a manual test
Ordered tests • An ordered test contains other tests that are meant to be run in a specified order. • Each test is self-contained and independent. • Environment state is not retained between each test that is run. • Do not use an ordered test in which any of the tests have dependencies on the outcome of previous tests in the ordered test.
Generic tests • Generic tests call external programs and tests. • Use a generic test to wrap an existing test, program, or third-party tool that behaves as follows: • It can be run from a command line. • It returns a value of Pass or Fail.
Load testing • Used to ensure your web application performs as expected under a range of user loads. • Can be used for smoke, load and stress testing. • Visual Studio monitors the system under test and can provide an enormous amount of data. • Understanding Performance Monitor counters is required to really interpret the test results .
Web Performance Testing • Repeatable tests that drive a web application using the HTTP layer. • Recorded using a web browser but executed using network classes. • You can analyse the HTTP response. • Primarily used as the building blocks for Load Tests. • Should not be confused with Coded UI Tests.
Microsoft Test Manager • The Microsoft Test Manager (MTM) comprises two Activity Centers; • Testing Center • Work with manual test cases • Lab Center • Allows you to work with physical or virtual lab environments • Switch between the two parts using the Activity Center drop down
What the Study Guide says… • Customize a team project • customizing a Work Item • customizing Work Item Queries • customizing Team Portal • identifying areas and iterations • managing roles and associated permissions
What is a Process Template? • The template TFS uses when creating new Team Projects • Defines key aspects of a team project such as work item types, queries and reports • You can choose a process template during the project creation wizard • While some aspects of the process can be changed after a project has been created, you can’t simply change from one process template to another after the project has been created
Template Architecture • Process Template Composition • New Team Project Wizard • used by project leads to create a new team project • XML Process definition files • a set of tasks that must run to correctly configure a new team project for the process. Build Classifications Group and Permissions Lab Reports Test Management Version Control Windows SharePoint Services WorkItem Tracking
Available templates • There are three out-of-the-box templates (at RTM) • Microsoft Visual Studio Scrum 2.0 • MSF for Agile Software Development 6.0 • MSF for CMMI Process Improvement 6.0 • While the Scrum and Agile templates are similar, the CMMI template is based on a different MSF process with a different philosophical approach to software development.
Tips before you begin • Process Template customisation should be planned and well considered before starting • Always test templates on non-production TFS server instances BEFORE uploading to a production server • Avoid changes for the sake of change • Manage template files in the same way you would work with .NET source code. • Store in TFS Source repository • Adopt branching/labelling practises to track versions
The customisation process • Download the default process template that you are either currently using or that most closely matches what you want • Rename the template (Important) • Make a few small changes at a time • Verify your changes as you go • Upload to a non-production server to test • Create a new team project using your template • Verify the changes you have made are correct
ProcessTemplate.xml Step 1: Change the template name Step 2: Change the template description Step 3: Change the GUID and version numbers
EXAM BEST BETS • While you do not generally need to know the specifics of how to use every quality tool, make sure you know; • what they are • what value they offer • what problems/issues they can solve • You don’t need to know everything about template customization but have a good general knowledge