This document describes the TL section of the Go4IT Package2 General Design Document, wich is made of the following sections:
- General Design of the Compiler.
- General Design of the SA.
- General Design of the PA.
- General Design of the CH.
- General Design of the TM.
- General Design of the TM-UI.
- General Design of the TL: This document.
- General Design of the CD-Gen
- General Design of the CD
- General Design of the RIPng ATS.
Introduction
This document focuses on the design of the TL. The TL entity performs test event logging and presentation to the test system user. It provides the logging of information generated by test execution such as which test components have been created, started and terminated, which data have been sent to or have been received from the SUT and matched to TTCN-3 templates, which timers have been started, stopped or timed out, etc. There are two categories of TL functionalities:
- The first one is the interface with the TE to collect the logging of the information about the test execution.
- The second one is the interface with the TM-UI to present to the TM-UI the logging information retrieved before.
Use Cases
This section contains a set of use cases that describe the external behavior of this TL module. A use case is a description of a specific interaction that a user (or another module) may have with this module. Use cases are deceptively simple tools for describing the functionality of the software. A use case is a simple, straightforward tool that can be used to completely describe all the behavior of a piece of software. It contains a textual description of all the ways that the intended users could work with the software through its interface. Use cases do not describe any internal workings of the software, nor do they explain how that software will be implemented. They simply show how the steps that the user follows to use the software to do his work. All the ways the users interact with the software can be described in this manner. This section will contain multiple use cases, enough to define all of the interactions the users will have with the module. In the following figure, a general overview of defined use cases and relationships between the different actors (i.e., users) which have been defined in this section is shown.
TL related vocabulary:
- Log: A trace system gives test user the overview of the system execution and the test execution
- Log items: The basic unit of log, an item is corresponding with an event which write in a log record. There are three levels log items, “record”, “warning” and “error”.
- Log records: Entities of the log items, corresponding to the execution of test cases.
- Log request: If some system module wants to log its action, it must send request to log system.
UC-1: Initialization for logging
Summary
- The TL entity has a unidirectional interface where any entity part of the TE may post a logging request to the TL entity
Rationale
- Before writing of log record, TL must do some preparative work including resources allocation and more.
Actors
- TE
Preconditions
- None
Basic Course of Events
- Step1: TE sends an initialization message to TL.
- Step2: TL allocates resources for the log request.
- Step3: TL sends reply to TE
Alternative Paths
- In Step2 if there are no enough resources, then, Step3 will return “Resource allocation failed” to TE; Otherwise, Step3 will return "initialization finished" to TE;
Postconditions
- Initialization done, all resources needed are ready and are waiting for the next operation.
UC-2: Write a report log
Summary
- Add a regular record.
Rationale
- "Report log" gives a trace of the normal execution of a test.
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE gives to TL a "report" message.
- Step2: TL writes the message as a "reportr” record
- Step3: TL gives "writing done" message to TE
Alternative Paths
- In Step2, if the specific log resource has not been allocated, then first a request must be performed.
Postconditions
- Writing done
UC-3: Write a warning log
Summary
- Add the log of warning event.
Rationale"
- Warning log" gives a more noticeable log than "report log". This “warning log” treats events which are unusual but are not fatal for the test case execution.
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE gives to TL a "warning log" message.
- Step2: TL writes the log message as a "warning" record.
- Step3: TL gives "writing done" message to TE.
Alternative Paths
- In Step2, if the specific log record has not been allocated, then a request must be performed.
Postconditions
- Writing is done
UC-4: Write an error log
Summary
- Add the log of error event.
Rationale
- "Error log" gives a more noticeable log than "warning log”. This “error log” treats events which are unusual and fatal for the test case execution.
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE gives TL "error log" message
- Step2: TL writes the log message using "error" record
- Step3: TL gives "writing done" message to TE
Alternative Paths
- In Step2, if the specific log record has not been allocated, then first a request must be performed.
Postconditions
- Writing is done
UC-5: Write a system report log
Summary
- Add the log of system report event.
Rationale
- System report log give a trace of normal system operation
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE gives TL "system report log" message
- Step2: TL writes the log message using "system report" form
- Step3: TL gives "writing done" message to TE
Alternative Paths
- In Step2, if the specific log record has not been allocated, then first a request must be performed.
Postconditions
- Writing is done
UC-6: Write a system warning log
Summary
- Add the log of system warning event.
Rationale
- System warning log traces the event where there is a problem within the test system but this problem does not affect the proper execution of TE.
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE gives TL "system warning log" message
- Step2: TL writes the log message using "system warning" form
- Step3: TL gives "writing done" message to TE
Alternative Paths
- In Step2, if the specific log record has not been allocated, then first a request must be performed.
Postconditions
- Writing done
UC-7: Write a system error log
Summary
- Add the log of system error event.
Rationale
- "System Error log" gives a more noticeable log than "warning log”. This “System error log” treats events which are unusual and fatal for the test case execution and has been specially caused by the test system.
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE gives TL "system report log" message
- Step2: TL writes the log message using "system error" form
- Step3: TL gives "writing done" message to TE
Alternative Paths
- In Step2, if the specific log record has not been allocated, request it first.
Postconditions
- Writing done
UC-8: Terminate the log operation
Summary
- Once the test logging operation has finished because the TE has finished its execution, the TE must inform the TL.
Rationale
- When TE entity wants to finish the logging operation, it must inform TL entity that must terminate the log process, and, then, the TL entity will do some additional work such as closing the opened log records.
Actors
- TE
Preconditions
- UC-1 has been done.
Basic Course of Events
- Step1: TE sends to TL the terminating message.
- Step2: TL saves the log record and the extra information retrieved during the test case execution.
- Step3: TL informs TE that termination of logging operation has been done.
Alternative Paths
- In Step2, if the specific log record has not been allocated, the TL entity must return “no log process” to TE.
Postconditions
- Termination of logging operation has been done.
UC-9: Browse the list of log records
Summary
- To give test user a list of log records.
Rationale
- Test user wants to browse some log information already stored in the TL entity.
Actors
- Test user, TM-UI
Preconditions
- None
Basic Course of Events
- Step1: Test user input browsing command to TL in TM-UI
- Step2: TL reads the log records from log files.
- Step3: TM-UI displays the log records to test user
Alternative Paths
- None
Postconditions
- A list of log records is shown to the user.
UC-10: To read the detailed information of a log record
Summary
- To present the detailed record to the test user
Rationale
- Once the test logging operation has finished, the TL entity must transfer the log record to the TM-UI entity. Therefore, the test user can read the detailed information included in the log record which resumes the main events occurred during the test case execution, test system initialization, etc.
Actors
- Test user, TM-UI
Preconditions
- UC-9 is running
Basic Course of Events
- Step1: Present the detailed information to test user
Alternative Paths
- None
Postconditions
- The detailed information has been transferred to TM-UI
UC-11: To delete log records
Summary
- To delete the specific log records
Rationale
- Test user can delete useless log records when the log record is outdated
Actors
- Test user, TM-UI
Preconditions
- None
Basic Course of Events
- Step1: Test user inputs a log deleting command and the target log records in TM-UI. This command is sent to the TL entity.
- Step2: TM-UI sends the command and target log records to TL
- Step3: TL deletes the specific log records.
- Step4: TL tells test TM-UI the delete operation is done.
- Step5: TM-UI display the corresponding information
Alternative Paths
- Test user can delete a log record or a set of log records
Postconditions
- Deleting operation has been done.
UC-12: To export the detailed information of log records
Summary
- Test user can export some detailed information of log records as a separate document.
Rationale
- Sometime, test user may want to use a log record as a separate document like to compose a report. So TL should offer a export function
Actors
- Test user, TM-UI
Preconditions
- None
Basic Course of Events
- Step1: Test user inputs the log exporting command and the target log records in TM-UI.
- Step2: TM-UI sends the log exporting command and target log records to TL.
- Step3: TL exports the specific log records.
- Step4: TL informs TM-UI the export operation has been done
- Step5: TM-UI displays the correspond information
Alternative Paths
- User can export a record or a batch of records
Postconditions
- Exporting has been done.
UC-13: Print
Summary
- Print log records’ detailed information
Rationale
- Test user can print the log records (list or detail)
Actors
- Test user, TM-UI
Preconditions
- None
Basic Course of Events
- Step1: Test user input the log printing command and the target log records in TM-UI
- Step2: TM-UI give the command and target log records to TL
- Step3: TL prints the specific log records.
- Step4: TL tells TM-UI the print operation is done.
- Step5: TM-UI display the correspond information
Alternative Paths
- User can print a record or a batch of records
Postconditions
- Printing done.
UC-14: Search for a list of log records
Summary
- Searching records
Rationale
- Searching records
Actors
- Test user, TM-UI
Preconditions
- None
Basic Course of Events
- Step1: Test user tells TL to search and the corresponding condition in TM-UI
- Step2: TL execute the searching process and get a batch of records
- Step3: TL return the result records list to TM-UI
- Step4: TM-UI display the records
Alternative Paths
- In Step4, if TL can't find corresponding log record, return warning information to TM-UI.
Postconditions
- searching done and the list is showing
UC-15: Configuring the TL
Summary
- Configuring the TL module
Rationale
- Test user can configuring the log system according to his environment
Actors
- Test user, TM-UI
Preconditions
- None
Basic Course of Events
- Step1: TL get the configuration command form TM-UI
- Step2: TL return the configutation opinion to TM-UI
- Step3: TL get the user response from TM-UI
- Step4: TL finish the configuration job
Alternative Paths
- In Step3, if the user response is not existing, the error message should be informed to TM-UI
Postconditions
- Configuration has been done.
Functional ReQuirements
FR-1: Open log resources for writing operation.
Summary
- Open the specific log resource for the logging operation of test execution
Rationale
- Only if the log resource has been already opened, the writing operation can be done.
Requirements
- When TE starts initialization for logging operation, then it can specify the parameter of log resource name; or, by default, TL will create the log resource according the name of test case and the current day and time. Then, the operation status will be returned to the execution (e.g.,” creation successful”).
References
FR-2: Format log item
Summary
- According to the log level (report, warning, error, system error), format the log item which TE wants to add to the log resource.
Rationale
- Formatting the log item ,according the log level, can give users a clear view about different important information
Requirements
- When TE wants to add any log item, the level parameter must be given to TL, TL makes the formatted log item according the level parameter and the log information parameter.
References
FR-3: Write log records
Summary
- Write the formatted log item
Rationale
- Add the formatted log item
Requirements
- Only formatted log item (by FR-2) can be added into the log resource
References
FR-4: Close log resource
Summary
- Close the log resource after the logging operation.
Rationale
- When TE finishes the logging operation, TL must close the logging session and resource handling session
Requirements
- Close the opening resource handling session
References
FR-5: Transfer log records list
Summary
- Transfer to TM-UI a log records list.
Rationale
- When TM-UI send “records list needed” command to TL, TL should supply the list.
Requirements
- After receive “list” command, TL should read the log folder and make a list by all the resources’ name in the folder and send it to TM-UI
References
FR-6: Transfer the detailed information of a log record
Summary
- Transfer the log record for user to read the detailed information in TM-UI
Rationale
- Open the log record for user to read the detailed information
Requirements
- When TM-UI send “open one log record needed” command to TL and the corresponding record, TL should open the record and send it to TM-UI
References
FR-7: Search log record
Summary
- When TM-UI send “search” command to TL, TL finish the work and return the result.
Rationale
- When the log list is showing for user, many of them are useless. If user can get records corresponded to his input condition, the search part can help user find the target log records quickly and it is friendly to users.
Requirements
- When TM-UI send “search” command to TL and the searching condition, TL finish the work and return the result.
References
FR-8: Delete log record
Summary
- When TM-UI send “delete” command to TL, TL finish the work and return the result.
Rationale
- User can delete the useless log records by input delete command in TM-UI, and TM-UI send it to TL.
Requirements
- When TL receive “delete” command and the corresponding log record from TM-UI, TL should delete the record and return the result to TM-UI
References
FR-9: Export log records
Summary
- When TM-UI send “export” command to TL, TL finish the work and return the result.
RationaleUser can export log records as a document resource for some external document work. The command should be input in TM-UI. And TM-UI send it to TL, TL finish the work and return the result. Requirements
- When TL receive “export” command and the corresponding log record from TM-UI, TL should delete the record and return the result to TM-UI
References
FR-10: Print log records
Summary
- Print log records
Rationale
- User can print log records
Requirements
- When user chooses to print one log record, print command and the corresponding log record as the command’s parameter should be given, and then the printing will be done.
References
Nonfunctional Requirements
NF-1: Performance constraints for writing log
Summary
- The writing log must perform quickly
Rationale
- If writing log is not fast enough, it will affect the test execution.
Requirements
- The writing operation must take under 50ms on a 700mhz Pentium III running Linux at 50% CPU load.
References
NF-2: Performance constraints for showing log list
Summary
- The showing log list must be shown to the user quickly
Rationale
- If showing log list is not fast enough, users will avoid using the software.
Requirements
- The showing log list operation must take under 100ms on a 700mhz Pentium III running Linux at 50% CPU load.
References
NF-3: Performance constraints for showing log
Summary
- The showing log must perform quickly
Rationale
- If showing log is not fast enough, users will avoid using the software.
Requirements
- The showing log operation must take under 100ms on a 700mhz Pentium III running Linux at 50% CPU load.
References
NF-4: Performance constraints for search log
Summary
- The searching log must perform quickly
Rationale
- If searching log is not fast enough, users will avoid using the software.
Requirements
- The searching log operation must take under 300ms on a 700mhz Pentium III running Linux at 50% CPU load.
References
![[Main Page]](/themes/Go4ITv2/images/logo.gif)
