1 / 21

Software Integration

Software Integration. IT323 - Software Engineering 2 Tutorial. Main. S. S. S.inv. S.inv. Read. Invert. Write. Example-1. Given a simple program that reads a string inverts it then writes it the structure of this program is

cleary
Download Presentation

Software Integration

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Software Integration IT323 - Software Engineering 2 Tutorial

  2. Main S S S.inv S.inv Read Invert Write Example-1 Given a simple program that reads a string inverts it then writes it • the structure of this program is • Where boxes indicate modules and links indicate module calling

  3. 1. Bottom-up Integration • Bottom-up Integration Algorithm • Integrates components at the lowest levels then adds functional components when going to the upper levels.

  4. 1. Bottom-up Integration • Bottom-up Integration Algorithm • Construct drivers for low level modules. • Execute and test each driver separately. • Remove drivers and combine modules moving upward into clusters that perform a specific software subfunction. When the main module is reached go to 5) • Construct a driver per cluster. Go to 2) • Stop when the whole system structure is built and no drivers remain

  5. Read Invert Write Step 3 Step 2 Step 1 1. Bottom-up Integration drivers

  6. 1. Bottom-up Integration • Step1 • Test the “Read” module through its driver • void Read(String s) • { • Output(“enter string”); • Input(S); • } • void main(){ • String s; • Read (s); • Output(“the string read is”, s) • }

  7. 1. Bottom-up Integration • Step2 • Test the “Invert” module through its driver • void invert(string r, string s)) • { • For (i=0; i<s.length ; i++) • r[i]=s[s.length-1-i]; • } • void main(){ • String r,s; • s=”Example text”; • Invert(r,s); • Output(“text to be inverted” ,s, ”its inverse”, r); • }

  8. 1. Bottom-up Integration • Step3 • Test the “Write” module through its driver • void write(string r) • { • Output(“inverted string is”, r); • } • void main(){ • String r; • r=”Example text”; • Write(r); • }

  9. 1. Bottom-up Integration • void Read(String S){ • Output(“enter string”); • Input(S); • } • void invert(invert(string r, string s)){ • For (i=0;i<s.length;i++) • R[i]=S[s.length-i-1] • } • void write(string r){ • Output(“inverted string is”,r); • } • void main() { • String s,r; • Read(s); • Invert(s,r); • Write(s); • } • Step4 :

  10. 2. Top-down integration • Top-down Integration Algorithm • Develops the skeleton of the system and populate it with components.

  11. 2. Top-down integration

  12. Read 2. Top-down integration

  13. Read Invert 2. Top-down integration

  14. Read Invert Write 2. Top-down integration

  15. 2. Top-down integration • Top-down Integration Algorithm • Use Main control module as a test driver and substitute all modules that are directly subordinate to it by stubs. • Depending on the integration approach selected (depth first or breadth first), choose a stub and replace it by a real module. • Tests are conducted after replacement of a stub by a real module. • While there exist stubs in the system, go to step 2(loop) • Stop when the whole system structure is built and no stubs remain.

  16. 2. Top-down integration void SRead(string s) % read stub %{ Output(“I am in READ module”); S=”Example string”; } void SInvert(string s, string r) % invert stub %{ Output(“I am in Invert module”); Output(S); r=”Example output string”; } void Swrite(string r) % write stub %{ Output(“I am in write module”); Output(r); } void main(){ String r,s; Sread(s); Sinvert(s,r); Swrite(r); } • Step1

  17. 2. Top-down integration • void Read(string s){ • Output(“enter string”); • Input(S); • } • void SInvert(string s, string r) % invert stub %{ • Output(“I am in Invert module”); • Output(S); • r=”Example output string”; • } • void Swrite(string r) % write stub %{ • Output(“I am in write module”); • Output(r); • } • void main(){ • String r,s; • Read(s); • Sinvert(s,r); • Swrite(r); • } • Step2 • Replacing Sread(stub of read procedure) by its real Read and keep the rest unchanged

  18. 2. Top-down integration • void Read(string s){ • Output(“enter string”); • Input(S); • } • void Invert(string s, string r) { • For (i=0;i<s.length;i++) • R[i]=S[s.length-i-1] • } • void Swrite(string r) % write stub %{ • Output(“I am in write module”); • Output(r); • } • void main(){ • String r,s; • Read(s); • Invert(s,r); • Swrite(r); • } • Step3 • Replacing Sinvert and keep the rest unchanged

  19. 2. Top-down integration • void Read(string s){ • Output(“enter string”); • Input(S); • } • void Invert(string s, string r) { • For (i=0;i<s.length;i++) • R[i]=S[s.length-i-1] • } • void Write(string r){ • Output(“inverted string is”,r); • } • void main(){ • String r,s; • Read(s); • Invert(s,r); • Write(r); • } • Step4 • Replace all stubs by their real & integrate the system

  20. Example -2 • Given the software system skeleton (Structured Chart)

  21. Example -2 Use the above skeleton to identify the testing strategy indicated by the sequences given. • {F};{G};{H};{I};{J};{K};{B,F,G,H};{E,I,J,K};{A,B,C,D,E,F,G,H,I,J,K} • Top-down testing • Bottom-up testing • Big-bang testing • {A};{A,B};{A,B,C}; {A,B,C,D};{A,B,C,D,E};{A,B,C,D,E,F};{A,B,C,D,E,F,G};{A,B,C,D,E,F,G,H}; {A,B,C,D,E,F,G,H,I}; {A,B,C,D,E,F,G,H,I,J}; {A,B,C,D,E,F,G,H,I,J,K} • Top-down testing • Bottom-up testing • Big-bang testing

More Related