SlideShare une entreprise Scribd logo
1  sur  6
SM
Ensuring Software Success



Six Tips to Get Started
with Automated Testing
A SmartBear White Paper
Automated testing will shorten your development cycles, avoid cumbersome repetitive tasks and
help improve software quality. But, how do you get started? These best practices provide a success-
ful foundation to start improving your software quality.


Contents                                                                                                Introduction
Introduction...................................................................................... 1    Thorough testing is crucial to the success of a software
Decide What Test Cases to Automate................................... 2                                 product. If your software doesn’t work properly, chances
Test Early and Test Often............................................................. 3                are strong that most people won’t buy or use it…at least
Select the Right Automated Testing Tool............................. 3                                  not for long. But testing to find defects – or bugs – is time-
Divide Your Automated Testing Efforts................................. 3                                consuming, expensive, often repetitive, and subject to hu-
Create Good, Quality Test Data................................................ 4                        man error. Automated testing, in which Quality Assurance
Create Automated Tests that are Resistant                                                               teams use software tools to run detailed, repetitive, and
to Changes in the UI..................................................................... 4             data-intensive tests automatically, helps teams improve
Automated Testing with TestCompleteTM.............................. 4                                   software quality and make the most of their always-
Conclusion......................................................................................... 5   limited testing resources. Automated testing helps teams
About SmartBear............................................................................ 6           test faster, allows them to test substantially more code,
                                                                                                        improves test accuracy, and frees up QA engineers so they
                                                                                                        can focus on tests that require manual attention and their
                                                                                                        unique human skills. Use these best practices to ensure
                                                                                                        that your testing is successful and you get the maximum
                                                                                                        return on investment.




                                                                                                        www.smartbear.com/testcomplete
1. Decide What Test Cases to Automate

    It is impossible to automate all testing. The first step to successful automation is to determine which test cases
    should be automated first.

    The benefit of automated testing is correlated with how many times a given test can be repeated. Tests that are
    only performed a few times are better left for manual testing. Good test cases for automation are those that are
    run frequently and require large amounts of data to perform the same action.

    You can get the most benefit out of your automated testing efforts by automating:

    ¿¿ Repetitive tests that run for multiple builds
    ¿¿ Tests that tend to cause human error
    ¿¿ Tests that require multiple data sets
    ¿¿ Frequently-used functionality that introduces high risk conditions
    ¿¿ Tests that are impossible to perform manually
    ¿¿ Tests that run on several different hardware or software platforms and configurations
    ¿¿ Tests that take a lot of effort and time in manual testing

    Success in test automation requires careful planning and design work. Start out by creating an automation plan.
    This plan allows you to identify the initial set of tests to automate, and serves as a guide for future tests. First,
    you should define your goal for automated testing and determine which types of tests to automate. There are
    a few different types of testing, and each has its place in the testing process. For instance, unit testing is used to
    test a small part of the intended application. Load testing is performed when you need to know how a Web ser-
    vice responds under a heavy workload. To test a certain piece of the application’s user interface (UI), you would
    use functional or graphical user interface (GUI) testing.

    After determining your goal and which types of tests to automate, you should decide what actions your au-
    tomated tests will perform. Don’t just create test steps that test various aspects of the application’s behavior
    at one time. Large, complex automated tests are difficult to edit and debug. It is best to divide your tests into
    several logical, smaller tests. This structure makes your test environment more coherent and manageable and al-
    lows you to share test code, test data and processes. You will get more opportunities to update your automated
    tests just by adding small tests that address new functionality. Test the functionality of your application as you
    add it, rather than waiting until the whole feature is implemented.

    When creating tests, try to keep them small and focused on one objective. For example, use separate tests for
    read-only versus read/write tests. This separation allows you to use these individual tests repeatedly without
    including them in every automated test.

    Once you create several simple automated tests, you can group your tests into one, larger automated test. You
    can organize automated tests by the application’s functional area, major/minor division in the application, com-
    mon functions or a base set of test data. If an automated test refers to other tests, you may need to create a




2
test tree, where you can run tests in a specific order.

    2. Test Early and Test Often

    To get the most out of your automated testing, testing should be started as early as possible in the development
    cycle and run as often as needed. The earlier testers get involved in the life cycle of the project the better, and
    the more you test, the more bugs you find. You can implement automated unit testing on day one and then you
    can gradually build your automated test suite. Bugs detected early are much cheaper to fix than those discov-
    ered later in production or deployment.

    3. Select the Right Automated Testing Tool

    Selecting an automated testing tool is essential for test automation. There are a lot of automated testing tools
    on the market, and it is important to choose the tool that best suits your overall requirements.

    Consider these key points when selecting an automated testing tool:

    ¿¿ Support for your platforms and technology. Are you testing .Net, C# or WPF applications, and on what
       operating systems?
    ¿¿ Flexibility for testers of all skill levels. Can your QA department write automated test scripts or is there a
       need for keyword testing?
    ¿¿ Feature-rich but also easy to create automated tests. Does the automated testing tool support record-
       and-playback test creation as well as manual creation of automated tests? Does it include features for
       implementing checkpoints to verify values, databases, or key functionality of your application?
    ¿¿ Create automated tests that are reusable, maintainable and resistant to changes in the application’s UI.
       Will your automated tests break if your UI changes?

    For detailed information about selecting automated testing tools, see our Whitepaper “Selecting Automated
    Testing Tools.”

    4. Divide Your Automated Testing Efforts

    Usually, the creation of different tests is based on the skill level of the QA engineers. It is important to identify
    the level of experience and skills for each of your team members and divide your automated testing efforts ac-
    cordingly. For instance, writing automated test scripts requires expert knowledge of scripting languages. Thus,
    in order to perform that task, you should have QA engineers who know the script language provided by the auto-
    mated testing tool.

    Some team members may not be versed in writing automated test scripts. These QA engineers may be better
    at writing test cases. It is better when an automated testing tool has a way to create automated tests that does
    not require an in-depth knowledge of scripting languages, like TestComplete’s “keyword tests” capability.
    A keyword test (also known as keyword-driven testing) is a simple series of keywords with a specified action.
    With keyword tests, you can simulate keystrokes, click buttons, select menu items, call object methods and
    properties, and do a lot more. Keyword tests are often seen as an alternative to automated test scripts. Unlike
    scripts, they can be easily-used by technical and non-technical users and allow users of all levels to create robust




3
and powerful automated tests.

    Also, you should collaborate on your automated testing project with other QA engineers in your department.
    Testing performed by a team is more effective for finding defects, and the right automated testing tool allows
    you to share your projects with several testers.

    5. Create Good, Quality Test Data

    Good test data is extremely useful for data-driven testing. The data that should be entered into input fields dur-
    ing an automated test is usually stored in an external file. This data might be read from a database or any other
    data source like text or XML files, Excel® sheets, or database tables. A good automated testing tool actually
    understands the contents of the data files and iterates over the contents in the automated test. Using external
    data makes your automated tests reusable and easier to maintain. To add different testing scenarios, the data
    files can be easily-extended with new data without needing to edit the actual automated test.

    Creating test data for your automated tests is boring, but you should invest time and effort into creating data
    that is well structured. With good test data available, writing automated tests becomes a lot easier. The earlier
    you create good-quality data, the easier it is to extend existing automated tests along with the application’s
    development.

    6. Create Automated Tests that are Resistant to Changes in the UI

    Automated tests created with scripts or keyword tests are dependent on the application under test. The user in-
    terface of the application may change between builds, especially in the early stages. These changes may affect
    the test results, or your automated tests may no longer work with future versions of the application.

    The problem is that automated testing tools use a series of properties to identify and locate an object. Some-
    times a testing tool relies on location coordinates to find the object. For instance, if the control caption or its
    location has changed, the automated test will no longer be able to find the object when it runs and will fail. To
    run the automated test successfully, you may need to replace old names with new ones in the entire project, be-
    fore running the test against the new version of the application. However, if you provide unique names for your
    controls, it makes your automated tests resistant to these UI changes and ensures that your automated tests
    work without having to make changes to the test itself. This best practice also prevents the automated testing
    tool from relying on location coordinates to find the control, which is less stable and breaks easily.

    7. Automated Testing with TestCompleteTM

    The best practices described in this article will help you successfully implement test automation. Our own auto-
    mated testing tool – TestComplete – includes a number of features that help you follow these best practices as
    you perform different types of software tests:

    ¿¿ Functional Testing        ¿¿ Keyword-Driven Testing ¿¿ Distributed Testing              ¿¿ Web Testing
    ¿¿ Unit Testing              ¿¿ Data-Driven Testing          ¿¿ Coverage Testing           ¿¿ Manual Testing
    ¿¿ Load Testing              ¿¿ Regression Testing           ¿¿ Object-Driven Testing




4
¿¿ TestComplete allows you to divide each test into individual test parts, called test items, and organize them
       in a tree-like structure. It lets you repeatedly use individual tests and run them in a certain order.
    ¿¿ TestComplete supports keyword-driven testing. These automated tests can be easily created by inexperi-
       enced TestComplete users, and they are also a good option when a simple test needs to be created quickly.
    ¿¿ TestComplete supports five scripting languages that can be used for creating automated test scripts:
       VBScript, JScript, DelphiScript, C++Script and C#Script.
    ¿¿ With TestComplete, QA engineers can share a test project with their team.
    ¿¿ TestComplete offers a Name Mapping feature that allows you to create unique names for processes, win-
       dows, controls and other objects. It makes your object names and tests clearer and easier to understand, as
       well as independent of all object properties, and less prone to errors if the UI changes. This feature allows
       you to test your application successfully, even in the early stages of the application’s life cycle when the
       GUI changes often.
    ¿¿ TestComplete addresses a full range of software testing challenges facing corporate IT departments,
       product developers, QA engineers, and consultants. The software enhances the software testing process by
       increasing efficiency, removing complexity and lowering costs.


    Conclusion

    Adopting the six recommended best practices outlined here – and taking advantage of TestComplete’s many
    features – will help you build a solid foundation for your automated testing process that promotes high software
    quality. You will be able to run tests faster, test more code, improve the accuracy of your tests, and focus your
    testing team’s attention on more important tasks that take advantage of their human capabilities.

    TestComplete will help you achieve thorough Quality Assurance in development, from the first line of code right
    through delivery and maintenance, with no surprises along the way. Ship superior applications and ship them
    on time.


        Try TestComplete Free for 30 Days
    Scan and download your free trial to see why
    testers choose SmartBear for automated testing.



    You may also enjoy these other resources in the SmartBear® Software Quality Series:

    ¿¿ 11 Best Practices for Peer Code Review
    ¿¿ Uniting Your Automated and Manual Test Efforts

    Be Smart and join our growing community of over 100,000 development, QA and IT professionals in 90 countries.




5
About SmartBear Software

SmartBear Software provides tools for over one mil-
lion software professionals to build, test, and monitor
some of the best software applications and websites
anywhere – on the desktop, mobile and in the cloud.
Our users can be found worldwide, in small businesses,
Fortune 100 companies, and government agencies.
Learn more about the SmartBear Quality Anywhere
Platform, our award-winning tools, or join our active
user community at www.smartbear.com, on Facebook,
or follow us on Twitter @smartbear.




SmartBear Software, Inc. 100 Cummings Center, Suite 234N Beverly, MA 01915
+1 978.236.7900 www.smartbear.com ©2012 by SmartBear Software Inc.
Specifications subject to change.                 TC-WP 6 Tips-042012-WEB

Contenu connexe

Plus de SmartBear

Enforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHubEnforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHubSmartBear
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1SmartBear
 
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...SmartBear
 
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...SmartBear
 
How LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHubHow LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHubSmartBear
 
Standardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial ServicesStandardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial ServicesSmartBear
 
Getting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHubGetting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHubSmartBear
 
Adopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHubAdopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHubSmartBear
 
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...SmartBear
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management SmartBear
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...SmartBear
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...SmartBear
 
Artificial intelligence for faster and smarter software testing - Galway Mee...
Artificial intelligence for faster and smarter software testing  - Galway Mee...Artificial intelligence for faster and smarter software testing  - Galway Mee...
Artificial intelligence for faster and smarter software testing - Galway Mee...SmartBear
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSmartBear
 
The Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear WebinarThe Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear WebinarSmartBear
 
How Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products FasterHow Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products FasterSmartBear
 
Testing Without a GUI Using TestComplete
 Testing Without a GUI Using TestComplete Testing Without a GUI Using TestComplete
Testing Without a GUI Using TestCompleteSmartBear
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsSmartBear
 
How Bdd Can Save Agile
 How Bdd Can Save Agile How Bdd Can Save Agile
How Bdd Can Save AgileSmartBear
 
API Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship RulesAPI Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship RulesSmartBear
 

Plus de SmartBear (20)

Enforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHubEnforcing Your Organization's API Design Standards with SwaggerHub
Enforcing Your Organization's API Design Standards with SwaggerHub
 
Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1Introducing OpenAPI Version 3.1
Introducing OpenAPI Version 3.1
 
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
IATA Open Air: How API Standardization Enables Innovation in the Airline Indu...
 
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
The State of API 2020 Webinar – Exploring Trends, Tools & Takeaways to Drive ...
 
How LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHubHow LISI Automotive Accelerated Application Delivery with SwaggerHub
How LISI Automotive Accelerated Application Delivery with SwaggerHub
 
Standardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial ServicesStandardising APIs: Powering the Platform Economy in Financial Services
Standardising APIs: Powering the Platform Economy in Financial Services
 
Getting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHubGetting Started with API Standardization in SwaggerHub
Getting Started with API Standardization in SwaggerHub
 
Adopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHubAdopting a Design-First Approach to API Development with SwaggerHub
Adopting a Design-First Approach to API Development with SwaggerHub
 
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
Standardizing APIs Across Your Organization with Swagger and OAS | A SmartBea...
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management
 
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
The API Lifecycle Series: Exploring Design-First and Code-First Approaches to...
 
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
The API Lifecycle Series: Evolving API Development and Testing from Open Sour...
 
Artificial intelligence for faster and smarter software testing - Galway Mee...
Artificial intelligence for faster and smarter software testing  - Galway Mee...Artificial intelligence for faster and smarter software testing  - Galway Mee...
Artificial intelligence for faster and smarter software testing - Galway Mee...
 
Successfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile WorldSuccessfully Implementing BDD in an Agile World
Successfully Implementing BDD in an Agile World
 
The Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear WebinarThe Best Kept Secrets of Code Review | SmartBear Webinar
The Best Kept Secrets of Code Review | SmartBear Webinar
 
How Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products FasterHow Capital One Scaled API Design to Deliver New Products Faster
How Capital One Scaled API Design to Deliver New Products Faster
 
Testing Without a GUI Using TestComplete
 Testing Without a GUI Using TestComplete Testing Without a GUI Using TestComplete
Testing Without a GUI Using TestComplete
 
Hidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script ExtensionsHidden Treasure - TestComplete Script Extensions
Hidden Treasure - TestComplete Script Extensions
 
How Bdd Can Save Agile
 How Bdd Can Save Agile How Bdd Can Save Agile
How Bdd Can Save Agile
 
API Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship RulesAPI Automation and TDD to Implement Master Data Survivorship Rules
API Automation and TDD to Implement Master Data Survivorship Rules
 

Dernier

Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 

Dernier (20)

Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 

6 Tips to Get Started with Automated Testing

  • 1. SM Ensuring Software Success Six Tips to Get Started with Automated Testing A SmartBear White Paper Automated testing will shorten your development cycles, avoid cumbersome repetitive tasks and help improve software quality. But, how do you get started? These best practices provide a success- ful foundation to start improving your software quality. Contents Introduction Introduction...................................................................................... 1 Thorough testing is crucial to the success of a software Decide What Test Cases to Automate................................... 2 product. If your software doesn’t work properly, chances Test Early and Test Often............................................................. 3 are strong that most people won’t buy or use it…at least Select the Right Automated Testing Tool............................. 3 not for long. But testing to find defects – or bugs – is time- Divide Your Automated Testing Efforts................................. 3 consuming, expensive, often repetitive, and subject to hu- Create Good, Quality Test Data................................................ 4 man error. Automated testing, in which Quality Assurance Create Automated Tests that are Resistant teams use software tools to run detailed, repetitive, and to Changes in the UI..................................................................... 4 data-intensive tests automatically, helps teams improve Automated Testing with TestCompleteTM.............................. 4 software quality and make the most of their always- Conclusion......................................................................................... 5 limited testing resources. Automated testing helps teams About SmartBear............................................................................ 6 test faster, allows them to test substantially more code, improves test accuracy, and frees up QA engineers so they can focus on tests that require manual attention and their unique human skills. Use these best practices to ensure that your testing is successful and you get the maximum return on investment. www.smartbear.com/testcomplete
  • 2. 1. Decide What Test Cases to Automate It is impossible to automate all testing. The first step to successful automation is to determine which test cases should be automated first. The benefit of automated testing is correlated with how many times a given test can be repeated. Tests that are only performed a few times are better left for manual testing. Good test cases for automation are those that are run frequently and require large amounts of data to perform the same action. You can get the most benefit out of your automated testing efforts by automating: ¿¿ Repetitive tests that run for multiple builds ¿¿ Tests that tend to cause human error ¿¿ Tests that require multiple data sets ¿¿ Frequently-used functionality that introduces high risk conditions ¿¿ Tests that are impossible to perform manually ¿¿ Tests that run on several different hardware or software platforms and configurations ¿¿ Tests that take a lot of effort and time in manual testing Success in test automation requires careful planning and design work. Start out by creating an automation plan. This plan allows you to identify the initial set of tests to automate, and serves as a guide for future tests. First, you should define your goal for automated testing and determine which types of tests to automate. There are a few different types of testing, and each has its place in the testing process. For instance, unit testing is used to test a small part of the intended application. Load testing is performed when you need to know how a Web ser- vice responds under a heavy workload. To test a certain piece of the application’s user interface (UI), you would use functional or graphical user interface (GUI) testing. After determining your goal and which types of tests to automate, you should decide what actions your au- tomated tests will perform. Don’t just create test steps that test various aspects of the application’s behavior at one time. Large, complex automated tests are difficult to edit and debug. It is best to divide your tests into several logical, smaller tests. This structure makes your test environment more coherent and manageable and al- lows you to share test code, test data and processes. You will get more opportunities to update your automated tests just by adding small tests that address new functionality. Test the functionality of your application as you add it, rather than waiting until the whole feature is implemented. When creating tests, try to keep them small and focused on one objective. For example, use separate tests for read-only versus read/write tests. This separation allows you to use these individual tests repeatedly without including them in every automated test. Once you create several simple automated tests, you can group your tests into one, larger automated test. You can organize automated tests by the application’s functional area, major/minor division in the application, com- mon functions or a base set of test data. If an automated test refers to other tests, you may need to create a 2
  • 3. test tree, where you can run tests in a specific order. 2. Test Early and Test Often To get the most out of your automated testing, testing should be started as early as possible in the development cycle and run as often as needed. The earlier testers get involved in the life cycle of the project the better, and the more you test, the more bugs you find. You can implement automated unit testing on day one and then you can gradually build your automated test suite. Bugs detected early are much cheaper to fix than those discov- ered later in production or deployment. 3. Select the Right Automated Testing Tool Selecting an automated testing tool is essential for test automation. There are a lot of automated testing tools on the market, and it is important to choose the tool that best suits your overall requirements. Consider these key points when selecting an automated testing tool: ¿¿ Support for your platforms and technology. Are you testing .Net, C# or WPF applications, and on what operating systems? ¿¿ Flexibility for testers of all skill levels. Can your QA department write automated test scripts or is there a need for keyword testing? ¿¿ Feature-rich but also easy to create automated tests. Does the automated testing tool support record- and-playback test creation as well as manual creation of automated tests? Does it include features for implementing checkpoints to verify values, databases, or key functionality of your application? ¿¿ Create automated tests that are reusable, maintainable and resistant to changes in the application’s UI. Will your automated tests break if your UI changes? For detailed information about selecting automated testing tools, see our Whitepaper “Selecting Automated Testing Tools.” 4. Divide Your Automated Testing Efforts Usually, the creation of different tests is based on the skill level of the QA engineers. It is important to identify the level of experience and skills for each of your team members and divide your automated testing efforts ac- cordingly. For instance, writing automated test scripts requires expert knowledge of scripting languages. Thus, in order to perform that task, you should have QA engineers who know the script language provided by the auto- mated testing tool. Some team members may not be versed in writing automated test scripts. These QA engineers may be better at writing test cases. It is better when an automated testing tool has a way to create automated tests that does not require an in-depth knowledge of scripting languages, like TestComplete’s “keyword tests” capability. A keyword test (also known as keyword-driven testing) is a simple series of keywords with a specified action. With keyword tests, you can simulate keystrokes, click buttons, select menu items, call object methods and properties, and do a lot more. Keyword tests are often seen as an alternative to automated test scripts. Unlike scripts, they can be easily-used by technical and non-technical users and allow users of all levels to create robust 3
  • 4. and powerful automated tests. Also, you should collaborate on your automated testing project with other QA engineers in your department. Testing performed by a team is more effective for finding defects, and the right automated testing tool allows you to share your projects with several testers. 5. Create Good, Quality Test Data Good test data is extremely useful for data-driven testing. The data that should be entered into input fields dur- ing an automated test is usually stored in an external file. This data might be read from a database or any other data source like text or XML files, Excel® sheets, or database tables. A good automated testing tool actually understands the contents of the data files and iterates over the contents in the automated test. Using external data makes your automated tests reusable and easier to maintain. To add different testing scenarios, the data files can be easily-extended with new data without needing to edit the actual automated test. Creating test data for your automated tests is boring, but you should invest time and effort into creating data that is well structured. With good test data available, writing automated tests becomes a lot easier. The earlier you create good-quality data, the easier it is to extend existing automated tests along with the application’s development. 6. Create Automated Tests that are Resistant to Changes in the UI Automated tests created with scripts or keyword tests are dependent on the application under test. The user in- terface of the application may change between builds, especially in the early stages. These changes may affect the test results, or your automated tests may no longer work with future versions of the application. The problem is that automated testing tools use a series of properties to identify and locate an object. Some- times a testing tool relies on location coordinates to find the object. For instance, if the control caption or its location has changed, the automated test will no longer be able to find the object when it runs and will fail. To run the automated test successfully, you may need to replace old names with new ones in the entire project, be- fore running the test against the new version of the application. However, if you provide unique names for your controls, it makes your automated tests resistant to these UI changes and ensures that your automated tests work without having to make changes to the test itself. This best practice also prevents the automated testing tool from relying on location coordinates to find the control, which is less stable and breaks easily. 7. Automated Testing with TestCompleteTM The best practices described in this article will help you successfully implement test automation. Our own auto- mated testing tool – TestComplete – includes a number of features that help you follow these best practices as you perform different types of software tests: ¿¿ Functional Testing ¿¿ Keyword-Driven Testing ¿¿ Distributed Testing ¿¿ Web Testing ¿¿ Unit Testing ¿¿ Data-Driven Testing ¿¿ Coverage Testing ¿¿ Manual Testing ¿¿ Load Testing ¿¿ Regression Testing ¿¿ Object-Driven Testing 4
  • 5. ¿¿ TestComplete allows you to divide each test into individual test parts, called test items, and organize them in a tree-like structure. It lets you repeatedly use individual tests and run them in a certain order. ¿¿ TestComplete supports keyword-driven testing. These automated tests can be easily created by inexperi- enced TestComplete users, and they are also a good option when a simple test needs to be created quickly. ¿¿ TestComplete supports five scripting languages that can be used for creating automated test scripts: VBScript, JScript, DelphiScript, C++Script and C#Script. ¿¿ With TestComplete, QA engineers can share a test project with their team. ¿¿ TestComplete offers a Name Mapping feature that allows you to create unique names for processes, win- dows, controls and other objects. It makes your object names and tests clearer and easier to understand, as well as independent of all object properties, and less prone to errors if the UI changes. This feature allows you to test your application successfully, even in the early stages of the application’s life cycle when the GUI changes often. ¿¿ TestComplete addresses a full range of software testing challenges facing corporate IT departments, product developers, QA engineers, and consultants. The software enhances the software testing process by increasing efficiency, removing complexity and lowering costs. Conclusion Adopting the six recommended best practices outlined here – and taking advantage of TestComplete’s many features – will help you build a solid foundation for your automated testing process that promotes high software quality. You will be able to run tests faster, test more code, improve the accuracy of your tests, and focus your testing team’s attention on more important tasks that take advantage of their human capabilities. TestComplete will help you achieve thorough Quality Assurance in development, from the first line of code right through delivery and maintenance, with no surprises along the way. Ship superior applications and ship them on time. Try TestComplete Free for 30 Days Scan and download your free trial to see why testers choose SmartBear for automated testing. You may also enjoy these other resources in the SmartBear® Software Quality Series: ¿¿ 11 Best Practices for Peer Code Review ¿¿ Uniting Your Automated and Manual Test Efforts Be Smart and join our growing community of over 100,000 development, QA and IT professionals in 90 countries. 5
  • 6. About SmartBear Software SmartBear Software provides tools for over one mil- lion software professionals to build, test, and monitor some of the best software applications and websites anywhere – on the desktop, mobile and in the cloud. Our users can be found worldwide, in small businesses, Fortune 100 companies, and government agencies. Learn more about the SmartBear Quality Anywhere Platform, our award-winning tools, or join our active user community at www.smartbear.com, on Facebook, or follow us on Twitter @smartbear. SmartBear Software, Inc. 100 Cummings Center, Suite 234N Beverly, MA 01915 +1 978.236.7900 www.smartbear.com ©2012 by SmartBear Software Inc. Specifications subject to change. TC-WP 6 Tips-042012-WEB