Book Image

Learning Software Testing with Test Studio

By : Rawane Madi
Book Image

Learning Software Testing with Test Studio

By: Rawane Madi

Overview of this book

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.
Table of Contents (18 chapters)
Learning Software Testing with Test Studio
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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