Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Learning Software Testing with Test Studio
Learning Software Testing with Test Studio

Learning Software Testing with Test Studio: Embark on the exciting journey of test automation, execution, and reporting in Test Studio with this practical tutorial with this book and ebook

By Rawane Madi
€36.99 €24.99
Book Sep 2013 376 pages 1st Edition
eBook
€36.99 €24.99
Print
€45.99
Subscription
€14.99 Monthly
eBook
€36.99 €24.99
Print
€45.99
Subscription
€14.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Sep 24, 2013
Length 376 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781849688901
Vendor :
Telerik
Category :
Languages :
Table of content icon View table of contents Preview book icon Preview Book

Learning Software Testing with Test Studio

Chapter 1. Introduction

Some of the reasons why you would want to achieve software quality are to make sure that the system does what it's supposed to do; uncover errors and/or to provide assurance for your software user. This chapter will explore some general terminologies and processes in software testing to shed light over some concepts used in this book, and briefly introduce the tool automation features that are covered in the next chapters.

If you are already familiar with the following testing concepts, you can jump to Test Studio uncovered in the later chapters of this book.

Testing concepts


The following is a conceptual overview of some fundamental testing terminologies and principles. These are used in day-to-day testing activities and will be directly referred to in the chapters when explaining the business case for our examples.

Test case

A test case is a scenario that will be executed by the tester or by an automation tool, such as the Test Studio for any of the software testing purposes, such as uncovering potential errors in the system. It contains:

  • Test case identifier: This identifier uniquely distinguishes a test case.

  • Priority: The priority holds a value to indicate the importance of a test case so that the most important ones are executed first and so on.

  • Preconditions: The preconditions describe the initial application state in which the test case is to be executed. It includes actions that need to be completed before starting the execution of the test case, such as performing certain configurations on the application, or other details about the application's state that are found relevant.

  • Procedure: The procedure of a test case is the set of steps that the tester or automated testing tool needs to follow.

  • Expected behavior: It is important to set an expected behavior resulting from the procedure. How else would you verify the functionality you are testing? The expected behavior of a test case is specified before running a test, and it describes a logical and friendly response to your input from the system. When you compare the actual response of the system to the preset expected behavior, you determine whether the test case was a success or a failure.

Executing a test case

When executing a test case, you would add at least one field to your test case description. It is called the actual behavior and it logs the response of the system to the procedure. If the actual behavior deviates from the expected behavior, an incident report is created. This incident report is further analyzed and in case a flaw is identified in the system, a fix is provided to solve the issue. The information that an incident report would include are the details of the test case in addition to the actual behavior that describes the anomalous events. The following example demonstrates the basic fields found in a sample incident report. It describes a transaction carried out at a bank's ATM:

  • Incident report identifier: ATM-398

  • Preconditions: User account balance is $1000

  • Procedure: It includes the following steps:

    1. User inserts a card.

    2. User enters the pin.

    3. Attempts to withdraw a sum of $500.

  • Expected behavior: Operation is allowed

  • Actual behavior: Operation is rejected, insufficient funds in account!

  • Procedure results: Fail

The exit criteria

The following definition appears in the ISTQB (International Software Testing Qualification Board) glossary:

"The set of generic and specific conditions, agreed upon with the stakeholders, for permitting a process to be officially completed. The purpose of exit criteria is to prevent a task from being considered completed when there are still outstanding parts of the task, which have not been finished. Exit criteria are used to report against and to plan when to stop testing. [After Gilb and Graham]"

The pesticide paradox

Software testing is governed by a set of principles out of which we list the pesticide paradox. The following definition appears in the ISTQB glossary:

If the same tests are repeated over and over again, eventually the same set of test cases will no longer find any new defects. To overcome this, "pesticide paradox", the test cases need to be regularly reviewed and revised, and new and different tests need to be written to exercise different parts of the software or system to potentially find more defects.

Element recognition

Element recognition is a pillar of automated test execution as the tool used can't perform an action on an object unless it recognizes it and knows how to find it. Element identification is important in making the automated scripts less fragile during execution. This topic will be reflected in this book.

Testing phases


The following set of fundamental testing phases is based on their definition by ISTQB. Other organizations might name them differently or include different activities in them.

  • Test planning and control: Test objectives and activities are set during test planning and a test plan is created. It can include:

    • Test strategy: The general approach to testing the application

    • Test tools: Reporting tools, automated testing tool, and so on

    • Test techniques : Will be discussed in the next section

    • Human resources: The personnel needed to carry out the testing

    As for test control, it should be exercised during all the phases to monitor progress and amend the test plan as needed.

  • Test analysis and design: During this phase, the system specifications are analyzed and test cases, along with their data, are designed. They are also prioritized and the testing environment is identified.

  • Test implementation and execution: When implementing your tests and before executing them, you should set up your environment, generate the detailed test cases, run them, and then log and report the results of your findings.

  • Evaluating the exit criteria and reporting: Evaluating exit criteria is important in order to know when to stop testing. Occasionally, we find that more tests are needed if the risk in one or more application areas hasn't been fully covered. In case it is decided to stop that test implementation and execution, reports are generated and submitted to the implicated persons.

  • Test closure activities: The test closure activities are designed to facilitate reusing of the test data across different versions and products, as well as to promote evaluating and enhancing the testing process. These activities include saving all the test data and testware in a secure repository, evaluating the testing process, and logging suggested amendments.

Testing techniques


Ranging from easy and straightforward to complex and machine-computed, many testing techniques guide the design and generation of your test cases. In the this section, we will describe the most basic of these techniques based on the ISTQB standards:

  • Equivalence classes: By definition, an equivalence class is a single class of inputs generating an equivalent output. Vice versa, it could be a single class of outputs generated from equivalent inputs. For example, imagine you need to test a simple numeric field which accepts values from 0 to 100. During your testing, you cannot possibly exhaust all the values, hence we would identify one valid equivalence partition and three invalid partitions as follows:

    For valid partitions:

    • Values between 0 and 100 inclusive

    For invalid partitions:

    • Values less than zero

    • Values greater than 100

    • Nonnumeric inputs

    As a result, you now choose tests from the four equivalence classes instead of testing all the options. The value of equivalence classes analysis lies in the reduction of testing time and effort.

  • Boundary values: When choosing boundary value analysis, you study the limits of your system input. Typically, they are the logical minimum and maximum values in addition to technical or computational limits, such as register sizes, buffer sizes, or memory availability. After determining your logical and technical limits, you would test the system by inputting the actual boundary, the boundary decremented by the smallest possible unit, and the boundary increment by the smallest possible unit.

    Assuming our system is an application form where you need to enter your first name in one of the fields, you can proceed with a boundary value analysis on the length of the first name string. Considering that the smallest input is one character, and the largest input is one hundred, our boundary values analysis will lead to a test for strings having the following number of characters: zero (empty input), one, two, ninety-nine, one hundred, and one hundred and one.

  • Decision tables: In certain systems, many rules may be interacting with each other to produce the output, such as a security matrix. For instance, let's assume your system is a document management system. The possible factors determining whether a user will have view rights or not are as follows:

    • Belonging to user groups with a permission set for each group

    • Having an individual permission for each user

    • Having access to the documents' file path

    These factors are called the conditions of the decision table, where the actions might be reading, editing, or deleting a document. A decision table would allow you to test and verify every combination of the listed conditions. Certain rules might simplify your table, but they are outside the scope of this book. The resulting decision table for the previous example of document management system is illustrated as follows:

    Decision table for user rights

  • State transition diagram: In some systems, not only do the actions performed determine the output and the routing of the application, but also the state in which the system was in before these actions. For such systems, a state transition diagram is used to generate test cases.

    1. Firstly, the state transition diagram is drawn with every state as a circle and every possible action as an arrow. Conditions are written between square brackets and the output is preceded by a forward slash.

    2. Secondly, each action represented in the diagram is attempted from an initial state.

    3. Thirdly, test cases are generated by looping around the state transition diagram and by choosing different possible paths while varying the conditions.

    The expected behavior in state transition test cases are both the output of the system and the transition to the next expected state. In the following sample diagram, you will find the state transition diagram of a login module:

    State transition diagram for user authentication to the system

Test Studio uncovered through the chapters


This section gives the list of features provided in Test Studio and the chapters in which they are reflected:

  1. Functional test automation: The Test Studio solution to functional test automation is going to be discovered through the following topics: building automated tests, using translators and inserting verifications, adding coded steps, executing tests and logging, adding custom logging, inserting manual steps, assigning and reading variables in tests, debugging errors, and integrating automated test creations with Visual Studio. These topics will be found in Chapter 2, Automating Functional Tests and Chapter 10, Tips and Tricks.

  2. Data-driven architecture: Test Studio offers built-in integration with data sources, allowing you to apply the data-driven architecture during test automation. This feature includes binding tests to SQL, MS Excel, XML, and local data sources, creating data-driven verification, and integrating data-driven architecture with normal automated execution contexts. These topics will be found in Chapter 3, Data-driven Tests and Chapter 10, Tips and Tricks.

  3. Element recognition: Element recognition is a powerful feature in Test Studio from which it derives additional test reliability. Element recognition topics will be covered through Test Studio Find expressions for UI elements, element repository consolidation and maintenance, and specialized Find chained expressions. These topics will be found in Chapter 4, Maintaining Test Elements and Chapter 10, Tips and Tricks.

  4. Manual testing: In addition to automated testing, Test Studio guides the manual testing process. Manual testing includes creating manual test steps, integrating with MS Excel, converting manual tests to hybrid, and executing these two types of tests. These topics will be covered in Chapter 5, Manual Testing.

  5. Organizing the test repository and source control: Tests within the Test Studio project can be organized and reorganized using the features embedded in the tool. Its integration with external source control systems also adds to this management process. The underlying topics are managing tests under folders, setting test properties, and binding your test project to source control from both Test Studio and Visual Studio. The best practices on test repository organization will be encountered throughout the examples of the first four chapters, where the source control topic will be discussed in Chapter 5, Manual Testing since we will have covered all the types of tests offered by the tool by then.

  6. Test suites execution and reporting: Grouping tests under test suites is achievable through the Test Studio test lists. This feature comprises creating static and dynamic test lists, executing them, logging their execution result, viewing standard reports, and extending with custom reports. These topics will be covered in Chapter 6, Test Lists and Reports.

  7. Extended libraries: Extending testing framework automation functionalities for Test Studio is an option available through the creation of Test Studio plugin libraries. This topic will be covered in Chapter 10, Tips and Tricks.

  8. Performance testing: In Test Studio, nonfunctional testing is firstly addressed with performance testing. This feature covers developing performance tests, executing them, gathering performance counters, and analyzing and baselining execution results. These topics will be covered in Chapter 7, Performance Testing.

  9. Load testing: Nonfunctional testing in Test Studio is augmented with another type of test, which is load testing. This topic covers configuring Test Studio load testing services, developing load tests, recording HTTP traffic, creating user profiles and workloads, monitoring machines, gathering performance metrics, executing load tests, and creating custom charts. These topics will be addressed in Chapter 8, Load Testing.

  10. Mobile testing: Test Studio is extended with a version specialized in iOS web, native and hybrid apps testing. It includes preparing applications for testing within Test Studio, creating automated tests, inserting verifications on UI elements, registering applications on the web portal, syncing test projects, sending and viewing built-in feedback messages, sending and viewing crash reports, and managing and monitoring registered applications through web portals. These topics will be addressed in Chapter 9, Mobile Testing.

Approach


While reading this book, you will find a problem-based approach to automating tests with Test Studio.

The following general approach might vary slightly between the different examples:

  • General problem: We will start by stating the general problem that you may face in real-life automation

  • Real-life example: We will then give a real-life example based on our previous experience in software testing

  • Solutions using the Test Studio IDE: Having described the problem, a solution using the Test Studio IDE will be provided

  • Solutions using code: Finally, some solutions will be provided by writing code

At any point, you can refer to the accompanying Test Studio solution for each chapter, which contains all the examples!

Setting up your environment


You will get a list of files with this book to help you try the examples properly. The following is an explanation on how to set up the environment to practice the automation examples against the applications under test.

The File Comparer application

Chapters 2 through 6, as well as Chapter 10, Tips and Tricks, revolve around the File Comparer WPF application. To configure this application environment, you need to:

  1. Run the FC_DB-Database Scripts.sql files in the SQL Management Studio.

  2. Open the settings.xml file from the solution bin and edit the ConnectionString parameter.

Reports

Chapter 6, Test Lists and Reports, gives examples on custom reports that can be found in the File Comparer - Reports.xlsx workbook. The data source files for these reports can be found in the ODCs folder. In order to properly display the charts in the workbook:

  1. Edit the ConnectionString parameter inside the ODC extension files.

  2. Bind the pivot tables inside the excel workbook to these files as follows:

    • The Execution Metrics for Last Run sheet to the FC_DB-L-EMLR.odc file

    • The Execution Metrics over Time sheet to the FC_DB-MOT.odc file

    • The Feature Coverage sheet to the FC_DB-FC.odc file

    • The Test Execution Duration sheet to the FC_DB-TED.odc file

Alternatively, you can create these charts with the queries provided in Chapter 6, Test Lists and Reports.

Additional files

The following are the additional files used in this book:

  • The Test Studio Automated Solutions folder contains the Test Studio automated solution for the examples in the book. For each chapter, there will be an incremental solution holding the examples for this chapter and the ones before.

  • The TestStudio.Extension folder is a Visual Studio solution and it corresponds to the Test Studio extension library demonstrated in Chapter 10, Tips and Tricks.

As for the remaining files, such as the data sources, external tests, and the fiddler SAZ file, they will be referenced by their names within the chapter examples.

Other reference sources


Refer to Telerik online documentation for:

Also, for software testing and automation concepts you can refer to:

  • ISTQB-BCS Certified Tester Foundation Level book, Foundations of Software Testing by Dorothy Graham, Erik Van Veenendaal, Isabel Evans, and Rex Black

  • ISTQB glossary of testing terms 2.2

Left arrow icon Right arrow icon

Key benefits

  • Learn to use Test Studio to design and automate tests valued with their functionality and maintainability
  • Run manual and automated test suites and view reports on them
  • Filled with practical examples, snapshots and Test Studio hints to automate and substitute throwaway tests with long term frameworks

Description

Test Studio is Telerik's QA solution for automating your manual testing. With Test Studio's standalone edition or Visual Studio plugin, you can rule out the possibility of unreliable test execution and UI recognition, non indicative test results and reports, dispersed test repository, low code coverage, and unaffordable learning curves. With no code, this tool provides an intuitive IDE to effortlessly create maintainable tests. If you are looking for a solution to automate testing for your web, desktop, or mobile application, you can now benefit from Test Studio's rich automation features. "Learning Software Testing with Test Studio" will illustrate how to reliably automate test cases when it is time to relinquish manual testing habits. This book is all about less theory and more hands-on examples to present a complete manual and automated solution for your ASP .NET, WPF, Silverlight or iOS apps. This book gets you started directly with automation in Test Studio by exploiting its recording powers through series of concrete test cases built around the equipped applications. Each chapter starts with a typical automation problem which is then approached using Test Studio specialized automation features. You will learn how to create record and playback functional, performance, and load tests. Furthermore, we will see how to insert verification steps, logical constructs, convenient logging operations, and how to convert test scripts in order to implement keyword and data-driven architectures. To endow your tests with additional flexibility, each recorded automation feature will be approached from its coded perspective through the usage of the underlying ArtOfTest Test Studio automation library. This book also illustrates how Test Studio can automate pre-conditions, test result inputting, and the capturing of system states during manual test case execution in order to keep the tester's attention focused on the important details.

What you will learn

Create functional automated tests using the recorder Add logic to the recorded tests Insert proper verification, and wait and log steps Customize tests in code Produce Keyword tests Generate data-driven tests by connecting tests to various data sources Export, create and run manual tests Create and execute test lists Gather performance test metrics Carry out performance and load testing while collecting necessary metrics

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Sep 24, 2013
Length 376 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781849688901
Vendor :
Telerik
Category :
Languages :

Table of Contents

18 Chapters
Learning Software Testing with Test Studio Chevron down icon Chevron up icon
Credits Chevron down icon Chevron up icon
About the Author Chevron down icon Chevron up icon
About the Reviewers Chevron down icon Chevron up icon
www.PacktPub.com Chevron down icon Chevron up icon
Preface Chevron down icon Chevron up icon
Introduction Chevron down icon Chevron up icon
Automating Functional Tests Chevron down icon Chevron up icon
Data-driven Tests Chevron down icon Chevron up icon
Maintaining Test Elements Chevron down icon Chevron up icon
Manual Testing Chevron down icon Chevron up icon
Test Lists and Reports Chevron down icon Chevron up icon
Performance Testing Chevron down icon Chevron up icon
Load Testing Chevron down icon Chevron up icon
Mobile Testing Chevron down icon Chevron up icon
Tips and Tricks Chevron down icon Chevron up icon
Configuring BugNet Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.