header
Component-based Software---A bank software application 

Tag:
Edit edit   Starstar

Program Information

Name: Component-based Software---A bank software application 
Domain: Numerical program
Functionality: Four  components: (1)Foreign exchange component (FEC) is used for foreign exchange dealing (2)Search rate component (SRC) is used for searching the exchange rates from some rivals  (3) Compute-interest component (CRC) is used for computing interest  (4) Save-withdraw component (SWC) has two interfaces: one interface save () is used for saving money, and the other interface withdraw () is used for withdrawing money
Input: Amount of money 
Output: Generate the corresponding amount according to different component 

Reference

 Testing of Component-based Software: a Metamorphic Testing Methodology 10.1109/UIC-ATC.2010.75 

MR Information

MR1------

Description: A bank normally offers cross-currency rates. A sample USD/RMB exchange rate is a pair  of values 8.2796/8.2797. The first and the second values in the pair refer to the bid and the ask rates, respectively.Foreign exchange component (FEC) provides a interface: USD_RMB () 
Property: n FEC: USD_RMB(x)= FEC: USD_RMB(nx) 
Source input: Amount of money x 
Source output: FEC: USD_RMB(x) 
Follow-up input: Amount of money y=n*x 
Follow-up output: FEC: USD_RMB(y) 
Input relation: y=n*x 
Output relation: n FEC: USD_RMB(x)= FEC: USD_RMB(nx) 
Pattern:

MR2------

Description: Foreign exchange component (FEC) can interact with search rate component (SRC) to get exchange rates from rivals. There has a interface serachRival() in search rate component(SRC) 
Property:  n FEC: USD_RMB(x) >= SRC:serachRival()*n*x 
Source input: Amount of money x
Source output: n*FEC: USD_RMB(x) 
Follow-up input: Amount of money x 
Follow-up output: SRC:serachRival()*n*x 
Input relation:
Output relation: n FEC: USD_RMB(x) >= SRC:serachRival()*n*x 
Pattern:

MR3------

Description: Testing the interaction between save-withdraw component (SWC) and compute-interest component (CRC) , In some situation, the save-withdraw component (SWC) need to invoke the compute-interest component (CRC) to compute interest before withdrawing money, so the two components have interaction 
Property:  additional invoking the operations save () and withdraw () in pair, the result should be same 
Source input: Amount of money x 
Source output: CRC:compute(x)--- SWC:withdraw(x) 
Follow-up input: Amount of money x,y=x/2 
Follow-up output: CRC:compute(x)---(SWC:save(y)-SWC:withdraw(y) ) ----SWC:withdraw(x) 
Input relation: (SWC:save(y)-SWC:withdraw(y) ) ----SWC:withdraw(x) 
Output relation: the results should be the same 
Pattern:
Insert title here