SlideShare a Scribd company logo
Technical Meeting
Automated Testing with
       VS2010
Suite of Application Lifecycle Management tools



http://msdn.microsoft.com/en-us/library/fda2bad5.aspx
application lifecycle management
http://www.clemensreijnen.nl/post/2008/02/18/ALM-Definitions.aspx
work together
__with work packages
__on alm artifacts
Testing Lifecycle




See also on www.tmap.net:
- The Test Lifecycle Model
- The 4 essentials
http://msdn.microsoft.com/en-us/library/bb385832.aspx
Microsoft Test Manager 2010
Test Case Management




See also on www.tmap.net: Control Phase
Test Plans
    Test Suites
    Test Configurations
Organize the testing effort in a Test Execution Plan
Create dynamic test suites for changing selection criteria
Define various test configurations and share automation across those
Test (Execution) Plans
Test (Execution) Plans
Test Plan Organization
Naming of test plans for agile environments:
Iteration number and name and one extra test plan for end
to end tests.
Test Configurations
Test Configurations
Test Suites
Test Suites Organization
Naming of test suites for agile environments:
Suite per user story (requirement based) and one additional
test suite for regression tests.(query based?)

(test cases are copied to the regression test suite)
Proposed organization
TCM.exe
TCM plan /list
TCM suites /lists planid:16
Share MTM Artifacts




mtm://clemenes-pc:8080/tfs/defaultcollection/p:MSF/Testing/testplan/connect?id=19
mtm://<server name>:<port>/<tfs vdir>/<Collection name>/p:<project name>/<center
 group>/<group specific>
               Open Test results
               Open Test Cases (or any work item)
               Open Test Runs
               Open Test Plans
               Connect to test plans
               mtm://server:8080/tfs/ProjectCollection/p:Project/testing/testcase/open?id=67




http://blogs.msdn.com/b/vstsqualitytools/archive/2010/02/09/sharing-content-in-microsoft-
test-manager.aspx
Test Case Specification




See also on www.tmap.net: Specification Phase
Test Case
    Shared Steps
    Test Data Iterations
Link test cases and requirements to provide requirement traceability
Data drive test cases with different parameters
Refactor common shared steps in test cases
Test Case
Test step types
Test steps
   Make them descriptive
   Not every step is a validation step
   Use the step attachment
Test steps copy-past
Test Data Iterations
Data drive test cases with different parameters
Test Data Iterations
Test data copy-past
Shared Steps
Refactor common shared steps in test cases
Reduce test maintenance by sharing test steps across test cases
Shared Steps
     Shared Step candidates?




• REUSE – Many steps, reused for many test cases . Benefit: time, retyping, boring work.
• EXPECTED CHANGES – for example environment variables change [URL]. Benefit: Time, test cases
   which need this step are updated automatically, also action recording.

• PRE- CONDITIONS – bring the system under test to a certain state and execute the different
   verifications. Benefit: beside time, you are certain the application under test is in the same state for every test case

• BACK TO INITIAL STATE - after test execution bring the environment back to the initial state for
   new test cases. Benefit: beside time, you are certain the application under test is always in a clean state for new test
   cases.
Test Execution
Test Runner

A test that you will want to run multiple times.
Different manual tests that contain common steps.
Verifying a bug is fixed by using a manual test.
Test Case Execution




See also on www.tmap.net: Execution Phase
Technical meeting automated testing with vs2010
Test Case Execution
Technical meeting automated testing with vs2010
Action recording
TCM
 run
/create
From TCM
run /export id:239 /resultsfile:”c:runresult”
Share with mtm://

 mtm://clemens-pc:8080/tfs/defaultcollection/p:MSF/Testing/testrun/open?id=292
Controlling the testing effort
BUG’s
File a BUG
Diagnostic Data Adapters
File a Bug
File an Exploratory Bug
Verify a Bug
Diagnostic Data Adapters
File a Bug
Submit a Bug using Test Runner
Ways to file a Bug

   Submit a Bug from the Test Runner
   Submit a Bug from the Verify Bugs View
   Submit a Bug from Test Results for a Test
Verify a Bug
Verify a Bug Fix Using Microsoft Test Manager
The Bug Flow
Link build 2 test
plan.                T   Execute   File Bug    Verify fix   Close or
Configure Data       E   Manual                by using     reopen
collectors.          S   Tests                 playback     Bug
                     T


         Build
     definition is
          the
     intergration

Setup build and
deploy               D               Resolve   Checkin
                     E               Bug       Build
                     V                         Deploy
Test Impact
Test Impact
Assign build 2
test plan.           T   Execute            Assign        Evaluated and reset
                          Execute
                           Execute
Configure Data       E   ‘passed’           ‘NEW’ build   tests impacted by
                          ‘passed’
                           ‘passed’
collectors.          S   Tests              2 Test Plan   code churn
                          Tests
                           Tests
                     T


         Build
     definition is
          the
     intergration

Setup build and
deploy               D            Make      Checkin
                     E            code      Build
                     V            changes   Deploy
Create test from Bug
Technical meeting automated testing with vs2010
File an Exploratory Bug
Submit an Exploratory Bug using Test Runner
PRO:
                                                 -   Reuse scenario knowledge business user
                                                 -   No typing detailed test steps
                                                 -   Easy to parameterize
1     Record scenario by business user with      -   Writing standards for test steps
    MTM on application under test. Action        -   MTM capabilities in step 3. (bug, codedUI,
                                                     recommended test etc …)
    recording is captured.                       Most benefit during step 2 (test case writing),
                                                 benefit in step 1: run once in common situation.
                                                 Benefit in step 3: common MTM benefits (record
                                                 playback, fast forward, parameters etc) and
                                                 benefit of well written steps.



2    Create test steps (with parameters) in
    MTM by using the action recording.
                                                 CON:
                                                 - Manual actions and tests.
                                                 - Test steps text are technical names
                                                 - Action recording (step 1) must be clean.
                                                 - Unknown what is validated, during step 2, need
                                                   additional knowledge.
                                                 - The business user must think of the important
                                                   scenarios
3    Save test case and execute it by a tester
                                                 The action recording during step 1 can have
    on application under test, by using MTM.     unnecessary steps, these can be removed during the
                                                 execution (1) or during the specification (2).
RECAP
Test Activities Planning…
Test Case Management
                     RECAP
RECAP
Test Case Specification
RECAP
Test Case Execution
Test Case Management
                     RECAP
Intellitrace
F5
1
Open the employee application
Set the intellitrace options
Set a breakpoint at …
2
When on the breakpoint, save the trace file on your desktop
3
Close Visual Studio and double click the intellitrace file
4
In the intellitrace summary, open the main threat …
5   … and search for
    The values that where entered
    during the previous run.
6
And now from Microsoft Test Manager
6
Set the diagnostic adapter
7
Configure the build… it needs a drop location for the symbols (pdb files)
8
Run the test case and see it crash… file a bug.
9
See the itrace file in the bug report...
10

Close MTM, open VS (with or without the employee application).
Got to the bug and click the itrace file…

See the exception and
start debugging…
11

Go back in time
11

Go back in time … and find the entered values
Regression Test Candidates




See also on www.tmap.net: Completion Phase
Test Automation
met Visual Studio 2010

                          Test automation
       Where? When? How? Who? Why? What?
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Where? When? How? Who? Why? What?
Where?   When? How? Who? Why? What?
Where? When? How? Who? Why? What?
VS2010 Test Tools
UI Test Automation Capabilities

                        Fast Forward
                             CodedUI
                  Test Infrastructure
Test Automation Investment Levels
 0   No investment in any kind of automation. Just click and test.



 1   Clean up of the Action log maybe re-execute, for more smooth Fast Forward.



 2   Basic CodedUI. Only use the default generation, add your own assertion.



 3   Advanced CodedUI. Customize the CodedUI and UIMap for optimization.
1   Clean up of the Action
2   Basic CodedUI




             VS2010 ALM MTLM usages patterns for
             Windows Azure hosted application
             development
3   Advanced CodedUI
Fast Forward
Cleaning the action recording
When: executing the same test case on
multiple environments or when using test data
iteration or … and don’t forget the shared
steps
CodedUI
CodedUI
from existing action recording from Manual Tester
CodedUI
from existing action recording from Manual Tester
CodedUI
from existing action recording from Manual Tester




                                                    2




                                                        1




                                                    4


                                                            3
CodedUI
Create a new action recording by Developer
UIMap
UIMap
Technical meeting automated testing with vs2010
Data-Driven
Coded UI Test
Test Infrastructure



Where and how to run the automated test?
Test Environments
See also on www.TMap.net:
- Checklist "Intake Test Environment“
- Checklist "Test Environment“
- Infrastructure Phase
Test lab
Visual Studio 2010 Lab Management
Where and how to run the automated test?
physical test environments
virtualized test environments
physical test                 virtualized test
environments                  environments
  MTLM Client                   MTLM Client


                Physical
                Test Client      TFS 2010     System Center Virtual
   TFS 2010
                                              Machine Manager
                                              (SCVMM)

                                              Hyper-V         Library
                Physical                      Host            Shares
                Test Client                     VM
                                                VM
                                                                share

                                                                share
Build
            application
                                        physical test environments
                                        versus
                                        virtualized test environments

                           Provision
Run tests
                          ‘clean’ env




              Deploy
            application
Lab for Physical
Environments, the
different flavors…
Visual Studio   Team
                Foundation
                Server




Test Manager
                             Build Server   Test Agent
                                                 Test Agent
                                                     Test Agent
Configurations for automated test execution:



                                  A




Flavor A: Execution from VS2010…
 Real developer test / test automation dry run
 (Triggered by: right mouse click – run tests, in test project)
 http://msdn.microsoft.com/en-us/library/dd286580.aspx

 No additional configuration needed*
 * Data Diagnostic Settings in the Local.Testsettings file are configurable.




                                                    Pro: Con:
                                     Easy setup No collection of test results in TFS
                    Debug-able test automation Run on developer environment
Configurations for automated test execution:


                                                             B




Flavor B: Execution during build with Build controller…
                                 not recommended, strange to run UI tests on build
  Part of Build Verification Tests
  (triggered by: build)

  Set the Build Service to run in interactive mode
  http://blogs.msdn.com/b/mathew_aniyan/archive/2009/05/26/coded-ui-test-in-a-team-build.aspx
  Configure the build to run the tests
  http://msdn.microsoft.com/en-us/library/ms182465.aspx#CreateBuildType
  * Data Diagnostic Settings in the *.Testsettings file are configurable.




                                              Pro: Con:
                                         Easy setup No collection of test results in TFS
                        Test results in build result Build Controller needs to run in interactive mode
                                                     Tests are executed on build environment
                                                     Run on build environment
Configurations for automated test execution:




                                                                     C


Flavor C: Execution during build with Test controller… B
                                       Preferred configuration above flavor
  Part of Build Verification Tests on multiple test agents
  (triggered by: build)

  Configure Test Controller (don’t register it with a project collection )
  http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestControllers
  Configure Test Agents on clients (interactive mode)
  http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestAgents
  Configure *.Testsettings file in solution to use Test Controller and Test Agents
  Configure the build to run the tests (see B)




                                                    Pro: Con:
                 Test run on test environments No collection of test results in TFS
           Tests run on multiple environments Harder to configure
                     Test Results in Build result Need for specific test client environments
                                                  Test Settings from VS
Configurations for automated test execution:




                                               D


Flavor D: Execution from Microsoft Test Manager…than BVT
                                         Other type of test
  Part of Regression Tests
  (triggered by: MTM user, right mouse click on test case, run)

  Configure Test Controller (register it with a project collection )
  Configure Test Agents on clients (interactive mode, can be the same as MTM)
  Configure Lab Center in MTM to use test controller and create test ‘agent’ environment.
  http://msdn.microsoft.com/en-us/library/ee390842.aspx
  http://msdn.microsoft.com/en-us/library/dd293551.aspx
  Associate CodedUI test with WI Test Case from VS.
  http://www.richard-banks.org/2010/11/how-to-use-codedui-tests-watin-and-mtm.html


                                                   Pro: Con:
                 Test run on test environments Manually triggered by Tester
           Tests run on multiple environments Hard to configure
                   Test Result in MTM and TFS Need for specific test client (same as MTM?)
                        Test Settings from MTM
Configurations for automated test execution:




                                                               E


Flavor E: Execution from MTM duringPreferred configuration above flavor C
                                     Build…
  Part of BVT                                                                 Flavor D and E can be configured together
  (triggered by: Build)

  Configure Test Controller (register it with a project collection )
  Configure Test Agents on clients (interactive mode, can be the same as MTM)
  Configure Lab Center in MTM to use test controller and create test ‘agent’ environment.
  Associate CodedUI test with WI Test Case from VS.
  Create Build task to run TCM or MSTEST task for Test Plan
  http://blogs.microsoft.co.il/blogs/shair/archive/2010/10/30/how-to-run-coded-ui-tests-from-command-line.aspx


                                                Pro: Con:
                 Test run on test environments Hard to configure
           Tests run on multiple environments Need for specific test client (same as MTM?)
                   Test Result in MTM and TFS
                             Triggered by build
Test Controller
Test Agent
New physical environment
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Execute CodedUI
During the build with Visual Studio 2010
Configurations for automated test execution:




                                                                     C


Flavor C: Execution during build with Test controller… B
                                       Preferred configuration above flavor
  Part of Build Verification Tests on multiple test agents
  (triggered by: build)

  Configure Test Controller (don’t register it with a project collection )
  http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestControllers
  Configure Test Agents on clients (interactive mode)
  http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestAgents
  Configure *.Testsettings file in solution to use Test Controller and Test Agents
  Configure the build to run the tests (see B)




                                                    Pro: Con:
                 Test run on test environments No collection of test results in TFS
           Tests run on multiple environments Harder to configure
                     Test Results in Build result Need for specific test client environments
                                                  Test Settings from VS
1
Configure Test Controller.
2
Add new Test Settings file
Set remote execution and
test controller.
3
Create a new build definition
Set the Automated Test Properties
4
Queue a new Build

Watch the Test Agent and
Test Environment
Execute CodedUI
Within a test case as an associated automation manualy
Configurations for automated test execution:




                                               D


Flavor D: Execution from Microsoft Test Manager…than BVT
                                         Other type of test
  Part of Regression Tests
  (triggered by: MTM user, right mouse click on test case, run)

  Configure Test Controller (register it with a project collection )
  Configure Test Agents on clients (interactive mode, can be the same as MTM)
  Configure Lab Center in MTM to use test controller and create test ‘agent’ environment.
  http://msdn.microsoft.com/en-us/library/ee390842.aspx
  http://msdn.microsoft.com/en-us/library/dd293551.aspx
  Associate CodedUI test with WI Test Case from VS.
  http://www.richard-banks.org/2010/11/how-to-use-codedui-tests-watin-and-mtm.html


                                                   Pro: Con:
                 Test run on test environments Manually triggered by Tester
           Tests run on multiple environments Hard to configure
                   Test Result in MTM and TFS Need for specific test client (same as MTM?)
                        Test Settings from MTM
1
Configure Test Controller.
2
Associate the CodedUI
with a Test Case.
2
Create Test Environment
3
Set test Settings
4
Associate the CodedUI
with a Test Case.
5
Run Automated Tests from Test Manager
Execute CodedUI
Within a test case as an associated automation from the build
Configurations for automated test execution:




                                                               E


Flavor E: Execution from MTM duringPreferred configuration above flavor C
                                     Build…
  Part of BVT                                                                 Flavor D and E can be configured together
  (triggered by: Build)

  Configure Test Controller (register it with a project collection )
  Configure Test Agents on clients (interactive mode, can be the same as MTM)
  Configure Lab Center in MTM to use test controller and create test ‘agent’ environment.
  Associate CodedUI test with WI Test Case from VS.
  Create Build task to run MTC or MSTEST task for Test Plan
  http://blogs.microsoft.co.il/blogs/shair/archive/2010/10/30/how-to-run-coded-ui-tests-from-command-line.aspx


                                                Pro: Con:
                 Test run on test environments Hard to configure
           Tests run on multiple environments Need for specific test client (same as MTM?)
                   Test Result in MTM and TFS
                              Triggered by build
                        Test Settings from MTM
Execute automated test cases on
different environments
0
Same steps as previous.
1
Configure additional environments in Test Plan properties.
                              Win 7 IE9 configuration
                                 Win 7 IE8 configuration


           TC   MTLM Client
                                                           Win 7 IE8 configuration
                                        Physical
                                        Test Client
                 TFS 2010



                                                           Win 7 IE9 configuration
                                        Physical
                                        Test Client
1
Get Test Plan ID
Get Test Suite
Get Test Configurations
  with TCM.exe
2
Create command line for Test Run for the different Test Configurations

    "run /create /title:""Run on Host for specific Test Point"" /planid:16
    /querytext:""SELECT * FROM TestPoint WHERE ConfigurationId=13""
    /settingsname:""Automated Test on Windows 7 Environment IE9""
    /testenvironment:""Win 7 IE9"" /collection:http://clemenes-
    pc:8080/tfs/defaultcollection /teamproject:EmployeeApplication"



    "run /create /title:""Run on test env for specific Test Point"" /planid:16
    /querytext:""SELECT * FROM TestPoint WHERE ConfigurationId=12""
    /settingsname:""Automated Test on Windows 7 Environment IE8""
    /testenvironment:""Win 7 IE8"" /collection:http://clemenes-
    pc:8080/tfs/defaultcollection /teamproject:EmployeeApplication"
3
Add build commands
6
Queue a new Build

Watch the Test Agent and
Test Environment
Build
            application




                           Provision
Run tests
                          ‘clean’ env




              Deploy
            application
VS2010 Lab Management
• Reproduce the exact conditions of a bug or other development
  issue.

• Build, deploy, and test applications automatically in a clean
  environment.

• Reduce the time required to create and configure machines for
  testing an application.

• Run multiple copies of a test or development at the same time.

• Enable members of a team to create and manage virtual
  environments without requiring system administrator privileges.
MTLM Client




TFS 2010                 System Center Virtual Machine
                         Manager (SCVMM)




                         Hyper-V             Library
                         Host                Shares

                           VM                  share

                           VM                  share
VM
Lab Agent
TFS 2010
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
Technical meeting automated testing with vs2010
staat voor resultaat

More Related Content

PPTX
Test Tooling in Visual Studio 2012 an overview
PPTX
Coded UI - Test automation Practices from the Field
PPTX
Coded ui - lesson 1 - overview
PPTX
Advanced Coded UI Testing
PPTX
Coded ui in a nutshell
PPT
UI testing frameworks and the Coded UI testing paradigm
PPTX
Testing the User Interface - Coded UI Tests with Visual Studio 2010
PPTX
Coded ui test
Test Tooling in Visual Studio 2012 an overview
Coded UI - Test automation Practices from the Field
Coded ui - lesson 1 - overview
Advanced Coded UI Testing
Coded ui in a nutshell
UI testing frameworks and the Coded UI testing paradigm
Testing the User Interface - Coded UI Tests with Visual Studio 2010
Coded ui test

What's hot (20)

PPTX
Unit testing with visual studio 2012
PPSX
QA with Microsoft Test Manager and Lab Management
PPT
MTM Test Management System
PPTX
Coded ui - lesson 9 - test windows
PPTX
Intro to Microsoft Test Manager
PPTX
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
PPTX
OPASS - Microsoft Test Manager
PPT
Automation testing by Durgasoft in Hyderabad
PPT
Automation testing material by Durgasoft,hyderabad
PPTX
Full Testing Experience - Visual Studio and TFS 2010
PPTX
SE2018_Lec 20_ Test-Driven Development (TDD)
DOCX
Testing in TFS
PPTX
Visual Studio 2010 Testing Overview
PPTX
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
PPTX
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
PDF
Automated Testing
PDF
Tutorial ranorex
PDF
Testing Tools
PPT
Automation testing IBM RFT - Rational Functional Tester
PPTX
Testing tools in visual studio
Unit testing with visual studio 2012
QA with Microsoft Test Manager and Lab Management
MTM Test Management System
Coded ui - lesson 9 - test windows
Intro to Microsoft Test Manager
Deep Dive Modern Apps Lifecycle with Visual Studio 2012: How to create cross ...
OPASS - Microsoft Test Manager
Automation testing by Durgasoft in Hyderabad
Automation testing material by Durgasoft,hyderabad
Full Testing Experience - Visual Studio and TFS 2010
SE2018_Lec 20_ Test-Driven Development (TDD)
Testing in TFS
Visual Studio 2010 Testing Overview
Model-Based Testing: Theory and Practice. Keynote @ MoTiP (ISSRE) 2012.
STARWEST 2011 - 7 Steps To Improving Software Quality using Microsoft Test Ma...
Automated Testing
Tutorial ranorex
Testing Tools
Automation testing IBM RFT - Rational Functional Tester
Testing tools in visual studio
Ad

Similar to Technical meeting automated testing with vs2010 (20)

PDF
Alm 4 Azure with screenshots
PPTX
Visual Studio 2010 Testing & Lab Management Tools
PPTX
Mastering Distributed Performance Testing
PDF
JUnit with_mocking
PPT
2 v presentation_new
PPT
2V_presentation
PPT
Review of an open source unit test tool- Cucumber_Presentation
PDF
Alm 4 Azure
PPTX
Test driven development in .Net - 2010 + Eclipse
PDF
What is Unit Testing_ - A Complete Guide.pdf
PPTX
Containerize your Blackbox tests
PDF
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
PPT
Qtp92 Presentation
DOC
SOFTWARE VERIFICATION & VALIDATION
PPT
Software testing ari force institute of tech.
PDF
What is Unit Testing? - A Complete Guide
PPT
Qtp Basics
PPT
Testing
PPT
Test planning.ppt
PDF
Planning & building scalable test infrastructure
Alm 4 Azure with screenshots
Visual Studio 2010 Testing & Lab Management Tools
Mastering Distributed Performance Testing
JUnit with_mocking
2 v presentation_new
2V_presentation
Review of an open source unit test tool- Cucumber_Presentation
Alm 4 Azure
Test driven development in .Net - 2010 + Eclipse
What is Unit Testing_ - A Complete Guide.pdf
Containerize your Blackbox tests
Test Automation and Keyword-driven testing af Brian Nielsen, CISS/AAU
Qtp92 Presentation
SOFTWARE VERIFICATION & VALIDATION
Software testing ari force institute of tech.
What is Unit Testing? - A Complete Guide
Qtp Basics
Testing
Test planning.ppt
Planning & building scalable test infrastructure
Ad

More from Clemens Reijnen (18)

PPTX
Azure for software development teams
PDF
06 operations and feedback
PDF
05 test infrastructure
PDF
04 test controlling and tracking
PDF
03 test specification and execution
PDF
02 test planning
PDF
01 the value of quality
PPTX
A Collaborative culture
PPTX
ALM - Getting Testing done in a Sprint
PDF
TFS11 on Azure advanced
PDF
TFS11 on Azure the basics
PDF
MTLM Visual Studio 2010 ALM workshop - day1
PDF
MTLM Visual Studio 2010 ALM - day2
PDF
MTLM Visual Studio 2010 ALM workshop
PDF
Scrum with VS2010
PDF
Talk Through Sogeti ALM 4 Azure
PPTX
TMap for VS2010 - SlideShare.
PPTX
Work agile with VS2010
Azure for software development teams
06 operations and feedback
05 test infrastructure
04 test controlling and tracking
03 test specification and execution
02 test planning
01 the value of quality
A Collaborative culture
ALM - Getting Testing done in a Sprint
TFS11 on Azure advanced
TFS11 on Azure the basics
MTLM Visual Studio 2010 ALM workshop - day1
MTLM Visual Studio 2010 ALM - day2
MTLM Visual Studio 2010 ALM workshop
Scrum with VS2010
Talk Through Sogeti ALM 4 Azure
TMap for VS2010 - SlideShare.
Work agile with VS2010

Recently uploaded (20)

PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PPTX
A Presentation on Artificial Intelligence
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Spectroscopy.pptx food analysis technology
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Cloud computing and distributed systems.
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Advanced methodologies resolving dimensionality complications for autism neur...
sap open course for s4hana steps from ECC to s4
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
NewMind AI Weekly Chronicles - August'25-Week II
A Presentation on Artificial Intelligence
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectroscopy.pptx food analysis technology
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
Cloud computing and distributed systems.
Assigned Numbers - 2025 - Bluetooth® Document
Unlocking AI with Model Context Protocol (MCP)
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx

Technical meeting automated testing with vs2010

  • 2. Suite of Application Lifecycle Management tools http://msdn.microsoft.com/en-us/library/fda2bad5.aspx
  • 4. work together __with work packages __on alm artifacts
  • 5. Testing Lifecycle See also on www.tmap.net: - The Test Lifecycle Model - The 4 essentials
  • 8. Test Case Management See also on www.tmap.net: Control Phase
  • 9. Test Plans Test Suites Test Configurations Organize the testing effort in a Test Execution Plan Create dynamic test suites for changing selection criteria Define various test configurations and share automation across those
  • 12. Test Plan Organization Naming of test plans for agile environments: Iteration number and name and one extra test plan for end to end tests.
  • 16. Test Suites Organization Naming of test suites for agile environments: Suite per user story (requirement based) and one additional test suite for regression tests.(query based?) (test cases are copied to the regression test suite)
  • 20. TCM suites /lists planid:16
  • 22. mtm://<server name>:<port>/<tfs vdir>/<Collection name>/p:<project name>/<center group>/<group specific> Open Test results Open Test Cases (or any work item) Open Test Runs Open Test Plans Connect to test plans mtm://server:8080/tfs/ProjectCollection/p:Project/testing/testcase/open?id=67 http://blogs.msdn.com/b/vstsqualitytools/archive/2010/02/09/sharing-content-in-microsoft- test-manager.aspx
  • 23. Test Case Specification See also on www.tmap.net: Specification Phase
  • 24. Test Case Shared Steps Test Data Iterations Link test cases and requirements to provide requirement traceability Data drive test cases with different parameters Refactor common shared steps in test cases
  • 27. Test steps Make them descriptive Not every step is a validation step Use the step attachment
  • 29. Test Data Iterations Data drive test cases with different parameters
  • 32. Shared Steps Refactor common shared steps in test cases Reduce test maintenance by sharing test steps across test cases
  • 33. Shared Steps Shared Step candidates? • REUSE – Many steps, reused for many test cases . Benefit: time, retyping, boring work. • EXPECTED CHANGES – for example environment variables change [URL]. Benefit: Time, test cases which need this step are updated automatically, also action recording. • PRE- CONDITIONS – bring the system under test to a certain state and execute the different verifications. Benefit: beside time, you are certain the application under test is in the same state for every test case • BACK TO INITIAL STATE - after test execution bring the environment back to the initial state for new test cases. Benefit: beside time, you are certain the application under test is always in a clean state for new test cases.
  • 34. Test Execution Test Runner A test that you will want to run multiple times. Different manual tests that contain common steps. Verifying a bug is fixed by using a manual test.
  • 35. Test Case Execution See also on www.tmap.net: Execution Phase
  • 41. From TCM run /export id:239 /resultsfile:”c:runresult”
  • 42. Share with mtm:// mtm://clemens-pc:8080/tfs/defaultcollection/p:MSF/Testing/testrun/open?id=292
  • 43. Controlling the testing effort BUG’s
  • 45. Diagnostic Data Adapters File a Bug File an Exploratory Bug Verify a Bug
  • 47. File a Bug Submit a Bug using Test Runner
  • 48. Ways to file a Bug Submit a Bug from the Test Runner Submit a Bug from the Verify Bugs View Submit a Bug from Test Results for a Test
  • 49. Verify a Bug Verify a Bug Fix Using Microsoft Test Manager
  • 50. The Bug Flow Link build 2 test plan. T Execute File Bug Verify fix Close or Configure Data E Manual by using reopen collectors. S Tests playback Bug T Build definition is the intergration Setup build and deploy D Resolve Checkin E Bug Build V Deploy
  • 52. Test Impact Assign build 2 test plan. T Execute Assign Evaluated and reset Execute Execute Configure Data E ‘passed’ ‘NEW’ build tests impacted by ‘passed’ ‘passed’ collectors. S Tests 2 Test Plan code churn Tests Tests T Build definition is the intergration Setup build and deploy D Make Checkin E code Build V changes Deploy
  • 55. File an Exploratory Bug Submit an Exploratory Bug using Test Runner
  • 56. PRO: - Reuse scenario knowledge business user - No typing detailed test steps - Easy to parameterize 1 Record scenario by business user with - Writing standards for test steps MTM on application under test. Action - MTM capabilities in step 3. (bug, codedUI, recommended test etc …) recording is captured. Most benefit during step 2 (test case writing), benefit in step 1: run once in common situation. Benefit in step 3: common MTM benefits (record playback, fast forward, parameters etc) and benefit of well written steps. 2 Create test steps (with parameters) in MTM by using the action recording. CON: - Manual actions and tests. - Test steps text are technical names - Action recording (step 1) must be clean. - Unknown what is validated, during step 2, need additional knowledge. - The business user must think of the important scenarios 3 Save test case and execute it by a tester The action recording during step 1 can have on application under test, by using MTM. unnecessary steps, these can be removed during the execution (1) or during the specification (2).
  • 63. F5
  • 64. 1 Open the employee application Set the intellitrace options Set a breakpoint at …
  • 65. 2 When on the breakpoint, save the trace file on your desktop
  • 66. 3 Close Visual Studio and double click the intellitrace file
  • 67. 4 In the intellitrace summary, open the main threat …
  • 68. 5 … and search for The values that where entered during the previous run.
  • 69. 6 And now from Microsoft Test Manager
  • 71. 7 Configure the build… it needs a drop location for the symbols (pdb files)
  • 72. 8 Run the test case and see it crash… file a bug.
  • 73. 9 See the itrace file in the bug report...
  • 74. 10 Close MTM, open VS (with or without the employee application). Got to the bug and click the itrace file… See the exception and start debugging…
  • 76. 11 Go back in time … and find the entered values
  • 77. Regression Test Candidates See also on www.tmap.net: Completion Phase
  • 78. Test Automation met Visual Studio 2010 Test automation Where? When? How? Who? Why? What?
  • 81. Where? When? How? Who? Why? What?
  • 82. Where? When? How? Who? Why? What?
  • 83. Where? When? How? Who? Why? What?
  • 84. VS2010 Test Tools UI Test Automation Capabilities Fast Forward CodedUI Test Infrastructure
  • 85. Test Automation Investment Levels 0 No investment in any kind of automation. Just click and test. 1 Clean up of the Action log maybe re-execute, for more smooth Fast Forward. 2 Basic CodedUI. Only use the default generation, add your own assertion. 3 Advanced CodedUI. Customize the CodedUI and UIMap for optimization.
  • 86. 1 Clean up of the Action
  • 87. 2 Basic CodedUI VS2010 ALM MTLM usages patterns for Windows Azure hosted application development
  • 88. 3 Advanced CodedUI
  • 90. Cleaning the action recording When: executing the same test case on multiple environments or when using test data iteration or … and don’t forget the shared steps
  • 92. CodedUI from existing action recording from Manual Tester
  • 93. CodedUI from existing action recording from Manual Tester
  • 94. CodedUI from existing action recording from Manual Tester 2 1 4 3
  • 95. CodedUI Create a new action recording by Developer
  • 96. UIMap
  • 97. UIMap
  • 100. Test Infrastructure Where and how to run the automated test?
  • 101. Test Environments See also on www.TMap.net: - Checklist "Intake Test Environment“ - Checklist "Test Environment“ - Infrastructure Phase
  • 102. Test lab Visual Studio 2010 Lab Management
  • 103. Where and how to run the automated test? physical test environments virtualized test environments
  • 104. physical test virtualized test environments environments MTLM Client MTLM Client Physical Test Client TFS 2010 System Center Virtual TFS 2010 Machine Manager (SCVMM) Hyper-V Library Physical Host Shares Test Client VM VM share share
  • 105. Build application physical test environments versus virtualized test environments Provision Run tests ‘clean’ env Deploy application
  • 106. Lab for Physical Environments, the different flavors… Visual Studio Team Foundation Server Test Manager Build Server Test Agent Test Agent Test Agent
  • 107. Configurations for automated test execution: A Flavor A: Execution from VS2010… Real developer test / test automation dry run (Triggered by: right mouse click – run tests, in test project) http://msdn.microsoft.com/en-us/library/dd286580.aspx No additional configuration needed* * Data Diagnostic Settings in the Local.Testsettings file are configurable. Pro: Con: Easy setup No collection of test results in TFS Debug-able test automation Run on developer environment
  • 108. Configurations for automated test execution: B Flavor B: Execution during build with Build controller… not recommended, strange to run UI tests on build Part of Build Verification Tests (triggered by: build) Set the Build Service to run in interactive mode http://blogs.msdn.com/b/mathew_aniyan/archive/2009/05/26/coded-ui-test-in-a-team-build.aspx Configure the build to run the tests http://msdn.microsoft.com/en-us/library/ms182465.aspx#CreateBuildType * Data Diagnostic Settings in the *.Testsettings file are configurable. Pro: Con: Easy setup No collection of test results in TFS Test results in build result Build Controller needs to run in interactive mode Tests are executed on build environment Run on build environment
  • 109. Configurations for automated test execution: C Flavor C: Execution during build with Test controller… B Preferred configuration above flavor Part of Build Verification Tests on multiple test agents (triggered by: build) Configure Test Controller (don’t register it with a project collection ) http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestControllers Configure Test Agents on clients (interactive mode) http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestAgents Configure *.Testsettings file in solution to use Test Controller and Test Agents Configure the build to run the tests (see B) Pro: Con: Test run on test environments No collection of test results in TFS Tests run on multiple environments Harder to configure Test Results in Build result Need for specific test client environments Test Settings from VS
  • 110. Configurations for automated test execution: D Flavor D: Execution from Microsoft Test Manager…than BVT Other type of test Part of Regression Tests (triggered by: MTM user, right mouse click on test case, run) Configure Test Controller (register it with a project collection ) Configure Test Agents on clients (interactive mode, can be the same as MTM) Configure Lab Center in MTM to use test controller and create test ‘agent’ environment. http://msdn.microsoft.com/en-us/library/ee390842.aspx http://msdn.microsoft.com/en-us/library/dd293551.aspx Associate CodedUI test with WI Test Case from VS. http://www.richard-banks.org/2010/11/how-to-use-codedui-tests-watin-and-mtm.html Pro: Con: Test run on test environments Manually triggered by Tester Tests run on multiple environments Hard to configure Test Result in MTM and TFS Need for specific test client (same as MTM?) Test Settings from MTM
  • 111. Configurations for automated test execution: E Flavor E: Execution from MTM duringPreferred configuration above flavor C Build… Part of BVT Flavor D and E can be configured together (triggered by: Build) Configure Test Controller (register it with a project collection ) Configure Test Agents on clients (interactive mode, can be the same as MTM) Configure Lab Center in MTM to use test controller and create test ‘agent’ environment. Associate CodedUI test with WI Test Case from VS. Create Build task to run TCM or MSTEST task for Test Plan http://blogs.microsoft.co.il/blogs/shair/archive/2010/10/30/how-to-run-coded-ui-tests-from-command-line.aspx Pro: Con: Test run on test environments Hard to configure Tests run on multiple environments Need for specific test client (same as MTM?) Test Result in MTM and TFS Triggered by build
  • 120. Execute CodedUI During the build with Visual Studio 2010
  • 121. Configurations for automated test execution: C Flavor C: Execution during build with Test controller… B Preferred configuration above flavor Part of Build Verification Tests on multiple test agents (triggered by: build) Configure Test Controller (don’t register it with a project collection ) http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestControllers Configure Test Agents on clients (interactive mode) http://msdn.microsoft.com/en-us/library/dd648127.aspx#TestAgents Configure *.Testsettings file in solution to use Test Controller and Test Agents Configure the build to run the tests (see B) Pro: Con: Test run on test environments No collection of test results in TFS Tests run on multiple environments Harder to configure Test Results in Build result Need for specific test client environments Test Settings from VS
  • 123. 2 Add new Test Settings file Set remote execution and test controller.
  • 124. 3 Create a new build definition Set the Automated Test Properties
  • 125. 4 Queue a new Build Watch the Test Agent and Test Environment
  • 126. Execute CodedUI Within a test case as an associated automation manualy
  • 127. Configurations for automated test execution: D Flavor D: Execution from Microsoft Test Manager…than BVT Other type of test Part of Regression Tests (triggered by: MTM user, right mouse click on test case, run) Configure Test Controller (register it with a project collection ) Configure Test Agents on clients (interactive mode, can be the same as MTM) Configure Lab Center in MTM to use test controller and create test ‘agent’ environment. http://msdn.microsoft.com/en-us/library/ee390842.aspx http://msdn.microsoft.com/en-us/library/dd293551.aspx Associate CodedUI test with WI Test Case from VS. http://www.richard-banks.org/2010/11/how-to-use-codedui-tests-watin-and-mtm.html Pro: Con: Test run on test environments Manually triggered by Tester Tests run on multiple environments Hard to configure Test Result in MTM and TFS Need for specific test client (same as MTM?) Test Settings from MTM
  • 133. 5 Run Automated Tests from Test Manager
  • 134. Execute CodedUI Within a test case as an associated automation from the build
  • 135. Configurations for automated test execution: E Flavor E: Execution from MTM duringPreferred configuration above flavor C Build… Part of BVT Flavor D and E can be configured together (triggered by: Build) Configure Test Controller (register it with a project collection ) Configure Test Agents on clients (interactive mode, can be the same as MTM) Configure Lab Center in MTM to use test controller and create test ‘agent’ environment. Associate CodedUI test with WI Test Case from VS. Create Build task to run MTC or MSTEST task for Test Plan http://blogs.microsoft.co.il/blogs/shair/archive/2010/10/30/how-to-run-coded-ui-tests-from-command-line.aspx Pro: Con: Test run on test environments Hard to configure Tests run on multiple environments Need for specific test client (same as MTM?) Test Result in MTM and TFS Triggered by build Test Settings from MTM
  • 136. Execute automated test cases on different environments
  • 137. 0 Same steps as previous.
  • 138. 1 Configure additional environments in Test Plan properties. Win 7 IE9 configuration Win 7 IE8 configuration TC MTLM Client Win 7 IE8 configuration Physical Test Client TFS 2010 Win 7 IE9 configuration Physical Test Client
  • 139. 1 Get Test Plan ID Get Test Suite Get Test Configurations with TCM.exe
  • 140. 2 Create command line for Test Run for the different Test Configurations "run /create /title:""Run on Host for specific Test Point"" /planid:16 /querytext:""SELECT * FROM TestPoint WHERE ConfigurationId=13"" /settingsname:""Automated Test on Windows 7 Environment IE9"" /testenvironment:""Win 7 IE9"" /collection:http://clemenes- pc:8080/tfs/defaultcollection /teamproject:EmployeeApplication" "run /create /title:""Run on test env for specific Test Point"" /planid:16 /querytext:""SELECT * FROM TestPoint WHERE ConfigurationId=12"" /settingsname:""Automated Test on Windows 7 Environment IE8"" /testenvironment:""Win 7 IE8"" /collection:http://clemenes- pc:8080/tfs/defaultcollection /teamproject:EmployeeApplication"
  • 142. 6 Queue a new Build Watch the Test Agent and Test Environment
  • 143. Build application Provision Run tests ‘clean’ env Deploy application
  • 144. VS2010 Lab Management • Reproduce the exact conditions of a bug or other development issue. • Build, deploy, and test applications automatically in a clean environment. • Reduce the time required to create and configure machines for testing an application. • Run multiple copies of a test or development at the same time. • Enable members of a team to create and manage virtual environments without requiring system administrator privileges.
  • 145. MTLM Client TFS 2010 System Center Virtual Machine Manager (SCVMM) Hyper-V Library Host Shares VM share VM share