Software Testing Technique...
Published: 2023-10-05 21:02:04

**what is testing technique?**
    software testing technique is help you design better test cases.in that exhaustive testing is not possible.in this testing technique help to reduce the number of test cases to be executed while increasing testing coverage.

**Method of Testing technique**
   - in this we using black box testing technique,
   - in black box testing, testers test the application by applying different inputs and comparing the output with expected results.

**Here some types of black box testing **

1._Boundary value Analysis_
2._Decision Table Testing_
3._Use case Testing_

**Boundary value Analysis**
              it is mainly focuses on testing values at the boundaries or edges of valid input ranges.it is important technique as its widely recognised values on boundaries cause more error in the system. it is commonly used in functional and non functional testing.

**Example**
   - taking a login page of web application. 
   - the login page has two input fields: Username and password. 
   - here how boundary value analysis can be applied to this 
     scenario. 

   **Valid boundary Testing**:
        
        1. _Username_: suppose the valid username length is 6 to 
            20 characters. in this case, you would test input at
             boundary values:
                  - Test with username of 6 characters is 
                     minimum boundary.
                  - Test with username of 20 characters is 
                     maximum boundary.
        2. _Password_: the valid password length is 8to16 
            characters. you would test inputs at boundary 
            values:
                  - Test with password of 8 characters is 
                     minimum boundary.
                  - Test with password of 16 characters is 
                     maximum boundary.

    **Invalid boundary testing :**
         - username: for invalid input, you would test the 
                     values just outside the valid range:
                  
                  - Test with username of 5 characters one less 
                    than the minimum.
                  - Test with username of 21 characters one more 
                    than the maximum.
          
         - Password: for password, you test values outside valid 
                     range:

                   - Test with password of 7 characters one less 
                     than the minimum.
                   - Test with password of 17 characters one 
                      one more than maximum.


 **Edge case testing :**
        
            - Test with an empty username and password
            - Test with special characters in username and 
              password
            - Test with username and password that include spaces


## Decision Table Technique:-
in this technique is use to test a large number of inputs. decision table are structured way to represent combination of conditions and their outcomes.

**Example**
   - to calculate the eligibility of applicants for credit card based on their age, income, credit score.
_eligibility criteria are:_
  - applicant must be 18year old
  - applicant must have minimum annual income $30,000
  - applicant must have minimum credit score 400

_decision table model:_

 condition      age>=18     income>=$30,000     credit score>=400

 Eligible        18            $31,000              450
not-Eligible     17            $35,000              400
not-Eligible     21            $30,000              300
not-Eligible     23            $25,000              500


**use the decision table to create test case:**

    _test case1 : eligible applicant_   
               Age : 18 yes
            income : $31,000 yes
      credit score : 450
   
    _test case 2,3,4 : not-eligible_
               Age : 21 no
            income : $20,000 no
      credit score : 300


## Use Case Testing:-
it is focus on a system functionality from end-user perspective. use case describe interaction between user and system to achieve specific goal.

**Example**
     - consider E-commerce website  where user can browse products, add item to cart, make purchase.

_some use cases are:_

   **Login:**
       - _Name_ : User
       - _Description_ : the user login to their account
       - _Test case_: open website, login using valid credentials
                    confirm that user login functionality works 
                    as expected.
 
   **Browse products:**
         - _Name_ : user
         - _Description_: user navigate through product catalog to 
                        view details of available items.
         - _Test case_: open the website, go to products section, 
                      and verify that product are displayed.
   
   **Add item to cart:**
          - _Name_ : user
          - _Description_: user select a product and add to cart
          - _Test case_: open the website, browse products, select 
             one item, add it to cart, and confirm the cart.
     
   **Checkout:**
          - _Name_ : user
          - _Description_: user proceeds to checkout and provides 
                         shipping and payments info to complete 
                          purchase.
           - _Test case_: open the website, add items to cart, go 
                        to checkout process, enter shipping and 
                        payment details, and confirm that order 
                        is placed. 
   **Logout:**
       - _Name_ : user
       - _Description_ : the user logout to their account
       - _Test case_: open website, logout using valid credentials
                    confirm that user logout functionality works 
                    as expected.

   

## LCSAJ Testing techniques:
it is white box testing technique, Linear code sequence and jump is structural based it . it is ensure that every executable statement in a program has been executed.