Some Facts About Class Testing

Page 1

QATestLab 154a, Borschagivska str., Kiev, Ukraine ph.: +38(044)501-55-38 http://qatestlab.com/ contact@qa-testlab.com

Some Facts About Class Testing When performing any type of testing (mobile testing, web site testing, software testing, etc.) testers should deal with testing of classes. Class is a construct in object-oriented programming that enables you to create your own custom types by grouping together variables of other types, methods and events. Class testing is roughly analogous to unit testing in traditional testing processes. Almost every software testing company prefers to use the most formal specification for generating test cases. The code for a class can be tested effectively by review or by executing test cases.

Code can be tested effectively by inspection (preferable when construction of a test driver is too difficult) or by execution of test cases (lends itself to easy regression testing later on). Note: When you test a class, you are really creating instances of that class and testing the behavior of those instances. Testers should make a choice: whether to perform a class test independently or to perform a test as a component of a larger part of the system.

Factors that Weigh with Choosing the Type of Testing: •

role of the class in the system – degree of risk;

complexity of the class;

amount of efforts associated with developing a test driver.

(c) QATestLab, 2013

http://qatestlab.com/


QATestLab 154a, Borschagivska str., Kiev, Ukraine ph.: +38(044)501-55-38 http://qatestlab.com/ contact@qa-testlab.com

Sometimes, class testing needs so many collaborators that it makes more sense to test classes in a cluster. Classes are usually tested by their developers because they understand class’ specification and familiar with the code. Test driver can be used by the developer to debug code while writing it. Software tester should ensure that the code for a class exactly meets the requirements – no more and no less. A test plan that identifies test cases should be developed soon after a class is fully specified and ready for coding, especially if developer is the class tester. The driver and the test cases will be available to supplement or change as the class is enhanced or modified. When performing class testing a test driver should be created. It produces instances of the class, sets up suitable environment around those instances to run a test case, sends one or more messages to an instance as specified by a test case, checks the outcome based on a reply value, changes to the instance, or parameters to the message, deletes any instances it creates if responsible for storage allocation. digg

(c) QATestLab, 2013

http://qatestlab.com/


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.