Pages

Friday, October 25, 2013

Module Testing / Unit Testing Concept

Please refer to Move the Robot figure and explanation here -http://softwaretestingbykunti.blogspot.com/2013/10/move-robot-program.html

I would suggest keep the Move the Robot page open while you read this.

How do I proceed with developing and testing this program?
·     Create a main module, Move the Robot. It will place the Robot in the position (1,1) on the screen and wait for Keyboard instruction to move the robot to left or right.
·     Test the main module, Move the Robot.
What can we test in the main module?
·         Test that the main module runs without giving severe errors or warnings.
·         Test that the main module when executed displays a screen with the Robot.
·         Test that the main module when displays a screen with Robot, has the Robot placed at position (1,1).

    What can we not test in the main module?
Even though we have written the code for waiting for Keyboard instructions in the main module, we cannot see any difference when any keys are pressed on the keyboard (except for exit).
This is because we have not told the main module what to do when any key is pressed on the keyboard.
We could write the code to call modules, Move left and Move right in the main module.
But remember we have not coded Move left and Move right modules yet.
Therefore, when we run the main module, Move the Robot. There are high chances that the program gives an error.

Move the Robot is a complex program with numerous instructions in it. There will be a team of people working on this program. A single person may not code all the three modules, namely Move the Robot, Move left and Move right.

Suppose modules are written in the following order:
1.     Main module, Move the Robot
2.     Move left
3.     Move right

Once when Main module, Move the Robot is finished coding, one want to test it rather than waiting for the Move left and Move right modules.
This would help remove errors that Move the Robot will contain and will also be easy to debug errors related to this module.

If in case all the three modules are written by 3 different people in parallel, then each one would want to test their module before all the 3 modules are tested together. Again, for the same reason that it would be easy to debug errors related to a specific module.
This will make it easier to test when all the 3 modules are integrated and tested. As possibly all specific module related testing would be over and their errors resolved.

Hope you understood this concept of testing! This is known as Module testing, where each module is tested before it is tested in a program. Module can be subroutine, subprograms, procedures of a program.

Advantage of Module testing:
·     Each module is tested and debugged before tested as a complete software.
·     The error debugging is easier.
·     Many modules can be tested simultaneously.

                  Find us on facebook: facebook.com/softwaretestingbykunti


15 comments:

  1. Good post and the way you explained is superb that one can easily understand it.It is one of the important part in the study of software testing . Keep sharing such articles!

    ReplyDelete
  2. That's very interesting! Not that I'm an IT person, I've got my team getting it done. By the way, if you're into technological innovation, you need to check out the internet of things - ax-dynamics.com is a good place to get it.

    ReplyDelete
  3. Awesome blog. I enjoyed reading your articles.

    tableau certification


    ReplyDelete
  4. Great Article… I love to read your QA services articles because your writing style is too good, its is very helpful for all of us and I never get bored while reading your article because, they are becomes a more and more interesting from the starting lines until the end.

    ReplyDelete
  5. This is really a worthy and wonderful blog about Software Testing Services in Chennai to read and further more tips on the Software Testing Services in India have been learnt. thanks for sharing your views among us and its great time spending on this. I am waiting for new post here about Software Testing Companies in Bangalore and Please keep it up in future..

    Consult today to - Software Testing Services in Mumbai

    ReplyDelete
  6. You made some decent factors there about Mobile App Testing Services. I looked on the internet for the difficulty and found most individuals will associate with along with your website. Keep update more excellent posts on Mobile Testing Services

    ReplyDelete
  7. Harrah's Cherokee Casino Hotel & RV Park - Mapyro
    Find Harrah's Cherokee Casino Hotel & RV 양산 출장마사지 Park, Murphy in NC 속초 출장샵 and 태백 출장안마 other Murphy, NC casinos. Map 대전광역 출장마사지 & Directions to Harrah's 구미 출장샵 Cherokee Casino Hotel

    ReplyDelete

Appreciate your comment...