november 2011csc7302: testing & metricsl4-integrationtesting:1 integration testing the software...

7
November 2011 CSC7302: Testing & Metrics L4- IntegrationTesting:1 ntegration Testing The software testing process where individual units are combined and tested as a group The purpose of this level of testing is to expose faults in the interaction between integrated units. Test drivers and test stubs are used to assist in Integration Testing.

Upload: jasmin-clarke

Post on 27-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:1

Integration Testing

The software testing process where individual units are combined and tested as a group

The purpose of this level of testing is to expose faults in the interaction between integrated units.

Test drivers and test stubs are used to assist in Integration Testing.

Page 2: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:2

Integration Testing: Approaches

• Big Bang is an approach to Integration Testing where all or most of the units are combined together and tested at one go. This approach can be taken when the testing team receives the entire software in a bundle.

• Top Down is an approach to Integration Testing where top level units are tested first and lower level units are tested step by step after that. This approach is taken when top down development approach is followed. Test Stubs are needed to simulate lower level units which may not be available during the initial phases.

• Bottom Up is an approach to Integration Testing where bottom level units are tested first and upper level units step by step after that. This approach is taken when bottom up development approach is followed. Test Drivers are needed to simulate higher level units which may not be available during the initial phases.

• Sandwich/Hybrid is an approach to Integration Testing which is a combination of Top Down and Bottom Up approaches.

Page 3: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:3

Integration Testing: Advice

•Ensure that you have a proper detail design document where interactions between each unit are clearly defined. In fact, you will not be able to perform Integration Testing without this information.

•Ensure that you have a robust Software Configuration Management system in place. Or else, you will have a tough time tracking the right version of each unit, especially if the number of units to be integrated is huge.

•Make sure that each unit is first unit tested before you start Integration Testing.

•As far as possible, automate your tests, especially when you use the Top Down or Bottom Up approach, since regression testing is important each time you integrate a unit, and manual regression testing can be inefficient.

Page 4: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:4

Recommended Reading

Paul C. Jorgensen and Carl Erickson. 1994. Object-oriented integration testing. Commun. ACM 37, 9 (September 1994), 30-38. DOI=10.1145/182987.182989

Jean Hartmann, Claudio Imoberdorf, and Michael Meisinger. 2000. UML-Based integration testing. In Proceedings of the 2000 ACM SIGSOFT international symposium on Software testing and analysis (ISSTA '00), Mary Jean Harold (Ed.). ACM, New York, NY, USA, 60-70.

Le Traon, Y.; Jeron, T.; Jezequel, J.-M.; Morel, P.; , Efficient object-oriented integration and regression testing, Reliability, IEEE Transactions on , vol.49, no.1, pp.12-25, Mar 2000, doi: 10.1109/24.855533

Briand, L.C.; Labiche, Y.; Yihong Wang; , "An investigation of graph-based class integration test order strategies," Software Engineering, IEEE Transactions on , vol.29, no.7, pp. 594- 607, July 2003, doi: 10.1109/TSE.2003.1214324

Page 5: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:5

Problem: Bilingual Hangman Game

You are to code (the tests for) an educational game for playing a bilingual version of hangman, whose aim is to help players to increase their vocabulary in a foreign language.

The game will make 2 different hangmen: 1 for each word in each of the languages.

Game rules:

• WIN – if both words found• LOSS – if one of the 2 hangmen hang• When player selects a letter during a round, this letter is played in each of the 2

hangmen games. • During a round, a player may also guess either of the words. A correct guess

completes the word without incurring a penalty, and all shared letters in the other word are added at no cost. For a word guess, there is no penalty for letters in the guessed word that are not present in the other word. An incorrect word guess adds a limb to the hangman for which the guess is made (and not the other).

The hangman game must select a sequence of 5 random word-pairs from a dictionary. The players score will be calculated by:100+ (Number of wins * 20 ) – number of errors made overall.

Page 6: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:6

Problem: Bilingual Hangman Dictionary

The words that are used in the bilingual hangman game must be downloaded from a dictionary ASCII text file.

This dictionary file must follow an XML schema: you can choose whatever type of schema you wish.

The dictionary file must also record the number of times each word has been played (with a breakdown of wins versus losses). This should be updated in batch mode (when the overall game is over).

Page 7: November 2011CSC7302: Testing & MetricsL4-IntegrationTesting:1 Integration Testing The software testing process where individual units are combined and

CSC7302: Testing & MetricsNovember 2011 L4-IntegrationTesting:7

Problem: Bilingual Hangman Test Development

TO DO:

1) Unit tests for each component in your design2) Two Integration tests of your choice, eg:

i. Dictionary – Bilingual Hangmanii. Hangman Language1 – Hangman Language 2

3) Validation tests for the complete system

You may (or may not) choose to write the tests before/after the development.

QUESTION: How useful are the integration tests?