mp tyagi
Hoe to write test cases for web application
By mp tyagi in Software Testing on Apr 22 2011
  • Dinkar Chavhan
    Apr, 2011 23

    i am giving you some details about testing and some sample about testing,in u r project as per requirements u can write.

                                      TESTING

     

    Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding. The increasing visibility of software as a system element and attendant costs associated with a software failure are motivating factors for  we  planned, through  testing. Testing is the process of executing a program with the intent of finding an error. The design of tests for software and other engineered products can be as challenging as the initial design of the product itself.

     

     There of basically two types of testing approaches.

     

    One is Black-Box testing – the specified  function  that  a  product   has   been designed to   perform,  tests can be conducted   that  demonstrate  each  function  is  fully operated.

    The  other  is  White-Box  testing – knowing  the   internal   workings  of   the   product  ,tests  can  be  conducted  to  ensure  that  the  internal operation of  the  product  performs according  to  specifications and  all  internal  components  have  been  adequately exercised.

     

    White  box   and   Black  box   testing     methods     have  been  used to  test  this package.    All     the     loop   constructs     have    been    tested   for  their  boundary  and intermediate  conditions. The   test    data   was   designed   with  a   view   to   check   for all   the  conditions  and  logical      decisions.  Error   handling  has  been  taken  care  of by  the  use  of  exception  handlers.

     

     

     

     

     

    Testing Strategies :

     

    Testing is a set of activities that can be planned in advanced and conducted systematically.  A strategy for software testing must accommodation low-level tests that are necessary to verify that a small source code segment has been correctly implemented as well as high-level tests that validate major system functions against customer requirements.

       Software testing is one element of verification and validation.   Verification refers to the set of activities that ensure that software correctly implements as specific function.  Validation refers to a different set of activities that ensure that the software that has been built is traceable to customer requirements.

    The objective of software testing to uncover errors.  To fulfill this objective, a series of test steps unit, integration, validation and system tests are planned and executed.  Each test step is accomplished through a series of systematic test technique that assist in the design of test cases.  With each testing step, the level of abstraction with which software is considered is broadened.

     

    Unit Testing :

    Unit testing focuses verification effort on the smallest unit of software design – the module.  The unit test is always white box oriented.  The tests that occur as part of unit testing are testing the module interface, examining the local data structures, testing the boundary conditions, executing all the independent paths and testing error-handling paths.

     

     

     

     

    Integration Testing :

                Integration testing is a systematic technique for constructing the program structure while at the same time conducting tests to uncover errors associated with interfacing.  Scope of testing summarizes the specific functional, performance, and internal design characteristics that are to be tested.  It employs top-down testing and bottom-up testing methods for this case.

    White Box Testing:

    The purpose of any security testing method is to ensure the robustness of a system in the face of malicious attacks or regular software failures. White box testing is performed based on the knowledge of how the system is implemented. White box testing includes analyzing data flow, control flow, information flow, coding practices, and exception and error handling within the system, to test the intended and unintended software behavior. White box testing can be performed to validate whether code implementation follows intended design, to validate implemented security functionality, and to uncover exploitable vulnerabilities.

    White box testing requires access to the source code. Though white box testing can be performed any time in the life cycle after the code is developed, it is a good practice to perform white box testing during the unit testing phase.

    White box testing requires knowing what makes software secure or insecure, how to think like an attacker, and how to use different testing tools and techniques. The first step in white box testing is to comprehend and analyze source code, so knowing what makes software secure is a fundamental requirement. Second, to create tests that exploit software, a tester must think like an attacker. Third, to perform testing effectively, testers need to know the different tools and techniques available for white box testing. The three requirements do not work in isolation, but together.

     

     

      Black Box Testing:

    Also known as functional testing. A software testing technique whereby the internal workings of the item being tested are not known by the tester. For example, in a black box test on software design the tester only knows the inputs and what the expected outcomes should be and not how the program arrives at those outputs. The tester does not ever examine the programming code and does not need any further knowledge of the program other than its specifications.

    The advantages of this type of testing include:

    • The test is unbiased because the designer and the tester are independent of each other.
    • The tester does not need knowledge of any specific programming languages.
    • The test is done from the point of view of the user, not the designer.
    • Test cases can be designed as soon as the specifications are complete.

     

    System Testing :

    System testing validates software once it has been incorporated into a larger system.  Software is incorporated with other system elements and a series of system integration and validation tests are conducted.  System testing is actually a series of different test whose primary purpose is to fully exercise the computer- based system.

    Once the system has been developed it has to be tested.  In the present system we have to take care of valid property and assessment numbers i.e. there should not exist any duplicate number in each case.  Care should be taken that the appropriate data is retrieved in response to the queries.

           

    Validation

     

                           The terms verification and validations are used interchangeably we will describe both these methods.  Verification is the process of determining whether or not the products of given phase of software development fulfill the specifications established in the previous phase.  These activities include proving and reviews.

                           Validation is the process of evaluating the software at the end of software development process, we find how well the software satisfies the requirement specifications.

                           The requirement of the software starts with requirement document and requirement specifications without errors and specifying client’s requirements correctly.  The validation process of evaluating the developed system at the end is to ensure that it must satisfy all the necessary requirement specification.  Requirement verification also checks the factors as completeness, consistency and testability of the requirements.

    As we all know that testing plays a crucial role in evaluation of the system. That is in order to know whether the system working properly or not. In other words we can say that in order to know whether the system which we have developed will give the expected output or not can be know by doing the testing. Testing phase  comes after coding phase . Usually organizations or the software developing companies use different  types of testing strategies in order to evaluate the performance of a system. Also it gives the output which provides clear information regarding the project or system , whether the project  which we have developed will going to give the expected output or not , that is whether the system fails or succeed in the market.

    We have many types of testing such as unit testing, integration testing, system testing, black box testing, white box testing and regression analysis testing and so on.

    In our project Secure Cryptographic messaging we are using unit testing, integration testing , and system testing.

    Unit testing is the one in which each entity or objects in the module will be tested . Once the entity is evaluated to be tested successfully than will move further with the another kind of testing. That’s is once unit testing is done with all modules, than integration testing will be done, on the every module or on group of two or three modules. Finally system testing will be done , in which all the modules of a system will be tested at once , there by getting the overall performance of a system that means we can conclude the result on the entire system whether our system is working as per our requirements or as per our expectations or not. The advantage of developing or testing  modules wise is that , we can reduce the effort, cost and time. Because if we are testing module wise than we can know clearly which module is working fine and which module is not working , thereby the module which is not working perfectly can be evaluated once again by going necessary modifications unlike the system being tested on a whole , where if any errors comes in than the entire system need to be tested or evaluated which consumes more effort , time and cost.

     

    Unit testing in our project:

    1) Admin module

    Our project consists of two modules namely admin and user, admin will do the following functionalities namely login, registering the user, assigning new telephone numbers, inserting bills and new plans, viewing the feedback and complaints. and signing out. On the other hand user can performs functionalities namely login, applying for new connection, sending the feedback, complaints, viewing the bill and new plans. and signing out.

    First we start with login module of admin, where will create application consisting of login functionality after creating login functionality will use unit testing that’s is that login functionality will be tested , that means will check whether the admin after entering the valid login name and password able to enter into his profile or not.

    After that will move further with the assign new telephone numbers, user module of admin, in which we have two methods namely reset member passwords and delete members . so will do individual testing of this two methods present  with in the block user module of admin. Once the reset member and delete member application has been created , it will be tested checking the output that is whether the passwords are getting resets or not and whether the members are getting deleting or not , on the invocation of the respective methods of the block user module of  Admin.

    Than the logout module will tested , and will see once the admin is logging out, he is signing out of the application or not.

    2 ) User module:

     User can performs functionalities such as logging , sending the messages. For the first module  , logging application will be created and will be tested whether after entering the valid username and password user is able to enter into his profile or not and also we will test whether after entering the invalid details he is being restricted from entering his profile or not. In this way logging module of user will be tested. Once logging module is over than will moves on with the sending message module.

    The sending message module consists of two methods namely entering the message which the user wants to send and selecting the appropriate encryption types that are either AES or DES encryption. once after selecting the encryption , the user will send the message.  So the testing will be done here and will  check  whether the message being send with encryption or not.

    Integration testing:

    1) Admin module:

                                  In the integration testing the modules present in the admin module such as logging , registering users, blocking user and signing out. Will be tested on integrating basics that is this functionalities of Admin module will be tested at once and will check whether this module is working perfectly or not

    2) User Module:

                            In this module , all the functionalities of a User module such as logging, sending messages, Inbox and signing out will be tested on a whole and will see whether this module is working perfectly or not ,by including all the validation controls . Once the integration testing is tested to be successfully done, will move further with the final testing for our project that is system testing will be done at last.

     

     

     

     

    System testing:

                                In this kind of testing the whole modules of a system will be tested at once or on a whole that is our application consists of two modules namely admin and users. The admin inturn has the functionalities such as logging, registering users , blocking user and signing out of the application. Also the user has the functionalities such as logging , sending messages, checking the inbox and signing out of the application, all this functionalities will be tested during the unit and integration testing , whether this functionalities are working  perfectly or not. Once this functionalities found to be working perfectly than will atlast do the system testing in which all the modules of a system will be tested on a whole where in , the complete modules present in the system will be tested , and will be checked whether the system is giving the expected output or result on a whole or not. If it found that the system testing is done perfectly , than the application will  be launched. That is our application or the project is ready to be used or is ready to be given to the client for whom we have developed our application.

    Thus, testing plays a crucial role in evaluating the performance of a system or the working condition of the system.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Module

     functionality

    Test case

           Input

          Output

    Result

    LOGIN

    Logging in

    Check validation

    When no user_id and pwd are given, shows msg-”required field cannot be blank”

    Blank fields for id and password

    Raise an exception

    ”required field cannot be blank”

    pass

    Search

    1)search by song

    2)search by artist

    3)search byMovie

    In this you can search by song sequentional

    Song name,artist name,movie name

    Output will come in gridview .

    pass

    Upload Audio song

    Some field there like txtbox,Dropdownlist

    In this you have to be upload new song

    Now here two types of song like free or paypal

    Submitted song

    Raise an exception

    ”required field cannot be blank”

    pass

    Search

    1)search by song

    2)search by artist

    3)search byMovie

    In this you can search by song sequentional

    Song name,artist name,movie name

    Output will come in gridview

    pass

    Upload video song

    Some field there like txtbox,Dropdownlist

    In this you have to be upload new song

    Now here two types of song like free or paypal

    Submitted song

    Raise an exception

    ”required field cannot be blank”

    pass

     

     

     

     

     

     

     

     

     

     

     

     

     

     


    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS