ΗΜΥ 317 Τεχνολογία Υπολογισμού



Σχετικά έγγραφα
Instruction Execution Times

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 19/5/2007

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Overview. Transition Semantics. Configurations and the transition relation. Executions and computation

CHAPTER 25 SOLVING EQUATIONS BY ITERATIVE METHODS

Test Data Management in Practice

2 Composition. Invertible Mappings

HOMEWORK 4 = G. In order to plot the stress versus the stretch we define a normalized stretch:

UNIVERSITY OF CALIFORNIA. EECS 150 Fall ) You are implementing an 4:1 Multiplexer that has the following specifications:

derivation of the Laplacian from rectangular to spherical coordinates

Other Test Constructions: Likelihood Ratio & Bayes Tests

Econ 2110: Fall 2008 Suggested Solutions to Problem Set 8 questions or comments to Dan Fetter 1

EE512: Error Control Coding

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 6/5/2006

EPL 603 TOPICS IN SOFTWARE ENGINEERING. Lab 5: Component Adaptation Environment (COPE)

Approximation of distance between locations on earth given by latitude and longitude

The Simply Typed Lambda Calculus

the total number of electrons passing through the lamp.

ΤΕΧΝΟΛΟΓΙΚΟ ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΝΟΣΗΛΕΥΤΙΚΗΣ

TMA4115 Matematikk 3

(C) 2010 Pearson Education, Inc. All rights reserved.

Section 9.2 Polar Equations and Graphs

Homework 3 Solutions

ΕΙΣΑΓΩΓΗ ΣΤΗ ΣΤΑΤΙΣΤΙΚΗ ΑΝΑΛΥΣΗ

Physical DB Design. B-Trees Index files can become quite large for large main files Indices on index files are possible.

PARTIAL NOTES for 6.1 Trigonometric Identities

Block Ciphers Modes. Ramki Thurimella

Phys460.nb Solution for the t-dependent Schrodinger s equation How did we find the solution? (not required)

The challenges of non-stable predicates

Στο εστιατόριο «ToDokimasesPrinToBgaleisStonKosmo?» έξω από τους δακτυλίους του Κρόνου, οι παραγγελίες γίνονται ηλεκτρονικά.

Γιπλυμαηική Δπγαζία. «Ανθπυποκενηπικόρ ζσεδιαζμόρ γέθςπαρ πλοίος» Φοςζιάνηρ Αθανάζιορ. Δπιβλέπυν Καθηγηηήρ: Νηθφιανο Π. Βεληίθνο

3.4 SUM AND DIFFERENCE FORMULAS. NOTE: cos(α+β) cos α + cos β cos(α-β) cos α -cos β

[1] P Q. Fig. 3.1

Statistical Inference I Locally most powerful tests

D Alembert s Solution to the Wave Equation

ΣΧΕΔΙΑΣΜΟΣ ΔΙΚΤΥΩΝ ΔΙΑΝΟΜΗΣ. Η εργασία υποβάλλεται για τη μερική κάλυψη των απαιτήσεων με στόχο. την απόκτηση του διπλώματος

Αλγόριθμοι και πολυπλοκότητα NP-Completeness (2)

Math 6 SL Probability Distributions Practice Test Mark Scheme

Partial Differential Equations in Biology The boundary element method. March 26, 2013

Lecture 2. Soundness and completeness of propositional logic

Μηχανική Μάθηση Hypothesis Testing

Assalamu `alaikum wr. wb.

ΚΥΠΡΙΑΚΟΣ ΣΥΝΔΕΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY 21 ος ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ Δεύτερος Γύρος - 30 Μαρτίου 2011

k A = [k, k]( )[a 1, a 2 ] = [ka 1,ka 2 ] 4For the division of two intervals of confidence in R +

Concrete Mathematics Exercises from 30 September 2016

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 11/3/2006

Architecture οf Integrated Ιnformation Systems (ARIS)

ANSWERSHEET (TOPIC = DIFFERENTIAL CALCULUS) COLLECTION #2. h 0 h h 0 h h 0 ( ) g k = g 0 + g 1 + g g 2009 =?

Πρόβλημα 1: Αναζήτηση Ελάχιστης/Μέγιστης Τιμής

Second Order RLC Filters

Capacitors - Capacitance, Charge and Potential Difference

ΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ "ΠΟΛΥΚΡΙΤΗΡΙΑ ΣΥΣΤΗΜΑΤΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ. Η ΠΕΡΙΠΤΩΣΗ ΤΗΣ ΕΠΙΛΟΓΗΣ ΑΣΦΑΛΙΣΤΗΡΙΟΥ ΣΥΜΒΟΛΑΙΟΥ ΥΓΕΙΑΣ "

Πανεπιστήμιο Πειραιώς Τμήμα Πληροφορικής Πρόγραμμα Μεταπτυχιακών Σπουδών «Πληροφορική»

Section 7.6 Double and Half Angle Formulas

Section 8.3 Trigonometric Equations

ΚΥΠΡΙΑΚΗ ΕΤΑΙΡΕΙΑ ΠΛΗΡΟΦΟΡΙΚΗΣ CYPRUS COMPUTER SOCIETY ΠΑΓΚΥΠΡΙΟΣ ΜΑΘΗΤΙΚΟΣ ΔΙΑΓΩΝΙΣΜΟΣ ΠΛΗΡΟΦΟΡΙΚΗΣ 24/3/2007

Numerical Analysis FMN011

Example Sheet 3 Solutions

C.S. 430 Assignment 6, Sample Solutions

Πανεπιστήµιο Πειραιώς Τµήµα Πληροφορικής

Business English. Ενότητα # 9: Financial Planning. Ευαγγελία Κουτσογιάννη Τμήμα Διοίκησης Επιχειρήσεων

Η ΨΥΧΙΑΤΡΙΚΗ - ΨΥΧΟΛΟΓΙΚΗ ΠΡΑΓΜΑΤΟΓΝΩΜΟΣΥΝΗ ΣΤΗΝ ΠΟΙΝΙΚΗ ΔΙΚΗ

ΠΑΝΕΠΙΣΤΗΜΙΟ ΠΕΙΡΑΙΩΣ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ ΠΜΣ «ΠΡΟΗΓΜΕΝΑ ΣΥΣΤΗΜΑΤΑ ΠΛΗΡΟΦΟΡΙΚΗΣ» ΚΑΤΕΥΘΥΝΣΗ «ΕΥΦΥΕΙΣ ΤΕΧΝΟΛΟΓΙΕΣ ΕΠΙΚΟΙΝΩΝΙΑΣ ΑΝΘΡΩΠΟΥ - ΥΠΟΛΟΓΙΣΤΗ»

Démographie spatiale/spatial Demography

Finite Field Problems: Solutions

Every set of first-order formulas is equivalent to an independent set

Lecture 2: Dirac notation and a review of linear algebra Read Sakurai chapter 1, Baym chatper 3

ΓΡΑΜΜΙΚΟΣ & ΔΙΚΤΥΑΚΟΣ ΠΡΟΓΡΑΜΜΑΤΙΣΜΟΣ

4.6 Autoregressive Moving Average Model ARMA(1,1)

department listing department name αχχουντσ ϕανε βαλικτ δδσϕηασδδη σδηφγ ασκϕηλκ τεχηνιχαλ αλαν ϕουν διξ τεχηνιχαλ ϕοην µαριανι

Απόκριση σε Μοναδιαία Ωστική Δύναμη (Unit Impulse) Απόκριση σε Δυνάμεις Αυθαίρετα Μεταβαλλόμενες με το Χρόνο. Απόστολος Σ.

Code Breaker. TEACHER s NOTES

Information and Communication Technologies in Education

Διαχείριση Έργων Πληροφορικής

Abstract Storage Devices

DESIGN OF MACHINERY SOLUTION MANUAL h in h 4 0.

SCHOOL OF MATHEMATICAL SCIENCES G11LMA Linear Mathematics Examination Solutions

ΠΑΝΔΠΙΣΗΜΙΟ ΜΑΚΔΓΟΝΙΑ ΠΡΟΓΡΑΜΜΑ ΜΔΣΑΠΣΤΥΙΑΚΧΝ ΠΟΤΓΧΝ ΣΜΗΜΑΣΟ ΔΦΑΡΜΟΜΔΝΗ ΠΛΗΡΟΦΟΡΙΚΗ

Εργαστήριο Ανάπτυξης Εφαρμογών Βάσεων Δεδομένων. Εξάμηνο 7 ο

Potential Dividers. 46 minutes. 46 marks. Page 1 of 11

Δίκτυα Επικοινωνιών ΙΙ: OSPF Configuration

Σχολή Εφαρμοσμένων Μαθηματικών και Φυσικών Επιστημών. Εθνικό Μετσόβιο Πολυτεχνείο. Thales Workshop, 1-3 July 2015

ΠΑΝΕΠΙΣΤΗΜΙΟ ΚΥΠΡΟΥ ΤΜΗΜΑ ΠΛΗΡΟΦΟΡΙΚΗΣ. ΕΠΛ342: Βάσεις Δεδομένων. Χειμερινό Εξάμηνο Φροντιστήριο 10 ΛΥΣΕΙΣ. Επερωτήσεις SQL

Inverse trigonometric functions & General Solution of Trigonometric Equations

Modern Greek Extension

Τ.Ε.Ι. ΔΥΤΙΚΗΣ ΜΑΚΕΔΟΝΙΑΣ ΠΑΡΑΡΤΗΜΑ ΚΑΣΤΟΡΙΑΣ ΤΜΗΜΑ ΔΗΜΟΣΙΩΝ ΣΧΕΣΕΩΝ & ΕΠΙΚΟΙΝΩΝΙΑΣ

Case 1: Original version of a bill available in only one language.

The new Remote Networks Regulatory Framework Το νέο Ρυθμιστικό Πλαίσιο των Απομακρυσμένων Δικτύων

Nowhere-zero flows Let be a digraph, Abelian group. A Γ-circulation in is a mapping : such that, where, and : tail in X, head in

Example of the Baum-Welch Algorithm

Οδηγίες Αγοράς Ηλεκτρονικού Βιβλίου Instructions for Buying an ebook

Main source: "Discrete-time systems and computer control" by Α. ΣΚΟΔΡΑΣ ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ ΔΙΑΛΕΞΗ 4 ΔΙΑΦΑΝΕΙΑ 1

Χρειάζεται να φέρω μαζί μου τα πρωτότυπα έγγραφα ή τα αντίγραφα; Asking if you need to provide the original documents or copies Ποια είναι τα κριτήρια

ΑΠΟΔΟΤΙΚΗ ΑΠΟΤΙΜΗΣΗ ΕΡΩΤΗΣΕΩΝ OLAP Η ΜΕΤΑΠΤΥΧΙΑΚΗ ΕΡΓΑΣΙΑ ΕΞΕΙΔΙΚΕΥΣΗΣ. Υποβάλλεται στην

Dynamic types, Lambda calculus machines Section and Practice Problems Apr 21 22, 2016

Ordinal Arithmetic: Addition, Multiplication, Exponentiation and Limit

( y) Partial Differential Equations

ΜΟΝΤΕΛΑ ΛΗΨΗΣ ΑΠΟΦΑΣΕΩΝ

ΑΝΑΠΤΥΞΗ ΣΕΝΑΡΙΩΝ ΒΕΛΤΙΣΤΟΠΟΙΗΣΗΣ ΤΗΣ ΔΙΑΧΕΙΡΙΣΗΣ ΚΑΙ ΤΗΣ ΥΔΡΟΗΛΕΚΤΡΙΚΗΣ ΠΑΡΑΓΩΓΗΣ ΤΟΥ ΥΔΡΟΣΥΣΤΗΜΑΤΟΣ ΤΟΥ ΠΟΤΑΜΟΥ ΝΕΣΤΟΥ

5.4 The Poisson Distribution.

Transcript:

ΗΜΥ 317 Τεχνολογία Υπολογισμού Εαρινό Εξάμηνο 2008 ΙΑΛΕΞΗ 20: οκιμασία Ελέγχου Λογισμικού (Testing) ΧΑΡΗΣ ΘΕΟΧΑΡΙ ΗΣ Λέκτορας ΗΜΜΥ (ttheocharides@ucy.ac.cy) [Προσαρμογή από Ian Sommerville, Software Engineering, 8 th Edition] Chapter 22

The testing process Component testing Testing of individual program components; Usually the responsibility of the component developer (except sometimes for critical systems); Tests are derived from the developer s experience. System testing Testing of groups of components integrated to create a system or subsystem; The responsibility of an independent testing team; Tests are based on a system specification. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).4

Testing phases ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).5

Defect testing The goal of defect testing is to discover defects in programs A successful defect test is a test which causes a program to behave in an anomalous way Tests show the presence not the absence of defects ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).6

Testing process goals Validation testing To demonstrate to the developer and the system customer that the software meets its requirements; A successful test shows that the system operates as intended. Defect testing To discover faults or defects in the software where its behaviour is incorrect or not in conformance with its specification; A successful test is a test that makes the system perform incorrectly and so exposes a defect in the system. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).7

The software testing process ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).8

Testing policies Only exhaustive testing can show a program is free from defects. However, exhaustive testing is impossible, Testing policies define the approach to be used in selecting system tests: All functions accessed through menus should be tested; Combinations of functions accessed through the same menu should be tested; Where user input is required, all functions must be tested with correct and incorrect input. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).9

System testing Involves integrating components to create a system or sub-system. May involve testing an increment to be delivered to the customer. Two phases: Integration testing - the test team have access to the system source code. The system is tested as components are integrated. Release testing - the test team test the complete system to be delivered as a black-box. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).10

Integration testing Involves building a system from its components and testing it for problems that arise from component interactions. Top-down integration Develop the skeleton of the system and populate it with components. Bottom-up integration Integrate infrastructure components then add functional components. To simplify error localisation, systems should be incrementally integrated. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).11

Incremental integration testing ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).12

Testing approaches Architectural validation Top-down integration testing is better at discovering errors in the system architecture. System demonstration Top-down integration testing allows a limited demonstration at an early stage in the development. Test implementation Often easier with bottom-up integration testing. Test observation Problems with both approaches. Extra code may be required to observe tests. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).13

Release testing The process of testing a release of a system that will be distributed to customers. Primary goal is to increase the supplier s confidence that the system meets its requirements. Release testing is usually black-box or functional testing Based on the system specification only; Testers do not have knowledge of the system implementation. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).14

Black-box testing ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).15

Testing guidelines Testing guidelines are hints for the testing team to help them choose tests that will reveal defects in the system Choose inputs that force the system to generate all error messages; Design inputs that cause buffers to overflow; Repeat the same input or input series several times; Force invalid outputs to be generated; Force computation results to be too large or too small. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).16

Testing scenario A student in Scotland is studying American History and has been asked to write a paper on ŌFrontier mentality in the American West from 1840 to 1880Õ.To do this, she needs to find sources from a range of libraries. She logs on to the LIBSYS system and uses the search facility to discover if she can acce ss original documents from that time. She discovers sources in various US university libraries and down loads copies of some of these. However, for one document, she needs to have confirmation from her university that she is a genuine student and that use is for non-commercial purposes. The s tudent then uses the facility in LIBSYS that can request such permission and registers her request. If granted, the document will be downloaded to the registered libraryõs server and printed for her. She receives a message from LIBSYS telling her that she will receive an e-mail message when th e printed document is available for collection. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).17

System tests 1. Test the login mechanism using correct and incorrect logins to check that valid users are accepted and invalid users are rejected. 2. Test the search facility using different queries against known sources to check that the search mechanism is actually finding documents. 3. Test the system presentation facility to check that information about documents is displayed properly. 4. Test the mechanism to request permission for downloading. 5. Test the e-mail response indicating that the downloaded document is available. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).18

Use cases Use cases can be a basis for deriving the tests for a system. They help identify operations to be tested and help design the required test cases. From an associated sequence diagram, the inputs and outputs to be created for the tests can be identified. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).19

Collect weather data sequence chart ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).20

Performance testing Part of release testing may involve testing the emergent properties of a system, such as performance and reliability. Performance tests usually involve planning a series of tests where the load is steadily increased until the system performance becomes unacceptable. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).21

Stress testing Exercises the system beyond its maximum design load. Stressing the system often causes defects to come to light. Stressing the system test failure behaviour.. Systems should not fail catastrophically. Stress testing checks for unacceptable loss of service or data. Stress testing is particularly relevant to distributed systems that can exhibit severe degradation as a network becomes overloaded. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).22

Component testing Component or unit testing is the process of testing individual components in isolation. It is a defect testing process. Components may be: Individual functions or methods within an object; Object classes with several attributes and methods; Composite components with defined interfaces used to access their functionality. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).23

Object class testing Complete test coverage of a class involves Testing all operations associated with an object; Setting and interrogating all object attributes; Exercising the object in all possible states. Inheritance makes it more difficult to design object class tests as the information to be tested is not localised. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).24

Weather station object interface ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).25

Weather station testing Need to define test cases for reportweather, calibrate, test, startup and shutdown. Using a state model, identify sequences of state transitions to be tested and the event sequences to cause these transitions For example: Waiting -> Calibrating -> Testing -> Transmitting -> Waiting ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).26

Interface testing Objectives are to detect faults due to interface errors or invalid assumptions about interfaces. Particularly important for object-oriented development as objects are defined by their interfaces. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).27

Interface testing ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).28

Interface types Parameter interfaces Data passed from one procedure to another. Shared memory interfaces Block of memory is shared between procedures or functions. Procedural interfaces Sub-system encapsulates a set of procedures to be called by other sub-systems. Message passing interfaces Sub-systems request services from other sub-system.s ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).29

Interface errors Interface misuse A calling component calls another component and makes an error in its use of its interface e.g. parameters in the wrong order. Interface misunderstanding A calling component embeds assumptions about the behaviour of the called component which are incorrect. Timing errors The called and the calling component operate at different speeds and out-of-date information is accessed. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).30

Interface testing guidelines Design tests so that parameters to a called procedure are at the extreme ends of their ranges. Always test pointer parameters with null pointers. Design tests which cause the component to fail. Use stress testing in message passing systems. In shared memory systems, vary the order in which components are activated. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).31

Test case design Involves designing the test cases (inputs and outputs) used to test the system. The goal of test case design is to create a set of tests that are effective in validation and defect testing. Design approaches: Requirements-based testing; Partition testing; Structural testing. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).32

Requirements based testing A general principle of requirements engineering is that requirements should be testable. Requirements-based testing is a validation testing technique where you consider each requirement and derive a set of tests for that requirement. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).33

LIBSYS requirements The user shall be able to search either all of the initial set of databases or select a subset from it. The system shall provide appropriate viewers for the user to read documents in the document store. Every order shall be allocated a unique identifier (ORDER_ID) that the user shall be able to copy to the accountõs permanent storage area. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).34

LIBSYS tests Initiate user search for searches for items that are known to be present and known not to be present, where the set of databases includes 1 database. Initiate user searches for items that are known to be present and known not to be present, where the set of databases includes 2 databases Initiate user searches for items that are known to be present and known not to be present where the set of databases includes more than 2 databases. Select one database from the set of databases and initiate user searches for items that are known to be present and known not to be present. Select more than one database from the set of databases and initiate searches for items that are known to be present and known not to be present. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).35

Partition testing Input data and output results often fall into different classes where all members of a class are related. Each of these classes is an equivalence partition or domain where the program behaves in an equivalent way for each class member. Test cases should be chosen from each partition. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).36

Equivalence partitioning ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).37

Equivalence partitions ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).38

Search routine specification procedure Search (Key : ELEM ; T: SEQ of ELEM; Found : in out BOOLEAN; L: in out ELEM_INDEX) ; Pre-condition -- the sequence has at least one element T FIRST <= T LAST Post-condition -- the element is found and is referenced by L ( Found and T (L) = Key) or -- the element is not in the array ( not Found and not (exists i, T FIRST >= i <= T LAST, T (i) = Key )) ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).39

Search routine - input partitions Inputs which conform to the pre-conditions. Inputs where a pre-condition does not hold. Inputs where the key element is a member of the array. Inputs where the key element is not a member of the array. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).40

Testing guidelines (sequences) Test software with sequences which have only a single value. Use sequences of different sizes in different tests. Derive tests so that the first, middle and last elements of the sequence are accessed. Test with sequences of zero length. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).41

Search routine - input partitions Sequence Single value Single value More than 1 value More than 1 value More than 1 value More than 1 value Element In sequence Not in sequence First element in sequence Last element in sequence Middle element in sequence Not in sequence Input sequence (T) Key (Key) Output (Found, L) 17 17 true, 1 17 0 false,?? 17, 29, 21, 23 17 true, 1 41, 18, 9, 31, 30, 16, 45 45 true, 7 17, 18, 21, 23, 29, 41, 38 23 true, 4 21, 23, 29, 33, 38 25 false,?? ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).42

Structural testing Sometime called white-box testing. Derivation of test cases according to program structure. Knowledge of the program is used to identify additional test cases. Objective is to exercise all program statements (not all path combinations). ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).43

Structural testing ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).44

Binary search - equiv. partitions Pre-conditions satisfied, key element in array. Pre-conditions satisfied, key element not in array. Pre-conditions unsatisfied, key element in array. Pre-conditions unsatisfied, key element not in array. Input array has a single value. Input array has an even number of values. Input array has an odd number of values. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).45

Binary search equiv. partitions ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).46

Binary search - test cases Input array (T) Key (Key) Output (Found, L) 17 17 true, 1 17 0 false,?? 17, 21, 23, 29 17 true, 1 9, 16, 18, 30, 31, 41, 45 45 true, 7 17, 18, 21, 23, 29, 38, 41 23 true, 4 17, 18, 21, 23, 29, 33, 38 21 true, 3 12, 18, 21, 23, 32 23 true, 4 21, 23, 29, 33, 38 25 false,?? ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).47

Path testing The objective of path testing is to ensure that the set of test cases is such that each path through the program is executed at least once. The starting point for path testing is a program flow graph that shows nodes representing program decisions and arcs representing the flow of control. Statements with conditions are therefore nodes in the flow graph. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).48

Binary search flow graph ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).49

Independent paths 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 14 1, 2, 3, 4, 5, 14 1, 2, 3, 4, 5, 6, 7, 11, 12, 5, 1, 2, 3, 4, 6, 7, 2, 11, 13, 5, Test cases should be derived so that all of these paths are executed A dynamic program analyser may be used to check that paths have been executed ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).50

Test automation Testing is an expensive process phase. Testing workbenches provide a range of tools to reduce the time required and total testing costs. Systems such as Junit support the automatic execution of tests. Most testing workbenches are open systems because testing needs are organisation-specific. They are sometimes difficult to integrate with closed design and analysis workbenches. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).51

A testing workbench ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).52

Testing workbench adaptation Scripts may be developed for user interface simulators and patterns for test data generators. Test outputs may have to be prepared manually for comparison. Special-purpose file comparators may be developed. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).53

Key points Testing can show the presence of faults in a system; it cannot prove there are no remaining faults. Component developers are responsible for component testing; system testing is the responsibility of a separate team. Integration testing is testing increments of the system; release testing involves testing a system to be released to a customer. Use experience and guidelines to design test cases in defect testing. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).54

Key points Interface testing is designed to discover defects in the interfaces of composite components. Equivalence partitioning is a way of discovering test cases - all cases in a partition should behave in the same way. Structural analysis relies on analysing a program and deriving tests from this analysis. Test automation reduces testing costs by supporting the test process with a range of software tools. ΗΜΥ317 20 οκιμασία Ελέγχου (Testing).55