240 likes | 614 Views
Quality control. Quality control is mostly about testing the quality of a product ( to eliminate problems ) Quality assurance is about building quality into the product . Testing techniques. It is never possible to test for all possible data inputs or code execution paths .
E N D
Qualitycontrol Qualitycontrolis mostlyabouttesting the quality of a product ( to eliminate problems ) Quality assurance is aboutbuildingqualityinto the product.
Testingtechniques It is never possible to test for all possible data inputs or codeexecutionpaths. Testingtechniquescanbeclassifiedaccording to 5 criteria : • Visibility • Automation • partitioning • Coverage • scripting
Testingtechniques • Visibility • Automation
Black-box tests • Black-box testing (testing to specifications) • An approach to testing where the program is considered as a ‘black-box’ , taking some inputs and produces some outputs. • Tester does not know or choose to ignoretheinternalworkings of the program. • The program test cases are based on the systemspecification • Test planning can begin early in the software process • Testing is done by feeding the test unit with datainputsandverifyingthattheexpectedoutputisproduced. • Main technique for acceptance testing. • Also applicable to constrainttesting ( performance and security ) and missingfunctionalities.
White-box tests (testing to code) • White-box testing • Sometime called structural testing • Tester studies the code and decide on data inputs to exercise all program statements (not all path combinations). • Test coverage measures ensure that all statements have been executed at least once • Derivation of test cases according to program structure. Knowledge of the program is used to identify additional test cases. • Also suitable for design models and specification documents (walkthrough and inspections)
Equivalencepartitioning • Groups data inputs (and implicitly , data outputs)into partitions constituinghomogenoues test targets( testing with onememberimplies test with othermember in the same partition ) • Supported by Black boxtesting
Boundaryvalue • Additional data analysistechnique • Bounadaryvaluesareextreme cases withingequivalence partitions. • Ex: Partition of integer from 1 to 100. Bounadryvalueanalysisrecommends tests to be done on the values on the edgesthat is : -1 , 0 , +1 as well as for 99,100, 101
Coverage Coverage ? Determine how muchcode is going to beexercised by a whitebox test
Operation (oeration) coverage • Ensurethateach operation in the code is exercised at leastonce by the whitebox test
Path coverage • Numberingpossibleexecutionpaths ( infinite in large program ) in the program • Exercisingthemone by one. • For large prgram , choose the most critical and frequentlyusedones. • Testingcanbemanual or automatic
Manual testing • Human tester interracts with the applicationunder test conducts, according to a predefined test script and observe the results. • Test script definesstep-by-steptesting actions and expectedoutcomes. • Use cases areused to write test scripts. Problems: • Freuqently output is not presented to the creen • Live data are not predefined • Expensive
Automated testing • Use software testingtools to execute large volumes of test without human participation • Tools canproduce post test reports • Automated testingcanbedividedinto : • Regressiontesting • Exercisingtesting
Regression testing • Repetitiveexecution of the same test scripts on the same data to be sure that the system has not beenbroken by successive changes to the code (changes not related to the testedfunctionality) . • Execution of the script at scheduled test times.
Exercisingtesting • Tool generates authomatically and randomlyvariouspossibleactions instead of the user. • Mad user hitting anypossiblekey on keyboard , selectinganypossible menu item , ….etc.
Test planning • Part of the quality management plan. • Definestestingschedule, budget , tasks (test cases) and resources. • Test Plan includecode and otherprojectartifactstestings. • Specifywhich test cases shouldbeconducted • Human and material ressources shouldbeallocated. • Test database created and test software toolsinstalled
Test cases (tasks) • Requirementsconstitute test inputs to test cases • Test cases defines the hardware/software configurations for conducting the test and when tests shouldbeexecuted (maybeautomatedone) • Test cases arerealised in test scripts , consisting of detailed listing of test steps and verification points. • Test scripts canbecombined in test suites.