1 Programų testavimo metodai. 2 ĮVADAS Modulio paskirtis.

46
1 Programų testavimo Programų testavimo metodai metodai

Transcript of 1 Programų testavimo metodai. 2 ĮVADAS Modulio paskirtis.

Page 1: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

1

Programų testavimo Programų testavimo metodaimetodai

Page 2: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

2

ĮVADASĮVADAS

Modulio paskirtisModulio paskirtis

Page 3: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

3

TikslaiTikslai Apibūdinti SWEBOK projektąApibūdinti SWEBOK projektą Apibrėžti modulio vietą mokymo planeApibrėžti modulio vietą mokymo plane Aprašyti modulio žinių struktūrąAprašyti modulio žinių struktūrą Apibūdinti praktines užduotisApibūdinti praktines užduotis

Page 4: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

4

SWEBOSWEBOKK

Software Configuration ManagementSoftware Configuration Management Software ConstructionSoftware Construction (Version 0.5) (Version 0.5) Software DesignSoftware Design Software Engineering InfrastructureSoftware Engineering Infrastructure Software Engineering ManagementSoftware Engineering Management Software Engineering ProcessSoftware Engineering Process Software Evolution and MaintenanceSoftware Evolution and Maintenance Software Quality AnalysisSoftware Quality Analysis Software Requirements AnalysisSoftware Requirements Analysis Software TestingSoftware Testing

Page 5: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

5

 4

sem.

TeorijaProgramų priežiūra ir tobulinimas(Software Evolution and Maintenance)R.Marcinkevičius

Teorija Programų kokybės analizė

(Software Quality Analysis)A.Ostreika

 R&D Magistro baigiamasis darbas (Master

Thesis)

Prof. R.Seinauskas

 3

sem.

Teorija Programų kūrimo priemonės(Software Engineering Tools)L.Lipavičius

Laisvai pasirinkti 

(Electives)

Informacinės technologijos

projektavimo vadyboje (Project Management

Tools)V.Limanauskienė

R&D Programinės įrangos įdiegimo tyrimas (Software Design and Implementation)

(V.Limanauskienė)

 2

sem.

TeorijaProgramų projektavimas

(Software Design)

D.Rubliauskas

TeorijaDuomenų projektavimas

(Data Design)B.Paradauskas

TeorijaProgramų testavimo metodai(Software Testing Methods)R.Šeinauskas

 Laisvai pasirinkti

(Electives)

R&D

Programų sistemų architektūros analizė(Analysis of Software Architecture)K. Motiejūnas

 1

sem.

TeorijaProgramų inžinerijos procesas(Software Engineering Process)A.Targamadzė 

TeorijaSistemų modeliavimas ir validavimas(System Modeling and Validation)H.Pranevičius

TeorijaReikalavimų programoms analizė(Software Requirements Analysis)R. Butleris

 Programų inžinerijos valdymas(Software

Engineering Management)

A. Tomkevičius

R&D

Reikalavimų specifikavimas(Requirements specifications)K. Motiejūnas

Page 6: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

6

Bendros Bendros knygosknygos

PPressmann ressmann Software Engineering Software Engineering Theory and PracticTheory and Practice, e, 6 laida6 laida

J.J. Sommerville, I. Sommerville, I. Software Software Engineering Engineering 8 laida8 laida

http://www.elen.ktu.lt/~rsei/PT/http://www.elen.ktu.lt/~rsei/PT/index.htmindex.htm

Page 7: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

7

Testavimo Testavimo knygosknygos

http://www.softwareqatest.com/http://www.softwareqatest.com/

Page 8: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

8

Programavimo Programavimo krizėkrizė

Programinės įrangos klaidos yra geriau Programinės įrangos klaidos yra geriau žinomos negu sėkmės atvejaižinomos negu sėkmės atvejai

Programavimo krizė prognozuota prieš Programavimo krizė prognozuota prieš 3030 metų taip niekada ir neįvyko ir metų taip niekada ir neįvyko ir programuotojams pavyko sumažinti programuotojams pavyko sumažinti nesėkmių kiekį bei darbuotojų poreikįnesėkmių kiekį bei darbuotojų poreikį

Problemos, kurios kamuoja programuotojus Problemos, kurios kamuoja programuotojus pagrindinai susietos su tinkamu programinės pagrindinai susietos su tinkamu programinės įrangos kūrimu ir jos palaikymu negu kad su įrangos kūrimu ir jos palaikymu negu kad su gavimu programinės įrangos, kuri gavimu programinės įrangos, kuri funkcionuoja korektiškaifunkcionuoja korektiškai

Page 9: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

9

TeisybTeisybėė

Matematikui, fizikui ir inžinieriui buvo Matematikui, fizikui ir inžinieriui buvo pasakyta “ Visi nelyginiai skaičiai yra pasakyta “ Visi nelyginiai skaičiai yra pirminiai”pirminiai”Matematikas pasakys: nesamonė, 9 yra Matematikas pasakys: nesamonė, 9 yra

nelyginis skaičius bet ne pirminisnelyginis skaičius bet ne pirminis Fizikas pasakys: pažiūrėkim, trys yra pirminis, Fizikas pasakys: pažiūrėkim, trys yra pirminis,

penki yra pirminis, septyni yra pirminis, atrodo, penki yra pirminis, septyni yra pirminis, atrodo, kad teisybėkad teisybė

Inžinierius pasakys: pažiūrėkim, trys yra Inžinierius pasakys: pažiūrėkim, trys yra pirminis, penki yra pirminis, septyni yra pirminis, penki yra pirminis, septyni yra pirminis, devyni yra pirminis, vienuolika yra pirminis, devyni yra pirminis, vienuolika yra pirminis, atrodo, kad teisybėpirminis, atrodo, kad teisybė

Page 10: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

10

Programų Programų testavimastestavimas

Istoriškai nepopuliarus tarpIstoriškai nepopuliarus tarp:: vadybininkųvadybininkųprogramuotojųprogramuotojų studentųstudentų

Testavimas ir daugelis programavimo Testavimas ir daugelis programavimo inovacijų išaugo iš programavimo krizės inovacijų išaugo iš programavimo krizės

Page 11: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

11

TestavimasTestavimas: : Mūsų Mūsų patyrimaspatyrimas

Software to be tested

Test Case

Output

Page 12: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

12

Kada Kada sustotisustoti??

Software to be tested

Test Case

Output

Enough?No

Verification

Yes

Test Coverage

Test Case

Generation

Page 13: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

13

Testavimo Testavimo pavyzdyspavyzdys

Sorting Program

Sorting Program

SPECS:Takes a list

of numbers; returns a

sorted list.

{1,3,2}

{1,2,3}

{3,2,3}

{}

{-1, -2}

Just a list.A sorted list.

Repeated entry.Empty list.

Negative numbers.

Test Cases

{1, 2, 3}

Output

{1, 2, 3}

Output

{2, 3, 3}

Output

{}

Output

{-2, -1}

Output

Page 14: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

14

Automatinis Automatinis testavimastestavimas

Software to be tested

Test Case

Output

Enough?No

Verification

Yes

Test Coverage

Test Case

Generation

Page 15: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

15

Automatinis testavimasAutomatinis testavimas

Software to be tested

Test Case

Output

CoverageEvaluator

Test CaseGenerator

VerifierOR

Test Oracle

TestSpecs

Page 16: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

16

Kas tai yra programų Kas tai yra programų testavimas?testavimas?

““The process of executing computer The process of executing computer software in order to determine software in order to determine whether the results it produces are whether the results it produces are correct”, Glass ‘79correct”, Glass ‘79

““The process of executing a program The process of executing a program with the intent of finding errors”, with the intent of finding errors”, Myers ‘79Myers ‘79

““Program testing can be used to show Program testing can be used to show the presence of bugs, but never their the presence of bugs, but never their absence”, Dijkstra ‘72absence”, Dijkstra ‘72

Page 17: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

17

Kas tai yra programų Kas tai yra programų testavimas?testavimas?

““The aim is not to discover errors but The aim is not to discover errors but to provide convincing evidence that to provide convincing evidence that there are none, or to show that there are none, or to show that particular classes of faults are not particular classes of faults are not present”, Hennell ‘84present”, Hennell ‘84

““Testing is the measure of software Testing is the measure of software quality”, Hetzel ‘85quality”, Hetzel ‘85

Kas vadinama programų testavimu?

Page 18: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

18

Kas tai yra programų Kas tai yra programų testavimas?testavimas?

““The process of operating a system or The process of operating a system or component under specified conditions, component under specified conditions, observing or recording the results, observing or recording the results, and making an evaluation of some and making an evaluation of some aspect of the system or component.”aspect of the system or component.”

IEEE/ANSI, 1990IEEE/ANSI, 1990

Page 19: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

19

Testavimas priklauso nuo Testavimas priklauso nuo požiūriopožiūrio

““If our goal is to show the absence of If our goal is to show the absence of errors, we will find very few of them”errors, we will find very few of them”

““If our goal is to show the presence of If our goal is to show the presence of errors, we will discover a large errors, we will discover a large number of them”number of them”

Page 20: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

20

Testavimo laikasTestavimo laikas

50%50% Brooks/Myers, 1970sBrooks/Myers, 1970s 80%80% Arthur Andersons’ Director of Arthur Andersons’ Director of

testing in North America, 1990stesting in North America, 1990s

Page 21: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

21

Testuotojų ir Testuotojų ir programuotojų programuotojų

santykissantykis 1:5-101:5-10 Mainframes Mainframes

i.e.,1 tester for every 5 to 10 developers i.e.,1 tester for every 5 to 10 developers 2:3 2:3 Microsoft, 1992Microsoft, 1992 2:1 2:1 Lotus (for 1-2-3 Windows)Lotus (for 1-2-3 Windows) 1:2 1:2 Average of 4 major companies,1992Average of 4 major companies,1992

Microsoft, Borland, WordPerfect, Microsoft, Borland, WordPerfect, NovellNovell

Koks testuotojų ir programuotojų santykis?

Page 22: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

22

Programų testavimo Programų testavimo problemosproblemos

poorly expressed requirementspoorly expressed requirements informal design techniquesinformal design techniques nothing executable until coding stagenothing executable until coding stage Huge input set: consider testing software Huge input set: consider testing software

that categorises an exam grade: 101 that categorises an exam grade: 101 inputsinputs

consider testing software that categorises two consider testing software that categorises two exam grades: 101*101 inputs!exam grades: 101*101 inputs!

Kokios programų testavimo problemos?

Page 23: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

23

Kas tai yra programų Kas tai yra programų testavimas?testavimas?

Exhaustive software testing is Exhaustive software testing is intractableintractable (sunkiai suvaldomas)(sunkiai suvaldomas)

Even if all possible inputs could be Even if all possible inputs could be identified, the problem of identifying identified, the problem of identifying expected resultsexpected results is is undecidableundecidable (neišsprendžiama)(neišsprendžiama)

Weyuker (1979) has shown that there is no Weyuker (1979) has shown that there is no algorithm that can determine if a given algorithm that can determine if a given statement, branch or path will be exercised!statement, branch or path will be exercised!

Page 24: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

24

Programų testavimo Programų testavimo apibrėžimasapibrėžimas

Software testing consists of the Software testing consists of the dynamicdynamic verification of the behavior of verification of the behavior of a program on a a program on a finitefinite set of test cases, set of test cases, suitably suitably selectedselected from the usually from the usually infinite executions domain, against infinite executions domain, against the specified the specified expectedexpected behavior. behavior.

Kaip apibrėžiamas programų testavimas?

Page 25: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

25

DinaminDinaminisis

This term means testing always This term means testing always implies executing the program on implies executing the program on valued inputs. Static analysis valued inputs. Static analysis techniques, such as peer review and techniques, such as peer review and inspection (that sometimes are inspection (that sometimes are improperly referred to as "static improperly referred to as "static testing"), are not considered as part testing"), are not considered as part of this KA; nor is program execution of this KA; nor is program execution on symbolic inputs, or symbolic on symbolic inputs, or symbolic evaluation;evaluation;

Page 26: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

26

BaigtinBaigtinisis

Clearly the tests are not selected literally from an infinite set Clearly the tests are not selected literally from an infinite set of possible tests, but a very large finite one (the set of all bit of possible tests, but a very large finite one (the set of all bit strings shorter than some length). Nonetheless, for even strings shorter than some length). Nonetheless, for even simple programs, so many test cases are theoretically possible simple programs, so many test cases are theoretically possible that exhaustive testing could require even years to execute. that exhaustive testing could require even years to execute. This is why in practice the number of tests can generally be This is why in practice the number of tests can generally be considered infinite. However, the number of executions considered infinite. However, the number of executions which can realistically be observed in testing must obviously which can realistically be observed in testing must obviously be finite, and -more than this- it must be manageable. Indeed, be finite, and -more than this- it must be manageable. Indeed, testing always implies a testing always implies a trade-off trade-off between limited resources between limited resources and schedules, and inherently unlimited test requirements: and schedules, and inherently unlimited test requirements: this conflict points to well known problems of testing, both this conflict points to well known problems of testing, both technical in nature (criteria for deciding test adequacy) and technical in nature (criteria for deciding test adequacy) and managerial in nature (estimating the effort to put in testing);managerial in nature (estimating the effort to put in testing);

Kokią įtaką turi testo ilgis?

Page 27: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

27

IšrinkIšrinktųtų

The many proposed The many proposed test techniques test techniques essentially differ in how they select essentially differ in how they select the (finite) test set, and testers must the (finite) test set, and testers must be aware that different selection be aware that different selection criteria may yield largely different criteria may yield largely different effectiveness. The problem of effectiveness. The problem of identifying the most suitable selection identifying the most suitable selection criterion under given conditions is still criterion under given conditions is still under research.under research.

Page 28: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

28

Laukiami Laukiami rezultatairezultatai

It must be possible to decide whether It must be possible to decide whether the observed outcomes of program the observed outcomes of program execution are acceptable or not, execution are acceptable or not, otherwise the testing effort would be otherwise the testing effort would be useless. The observed behavior may be useless. The observed behavior may be checked against user's expectations checked against user's expectations (commonly referred to as testing for (commonly referred to as testing for validatiovalidation) or against a functional n) or against a functional specification (testing for specification (testing for verificatioverification). n). The test pass/fail decision is referred to The test pass/fail decision is referred to as the as the oracle probleoracle problem, which can be m, which can be addressed with different approaches. addressed with different approaches.

Kas tai yra orakulo problema?

Page 29: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

29

Statiniai Statiniai metodaimetodai

Software testing is a means for quality Software testing is a means for quality evaluation. In the SQA chapter of the evaluation. In the SQA chapter of the SWEBOK, activities and techniques for SWEBOK, activities and techniques for quality analysis are categorized into: quality analysis are categorized into: static techniques (no code execution), static techniques (no code execution), and dynamic techniques (code execution). and dynamic techniques (code execution). Both categories are useful. Although this Both categories are useful. Although this chapter focuses on testing, that is chapter focuses on testing, that is dynamic, we would like to emphasize that dynamic, we would like to emphasize that static techniques are equally important static techniques are equally important for the purpose of building quality in a for the purpose of building quality in a software product. Static techniques are software product. Static techniques are covered into the SQA KA descriptioncovered into the SQA KA description

Kas tai yra statiniai testavimo metodai?

Page 30: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

30

Testavimo Testavimo veiklaveikla

In the years, the view of software testing has In the years, the view of software testing has evolved towards a more constructive attitude. evolved towards a more constructive attitude. Testing is no longer seen as an activity that Testing is no longer seen as an activity that starts only after the coding phase is complete, starts only after the coding phase is complete, with the limited purpose of finding mistakes. with the limited purpose of finding mistakes. Software testing is nowadays seen as an activity Software testing is nowadays seen as an activity that encompasses the whole development that encompasses the whole development process, and is an important part itself of the process, and is an important part itself of the actual construction. Indeed, planning for testing actual construction. Indeed, planning for testing starts since the early stages of requirement starts since the early stages of requirement analysis, and test plans and procedures are analysis, and test plans and procedures are systematically and continuously refined as the systematically and continuously refined as the development proceeds. These activities of development proceeds. These activities of planning and designing tests constitute planning and designing tests constitute themselves a useful input to designers for themselves a useful input to designers for highlighting potential weaknesses. highlighting potential weaknesses.

Ką apima testavimo veikla?

Page 31: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

31

KlaidKlaidųų vengimasvengimas

As more extensively discussed in the SQA As more extensively discussed in the SQA chapter, the right attitude towards quality is one chapter, the right attitude towards quality is one of prevention: it is better to avoid problems, of prevention: it is better to avoid problems, rather than repairing them. Testing must be seen rather than repairing them. Testing must be seen as a means primarily for demonstrating that the as a means primarily for demonstrating that the prevention has been effective, but also for prevention has been effective, but also for identifying anomalies in those cases in which, for identifying anomalies in those cases in which, for some reason, it has been not. Finally, it is worthsome reason, it has been not. Finally, it is worth recognizing that even after a good testing, the recognizing that even after a good testing, the system could still contain mistakes. The remedy system could still contain mistakes. The remedy to system failures after delivery is provided by to system failures after delivery is provided by (corrective) maintenance actions. The (corrective) maintenance actions. The maintenance issues of software engineering are maintenance issues of software engineering are covered into the Software Evolution and covered into the Software Evolution and Maintenance chapter of the SWEBOKMaintenance chapter of the SWEBOK

Kuo remiasi klaidų vengimo strategija?

Page 32: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

32

TemoTemoss

A.Testing Basic Concepts and A.Testing Basic Concepts and DefinitionsDefinitions

B.Test LevelsB.Test Levels C.Test TechniquesC.Test Techniques D.Test-related MeasuresD.Test-related Measures E.Managing the Test ProcessE.Managing the Test Process F.Test Tools.F.Test Tools.

Page 33: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

33

A.A.Bazinės testavimo Bazinės testavimo koncepcijos ir koncepcijos ir

apibrėžimaiapibrėžimai When the outcome of a test execution When the outcome of a test execution diverges from the expected, a failure diverges from the expected, a failure is observed, whose cause is a fault. is observed, whose cause is a fault. These and other basic definitions These and other basic definitions within software testing area, as well within software testing area, as well as an introduction to the terminology, as an introduction to the terminology, will be provided in Part A will be provided in Part A Testing Testing Basic Concepts and DefinitionBasic Concepts and Definitions. In the s. In the same section, the scope of the KA will same section, the scope of the KA will be laid down, also in relation with be laid down, also in relation with other activities.other activities.

Page 34: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

34

B.B.Testavimo Testavimo lygiailygiai

Software testing is usually performed at Software testing is usually performed at different levels along the development process. different levels along the development process. That is to say, the object of the test can vary: a That is to say, the object of the test can vary: a whole program, part of it (functionally or whole program, part of it (functionally or structurally related), a single module. The structurally related), a single module. The latter subject is expanded in Part B latter subject is expanded in Part B Test LevelTest Levels. s. This consists of two (orthogonal) subsections: This consists of two (orthogonal) subsections: B.1 lists the phases in which the testing of B.1 lists the phases in which the testing of large software systems is traditionally large software systems is traditionally subdivided. In B.2 testing for specific subdivided. In B.2 testing for specific conditions or properties is instead considered, conditions or properties is instead considered, and is referred to as "Objectives of testing". and is referred to as "Objectives of testing". Clearly not all listed types of testing apply to Clearly not all listed types of testing apply to every system, nor has every possible type been every system, nor has every possible type been listed, but those most generally applied. listed, but those most generally applied.

Page 35: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

35

Testavimo Testavimo paskirtispaskirtis

Testing is conducted in view of a Testing is conducted in view of a specific purpose (test objective), specific purpose (test objective), which is stated more or less explicitly, which is stated more or less explicitly, and with varying degrees of precision. and with varying degrees of precision. Stating the objective in precise, Stating the objective in precise, quantitative terms allows for quantitative terms allows for establishing control over the test establishing control over the test process. process.

Kokia testavimo paskirtis?

Page 36: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

36

Testavimo Testavimo tikslastikslas

One of testing aims is to expose failures (as many as One of testing aims is to expose failures (as many as possible), and many popular test techniques have possible), and many popular test techniques have been developed for this objective. These techniques been developed for this objective. These techniques variously attempt to "break" the program, by running variously attempt to "break" the program, by running identified classes of (deemed equivalent) executions: identified classes of (deemed equivalent) executions: the leading principle underlying such techniques is the leading principle underlying such techniques is being as much systematic as possible in identifying a being as much systematic as possible in identifying a representative set of program behaviors (generally in representative set of program behaviors (generally in the form of subclasses of the input domain). the form of subclasses of the input domain). However, a comprehensive view of the KA of testing However, a comprehensive view of the KA of testing as a means for quality must include other as as a means for quality must include other as important objectives for testing, e.g., reliability important objectives for testing, e.g., reliability measurement, usability evaluation, contractor’s measurement, usability evaluation, contractor’s acceptance, for which different approaches would be acceptance, for which different approaches would be taken. Note that the test objective varies with the taken. Note that the test objective varies with the test object, i.e., in general test object, i.e., in general different purposes are different purposes are addressed at the different levels of testinaddressed at the different levels of testing. g.

Koks testavimo tikslas?

Page 37: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

37

Testavimo Testavimo kriterijaikriterijai

The test objective determines how the test The test objective determines how the test set is identified, both with regard to its set is identified, both with regard to its consistency consistency -how much testing is enough for -how much testing is enough for achieving the stated objectiveachieving the stated objective?- and its ?- and its composition composition -which test cases should be -which test cases should be selected for achieving the stated objectiveselected for achieving the stated objective?-, ?-, although usually the although usually the "for achieving the stated "for achieving the stated objectivobjective" part is left implicit and only the e" part is left implicit and only the first part of the two italicized questions above first part of the two italicized questions above is posed. Criteria for addressing the first is posed. Criteria for addressing the first question are referred to as question are referred to as test adequacy test adequacy critericriteria, while for the second as a, while for the second as test selection test selection critericriteriaa Kas tai yra testavimo kriterijai?

Page 38: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

38

C.C.Testavimo Testavimo metodaimetodai

As already said, several As already said, several Test Test Techniques Techniques have been developed in have been developed in the last two decades according to the last two decades according to various criteria, and new ones are still various criteria, and new ones are still proposed. "Generally accepted" proposed. "Generally accepted" techniques will be described in Part C. techniques will be described in Part C.

Kas tai yra testavimo metodai?

Page 39: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

39

D.D.Testavimo Testavimo matavimaimatavimai

Sometimes, it can happen that confusion is Sometimes, it can happen that confusion is made between test objectives and techniques. made between test objectives and techniques. For instance, branch coverage is a popular test For instance, branch coverage is a popular test technique. Achieving a specified branch technique. Achieving a specified branch coverage measure should not be considered coverage measure should not be considered per se per se as the objective of testing: it is a means as the objective of testing: it is a means to improve the chances of finding failures (by to improve the chances of finding failures (by systematically exercising every program systematically exercising every program branch out of a decision point). To avoid such branch out of a decision point). To avoid such misunderstandings, a clear distinction should misunderstandings, a clear distinction should be made between test measures which be made between test measures which evaluate the test set, like measures of evaluate the test set, like measures of coverage, and those which instead provide an coverage, and those which instead provide an evaluation of the program under test, based on evaluation of the program under test, based on the observed test outputs, like reliabilitythe observed test outputs, like reliability

Kam reiklaingi testavimo matavimai?

Page 40: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

40

E. E. Testavimo proceso Testavimo proceso valdymasvaldymas

Testing concepts, strategies, techniques Testing concepts, strategies, techniques and metrics need to be integrated into a and metrics need to be integrated into a defined and controlled process, which is defined and controlled process, which is run by people. The test process should run by people. The test process should support testing activities and testing support testing activities and testing teams, from test planning to test teams, from test planning to test outputs evaluation, in such a way as to outputs evaluation, in such a way as to provide justified assurance that the test provide justified assurance that the test objectives are met cost-effectively. objectives are met cost-effectively. Issues relative to Issues relative to Managing the Test Managing the Test Process Process are expanded in Part E. are expanded in Part E.

Kokia testavimo proceso paskirtis?

Page 41: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

41

F. F. Testavimo Testavimo priemonėspriemonės

Software testing is a very expensive Software testing is a very expensive and labor-intensive part of and labor-intensive part of development. For this reason, tools are development. For this reason, tools are instrumental to support test activities. instrumental to support test activities. Moreover, in order to enhance cost-Moreover, in order to enhance cost-effectiveness ratio, a key issue has effectiveness ratio, a key issue has always been pushing test automation always been pushing test automation as much as possible. Existing tools and as much as possible. Existing tools and concepts related to automating the concepts related to automating the constituent parts of test process are constituent parts of test process are addressed in Part F addressed in Part F Test ToolsTest Tools

Kam skirtos testavimo priemonės?

Page 42: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

42

Bendra Bendra UžduotisUžduotis

1.1.          Suformuoti darbo grupę iš 4 asmenųSuformuoti darbo grupę iš 4 asmenų 2.2.          Parinkti darbo grupes pavadinimąParinkti darbo grupes pavadinimą 33 Nusiųsti laišką dėstytojui adresu: Nusiųsti laišką dėstytojui adresu: vakvak

@[email protected] SusiraSusirašinėti su dėstytoju tik šiuo adresu. šinėti su dėstytoju tik šiuo adresu.

Laiške kaip subject nurodytiLaiške kaip subject nurodyti darbo grupės darbo grupės vardą ir per brūkšnelį laiško numerį. Grupei, vardą ir per brūkšnelį laiško numerį. Grupei, kurios vardas “ Namas” pirmam laiške nurodyti kurios vardas “ Namas” pirmam laiške nurodyti subject Namas-1. Pirmam laiške nurodyti subject Namas-1. Pirmam laiške nurodyti grupės vardą, grupės studentų vardą, pavardę, grupės vardą, grupės studentų vardą, pavardę, grupę ir paprašyti atsiųsti projekto užduotį. grupę ir paprašyti atsiųsti projekto užduotį. Atsakymas bus siunčiamas su “ Reply”. Atsakymas bus siunčiamas su “ Reply”.

Page 43: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

43

Bendra Bendra UžduotisUžduotis

44.. Duotam algoritmui sudaryti programą nurodytomis  Duotam algoritmui sudaryti programą nurodytomis priemonėmis. Detaliai aprašyti užduotį ir algoritmą, pateikti priemonėmis. Detaliai aprašyti užduotį ir algoritmą, pateikti struktūrogramą. Programa turi turėti ne mažiau kaip penkis struktūrogramą. Programa turi turėti ne mažiau kaip penkis atskirai testuojamus vienetus. Sudaryti programos testavimo atskirai testuojamus vienetus. Sudaryti programos testavimo planą. Bent vienas vienetas turi būti automatiškai ištestuotas planą. Bent vienas vienetas turi būti automatiškai ištestuotas įvairiais kriterijais. Parengti testavimo dokumentaciją. įvairiais kriterijais. Parengti testavimo dokumentaciją. Programa pateikiama kompaktiniam diske ir pristatymo Programa pateikiama kompaktiniam diske ir pristatymo metu suinstaliuojama į nurodytą kompiuterį, o po pristatymo metu suinstaliuojama į nurodytą kompiuterį, o po pristatymo išinstaliuojama arba pateikiama serveryje. Pristatymo metu išinstaliuojama arba pateikiama serveryje. Pristatymo metu pateikti vieną lapą, kuriame nurodoma grupės vardas, pateikti vieną lapą, kuriame nurodoma grupės vardas, sudėtis, pagrindiniai atliktos užduoties privalumaisudėtis, pagrindiniai atliktos užduoties privalumai

Page 44: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

44

Programavimo Programavimo būdasbūdas

5. Gali b5. Gali būūti trys programavimo bti trys programavimo būūdaidai::A – Programuojama Java kalba, programa A – Programuojama Java kalba, programa

paleidžiama su naršykle ir ją vykdo paleidžiama su naršykle ir ją vykdo vartotojo kompiuterisvartotojo kompiuteris

B - Programuojama C arba CB - Programuojama C arba C++++ ir php, ir php, programa paleidžiama su naršykle ir programa paleidžiama su naršykle ir vykdoma serveryjevykdoma serveryje

C- C- Programuojama C arba C++, instaliacinProgramuojama C arba C++, instaliacinė ė programa nuskaitoma iš serverio į programa nuskaitoma iš serverio į vartotojo kompiuterį, programa vartotojo kompiuterį, programa suinstaliuojama ir vykdoma vartotojo suinstaliuojama ir vykdoma vartotojo kompiuteryjekompiuteryje

Page 45: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

45

Funkcijų Funkcijų sąsajasąsaja

1.1.      Funkcijos sąsajaFunkcijos sąsaja ( ( char char **įėjimo-įėjimo-vektorius, char vektorius, char **išėjimo-vektorius, int išėjimo-vektorius, int įėjimų-skaičius, int išėjimų-skaičius, įėjimų-skaičius, int išėjimų-skaičius, int sekmės-požymis)int sekmės-požymis)

Sekmės-požymis 1 –sėkmingai Sekmės-požymis 1 –sėkmingai paskaičiuota, 0 - nepaskaičiuotapaskaičiuota, 0 - nepaskaičiuota

  

Page 46: 1 Programų testavimo metodai. 2 ĮVADAS  Modulio paskirtis.

46

Vertinimo Vertinimo TaisyklėsTaisyklės

Galutinis pažymys G skaičiuojamas pagal formulę:Galutinis pažymys G skaičiuojamas pagal formulę:

G G = (= ((A (A + + E)/2)E)/2)**0,5 0,5 + S*0,+ S*0,2 + P* 0,32 + P* 0,3

A – Apklausa iš pakartojimoA – Apklausa iš pakartojimo

E- EgzaminasE- Egzaminas

S- pasisakymas paskirta temaS- pasisakymas paskirta tema

P- projektinė užduotisP- projektinė užduotis ir apvalinamas pagal matematines taisykles iki ir apvalinamas pagal matematines taisykles iki

sveikaskaitinio skaičiaus.sveikaskaitinio skaičiaus.