Answered Questions

  • How will you write testcase for a quadratic equation ?

    Star Read Best Answer

    Editorial / Best Answer

    kurtz182  

    • Member Since Nov-2009 | Dec 13th, 2009


    The quadratic equation is a polynomial of the second degree. 
    Its general form is
     
                          ax^2 + bx + c = 0


    where x represents a variable and a, b, and c are constants.
      
    I would study the functional requirements and technical specifications and create test cases based on my knowledge. The requirements might include the following features:

    1) Text which describes the quadratic equation and how to use the application.
    2) A graphical representation of the quadratic function.
    3) Text which decribes the first and second root of the equation.
    4) Text which describes the equation's descriminant.
     

    I will assume the requirements indicate that the application simply solves for x when all of the constants are input into the equation.  I will also assume there is no

    graphical representation supplied by the application. In this case, I would do the following:


    1) Enter valid data in all fields and verify result.

    2) Enter valid data in all but one field and invalid numeric data in remaining field and ensure validation.

    3) Enter valid data in all but one field and no data in remaining field and ensure validation.

    4) Enter a = 0 to verify it becomes linear.

    5) Data set should include the following types:
       a) Integers
          - Positive
          - Zero
          - Negative
       b) Decimal (applying greatest number of significant digits)
          - Postive
          - Negative

    6) For each data type, I would
        a) Use boundary value analysis to select input data for all data types.
        b) Use equivalence class partitioning to minimize input data.

    7) Enter alpha characters in all fields and verify validation.

    8) Enter special characters in all fields and verify validation.

    9) On each text box, I would try to enter numbers that extend beyond the range that the text box can accept.