Black Box Testin1

Embed Size (px)

Citation preview

  • 8/2/2019 Black Box Testin1

    1/4

    Black Box Testing:

    Black Box testing is the testing all the features and functionalities of the finalproduct. It is also called asClosed Box Testing . The Tester has no information

    about the internal architecture or functional mechanism of the product. Black

    Box testing is a wide range and has many sub kinds in it.

    1. Acceptance Testing: When the product is delivered for testing, it is first

    checked whether the product is in a functional condition to test. This is calledAcceptance Testing. The Testers can generate an Acceptance Test Case, whichcan be run for Acceptance Testing.

    2. Ad Hoc Testing: This method is also called Exploratory Testing where in no

    Test Case designs are used to test the product. The Tester goes by his intuitionand creativity in finding out problems with the product.

    3. Automation Testing: This method of testing is done using third party tools. In

    this method, we automate, or run a particular Test Case for a specific number oftimes. This helps in finding out the consistent passing of the test case and alsohelps in finding our problems related to memory, Performance etc. More about

    this method is dealt in detail later.

    4. Boundary Value Testing: Certain features will require inputs to be taken fromthe user, like Login name in a site. There will also be a lower end limit andhigher end limit to the input value to be given. In this kind of testing, we check

    the feature using values just below or above the lower limit and the upper limit.

    One very common source for errors is improper handling of boundaries. The ideain boundary value analysis is to test boundaries on the edges, for example

    MIN, MIN-1, MAX, MAX+1. These values should be exercised both for input and

    output of methods (when applicable).

    It is impossible to create all the possible input data for the methods, which may

    happen when the system is used in actual reality. However, the similar datapassed for the method does not usually change the execution path, and thusdata can be abstracted. Equivalence class partitioning is a behavioral testdesign method that divides all the similar input values into classes. For example,

    if the method accepts values between -5 and 15, there are three classes, andthus only three test cases are needed:

    Valid: [-5 15] Invalid [-n -6] Invalid [16 n]

  • 8/2/2019 Black Box Testin1

    2/4

    Special valuesare a good source of errors and require extra attention from theimplementation. Some examples include

    Zero and one in arithmetic operations and function usages 90 degree and multiples

    Empty strings NULL values

    Experience and intuition can guide developers to predict possible sources oferrors. Because programmers often make similar errors, creating test casesthrough error guessing can be practical and effective. This is a good practiceespecially when software and development teams evolve, and test suites are run

    continuously. Such tests can locate bugs that crawl into software duringchanges.

    5. Compatibility Testing: Compatibility Testing confirms that the Product installed

    does not hinder the functionality of any other product installed on the machine.Products are said to be compatible with each other if they can share databetween them or if they can simultaneously reside in the same computers

    memory. In short Compatibility testing checks that one product works withanother.

    6. Integration Testing: This testing is done when the different modules of the

    product have been integrated together. It is an orderly process, which is carried

    out until all the modules have been integrated into the system.

    7. Manual Testing: That part of software testing that requires operator input,analysis, or evaluation.

    8. Performance Testing: The tests might determine which modules execute mostoften or use the most computer time. Then those modules are re-examined and

    recorded to run more quickly.

    9. Regression Testing: This process of testing is done when new features are

    added or when features have been modified to confirms that the features thathave been functioning are still functioning and that defects which has been fixedstill remain fixed.

    10. Usability Testing: Usability testing is done to check the flow of the product

    and the user friendliness of the product. It helps in finding out whether the useris able to interact with the product and achieve his goal. People who are novice

  • 8/2/2019 Black Box Testin1

    3/4

    to the product usually do this kind of test, and the Testers and Developers study

    the user while he is doing the process.

    11. Installation Testing: Here the installation media and different kinds ofinstallation process on different Operating systems with different configurationsare tested. What good is a product if it does not install properly on different

    computer configurations?

    White Box Testing:

    White box testing involves testing at the Code Level and is done usually at thecoding stage. Here the inputs required for testing is fed to the program and the

    output is checked. The Tester does not know or pretends not to know how theprogram works. There are lots of different kinds of White Box testing. Some ofthe major methods are mentioned below.

    1. Boundary Value Testing: This method can be used as black box andas white box. The feature tested here is similar to Black Box testing asmentioned earlier. (See Black Box testing section)

    2. Branch Testing: This testing is done to satisfy the coverage criteria such that

    for each decision point each possible branch be executed at least once. Forexample if the execution reaches a Case statement, this kind of testing shouldcover each of the Case conditions at least once.

    3. Top-Down and Bottom-Up Testing: In the Top-Down testing the highest levelmodules are tested first whereas the Bottom -up testing, the lower modules aretested first, and then the higher level modules.

    4. Hybrid Testing: A combination of top-down testing combined with bottom-uptesting of prioritized or available components.

    5. Incremental Testing: Under this each piece of a module is first testedseparately. This testing makes it easy to pin down the cause of the error but to

    test it requires a special code. Each piece is individually tested with focus on itand is thoroughly tested.

  • 8/2/2019 Black Box Testin1

    4/4

    6. Special Case Testing: This kind of testing can be conducted as both Black Box

    testing and White Box testing. Here testing is done by giving input values thatseem likely to cause program errors like "0", "1", NULL, empty string.

    7. Statement Testing: Testing that satisfies that each statement in a program isexecuted at least once during program testing. It is said, An untested code is a

    hidden Bomb. It is true in the sense that if it is not tested, we can never saywhether it will function properly or throw up errors.

    Q: How does Unit testing fit into the Software Development Life Cycle

    (SDLC)?

    This is the first and the most important level of testing. As soon as theprogrammer develops a unit of code the unit is tested for various scenarios. As

    the application is built it is much more economical to find and eliminate the bugsearly on. Hence Unit Testing is the most important of all the testing levels. Asthe software project progresses ahead it becomes more and more costly to find

    and fix the bugs.

    In most cases it is the developers responsibility to deliver Unit Tested Code.

    Unit Testing Tasks and Steps:

    Step 1: Create a Test PlanStep 2: Create Test Cases and Test Data

    Step 3: If applicable create scripts to run test cases

    Step 4: Once the code is ready execute the test casesStep 5: Fix the bugs if any and re test the code

    Step 6: Repeat the test cycle until the unit is free of all bugs

    Q: What is a Unit Test Plan?

    This document describes the Test Plan in other words how the tests will becarried out. This will typically include the list of things to be Tested, Roles and

    Responsibilities, prerequisites to begin Testing, Test Environment, Assumptions,what to do after a test is successfully carried out, what to do if test fails,Glossary and so on

    Q: What is a Test Case?

    A set of test inputs, execution conditions, and expected results developed for aparticular objective, such as to exercise a particular program path or to verifycompliance with a specific requirement.

    Simply put, a Test Case describes exactly how the test should be carried out. Forexample the test case may describe a test as follows:

    Step 1: Type 10 characters in the Name FieldStep 2: Click on Submit

    Test Cases clubbed together form a Test Suite