Integration Testing. Rogério Paulo. January 12, 2007

Size: px
Start display at page:

Download "Integration Testing. Rogério Paulo. January 12, 2007"

Transcription

1 Integration Testing Rogério Paulo January 12, 2007

2 Abstract This document is written as a dissertation to complete the module CS339 Advanced Topics in Computer Science: Testing in University of Wales Swansea. The referencing materials are mainly based on the book Software Testing A Craftman s Approach by Paul C. Jorgensen, also referred as [Jor02]. Nowadays testing plays a major role in the software development cycle. Generally, software development firms invest a considerable amount of resources in testing to make sure the software developed meets the specification and standard for the user or customer. Since problems that arise after the software release can cause the company to lose revenue and reputation, or worse, it can cause environmental damage, injuries and deaths. In this document, we will discuss one of the testing phase, integration testing, and its different strategies. Namely decomposition-based integration, call-graph based integration and path-based integration. We will see that for each strategy there are different approaches to achieve the same main concept but with different requirements and consequences. For each approach there will be a case study where a closer to real-life example will be shown and discussed. Finally, at the end of this document there will be a conclusion based on my research and personal experiences.

3 Table of Contents Table of Contents 1 Introduction 2 1 Decomposition-based Integration Big bang Integration Top-down Integration Bottom-up Integration Sandwich Integration Call Graph-based Integration Pair-wise Integration Neighbourhood Integration Path-based Integration MM-Path based Integration Conclusion 22 Bibliography 23 1

4 Introduction In the classic software development model, V-Model (Figure 1), integration testing is a software testing phase located before system testing and after unit testing. Integration testing has the goal of proving that the features developed work together well enough for the project to be submitted for system testing. In this model, unit testing is performed mainly by programmers and system testing is performed mainly by testers; integration testing offers the opportunity for the programmers (people with high knowledge on the code) to work with the testers (people with high technical expertise in testing), bridging unit testing and system testing thus allowing the transition to be smoother. Generally, the larger and more complex the project is, the more important is the integration testing. As integration testing is performed after unit testing, we will assume that all units have been tested separately. The method of grouping the modules of the system is determined by the strategy and the approach. It is also important to note that these strategies and approaches are targetted to traditional procedural programming languages. Different strategies are needed because there are different requirements and resource allowance. For instance, in very small systems grouping all the modules and testing them in a single phase may be acceptable, however, for larger systems this is impractical. The reasons and solutions for these problems will be discussed in the later chapters. We will first introduce the example that will be using during this document, the NextDate program. Then we will discuss the different approaches of integration testing and how it is applied to our example: Chapter 1, we will talk about decomposition-based integration. We will see the four main approaches in this strategy: big bang, top-down, bottom-up and sandwich; the advantages and disadvantages of them and examples of their application will be given. Chapter 2, we will examine call graph-based integration and its general improvement made towards decompositionbased integration. Namely the approaches known as pair-wise and neighbourhood. Again, their strong and weak points will be discussed with concrete examples shown. Chapter 3, we will discuss about path-based integration. We will talk mainly about an approach known as MM-path based integration, its advantages and disadvantages. A concrete example will be used to explain how it is applied. R equirem ents A nalysis R equirem ents Testing A rchitecture D esign D esign Testing M odule D esign M odule Testing S ystem D evelopm ent A cceptance Testing S ystem Integration S ystem Testing Module Integration Integration Testing U nit D esign & Im plem entation U nit Testing Figure 1: V-Model, a classic software development model. 2

5 The NextDate Program This example is taken directly from [Jor02], the way the pseudo-code is shown has been modified. However, the main functional and structural integrity of the program is kept. This program uses three variables: month, date and year. With the input, it returns the next date of the inputted date. It has the following characteristics: Checks for valid input: Must be positive integers A month must be: 1 month 12 A day must be: 1 day 31 A year must be: Takes leap years into consideration: A year is leap year if is divisible by 4 Unless it is a century year, then it is only leap if is multiple of 400 Here is the pseudo-code of the NextDate program implementation: input output : A date : Next date of the day inputted Type Date: Integer month,integer day,integer year Date : today,tomorrow,adate Main integrationnextdate getdate(today); /* message1*/ printdate(today); /* message2*/ tomorrow = incrementdate(today); /* message 3 */ printdate(tomorrow); /* message 4 */ End Main Function(Main) integrationnextdate(date) We want to keep the main part simple, thus we just call functions from other parts. Here we get the date from the user input with getdate, we print it with printdate then we calculate the next date with incrementdate, finally, printing the results with printdate again. Also note that Date is a new datatype that contains three other integer variables: month, day and year. We also declared today, tomorrow and adate as variables of the type Date input : A year output: True if is a leap year, otherwise false Function Boolean isleap(year) if year divisible by 4 then if year is NOT divisible by 100 then isleap=true else if year is divisible by 400 then isleap=true else isleap=false else isleap=false End (Function isleap) FunctionisLeap(year) 3

6 This function isleap checks if the year from the input is a leap year or not. We first check if the year is divisible by 4, if it is, then there is possibility that it is a leap year, otherwise it is not. In case it is divisible by 4, we continue to check if the year is a century year or not. If it is not, then the year is a leap year. Else, we proceed to check the next condition, if the year is a multiple of 400. If it is then it is a leap year, else, it is not input : A month and a year output: The last day of the month in integer Function Integer lastdayofmonth(month,year) switch month do case 1,3,5,7,8,10,12: lastdayofmonth = 31 case 4,6,9,11: lastdayofmonth = 30 case 2: if isleap(year) then lastdayofmonth = 29; /* message 5 */ else lastdayofmonth = 28 endsw endsw End (Function lastdayofmonth) FunctionlastDayOfMonth(month,year) In lastdayofmonth we calculate the upperbound of the number of days that exist in a certain month. This is needed because there are months with 30 and 31 days; with February a special case where it has 28 days in a standard year and 29 days in a leap year. This function is handled mainly by switch-case statements. For the first case, we are saying that the months: January, March, May, July, August, October and December have 31 days. For the second case, the months: April, June, September and November have 30 days. Finally, for February we are saying that it has 29 days if it is a leap year, otherwise it has only 28 days input : A date output: True if the date is valid, otherwise false Function Boolean validdate(adate) if (adate.month > 0) (adate.month <= 12) then monthok = True else monthok = False if monthok then if (adate.day > 0) (adate.day <= lastdayofmonth(adate.month,adate.year)) then dayok = True; /* message6*/ else dayok = False endif if (adate.year > 1811) (adate.year <= 2012) then yearok = True else yearok=false if monthok dayok yearok then validdate= True else validdate = False End (Function validdate) FunctionvalidDate(aDate) Since there are certain conditions that must be met for a date to be valid, for our program we should have a part to make sure these conditions are met. Especially if the date is from user input. In validdate we will be checking these conditions separately: Month - We return true if the value is between 1 and 12 (inclusive), else, we return false. 4

7 Day - We return true if the value is between 1 and the maximum day of the month (inclusive); the maximum day of the month is retrieved by using lastdayofmonth. If this condition is not met, then we return false. Year - Here we will be placing an artificial boundry to our program. We are just allowing years between the year of 1812 and 2012 (inclusive), even if there are other values that are also considered valid. Again, we return true if this condition is met, else, false is returned. After checking all three variables (month,day and year), we will just consider that the date is valid if all three conditions are met (all of them returned true), otherwise we will be rejecting the date input : A set of integers from user input output: A date Function Date getdate(adate) repeat Output( Enter a month: ) Input(aDate.Month) Output( Enter a day: ) Input(aDate.Day) Output( Enter a year: ) Input(aDate.Year) getdate.month = adate.month getdate.day = adate.day getdate.year = adate.year until validdate(adate); /* message 7 */ End (Function getdate) FunctiongetDate(aDate) By using getdate we will be able to retrieve and store the date from the user input. Here we request the inputs by printing to the screen the desired variable using Output. After each request, we retrieve the value inputted by the user to the corresponding variable using Input. Finally, we stored the retrieved values to the corresponding variable. These statements are inside the repeat block, thus if the user inputs an invalid date, the program will keep requesting a new date until a valid one is inputted input : A date output: The date incremented Function Date incrementdate(adate) if adate.day < lastdayofmonth(adate.month) then adate.day = adate.day + 1; /* message 8 */ else adate.day=1 if adate.month = 12 then adate.month = 1 adate.year = adate.year + 1 else adate.month = adate.month + 1 endif End (Function incrementdate) FunctionincrementDate(aDate) With incrementdate we implement the main feature of this program. With a date as an input, we output a date that corresponds to the following date of the input. To achieve that we first check the day of the date inputted, if it is the 5

8 last day of the month using lastdayofmonth. If it is not, then we can simply increase the day by one. If it is then we will need to change more variables. First, we set the day to 1; this is because the successor of the last day of a month is the first day of the next month. Then we must check if the month is the last month of the year, which is 12 (December). If it is, then we must set the month as 1 (January) and increment the year, which corresponds to the first day of a new year. Else, we can simply increment the value of month by input : A date output: The date in string Procedure String printdate(adate) Output( Day is,adate.month, /,adate.day, /,adate.year) End (Procedure printdate) Procedure printdate(adate) Here with printdate, we simply convert the date with the datetype of date to a string. This is done so that it can be printed on the screen and allow us to put additional strings or information. 6

9 Chapter 1 Decomposition-based Integration In this strategy, we do the decomposition based on the functional characteristics of the system. A functional characteristic is defined by what the module does, that is, actions or activities performed by the module. In this strategy our main goal is to test the interfaces among separately tested units. There are four approaches for this strategy: Big bang integration Top-down integration Bottom-up integration Sandwich integration Briefly, big-bang groups the whole system and test it in a single test phase. Top-down starts at the root of the tree and slowly work to lower level of the tree. Bottom-up mirrors top-down, it starts at the lower level implementation of the system and work towards the main. Sandwich is an approach that combines both top-down and bottom-up. Note that many different sources refers decomposition-based integration, if not the only one, the main strategy used for integration testing, however, this is not true. In later chapters we will see strategies that are not decompositionbased but they still allow us to achieve a systematic test for the integration phase. 1.1 Big bang Integration This is one of the easiest approaches to apply in integration testing. Here we treat the whole system as a subsystem and test it in a single test phase. Figure 1.1 shows the modules used in a single test session. Normally this means simply integrating all the modules, compile them all at once and then test the resulting system. This approach requires little resources to execute as we do not need to identify critical components (like interactions paths between the modules) nor require extra coding for the dummy modules. This approach may be used for very small systems, however it is still not recommended because it is not systematic. In larger systems, the low resources requirement in executing this testing is easily offset by the resources required to locate the problem when it occurs. While it is easy to have a SUT 1 for the test cases to be applied on, it is very difficult in creating the test cases. This is because in a large system, the input has undergone a considerable amount of interactions and conditional checks to reach the final output. It is difficult to create test cases that has a good coverage in such complex scenario. For big bang integration the number of integration testing sessions is only 1. 1 System Under Test a system that is being tested for correct operation. 7

10 Figure 1.1: Big bang integration, coverage of a test session Case Study Here we compile all the modules in the functional decomposition tree: Main, isleap, lastdayofmonth, GetDate, ValidDate, IncrementDate, printdate and test the whole system in a single session (Figure 1.2). By doing this, we will increase the difficulty of test cases creation. This is because we must create a single set of test cases that covers conditions passed by different modules. Simultaneously, this will make the analysis of the test cases harder; when there is a test case that produces incorrect value, it will be more difficult to deduce the reasons because the data has been heavily processed. Consequently, this will make problem isolation a big issue in this approach. In these situations the programmer s experience may help locating the problem, or we can use debugging methods to locate them. While this is viable in small systems like the one used as an example, it is not cost effective for larger systems. In fact, there are other methods that we will discuss that help resolving these problems in a more systematic way. M ain isleap lastd ayo fm onth validd ate getd ate increm entd ate printd ate Figure 1.2: Big bang integration of the nextdate program Summary In summary, big bang integration has the following characteristics: Considers the whole system as a subsystem Tests all the modules in a single test session Only one integration testing session And the following advantages and disadvantages: Advantages: Low resources requirement Does not require extra coding Disadvantages: Not systematic Hard to locate problems Hard to create test cases 8

11 1.2 Top-down Integration In top-down integration, we start at the target node at root of the functional decomposition tree and work toward the leaves. Figure 1.3 shows different sessions of integration testing. Stubs 2 are used to replace the children nodes attached to the target node. A test phase consists in replacing one of the stub modules with the real code and test the resulting subsystem. If no problem is encountered then we do the next test phase. If all the children were replaced by real code at least once and meet the requirements then we move down to the next level. Now we can replace the higher level tested modules with real code and continue the integration testing. This testing approach finish when the whole system is covered by using the method above. Top-down integration allows us to have a prototype of the SUT at early stages. This is a very big advantage in many customer based software development. In many cases, companies suffer large software development cost because of a bad design that is just identified at the later stage of the development cycle, forcing the developing team to restart at the designing phase. By having an early SUT prototype many design issues can be identified early thus rectified. Consequently, by using top-down integration, we will be able to interleave design and implementation. Top-down integration has the drawback of requiring stubs. While stubs are simpler than the real code, it is not straightforward to write them; the emulation must be complete and realistic, that is, the test cases results ran on the stub should match with the results on the real code. Being a throw-away code, it does not reach the final product nor it will increase functionality of the software thus it is extra programming effort without a direct reward. Another issue of starting at higher level is that we are forced to abstract both the application layer and the hardware layer. For systems where it requires strict hardware compatibility, for example, embedded systems, this will create serious issues at later stages. Finally, top-down integration starts at the higher level of the software thus the expected outputs are more complex, making the creation of test cases also harder. For top-down integration the number of integration testing sessions is n nodes n leaves + n edges. Figure 1.3: Top-down integration, coverage of different sessions at different levels. 2 Stub simple throw-away codes that emulate the replaced module. 9

12 1.2.1 Case Study With our example program nextdate, this integration approach is not very useful. This is mainly because this is a very simple system (thus the functional decomposition tree does not have many levels) and secondly the main program does not have many features or complex user interface. In top-down integration, we would be starting with Main as a target node and replace the children nodes one by one with stubs (only one stub in each test session). We must build the stub such that it returns correct values to the real module and compatible to the test cases. A possible stub for incrementdate could be: input : A date output: The following day of the inputted date Date : d ,d ,d ,next Function Date incrementdate(adate) d = Date(12,31,1999) d = Date(02,28,2000) d = Date(02,28,1999) if adate == d then next = Date(01,01,2000) else if adate == d then next = Date(02,29,2000) else if adate == d then next = Date(03,01,1999) End (Function incrementdate) FunctionlastDayOfMonth(month,year) In a way, the test cases will be limited by how and what we code in the stub. This also means that we are limiting the area we must look at when problems arise. For instance, if both incrementdate and getdate is replaced by stubs but there is a mismatch of results in the output, then most likely the problem is at printdate. Another thing to note about this approach in this example is that there are empty test sessions. The functions isleap, lastdayofmonth and validdate are never called by Main directly so we will not be able to isolate them with stubs with a top-down approach thus no test cases are created in these sessions (Figure 1.4). N ode w ith real code M ain N odes that w ill be replaced by stubs isleap lastd ayo fm onth validd ate getd ate increm entd ate printd ate Figure 1.4: Top-down integration of the nextdate program Summary In summary, top-down integration has the following characteristics: Integration starts at the main program Moves from the higher level modules to the lower level modules Has n nodes n leaves + n edges number of integration testing sessions And the following advantages and disadvantages: 10

13 Advantages: Early SUT prototype Interleaves design and implementation Disadvantages: Throw-away code programming Late interaction tests between the main program, the application layer and the hardware Difficult to create test cases 1.3 Bottom-up Integration Bottom-up integration starts at the opposite end of the functional decomposition tree, instead of starting at the main program we start at the lower-level implementation of the software. As we can see in Figure 1.5, bottom-up integration mirrors top-down integration in the sense of testing direction in the tree. By moving in an opposite direction, the parent nodes are replaced by throw-away codes instead of the children. These throw-away codes are also known as drivers 3. Most functional decomposition trees have a reasonably high scatter near the leaves. Consequently, we will not need to replace as many modules with throw-away codes as we need in a top-down approach. While we do not need that many drivers, this is offset by higher difficulty in programming drivers. This approach allow us to start working with simpler and lower level of the implementation, allowing us to create testing environments more easily because of the simpler outputs of those modules. This also allows us to handle the exceptions more easily. Conversely, we do not have an early prototype thus the main program is the last to be tested. If there is a design error then it will be just identified at a later stage, which implies high error correction cost. Bottom-up integration is commonly used for object-oriented systems, real-time systems and systems with strict performance requirements. For bottom-up integration the number of integration testing sessions is n nodes n leaves + n edges. Figure 1.5: Bottom-up integration, coverage of different sessions at different levels Case Study For bottom-up integration, we can apply it to our example by starting with isleap, then lastdayofmonth, validdate and getdate. Some shorter but still useful test sessions includes Main and getdate, incrementdate, printdate. As we can see, bottom-up seems to be a more natural choice to use than top-down integration for this example. Here we do not need to substitute as many modules with temporary throw-away modules (Figure 1.6). Also, since the lower level modules do not have a high degree of coupling (they are able to function with only their own code), the test cases are easier to be maintained. The main purpose of the driver is passing test cases to its children nodes. A possible driver for the lastdayofmonth to work with isleap could be: 3 Driver routine that replace a real module and calls a subsystem, passing test cases to it. 11

14 input : None (Hardcoded test cases) output: True if it match the expected result, otherwise false Function Integer lastdayofmonth driver() Output( Pass 1900:,(isLeap(1900) == False)) Output( Pass 1999:,(isLeap(1999) == False)) Output( Pass 2000:,(isLeap(2000) == True)) End (Function lastdayofmonth driver) FunctionlastDayOfMonthdriver In case of there are results that does not match with the expected ones, we will know that isleap most likely is the module that is causing the problem. For example, if during the test session the returning value of the years 1900 and 2000 does not correspond to the expected result then we would check the code that handles century years in the module isleap. N ode replaced by driver M ain N odes w ith real code isleap lastd ayo fm onth validd ate getd ate increm entd ate printd ate Figure 1.6: Bottom-up integration of the nextdate program Summary In summary, bottom-up integration has the following characteristics: Start at the leaves of the functional decomposition tree Work toward to the higher level, to the root of the tree Has n nodes n leaves + n edges number of integration testing sessions And the following advantages and disadvantages: Advantages: Less throw-away code programming Easy to create testing environments Easy exceptions handling Disadvantages: No prototype Main program tested last Late to identify design errors High error correction cost 1.4 Sandwich Integration Sandwich integration combines top-down integration and bottom-up integration. The main concept is to maximize the advantages of top-down and bottom-up and minimizing their weaknesses. In top-down by starting at the root of the functional decomposition tree, we will be able to test the main program at early stage. In bottom-up, we will have coverage that is easy to create test cases. 12

15 Sandwich integration uses a mixed-up approach where we use stubs at the higher level of the tree and drivers at the lower level (Figure 1.7). The testing direction starts from both side of tree and converges to the centre, thus the term sandwich. This will allow us to test both the top and bottom layers in parallel and decrease the number of stubs and drivers required in integration testing. While this approach decreases the number of throw-away code required, it is still a requirement. Due of the nature of combining both approach and starting at both side of the tree, we are in fact doing a smaller version of big bang inside our functional decomposition tree. Consequently, it is also more difficult of isolate problems. For sandwich integration, the number of integration testing sessions varies but the maximum number of sessions is the number of subtrees that exists in the functional decomposition tree. Figure 1.7: Sandwich integration, combining top-down and bottom-up approach Case Study Sandwich integration is also a good choice for integration testing in this system. This is because by doing either top-down or bottom-up approach a good part of the functional decomposition tree is covered. Sandwich integration approach is known of its flexibility in the integration, thus there are no strict guidelines in modules grouping. Consequently, there are different types of sandwich integration testing, which normally are categorized by the depth of the coverage. In this example, we can use a top-down approach for the modules in the higher level of the tree; for example, Main, incrementdate and printdate. While at the lower level, we use bottom-up approach. For instance, isleap,lastdayofmonth and validdate. Resulting a combination of top-down and bottom-up approach where the tested subsystems join in the centre of the functional decomposition tree. (Figure 1.8) At the end we will be doing a smaller version of big bang approach, problems isolation (while smaller) is still an issue. B ottom -up integration M ain Top-dow n integration isleap lastd ayo fm onth validd ate getd ate increm entd ate printd ate Figure 1.8: Sandwich integration of the nextdate program Summary In summary, sandwich integration has the following characteristics: Combines top-down approach and bottom-up approach 13

16 Generally, higher level modules use a top-down approach (stub) Normally, lower level modules use a bottom-up approach (driver) Testing converges to the middle Number of integration sessions can vary The maximum number of sessions is the number of subtrees of the system And following advantages and disadvantages: Advantages: Top and bottom layers can be done in parallel Less stubs and drivers needed Easy to contruct test cases Better coverage control Integration is done as soon a component is implemented Disadvantages: Still requires throw-away code programming Partial big bang integration Hard to isolate problems 14

17 Chapter 2 Call Graph-based Integration Call graph-based integration is an improvement over the approaches based on the functional decomposition. This is done by moving to the direction of structural testing. Here we use a directed graph instead of a functional decomposition tree to represent the program. The system is presented as a directed graph where the nodes are the modules and the edges represent function invocations. There are two main approaches in call graph-based integration: Pair-wise integration Neighbourhood integration In pair-wise integration, we restrict a test session with only a pair of modules, whereas in neighbourhood integration we group the modules around the target node as a subsystem to be tested. 2.1 Pair-wise Integration In pair-wise integration, we eliminate the need of stub and driver, by using the real code instead. This is similar to big bang where has problem isolation problem due to the large amount of modules we are testing at once. To resolve this, we restrict a test session to only a pair of units in the call graph (Figure 2.1). In case problem occurs then we just need to look into the vertices (the modules) and the edge (the function) in question, thus problem isolation is no longer a problem. By pairing up the modules using the edges, we will have a number of test sessions equal to the number of edges that exist in the call graph. Since the edges correspond to functions or procedures invocated, in a standard system, this implies many test sessions. For pair-wise integration the number of integration testing sessions is the number of edges Figure 2.1: Pair-wise integration, some pairs that are used for different testing sessions. 15

18 2.1.1 Case Study By going to a call graph-based strategy, we will be able to eliminate the problem of empty test sessions. This is because the edges actually represent the calls and functional dependencies of the modules. To use pair-wise integration in this example, we pair-up the modules according to the edges of the call graph (Figure 2.2). For instance, lastdayofmonth with isleap and Main with printdate. Each of these pairs will then constitute a subsystem for a test session. With this call graph, there will be seven test sessions because there are seven edges. M ain getd ate printd ate increm entd ate validd ate lastd ayo fm onth isleap Figure 2.2: Two pairs used in pairwise integration of the nextdate program Summary In summary, pair-wise integration has the following characteristics: Each test session is restricted to only a pair of modules Module pairing is based on the edges of the call graph The number of integration testing sessions is the number of edges And the following advantages and disadvantages: Advantages: Stub and driver need is eliminated Disadvantages: Many test sessions Use of real code 16

19 2.2 Neighbourhood Integration While pair-wise integration eliminates the need of stub and driver, it still requires many test cases. As an attempt of improving from pair-wise, neighbourhood requires fewer test cases. In neighbourhood integration, we create a subsystem for a test session by having a target node and grouping all the nodes near it (Figure 2.3. Near is defined as nodes that are linked to the target node that is an immediate predecessor or successor of it. By doing this we will be able to reduce considerably the amount of test sessions required. Notice that the predecessors and successors correspond to the modules that are replaced by stubs and drivers in the functional decomposition tree. This means that we are doing something what sandwich integration does, smaller version of big bang integration in the tree. Consequently, this causes difficulty in isolating faults. For neighbourhood integration the number of integration testing sessions is n nodes n sinknodes Figure 2.3: Neighbourhood integration, neighbourhood of nodes 1, 2 and 3 respectively Case Study Applying this approach to the example we will have: Neighbourhood of validdate: getdate, lastdayofmonth Neighbourhood of lastdayofmonth: validdate, incrementdate, isleap Neighbourhood of getdate: Main, validdate Neighbourhood of incrementdate: Main, lastdayofmonth Neighbourhood of Main: getdate, incrementdate, printdate M ain getd ate printd ate increm entd ate validd ate lastd ayo fm onth isleap Figure 2.4: Neighbourhood of lastdayofmonth in neighbourhood integration of the nextdate program. As we can see, we group the modules such that all the modules that are immediate successors or predecessor of the target node are within the same subsystem. Each of these subsystems will be used for separate test session. Figure 2.4 show the neighbourhood for the module lastdayofmonth. While this approach decreases the number of test sessions needed, it also makes it harder to isolate faults. 17

20 2.2.2 Summary In summary, neighbourhood integration has the following characteristics: Modules are grouped as neighbourhoods A neighbour module is a module that is the immediate successor or predecessor of another unit The number of integration testing sessions is n nodes n sinknodes And the following advantages and disadvantages: Advantages: Stub and driver need is eliminated Use of real code Disadvantages: Hard to isolate faults Reduction of test sessions 18

21 Chapter 3 Path-based Integration By moving to path-based integration we will be approaching integration testing from a new direction. In decompositionbased testing we use a structural approach and in call-graph base testing we use a functional approach. Here we will try to combine both structural and functional approach in path-base integration. Finally, instead of testing the interfaces (which are structural), we will be testing the interactions (which are behavioural). Here, when a unit is executed certain path of source statements is traversed. When this unit calls source statements from another unit, the control is passed from the calling unit to the called unit. For integration testing we treat these unit calls as an exit followed by an entry. The main path-based integration approach that we will be discussing is: MM-Path 1 based integration In MM-path based integration we track all the modules execution paths 2 and messages 3 used in the system. The modules traversed by this path is then used as a subsystem to be tested. Note that in path-based integration we will introduce two new types of nodes: Source node 4 Sink node MM-Path based Integration MM-Paths represent actions with inputs and outputs thus showing us the system in a functional level. The way the MM-Path graph is constructed, how the modules and messages are identified allow us to work on the system in a structural level. A MM-Path graph is represented by a directed graph in which nodes are module execution paths and edges to messages and returns from one unit to another. These cross unit paths show the possible executions paths, allowing us to examine more closely the behaviour of the system (Figure 3.1). To be able to apply MM-Path based integration, we must first find guidelines which allow us to limit us the depth of an MM-Path. Two possible behavioural criteria are: Message Quiescence Data Quiescence 1 Method/Message-Path an interleaved sequence of module execution paths and messages. 2 Module Execution Path a sequence of statements that begins with a source node and ends with a sink node. 3 Message a programming language mechanism by which one unit transfers control to another unit. 4 Source Node a statement fragment at which program execution begins or resumes. 5 Sink Node a statement fragment at which program execution terminates. 19

22 It is said to be message quiescence when we arrive to a unit that sends no messages. Data quiescence is reached when we terminate a set of execution with the creation of data that is stored but not used immediately. With these definitions, we will be able to do an integration testing that combines both structural and functional approach, allowing a closer coupling with the actual system behaviour. Avoiding the drawbacks from a structural based approach and allowing us to have a smoother transition from integration testing to system testing (where the use of behavioural threads is desired). However, to use a MM-Path based integration we must put extra effort to identify the MM-Paths; which may be compensated by the elimination of stub and driver. For MM-Path based integration the number of integration testing sessions is dependant to the system in question A B C 4 5 Figure 3.1: A MM-Path (dotted arrows) across units A, B and C Case Study The example is a data-driven program; the MM-Paths begin in and return to the main program. The following fragment represent the first MM-Path for 5/27/2002 : Main(1,2) message1 getdate(36,37,38,39,40,41,42,43,44,45,46,47) message7 validdate(24,25,26,27,28) message6 lastdayofmonth(14,15,16,23); validdate(28,30,31,33,35) getdate(48) Main(3) /* Point of quiescence*/ A main problem when using this approach is knowing how many MM-Paths are required to complete the integration test. The set of MM-Paths should traverse all source-to-sink paths. A large number of paths (or even infinite) caused by loops can be reduced by condensation graphs 6 of the directed acyclic graphs 7. 6 Condensation Graph a graph CG=(CV, CE) based on the graph G=(V, E) where each vertex in CV corresponds to a strongly connected component in G and edge (u, v) is in CE if and only if there exists an edge in E connecting any of the vertices in the component of u to any of the vertices in the component of v. 7 Directed Acyclic Graph a directed graph with no directed cycles. 20

23 3.1.2 Summary In summary, MM-Path integration has the following characteristics: Messages sent between modules are tracked The set of MM-Paths should cover all source-to-sink paths Points of quiescence are natural endpoints for an MM-Path The number of integration testing sessions is dependant to the system in question And the following advantages and disadvantages: Advantages: Hybrid of functional and structural testing Closely coupled with actual system behaviour Disadvantages: Extra effort required to identify the MM-Paths Does not require stub or driver 21

24 Conclusion It is important to note again that all the strategies and approaches mentioned are targeted for the traditional procedural programming languages. Still, the foundation and many basic concepts can be applied to object-oriented programming languages by undergoing some changes. For instance, in many situations we have assumed that the units are able to behave correctly independently from other units of the same system. This assumption will not be able to be applied in object-oriented applications as commonly as procedural ones because the units are tightly coupled; making the use of stub and driver more frequent. It is also important to remind that at first sight, integration testing and system testing seems to be testing the system as a whole (all units are present and complete) but their goals are different. In integration testing we are more concerned in finding faults when the units are integrated. While in system testing we are more concerned in demonstrating the performance of the system. With all these testing strategies and approaches we are able to test different type of systems more effectively and more systematically. For each system there may be an optimal testing strategy and approach that should be used. However, due to the demands in the software development industry and limiting factors like lack of time, capital and technical expertise such choices are not always possible or as complete as desired. Yet, I believe that we should not put testing as something to be avoided or just for the completeness of the software development cycle. In fact, it is one of the most important stages and more effort should be put in it. Generally, the loss caused by a deployed faulty system is greater than the amount of investment needed to do a more complete testing to avoid such problem. This is especially true in critical systems where the damage is irreversible, like loss of human lives and environmental damages. 22

25 Bibliography [Jor02] Paul C. Jorgensen. Software Testing A Craftsman s Approach. CRC Press, second edition, [KFN99] Cem Kaner, Jack Falk, and Hung Quoc Nguyen. Testing Computer Software. John Wiley & Sons Inc, second edition, [Pez05] [Sch06] Mauro Pezzè. Quality control of softwares. Chapter 18: Integration and Component-based Software Testing, Holger Schlingloff, Handouts for Advanced Topics in Computer Science: Testing. 23

Software Testing: A Craftsman s Approach, 4 th Edition. Chapter 16 Software Complexity

Software Testing: A Craftsman s Approach, 4 th Edition. Chapter 16 Software Complexity Chapter 16 Software Complexity Levels of Software Complexity Unit Level Topological (cyclomatic) complexity, based on a program graph Decisional complexity, a refinement of topological complexity, based

More information

Software Testing: A Craftsman s Approach, 4 th Edition. Chapter 13 Integration Testing

Software Testing: A Craftsman s Approach, 4 th Edition. Chapter 13 Integration Testing Chapter 13 Integration Testing The Mars Climate Orbiter Mission mission failed in September 1999 completed successful flight: 416,000,000 miles (665.600.600 km) 41 weeks flight duration lost at beginning

More information

Integration Testing Path Based" Chapter 13!

Integration Testing Path Based Chapter 13! Integration Testing Path Based Chapter 13! Call graph based integration Use the call graph instead of the decomposition tree! What is a call graph?! IntP 2 Call graph definition Is a directed, labeled

More information

TDDD04: Integration and System level testing. Lena Buffoni

TDDD04: Integration and System level testing. Lena Buffoni TDDD04: Integration and System level testing Lena Buffoni lena.buffoni@liu.se Lecture plan Integration testing System testing Test automation Model-based testing Remember? Testing in the waterfall model

More information

CSCE 747 Software Testing and Quality Assurance

CSCE 747 Software Testing and Quality Assurance CSCE 747 Software Testing and Quality Assurance Lecture 10 Integration Testing 9/30/2013 Lec 10 Integration Testing 1 CSCE 747 Fall 2013 1 Last Time Integration & System Testing Part III Levels of Testing

More information

TDDD04 Software Testing

TDDD04 Software Testing TDDD04 Software Testing Lecture Notes 5 March June 2010 Mohsen Torabzadeh-Tari (presenter), (originator) Department of Computer and Information Science Linköping University, Sweden Integration Testing

More information

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn

Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Difference Between Dates Case Study 2002 M. J. Clancy and M. C. Linn Problem Write and test a Scheme program to compute how many days are spanned by two given days. The program will include a procedure

More information

Chapter 9. Software Testing

Chapter 9. Software Testing Chapter 9. Software Testing Table of Contents Objectives... 1 Introduction to software testing... 1 The testers... 2 The developers... 2 An independent testing team... 2 The customer... 2 Principles of

More information

Integration Testing Qualidade de Software 2

Integration Testing Qualidade de Software 2 Integration Testing Integration Testing Software systems are built with components that must interoperate Primary purpose: To reveal component interoperability faults so that testing at system scope may

More information

CS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING

CS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING 1 CS 4387/5387 SOFTWARE V&V LECTURE 4 BLACK-BOX TESTING Outline 2 Quiz Black-Box Testing Equivalence Class Testing (Equivalence Partitioning) Boundary value analysis Decision Table Testing 1 3 Quiz - 1

More information

Programming Logic and Design Sixth Edition

Programming Logic and Design Sixth Edition Objectives Programming Logic and Design Sixth Edition Chapter 6 Arrays In this chapter, you will learn about: Arrays and how they occupy computer memory Manipulating an array to replace nested decisions

More information

CSC-140 Assignment 6

CSC-140 Assignment 6 CSC-140 Assignment 6 1 Introduction In this assignment we will start out defining our own classes. For now, we will design a class that represents a date, e.g., Tuesday, March 15, 2011, or in short hand

More information

A Linear-Time Heuristic for Improving Network Partitions

A Linear-Time Heuristic for Improving Network Partitions A Linear-Time Heuristic for Improving Network Partitions ECE 556 Project Report Josh Brauer Introduction The Fiduccia-Matteyses min-cut heuristic provides an efficient solution to the problem of separating

More information

TREES Lecture 12 CS2110 Spring 2019

TREES Lecture 12 CS2110 Spring 2019 TREES Lecture 12 CS2110 Spring 2019 Announcements 2 Submit P1 Conflict quiz on CMS by end of day Wednesday. We won t be sending confirmations; no news is good news. Extra time people will eventually get

More information

A Beginner s Guide to Programming Logic, Introductory. Chapter 6 Arrays

A Beginner s Guide to Programming Logic, Introductory. Chapter 6 Arrays A Beginner s Guide to Programming Logic, Introductory Chapter 6 Arrays Objectives In this chapter, you will learn about: Arrays and how they occupy computer memory Manipulating an array to replace nested

More information

Black-box Testing Techniques

Black-box Testing Techniques T-76.5613 Software Testing and Quality Assurance Lecture 4, 20.9.2006 Black-box Testing Techniques SoberIT Black-box test case design techniques Basic techniques Equivalence partitioning Boundary value

More information

Specification-based test design

Specification-based test design Software and Systems Verification (VIMIMA01) Specification-based test design Zoltan Micskei, Istvan Majzik Budapest University of Technology and Economics Fault Tolerant Systems Research Group Budapest

More information

Testing: Test design and testing process

Testing: Test design and testing process Testing: Test design and testing process Zoltán Micskei Based on István Majzik s slides Dept. of Measurement and Information Systems Budapest University of Technology and Economics Department of Measurement

More information

EECS 4313 Software Engineering Testing. Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang

EECS 4313 Software Engineering Testing. Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang EECS 4313 Software Engineering Testing Topic 05: Equivalence Class Testing Zhen Ming (Jack) Jiang Relevant Readings [Jorgensen] chapter 6 Introduction Boundary Value Testing derives test cases with Massive

More information

Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 11, Testing, Part 2: Integration and System Testing Overview Integration testing Big bang Bottom up Top down Sandwich System testing

More information

PATH FINDING AND GRAPH TRAVERSAL

PATH FINDING AND GRAPH TRAVERSAL PATH FINDING AND GRAPH TRAVERSAL PATH FINDING AND GRAPH TRAVERSAL Path finding refers to determining the shortest path between two vertices in a graph. We discussed the Floyd Warshall algorithm previously,

More information

Read and fill in this page now. Your lab section day and time: Name of the person sitting to your left: Name of the person sitting to your right:

Read and fill in this page now. Your lab section day and time: Name of the person sitting to your left: Name of the person sitting to your right: CS3 Fall 04 Midterm 1 Read and fill in this page now Your name: Your login name: Your lab section day and time: Your lab T.A.: Name of the person sitting to your left: Name of the person sitting to your

More information

Software Testing. 1. Testing is the process of demonstrating that errors are not present.

Software Testing. 1. Testing is the process of demonstrating that errors are not present. What is Testing? Software Testing Many people understand many definitions of testing :. Testing is the process of demonstrating that errors are not present.. The purpose of testing is to show that a program

More information

Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 11, Testing, Part 2: Integration and System Testing Overview Integration testing Big bang Bottom up Top down Sandwich System testing

More information

Software Testing. Minsoo Ryu. Hanyang University. Real-Time Computing and Communications Lab., Hanyang University

Software Testing. Minsoo Ryu. Hanyang University. Real-Time Computing and Communications Lab., Hanyang University Software Testing Minsoo Ryu Hanyang University Topics covered 1. Testing Goals and Principles 2. Testing Process 3. Testing Strategies Component testing Integration testing Validation/system testing 4.

More information

CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL

CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL CHAPTER 5 GENERATING TEST SCENARIOS AND TEST CASES FROM AN EVENT-FLOW MODEL 5.1 INTRODUCTION The survey presented in Chapter 1 has shown that Model based testing approach for automatic generation of test

More information

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5

Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 Formal Methods of Software Design, Eric Hehner, segment 24 page 1 out of 5 [talking head] This lecture we study theory design and implementation. Programmers have two roles to play here. In one role, they

More information

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras

Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Advanced Operations Research Prof. G. Srinivasan Department of Management Studies Indian Institute of Technology, Madras Lecture 18 All-Integer Dual Algorithm We continue the discussion on the all integer

More information

Modern Methods in Software Engineering. Testing.

Modern Methods in Software Engineering. Testing. Modern Methods in Software Engineering Testing www.imit.kth.se/courses/2g1522 Literature used Text book Chapter 11 Introduction Content Terminology Types of errors Dealing with errors Component Testing

More information

TREES Lecture 12 CS2110 Spring 2018

TREES Lecture 12 CS2110 Spring 2018 TREES Lecture 12 CS2110 Spring 2018 Important Announcements 2 A4 is out now and due two weeks from today. Have fun, and start early! Data Structures 3 There are different ways of storing data, called data

More information

Verification Overview Testing Theory and Principles Testing in Practice. Verification. Miaoqing Huang University of Arkansas 1 / 80

Verification Overview Testing Theory and Principles Testing in Practice. Verification. Miaoqing Huang University of Arkansas 1 / 80 1 / 80 Verification Miaoqing Huang University of Arkansas Outline 1 Verification Overview 2 Testing Theory and Principles Theoretical Foundations of Testing Empirical Testing Principles 3 Testing in Practice

More information

Sequential Search (Searching Supplement: 1-2)

Sequential Search (Searching Supplement: 1-2) (Searching Supplement: 1-2) A sequential search simply involves looking at each item in an array in turn until either the value being searched for is found or it can be determined that the value is not

More information

Terminology. There are many different types of errors and different ways how we can deal with them.

Terminology. There are many different types of errors and different ways how we can deal with them. Testing Terminology Reliability: The measure of success with which the observed behavior of a system confirms to some specification of its behavior. Failure: Any deviation of the observed behavior from

More information

Red-Black trees are usually described as obeying the following rules :

Red-Black trees are usually described as obeying the following rules : Red-Black Trees As we have seen, the ideal Binary Search Tree has height approximately equal to log n, where n is the number of values stored in the tree. Such a BST guarantees that the maximum time for

More information

Example of a Process in Use in an Organization

Example of a Process in Use in an Organization Example of a Process in Use in an Organization In this note, the use of a process in an organization is defined. Many software organizations have organization wide process standards. These standards are

More information

Selection of UML Models for Test Case Generation: A Discussion on Techniques to Generate Test Cases

Selection of UML Models for Test Case Generation: A Discussion on Techniques to Generate Test Cases St. Cloud State University therepository at St. Cloud State Culminating Projects in Computer Science and Information Technology Department of Computer Science and Information Technology 6-2018 Selection

More information

TABLES AND HASHING. Chapter 13

TABLES AND HASHING. Chapter 13 Data Structures Dr Ahmed Rafat Abas Computer Science Dept, Faculty of Computer and Information, Zagazig University arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ TABLES AND HASHING Chapter 13

More information

Advanced Syllabus 2007 Release Plan

Advanced Syllabus 2007 Release Plan Advanced Syllabus Release Plan Milestone English Non-English The Advanced Syllabus distributed to National Boards for general release. Change tracked and Word versions released to National Boards for limited

More information

Motivation for B-Trees

Motivation for B-Trees 1 Motivation for Assume that we use an AVL tree to store about 20 million records We end up with a very deep binary tree with lots of different disk accesses; log2 20,000,000 is about 24, so this takes

More information

ADVANCED ALGORITHMS TABLE OF CONTENTS

ADVANCED ALGORITHMS TABLE OF CONTENTS ADVANCED ALGORITHMS TABLE OF CONTENTS ADVANCED ALGORITHMS TABLE OF CONTENTS...1 SOLVING A LARGE PROBLEM BY SPLITTING IT INTO SEVERAL SMALLER SUB-PROBLEMS CASE STUDY: THE DOOMSDAY ALGORITHM... INTRODUCTION

More information

UNIT-4 Black Box & White Box Testing

UNIT-4 Black Box & White Box Testing Black Box & White Box Testing Black Box Testing (Functional testing) o Equivalence Partitioning o Boundary Value Analysis o Cause Effect Graphing White Box Testing (Structural testing) o Coverage Testing

More information

Chapter 6. More Complex Conditionals. 6.1 Nested Conditionals

Chapter 6. More Complex Conditionals. 6.1 Nested Conditionals 56 Chapter 6 More Complex Conditionals Despite the initial simplicity of if/else statements as introduced in Chapter 5, things can get interesting when if/else statements are composed of other if/else

More information

FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard

FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 ( Marks: 1 ) - Please choose one The data of the problem is of 2GB and the hard FINALTERM EXAMINATION Fall 2009 CS301- Data Structures Question No: 1 The data of the problem is of 2GB and the hard disk is of 1GB capacity, to solve this problem we should Use better data structures

More information

Standards for Test Automation

Standards for Test Automation Standards for Test Automation Brian Tervo Windows XP Automation Applications Compatibility Test Lead Microsoft Corporation Overview Over the last five years, I ve had the opportunity to work in a group

More information

TITAN 5300 Software. Unit Test Guidelines. S. Darling, S. Harpster, R. Hite, K. Konecki, W. Martersteck, R. Stewart. Revision 2.0

TITAN 5300 Software. Unit Test Guidelines. S. Darling, S. Harpster, R. Hite, K. Konecki, W. Martersteck, R. Stewart. Revision 2.0 TITAN 5300 Software Unit Test Guidelines S. Darling, S. Harpster, R. Hite, K. Konecki, W. Martersteck, R. Stewart Revision 2.0 1994, Tellabs Operations, Inc., 4951 Indiana Ave., Lisle, IL 60532 (312) 969-8800

More information

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207.

MAT 7003 : Mathematical Foundations. (for Software Engineering) J Paul Gibson, A207. MAT 7003 : Mathematical Foundations (for Software Engineering) J Paul Gibson, A207 paul.gibson@it-sudparis.eu http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/ Graphs and Trees http://www-public.it-sudparis.eu/~gibson/teaching/mat7003/l2-graphsandtrees.pdf

More information

Darshan Institute of Engineering & Technology for Diploma Studies

Darshan Institute of Engineering & Technology for Diploma Studies CODING Good software development organizations normally require their programmers to follow some welldefined and standard style of coding called coding standards. Most software development organizations

More information

Part 5. Verification and Validation

Part 5. Verification and Validation Software Engineering Part 5. Verification and Validation - Verification and Validation - Software Testing Ver. 1.7 This lecture note is based on materials from Ian Sommerville 2006. Anyone can use this

More information

UNIT-4 Black Box & White Box Testing

UNIT-4 Black Box & White Box Testing Black Box & White Box Testing Black Box Testing (Functional testing) o Equivalence Partitioning o Boundary Value Analysis o Cause Effect Graphing White Box Testing (Structural testing) o Coverage Testing

More information

18-642: Testing Overview

18-642: Testing Overview 18-642: Testing Overview 9/25/2017 "In September of 1962, a news item was released stating that an $18 million rocket had been destroyed in early flight because "a single hyphen was left out of an instruction

More information

Introduction. Easy to get started, based on description of the inputs

Introduction. Easy to get started, based on description of the inputs Introduction Testing is about choosing elements from input domain. The input domain of a program consists of all possible inputs that could be taken by the program. Easy to get started, based on description

More information

Summer Final Exam Review Session August 5, 2009

Summer Final Exam Review Session August 5, 2009 15-111 Summer 2 2009 Final Exam Review Session August 5, 2009 Exam Notes The exam is from 10:30 to 1:30 PM in Wean Hall 5419A. The exam will be primarily conceptual. The major emphasis is on understanding

More information

Software Testing: A Craftsman s Approach, 4 th Edition. Chapter 5 Boundary Value Testing

Software Testing: A Craftsman s Approach, 4 th Edition. Chapter 5 Boundary Value Testing Chapter 5 Boundary Value Testing Functional Testing The rationale for referring to specification-based testing as functional testing is likely due to the abstraction that any program can be viewed as a

More information

Chapter 8 Software Testing. Chapter 8 Software testing

Chapter 8 Software Testing. Chapter 8 Software testing Chapter 8 Software Testing 1 Topics covered Introduction to testing Stages for testing software system are: Development testing Release testing User testing Test-driven development as interleave approach.

More information

SOFTWARE QUALITY ASSURANCE TOOLS & TECHNOLOGY PROFESSIONAL SERVICES ACADEMY. Feature Brief. Wrapping

SOFTWARE QUALITY ASSURANCE TOOLS & TECHNOLOGY PROFESSIONAL SERVICES ACADEMY. Feature Brief. Wrapping SOFTWARE QUALITY ASSURANCE TOOLS & TECHNOLOGY PROFESSIONAL SERVICES ACADEMY P a g e 1 Feature Brief Wrapping Cantata provides a full and unique suite of intelligent testing capabilities accelerating unit

More information

Dynamic Wavelength Assignment for WDM All-Optical Tree Networks

Dynamic Wavelength Assignment for WDM All-Optical Tree Networks Dynamic Wavelength Assignment for WDM All-Optical Tree Networks Poompat Saengudomlert, Eytan H. Modiano, and Robert G. Gallager Laboratory for Information and Decision Systems Massachusetts Institute of

More information

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification Techniques

Software Testing. Software Testing. in the textbook. Chapter 8. Verification and Validation. Verification Techniques Software Testing in the textbook Software Testing Chapter 8 Introduction (Verification and Validation) 8.1 Development testing 8.2 Test-driven development 8.3 Release testing 8.4 User testing 1 2 Verification

More information

Operating System Concepts

Operating System Concepts Chapter 9: Virtual-Memory Management 9.1 Silberschatz, Galvin and Gagne 2005 Chapter 9: Virtual Memory Background Demand Paging Copy-on-Write Page Replacement Allocation of Frames Thrashing Memory-Mapped

More information

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends!

Coding and Unit Testing! The Coding Phase! Coding vs. Code! Coding! Overall Coding Language Trends! Requirements Spec. Design Coding and Unit Testing Characteristics of System to be built must match required characteristics (high level) Architecture consistent views Software Engineering Computer Science

More information

Computer Science 217

Computer Science 217 Computer Science 217 Midterm Exam October 29, 2014 First Name: Last Name: ID: Class Time (Circle One): 1:00pm 3:00pm Instructions: Neatly print your names and ID number in the spaces provided above. Pick

More information

CSC 258 lab notes, Fall 2003

CSC 258 lab notes, Fall 2003 CSC 258 lab notes, Fall 2003 Instructor: E. R. C. Hehner Lab demonstrators: Nicolas Kokkalis, Andrés Lagar Cavilla Successful completion of the three graded labs in this course involves a significant amount

More information

Integration Testing. Conrad Hughes School of Informatics. Slides thanks to Stuart Anderson

Integration Testing. Conrad Hughes School of Informatics. Slides thanks to Stuart Anderson Integration Testing Conrad Hughes School of Informatics Slides thanks to Stuart Anderson 19 February 2010 Software Testing: Lecture 10 1 Unit Test vs Integration Testing 1 The ideal in unit testing is

More information

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing.

Overview. State-of-the-Art. Relative cost of error correction. CS 619 Introduction to OO Design and Development. Testing. Overview CS 619 Introduction to OO Design and Development ing! Preliminaries! All sorts of test techniques! Comparison of test techniques! Software reliability Fall 2012! Main issues: There are a great

More information

Abstract Data Types. Different Views of Data:

Abstract Data Types. Different Views of Data: Abstract Data Types Representing information is fundamental to computer science. The primary purpose of most computer programs is not to perform calculations, but to store and efficiently retrieve information.

More information

Graph Theory for Modelling a Survey Questionnaire Pierpaolo Massoli, ISTAT via Adolfo Ravà 150, Roma, Italy

Graph Theory for Modelling a Survey Questionnaire Pierpaolo Massoli, ISTAT via Adolfo Ravà 150, Roma, Italy Graph Theory for Modelling a Survey Questionnaire Pierpaolo Massoli, ISTAT via Adolfo Ravà 150, 00142 Roma, Italy e-mail: pimassol@istat.it 1. Introduction Questions can be usually asked following specific

More information

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013!

Testing! Prof. Leon Osterweil! CS 520/620! Spring 2013! Testing Prof. Leon Osterweil CS 520/620 Spring 2013 Relations and Analysis A software product consists of A collection of (types of) artifacts Related to each other by myriad Relations The relations are

More information

Online Advanced Exams

Online Advanced Exams Online Advanced Exams Further to the announcement just before Christmas regarding the availability of online Advanced examinations, here are a few more details which, while giving a little more insight

More information

Aerospace Software Engineering

Aerospace Software Engineering 16.35 Aerospace Software Engineering Verification & Validation Prof. Kristina Lundqvist Dept. of Aero/Astro, MIT Would You...... trust a completely-automated nuclear power plant?... trust a completely-automated

More information

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process

Verification and Validation. Assuring that a software system meets a user s needs. Verification vs Validation. The V & V Process Verification and Validation Assuring that a software system meets a user s needs Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapters 19,20 Slide 1

More information

Verification and Validation. Verification and validation

Verification and Validation. Verification and validation Verification and Validation Verification and validation Verification and Validation (V&V) is a whole life-cycle process. V&V has two objectives: Discovery of defects, Assessment of whether or not the system

More information

Software Testing Fundamentals. Software Testing Techniques. Information Flow in Testing. Testing Objectives

Software Testing Fundamentals. Software Testing Techniques. Information Flow in Testing. Testing Objectives Software Testing Fundamentals Software Testing Techniques Peter Lo Software Testing is a critical element of software quality assurance and represents the ultimate review of specification, design and coding.

More information

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting

CS2 Algorithms and Data Structures Note 10. Depth-First Search and Topological Sorting CS2 Algorithms and Data Structures Note 10 Depth-First Search and Topological Sorting In this lecture, we will analyse the running time of DFS and discuss a few applications. 10.1 A recursive implementation

More information

TREES 11/1/18. Prelim Updates. Data Structures. Example Data Structures. Tree Overview. Tree. Singly linked list: Today: trees!

TREES 11/1/18. Prelim Updates. Data Structures. Example Data Structures. Tree Overview. Tree. Singly linked list: Today: trees! relim Updates Regrades are live until next Thursday @ :9M A few rubric changes are happening Recursion question: -0pts if you continued to print Exception handling write the output of execution of that

More information

Introduction to programming using Python

Introduction to programming using Python Introduction to programming using Python Matthieu Choplin matthieu.choplin@city.ac.uk http://moodle.city.ac.uk/ Session 5 1 Objectives To come back on the definition of functions To invoke value-returning

More information

Faculty of Engineering Kasetsart University

Faculty of Engineering Kasetsart University Faculty of Engineering Kasetsart University Final eamination, 2013-2014, 2 nd Semester Section 450 219343: Software Testing Lecturer: Uwe Gühl Tuesday, 18 th of March, 2014 1.00 pm until 3.00 pm Name:

More information

Tutorial 1 Answers. Question 1

Tutorial 1 Answers. Question 1 Tutorial 1 Answers Question 1 Complexity Software in it what is has to do, is often essentially complex. We can think of software which is accidentally complex such as a large scale e-commerce system (simple

More information

Introduction to Software Testing Chapter 5.1 Syntax-based Testing

Introduction to Software Testing Chapter 5.1 Syntax-based Testing Introduction to Software Testing Chapter 5.1 Syntax-based Testing Paul Ammann & Jeff Offutt http://www.cs.gmu.edu/~offutt/ softwaretest/ Ch. 5 : Syntax Coverage Four Structures for Modeling Software Graphs

More information

Chapter 11, Testing, Part 2: Integration and System Testing

Chapter 11, Testing, Part 2: Integration and System Testing Object-Oriented Software Engineering Using UML, Patterns, and Java Chapter 11, Testing, Part 2: Integration and System Testing Overview Integration testing Big bang Bottom up Top down Sandwich System testing

More information

Midterm Exam Solutions Amy Murphy 28 February 2001

Midterm Exam Solutions Amy Murphy 28 February 2001 University of Rochester Midterm Exam Solutions Amy Murphy 8 February 00 Computer Systems (CSC/56) Read before beginning: Please write clearly. Illegible answers cannot be graded. Be sure to identify all

More information

Unit Testing as Hypothesis Testing

Unit Testing as Hypothesis Testing Unit Testing as Hypothesis Testing Jonathan Clark September 19, 2012 You should test your code. Why? To find bugs. Even for seasoned programmers, bugs are an inevitable reality. Today, we ll take an unconventional

More information

Lethbridge/Laganière 2005 Chapter 9: Architecting and designing software 6

Lethbridge/Laganière 2005 Chapter 9: Architecting and designing software 6 Trying to deal with something big all at once is normally much harder than dealing with a series of smaller things Separate people can work on each part. An individual software engineer can specialize.

More information

TOP-DOWN PROCEDURAL PROGRAMMING

TOP-DOWN PROCEDURAL PROGRAMMING TOP-DOWN PROCEDURAL PROGRAMMING Top-down programming is an incremental strategy where you implement the most general modules first and work towards implementing those that provide specific functionality.

More information

Integration and Testing. Uses slides from Lethbridge & Laganiere, 2001

Integration and Testing. Uses slides from Lethbridge & Laganiere, 2001 Integration and Testing Uses slides from Lethbridge & Laganiere, 2001 Testing phases: V model Requirements Acceptance Testing Specifications System Testing Design Integration Testing Detailed Design Unit

More information

Testing is executing a system in order to identify any gaps, errors, or missing requirements in contrary to the actual requirements.

Testing is executing a system in order to identify any gaps, errors, or missing requirements in contrary to the actual requirements. TESTING Testing is the process of evaluating a system or its component(s) with the concentrating to find whether it satisfies the specified requirements or not. Testing is executing a system in order to

More information

CS164: Programming Assignment 5 Decaf Semantic Analysis and Code Generation

CS164: Programming Assignment 5 Decaf Semantic Analysis and Code Generation CS164: Programming Assignment 5 Decaf Semantic Analysis and Code Generation Assigned: Sunday, November 14, 2004 Due: Thursday, Dec 9, 2004, at 11:59pm No solution will be accepted after Sunday, Dec 12,

More information

Note: The enumerations range from 0 to (number_of_elements_in_enumeration 1).

Note: The enumerations range from 0 to (number_of_elements_in_enumeration 1). C8-1 Algorithm 1. Use a subtype to represent the numbers for months 2. Use an enumeration to represent the named months 3. Use an enumeration to represent the roman months 4. Get the inputs from the user

More information

Macros in sbt: Problem solved!

Macros in sbt: Problem solved! Macros in sbt: Problem solved! Martin Duhem, Eugene Burmako Technical Report January 2015 Contents 1 Introduction 2 1.1 What problems do macros bring?................ 2 1.1.1 The problems we addressed

More information

CS 520 Theory and Practice of Software Engineering Fall 2018

CS 520 Theory and Practice of Software Engineering Fall 2018 CS 520 Theory and Practice of Software Engineering Fall 2018 Nediyana Daskalova Monday, 4PM CS 151 Debugging October 30, 2018 Personalized Behavior-Powered Systems for Guiding Self-Experiments Help me

More information

Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur

Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Database Management System Prof. Partha Pratim Das Department of Computer Science & Engineering Indian Institute of Technology, Kharagpur Lecture - 19 Relational Database Design (Contd.) Welcome to module

More information

Note : Your program must contain the following 6 functions :

Note : Your program must contain the following 6 functions : Fall 2018 - CS1428 Programming Assignment 6 Due Date : Wednesday November 7 th - 2018 Sections 3 and 4 Write a menu driven C++ program that prints the day number of the year, given the date in the form

More information

Message-Passing and MPI Programming

Message-Passing and MPI Programming Message-Passing and MPI Programming 5.1 Introduction More on Datatypes and Collectives N.M. Maclaren nmm1@cam.ac.uk July 2010 There are a few important facilities we have not covered yet; they are less

More information

Programming Assignment #2

Programming Assignment #2 Programming Assignment #2 Due: 11:59pm, Wednesday, Feb. 13th Objective: This assignment will provide further practice with classes and objects, and deepen the understanding of basic OO programming. Task:

More information

A number of optimizations are already in use by the majority of companies in industry, notably:

A number of optimizations are already in use by the majority of companies in industry, notably: 1 Abstract Mechatronics products contain significant amounts of software. Most advances in embedded software development focus on specific phases of the development process. However, very little emphasis

More information

The testing process. Component testing. System testing

The testing process. Component testing. System testing Software testing Objectives To discuss the distinctions between validation testing and defect testing To describe the principles of system and component testing To describe strategies for generating system

More information

CS106X Handout 03 Autumn 2012 September 24 th, 2012 Getting Started

CS106X Handout 03 Autumn 2012 September 24 th, 2012 Getting Started CS106X Handout 03 Autumn 2012 September 24 th, 2012 Getting Started Handout written by Julie Zelenski, Mehran Sahami, Robert Plummer, and Jerry Cain. After today s lecture, you should run home and read

More information

Software Testing part II (white box) Lecturer: Giuseppe Santucci

Software Testing part II (white box) Lecturer: Giuseppe Santucci Software Testing part II (white box) Lecturer: Giuseppe Santucci 4. White box testing White-box (or Glass-box) testing: general characteristics Statement coverage Decision coverage Condition coverage Decision

More information

Question Bank Subject: Advanced Data Structures Class: SE Computer

Question Bank Subject: Advanced Data Structures Class: SE Computer Question Bank Subject: Advanced Data Structures Class: SE Computer Question1: Write a non recursive pseudo code for post order traversal of binary tree Answer: Pseudo Code: 1. Push root into Stack_One.

More information

SURIEM 2016 Final Report: Games on Graphs

SURIEM 2016 Final Report: Games on Graphs SURIEM 2016 Final Report: Games on Graphs Julie Anne Bowman, Arthur Diep-Nguyen, Rashmika Goswami, Dylan King, Nicholas Lindell, Emily Olson, Robert W. Bell July 14, 2016 1 Introduction The game of Cops

More information

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing

Black Box Testing. EEC 521: Software Engineering. Specification-Based Testing. No Source Code. Software Testing Black Box Testing EEC 521: Software Engineering Software Testing Black-Box Testing Test-Driven Development Also known as specification-based testing Tester has access only to running code and the specification

More information

CMSC th Lecture: Graph Theory: Trees.

CMSC th Lecture: Graph Theory: Trees. CMSC 27100 26th Lecture: Graph Theory: Trees. Lecturer: Janos Simon December 2, 2018 1 Trees Definition 1. A tree is an acyclic connected graph. Trees have many nice properties. Theorem 2. The following

More information