Gijo Varghese's WebLog

  • Best Practices in Testing

     

    Importance of testing in computer applications is increasing day by day. Role of QA is to ensure quality of the product starting from product planning and design phase to final deployment. Efficient testing techniques and best practices at every stage of product life cycle are very important to deliver quality products to customers. The following is a compilation of some best practices in testing at various stages of product life cycle. It is not an exhaustive list. We can add lot more to it. This list is compiled from the trainings and presentations on various testing aspects and my own experience in testing @ Microsoft.

     

    Define the scope of testing and Quality matrix early

     

    One of the key challenges of a tester is to define the quality criteria with a clear agreement to the team and defining the scope of testing. As the product evolves, revisiting these criteria as per the changes is very important.

     

           Testing is an infinite space! You need to define the boundaries for this!

           How do you say that you are done with testing?

           Identify your quality criteria early

           Define the scope of testing and testing matrix

           Definition comes from whole team, but testing can drive

           Once identified, aim for them, and (most importantly) stick to them

           When you reach the criteria, you’re done, ship it!

           Publish them, make sure the entire team knows and understands them

           Track your progress against the goals

           Establish a formal process for change.  They will change over time; just make sure that change is managed.

     

    Test the Specification documents

     

    Prevention is better than cure! At MS, test is involved right from the beginning of the product cycle instead of starting after a code complete stage. Getting involved at the specification stage is very valuable. QA should look from the customer’s viewpoint to ensure the specification is meeting customer needs!

     

              Many testing teams uses some standard check list for specification doc validations.

              There are standard techniques like model based testing for spec validations.

              ~30% of all bugs could have been avoided in the spec stage

              Testing must be involved in specification reviews

              Testing is the advocate for the customer

              Does it meet the requirements?

              Is it testable? At the same time no security holes later with your testing hooks!

              Bug’s fixed earlier cost less, so fixing an issue at specification stage is very much valuable.

              Want to reduce the number of bugs that get to testing?  Reduce the number of bugs that get to development!

     

    Do Design, Code Reviews

     

    Many times test tends to ignore design and code review – at that stage they may be busy with test plan!

              Right design is very important

              Fixing a wrong design may prevent a pattern of bugs

              Consider stress and performance early

              White box testing – this should be an ongoing process

              Hard coding / Localization / Globalization issues

              Special handling / special casing – my experience taught me this area is a bug mine!

     

    Manage your Bugs!

     

    The quality of the bug filed by a tester talks a lot about the tester!

     

           Describe bugs accurately with clear repro steps

           Clearly give the customer scenario and impact.

           Quality of bugs matters, not just the number of bugs

           Give the right priority and severity

           Promote practices that keep open bug counts down

           Track bug metrics and get blocking bugs fixed with high priority

           File bugs on each and every issue to track them.

           Be proactive; analyze the patterns of bugs to identify weak design areas.

           You should not wait until the end of the milestone to verify the resolved bugs

           Do not put more than one bug in the same bug entry

           Do not resolve a bug not Repro unless it truly is not reproducible

     

    Test Automation

     

    Automation of the tests is very important for efficient regression runs and to save manual efforts in repeated testing. Time to automate, maintenance cost and amount of time for manual testing are crucial deciding factors on deciding on the % of automation at various stages of product life cycle.

     

              Identify the right tools and frameworks for your automation. Think about long term benefits, extensibility, maintenance and reporting.

              When to automate? Especially UI tests

            Specification documents should be closed – tester should drive for it. If we start automating early without the product specification fixed, it will lead to lots of automation destabilization and maintenance.

              Goal: Minimal tests to get max coverage.

              Start with the key functionality test automation and later expand it to cover the desired feature lists.

              Consider stabilizations and stabilization costs

              Manual tests – Is there a better way to do it? If we are doing it repeatedly, look for a way to automate it. Trade off is the time to automate and maintain vs the amount of time you spend in running manually.

              Frameworks should be globalization/localization ready if you are doing these testing.

              Fix test issues upfront! A stitch  in time saves nine J

              Tools – are you reinventing the wheel? Look around and see if you have the same tools available!

              Use measures like code coverage to ensure you have sufficient coverage for your tests.

     

    Test Your Tests!   

     

    What if your tests are not catching the bugs? Test automation and test codes are to be reviewed with good attention to the details.

     

              How will you ensure your test code catches bugs? Is there any false positives?

              Ongoing risk analysis ensures you’re testing the most important things

              Coverage analysis ensures that your tests are testing everything you think they are

              Code reviews for testing are more important than code reviews for dev

     

    Analyze Your Tests

     

    A good tester will keep analyzing his tests to ensure the quality of the product is good at all stages of product cycle.

     

           Risk Analysis -likelihood of a problem happening and impact if it happens

           Bug Analysis – is the product getting stable? Do I see any patterns?

           Product Analysis – functional, data, platform, code coverage – what changed as the product cycle changes and progress?

           Data Domain Analysis – have you covered all the possible ranges?

           Change Analysis – have you added new tests for the final stage bug fixes/design changes/feature additions?

           Code coverage Analysis – how much of the code is touched by your tests?

           Functional coverage – how much of the functionality is covered by your tests?

     

    Private Testing for late design changes

     

    Late design changes in the product cycle could be risky. Test should ensure proper quality gates are used to do large design changes to avoid destabilization of the product.

     

              Ensure there is proper code review done before check in.

              Define a check in criteria for risky design changes.

              Do private testing and signoff when there is a large design change.

              Add new tests to your test suites

     

    Communication

     

    Efficient communication is a key to the success of a tester. It could be in the form of calling out the quality concern to the team or collaborating with the peers to leverage their knowledge to improve the component quality or pushing back on enabling key customer scenarios.

     

              Work in perfect sync with developer and project management team.

              Leverage from all experienced hands – third eye! Ask your friend to dogfood your component or conduct bug bashes.

              No assumptions in testing! Make your assumptions public!

              No biasing/Assuming it works ( if x works 1000x will work)

              Let the team know what you think about product quality – Good/Fair/Bad

              Call out what is tested and what is remaining!

              If there is a decision taken by the development/project management team on not fixing the bug – If you disagree on the decision, always raise it to the team with the justifications. At the same time pick the right bugs and understand the prioritizations.

     

  • CQConverter Migration Issue Due to Missing ClearQuest Registry Path

    Rational ClearQuest to VSTS Work Item Tracking Migration Tool will migrate existing ClearQuest work items (schema and data) to VSTS work item tracking system. Team Foundation includes this conversion utility, CQConverter.exe, that you can use to perform this migration.

     

    To understand more about the usage of this tool to migrate your existing ClearQuest work items to VSTS work item tracking, please refer the walk through: Walkthrough: Migrating ClearQuest Work Items to Team Foundation

     

    Supported ClearQuest Versions for Migration

    ·         ClearQuest Standalone client Versions 2003.06.00 / 2003.06.12. We have tested these two versions. Ideally Versions 2003.06.XX should work. We have recently tried 2003.06.13 also.

    ·          Versions 2002.05.20 and 2003.05.00 may also work, but have not been tested.

    Even with supported versions, we may encounter the following issue if we don’t have proper ClearQuest registry path set on the migration client under the account used for migration:

    {Total Errors 1} ERROR: TF61103: The converter could not find a supported version of the ClearQuest client. Please refer to CQConverter help for a list of supported versions.

     

    One of the possible scenarios where it can happen is: We installed ClearQuest client using one account1 say “user1” and later logging in using account2 say “user2”. Converter will check for the existence of key HKEY_CURRENT_USER\SOFTWARE\Rational Software\ClearQuest before proceeding with migration. But since the installation was done using “user1” account, the registry key will not be present under current user when you login with “user2”. This happens if you are trying migration directly even before opening ClearQuest client once from the account used for migration.

     

    How to fix this issue?

     

    Before starting migration process, open ClearQuest client from the same account where you are running migration and connect to the ClearQuest database from where you want to migrate work items. When you open ClearQuest client, it will create the registry key under HKEY_CURRENT_USER\SOFTWARE\Rational Software\ClearQuest. Hence converter check for this key will succeed and migration will start for the supported versions.

     

     

  • CQConverter Migration Issue Due to Missing ClearQuest Path Setting

    Rational ClearQuest to VSTS Work Item Tracking Migration Tool will migrate existing ClearQuest work items (schema and data) to VSTS work item tracking system. Team Foundation includes this conversion utility, CQConverter.exe, that you can use to perform this migration.

     

    To understand more about the usage of this tool to migrate your existing ClearQuest work items to VSTS work item tracking, please refer the walk through: Walkthrough: Migrating ClearQuest Work Items to Team Foundation

     

    Before starting migration to TFS using CQConverter.exe, we need to ensure that the path settings contains ClearQuest path.

     

    We may encounter the following message if we don’t have proper ClearQuest path set during migration:

     

    "Analysis failed due to "Retrieving the COM class factory for component with CLSID {94773112-72E8-11D0-A42E-00A024DED613} failed due to the following error: 8007007e." ".


    Or

    A pop up with the message “The application has failed to start. License.dll is not found. Re-installing the application may fix this problem” followed by this message:

     

    {Total Errors 1} ERROR: TF61118: ClearQuest API call failed with the following error:

    Retrieving the COM class factory for component with CLSID {94773112-72E8-11D0-A4

    2E-00A024DED613} failed due to the following error: 8007007e.

    Refer ClearQuest documentation for more help.

     

    One of the possible scenarios where it can happen is: We opened a command prompt to start migration. Then we installed ClearQuest client on this machine. Installing ClearQuest client will set path to ClearQuest. But since this command window was opened before installation of ClearQuest client, this command window path will not have ClearQuest path. Hence if we start a migration from this command prompt, analysis/migration will fail with an error message similar to the above.

     

    How to fix this issue?

     

    • After installing ClearQuest client, open a new command Visual Studio command prompt. This is especially applicable in the scenarios mentioned above. This should get the latest path with ClearQuest installation. We can double check this by typing echo %PATH% on the command prompt.

     

    • There could be another chance that ClearQuest installation path is removed from the path by mistake. In this case we should add the path to ClearQuest.

     

    PATH=%PATH%;D:\Program Files\Rational\common;D:\Program Files\Rational\ClearCase\bin

     

    This is the path added after ClearQuest client installation. Here D:\Program Files\Rational is the location of Rational ClearQuest installation. If you have installation in a different drive, change path accordingly.

     

     

     

  • Using VSS/CQConverters in Globalization/Localization scenarios

    We can use VSSConverter for migration of Visual Source Safe repositories and CQConverter for migration of ClearQuest work items to VSTS in globalization setups or in localization scenarios supported by Visual Studio Team System.

     

    When we use VSS, CQ Converters in Globalization/Localization scenarios, we need to make sure to save the configuration xml files with correct encoding scheme.  Configuration xml files can be saved in different formats like utf-8, utf-16 (Unicode).

     

    For example, consider the sample VSSConverter migration settings xml file below. This contains some extended characters on CHS OS (i.e.., DBCS) for VSS repository name, destination project name and migration report. If you are using notepad, when you save this settings file by File->Save, by default the encoding scheme is ANSI. If you save this settings file with this default option, you will get an error during migration.

     

     

    So, if you are planning to use utf-8 encoding scheme as in this example, you have to explicitly choose the encoding schemes to utf-8 while saving the file as shown below:

     

    If you want to save with Unicode encoding in the above example (See Unicode option above), make sure to change the encoding section of Migration configuration xml file from:

     

    <?xml version="1.0" encoding="utf-8"?>

    <SourceControlConverter>

    <ConverterSpecificSetting>

     

    To

    <?xml version="1.0" encoding="unicode "?>

    <SourceControlConverter>

    <ConverterSpecificSetting>

     

  • Migration Tools for Visual Studio Team System

    Visual Studio Team System is a productive, integrated, and extensible software development life-cycle tools platform that helps software teams by improving communication and collaboration throughout the software development process

     

    Visual Studio Team Foundation offers powerful integration features by knocking down the wall between source control, work item tracking, build management by enabling project contributors to associate work items with other types of configuration items, or artifacts. There are four types of artifacts in Visual Studio Team Foundation: work items, source files, changesets, which are the products of a check in operation, and builds. A work item can contain links to the other three artifact types. Read more about VSTS at Visual Studio 2005 Team System: Overview

     

    A common question for teams planning to use VSTS is- what will happen to my existing work items and source codes? Do we have a migration story here?

     

    My team is involved in the development of Migration Tools for Software Configuration Management Tools and Work Item Tracking Tools of Visual Studio 2005 Team System. We have a migration tool for migrating source code from Visual Source Safe to VSTS Source Control and a migration tool for migrating work items from Rational ClearQuest to VSTS work item tracking system.


    Visual Source Safe to VSTS Source Control Migration Tool

     

    This tool will migrate existing Visual SourceSafe repository to Team Foundation Source Control System. Team Foundation includes this conversion utility, VSSConverter.exe that you can use to perform this migration. This tool will migrate data including history to Team Foundation.

     

    Before doing the migration, it is highly recommended to run VSS analyze utility to fix any VSS database corruption issues. This will help to fix any VSS database inconsistencies or database corruptions to avoid data loss during migration process.

     

    VSSConverter has an analyze option. Do not get confused with VSSConverter analyze option with VSS analyze utility mentioned above. During VSSConverter analysis phase, it analyzes the existing VSS repository and generates an analysis report. This gives useful information to help in migration process like the list of checked out files which you need to check in before migration. During the migration phase, this tool will migrate the data from VSS repository to Team Foundation version control system. At the end of migration this tools will generate a migration report, which gives you the details of migrations with any errors/warning generated during migration.

     

    To understand more about the usage of this tool to migrate your existing Visual SourceSafe repository to Team Foundation, please refer the walk through: Walkthrough: Migrating from Visual SourceSafe to Team Foundation  .

     

    Check out some nice blogs from my colleagues on VSSConverter: Akash's blog on planning for migration, Ankur's blog on how VSSConverter works and Nagendra's blog for post migration steps.

     

    Rational ClearQuest to VSTS Work Item Tracking Migration Tool

     

    This tool will migrate existing ClearQuest work items (schema and data) to VSTS work item tracking system. Team Foundation includes this conversion utility, CQConverter.exe, that you can use to perform this migration.

     

    CQConverter has an analysis option where it generates the schemas (work item type definition in xml format) based on the migration query. The generated work item types correspond to the entity type definition in ClearQuest. The schema generated by this tool is configurable; you can modify it to suite to your requirement before or after migration. During migration phase, this tool will migrate data from all entities (work items) in the selected query including history.

     

    To understand more about the usage of this tool to migrate your existing ClearQuest work items to VSTS work item tracking, please refer the walk through: Walkthrough: Migrating ClearQuest Work Items to Team Foundation

     

     

    Post your questions on VSS, ClearQuest Converters on Visual Studio Team System General  or Visual Studio Team Foundation Forums or contact me at gijov at microsoft.com.

      

  • Something about me and Microsoft?

    Hi! I am Gijo, a Software Design Engineer-Test Lead in Microsoft India Development Center,Hyderabad.  I have been with Microsoft for over 4.5 years.

    I’m now working for Windows Live Local and Windows Live Local for Mobile 

    I’ve been a guy who mainly lived in UNIX world till the time I completed my Computer Science masters at IIT Bombay.   At my first workplace ‘firstRain’ windows were new to me or I was new to windows ;)  Then I had a kick start off with Visual Studio as my primary Dev environment.  And there I fell in love with MS Technologies and products with its beauty in productivity gains and here I am now at Microsoft.

     

    I joined MS in early 2003 and my career started with the vjsharp team. Serialization and generics were the two interesting feature areas in J# which I worked for.  After that I worked with the Visual Studio Team System  team. Our team developed  Migration Tools for Software Configuration Management Tools and Work Item Tracking Tools of Visual Studio 2005 Team System. After VSTS V1.0, I moved to Visual Studio for Team System Test(VSTT) where I worked in functional testing feature team.

     

    After around 4 years in Developer Tools, I moved to the Windows Live World. I am enjoying the MS live world!!

     


© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker