|
This example is based on a system in which transactions are created. Each transaction has the following attributes:
- Transaction Name
- Transaction Sender
- Transaction Receiver
- Starting Time
- Ending Time
This file contains many models, where many of them have been implemented by our users. The models are divided into three categories:
All of these models use the same data. When many models use the same data, we recommend a tool such as Meteor that is based on the domain paradigm.
This example shows the importance of hierarchy and the differences between temporal models and snapshot models. It also demonstrates models for stress testing.
Formats for Collecting Information in Traces
The following formats are commonly used to collect information in traces:
Format #1
Transaction Name, Sender, Receiver, Starting Time, Ending Time.
This format is usually easy to process, but sometimes requires additional calculations from the user.
Format #2
Time, Transaction Name, Transaction ID, End-or-Start, Sender or Receiver.
In this format, each transaction is associated with two lines in the trace. For example, look at the following trace segment:
- 23, Do-good, 1, Start, MyName
- 40, Do-bad, 2, Start, Criminal
- 45, Do-good, 2, End, Police
- .....
This transaction includes the following attributes:
- Transaction Name = Do-good
- Transaction Sender = MyName
- Transaction Receiver = Police
- Starting Time = 23
- Ending Time = 45
Each single transaction model comprises the following four components:
- Story
- Tupple
- Values for each Attribute
- Restrictions
All-Transactions Model
- We would like to know that we have seen all the transactions
- The tupple is <Transaction Name>
- Attribute Values
- Transaction Name has all the possible transactions as values
- Restrictions
- No Restrictions
The All-Transactions model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Measure statistics on how the application is used.
Keywords: Snapshot, Transaction, Simple.
Transactions-Sender Model
- We would like to know that we have seen all the transactions sent by all possible senders
- The tupple is <Transaction Name, Transaction Sender>
- Attribute Values
- Transaction Name has all the possible transactions, as values.
- Sender Name has all the entities that can create transactions, as values.
- Restrictions
- Not every Sender can send every possible transaction. Remove illegal combinations.
The Transactions-Sender model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: Snapshot, Transaction, Simple.
Transactions-Receiver Model
This is similar to the Transactions-Sender model.
Transaction-Time Model
- We would like to know that we have seen all the transactions finished in reasonable time periods.
- The tupple is <Transaction Name, Transaction Time>
- Attribute Values
- Transaction Name has all the possible transactions, as values.
- Transaction Time = End Time - Start Time and can have the following values (e.g., real ranges are application independent)
- 0
- 1
- 2
- 3 ... 10
- > 10
- Restrictions
- Not every Transaction can have every possible duration.
The Transactions-Time model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: Temporal, Transaction, Simple.
Transaction-Sender-Receiver Model
- We would like to know that we have seen all the transactions sent by all senders to all receivers.
- The tupple is <Transaction Name, Transaction Sender, Transaction Receiver>
- Attribute Values
- Transaction Name has all the possible transactions, as values.
- Sender Name has all the entities that can create transactions, as values.
- Receiver Name has all the entities that can receive transaction, as values.
- Restrictions
- All the restrictions from the Transactions-Sender Model
- All the restrictions from the Transactions -Reciever Model
- A matrix on which receiver can get transactions from which sender
The Transactions-Sender-Receiver model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: Temporal, Transaction.
Two transaction models look at the possible interaction between two transactions, and between the transactions and the system in which the transactions operate. For the purpose of the following models, the first transaction T1 has a start time S1 and end time E1; the second transaction T2 has S2 and E2 respectively.
Two-Concurrent-TransactionModel
- We would like to see which transactions can occur at the same time. Two transactions occur at the same time if there exist a time T such that S1 =< T =< E1 and S2 =< T =< E2
- The tupple is <T1 Name, T2 Name>
- Attribute Values
- T1 and T2 have the values of Transaction Name.
- Restrictions
- The restrictions are implementation-specific and depend on which transactions can co-exist.
The Two-Concurrent-Transaction model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: SnapShot, Transaction.
Two-Concurrent-Transaction-Sent Model
- We would like to see which transactions can be sent at the same time. We would like to see two concurrent transactions (as per previous model) that are sent by the same sender.
- The tupple is <Two-Concurrent-Transaction, Transaction Sender>
- Attribute Values
- Two-Concurrent-Transaction as per the Two-Concurrent-Transaction model
- Transaction Sender has the values of Transaction-Sender
- Restrictions
- The restrictions of the Two-Concurrent-Transaction model
- The restrictions of the Transactions-Sender model
- Additional restrictions from the application on what transaction a sender can send, as long as he has a transaction outstanding.
The Two-Concurrent-Transaction-Sent Model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: SnapShot, Transaction.
Two-Concurrent-Transaction-Received Model
Similar to the Two-Concurrent-Transaction-Sent model
Two-Transaction-Interplay Model
- We would like to see how transactions interact with each other in the time domain.
- The tupple is <T1 Name, T2 Name, Interplay>
- Attribute Values
- T1 Name T2 Name have the values of Transaction Name.
- Interplay has the following values (some of them do not make sense in specific implementations).
- Instance => S1=S2=E1=E2
- Equal => S1 = S2 and E1 = E2
- Contained => S1 < S2 and E2 < E1
- Consecutive => S2 = E1
- Consecutive + 1 => S2 = E1=1
- After => S2 > E1+1 and there is no third transaction between them
- Staggered => S1 < S2 < E1 < E2
- Restrictions
- The restrictions are implementation-specific and depend on how transactions interact.
The Two-Transaction-Interplay Model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: temporal, Transaction, Complex.
Two-Transaction-Interplay-Send / Two-Transaction-Interplay-Receive Models
Should be clear from the above descriptions.
Three-Concurrent-Transaction Model
Every model created for two transactions can be generalized to three or more transactions.
Number-of-Concurrent-Transactions Model:
- We would like to see how many transactions can occur concurrently.
- The tupple is <Number-Of-Transactions>
- Attribute Values
- Number-Of-Transactions = 0,1,2,3,4, Many
- Restrictions
- No restrictions are expected
The Two-Transaction-Interplay model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used. This is the key reason for writing this model.
Keywords: Snapshot, Transaction, Complex.
Number-of-Concurrent-Transactions * Transaction Model
- We would like to see how many transactions can occur concurrently with a specific transaction.
- The tupple is <Number-Of-Other-Transactions, Transaction Name>
- Attribute Values
- Number-Of-Transactions = 0,1,2,3,4, Many
- Transaction Name has the possible transaction names as values
- Restrictions
- Some transactions can not have many simultaneous transactions. This should be reflected.
The Number-of-Concurrent-Transactions * Transaction model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords Snapshot, Transaction, Complex.
Number-of-Concurrent-Sender / Number-of-Concurrent-Receiver Models
How many models can be sent by a specific sender or received by a specific receiver, concurrently. Models omitted.
Number-of-Transaction-in-Unit-of-Time Model
- We would like to see how many transactions can occur during a specific time interval. This is usually done to measure stress
- The tupple is <Number-Of-Transactions>
- Attribute Values
- Number-Of-Transactions = 0,1,2,3..5,6..10, more (depends on the application)
- Restrictions
- None expected
The Number-of-Transaction-in-Unit-of-Time model was created to:
- Find areas in which coverage is missing or low and improve testing in these areas.
- Find illegal combinations.
- Measure statistics on how the application is used.
Keywords: Temporal, Transaction, Complex.
Number-of-Transaction-in-Unit-of-Time-by-Sender, Number-of-Transaction-in-Unit-of-Time-by-Reciever Models
etc...
| |
|