Docstoc

td

Document Sample
td Powered By Docstoc
					BrickOS Task and Memory Monitor
       Testing Design Specification
               Charles Mancinelli
               October 31, 2003


   Submitted in the partial fulfillment of the
          requirements of CMPS 490
              Computer Projects
                                  Testing Design Document for the BrickOS Task and Memory Monitor
                                                         October 31, 2003




                                                           Table of Contents


TABLE OF CONTENTS ............................................................................................................................. 2
CHAPTER 1 ................................................................................................................................................. 3
1.       INTRODUCTION............................................................................................................................... 3
     1.1          PURPOSE ...................................................................................................................................... 3
     1.2          SCOPE .......................................................................................................................................... 3
     1.3          GLOSSARY ................................................................................................................................... 4
     1.4          REFERENCES ................................................................................................................................ 5
     1.5          OVERVIEW OF DOCUMENT ........................................................................................................... 5
CHAPTER 2 ................................................................................................................................................. 6
2.       TEST PLAN ........................................................................................................................................ 6
     2.1     SCHEDULES AND RESOURCES....................................................................................................... 6
     2.2     TEST RECORDING ......................................................................................................................... 6
        Figure 1 – Testing Record Form ........................................................................................................... 7
     2.3     TEST REPORTING.......................................................................................................................... 7
     2.4     STATIC TESTING ........................................................................................................................... 7
3.       VERIFICATION TESTING .............................................................................................................. 8
     3.1      UNIT TESTING .............................................................................................................................. 8
        3.1.1    Doubly linked list module DBLList ..................................................................................... 8
        3.1.2    Data Storage module dataStorage ................................................................................... 8
        3.1.3    Receiving Protocol thread recProtocol ........................................................................... 9
        3.1.4    Memory data table display thread mmTableModel ............................................................ 9
        3.1.5    Task data table display thread tcbTableModel ................................................................ 9
        3.1.6    Pie Chart Module memChart ..............................................................................................10
     3.2      INTEGRATIVE TESTING ................................................................................................................10
        Figure 3.2 Module testing ....................................................................................................................10
4.       VALIDATION TESTING .................................................................................................................11
     4.1          SYSTEM TESTING ........................................................................................................................11
     4.2          ACCEPTANCE AND BETA TESTING...............................................................................................11
INDEX ..........................................................................................................................................................12
APPENDIX ..................................................................................................................................................13




                                                                                                                                                                 2
                Testing Design Document for the BrickOS Task and Memory Monitor
                                       October 31, 2003



Chapter 1
  1. Introduction
  1.1 Purpose

            The purpose of this document is to adequately describe and insure the full
     functionality of the BrickOS Task and Memory Monitor (BTMM). This document
     will serve as a guide for the maintenance and regression testing of the system.
     Any modifications or possible evolution of the system will also be noted within
     this document. The primary audience of this document will include any
     developers or users of the BrickOS operating system. This could also include any
     instructors wishing to use this as a teaching tool.

  1.2 Scope
          As per the software development life cycle the BTMM will be tested
     according to the four stages of testing. These four stages consist of unit testing,
     module testing, systems testing, and acceptance testing. The individual units of
     code will be tested first to insure that they work properly. These units of code are
     then organized and divided up into modules that perform the necessary functions
     of the system. These modules are then tested individually with there
     corresponding lines of code to insure the operability. The system will then be
     tested as a whole to see how the modules will interact and to find any unexpected
     flaws in their design or code. At this point test data will be used to verify the
     systems functionality. Both the functional and non-functional requirements are
     tested here. The final acceptance testing is done with the system together as a
     whole with out sample data and with user interaction. Any problems discovered
     or unacceptable functionality of the system will be analyzed. The easiest way to
     accomplish this is user acceptance testing by both the users and developer to
     make the system more functional and user friendly.




                                                                                           3
                   Testing Design Document for the BrickOS Task and Memory Monitor
                                          October 31, 2003



    1.3 Glossary



BrickOS – An open source operating system developed in C/C++ that runs on the Lego
RCX and supports user programs.
BrickOS Task and Memory Monitor (BTMM)- A Java applet/application used to
monitor tasks and the memory management of the BrickOS operating system
Java – An object-oriented language originally developed at Sun Microsystems by James
Gosling (and known by the name "Oak") with the intention of being the successor to
C++.
Operating System – Software that controls the operation of a computer and directs the
processing of programs (as by assigning storage space in memory and controlling input
and output functions
RCX 2.0 – Lego Robotics Command Explorer, a self-containing battery operated robot
built by Lego™, which can be used to model a real-time system.
Runtime Environment – An Environment in which a piece of written source code of a
programming language can be run.
USB – Universal Serial Bus
User Space – The portion of memory dedicated to storing and running user programs.
Tab – A graphical representation of a file folder that indicates what is underneath the
above item by a label. This feature is commonly seen in any GUI graphical user
interface.
Task Control Block (TCB) – A structure from the BrickOS operating system that
contains the data for each process. This data would include priority, next and previous
pointer, and the task id of each task.
Task/Thread/Process – A program or source code run either by its self or with other
pieces of code in a pseudo parallel or current fashion each performing separate
operations. Threads and task share the parent process address and memory space.




                                                                                          4
               Testing Design Document for the BrickOS Task and Memory Monitor
                                      October 31, 2003



1.4 References

     IEEE Std 829-1998, IEEE Standard for Software Test Documentation
      IEEE Std 1008-1987, IEEE Standard for Software Unit Testing
     Professor Martin’s Standard on Documentation,
      http://www.cs.scranton.edu/~dmartin
     BrickOS Task and Memory Monitor (BTMM), Software Requirement
      Specification, Charles H. Mancinelli, The University of Scranton, 2003.
     BrickOS Task and Memory Monitor (BTMM), Software Design Description,
      Charles H. Mancinelli, The University of Scranton, 2003.
     BrickOS Task and Memory Monitor (BTMM), Justification and Fesability,
      Charles H. Mancinelli, The University of Scranton, 2003.



1.5 Overview of Document

            The remainder of the document is organized into three additional chapters
     in the following manner:
                  Chapter 2 consists of the test plan which is a guide to how the
                   testing will be performed on the modules of code and the entire
                   system as a whole.
                  Chapter 3 consists of the verification testing which will describe
                   how the each component will be tested to meet the requirements
                   stated in the software design document for the BTMM. Though
                   the testing the software can be verified to meet its functional and
                   non-functional requirements.
                  Chapter 4 consists of the validation testing which will consistent of
                   the user acceptance testing. Through this process of validation, the
                   requirements in the software design document for the BTMM will
                   test the functionality of the system.




                                                                                         5
                   Testing Design Document for the BrickOS Task and Memory Monitor
                                          October 31, 2003



Chapter 2

   2. Test Plan
   2.1 Schedules and Resources

Testing Phase                    Start Date                           End Date
Unit Testing                     10/1/03                              11/5/03
Module Testing                   10/30/03                             11/18/03
Subsystem Testing                10/31/03                             12/5/03
System Testing                   11/21/03                             12/5/03
Acceptance Testing               12/5/03                              12/5/03

   This data can also be found in the Gantt chart located below. This phase will of
course overlap and are an estimation of the testing dates because error could be found at
any phase of the software development life cycle. This will then call for some of the
previous stages to be verified and checked. The reason for this is the inherited factor that
each of these stages incorporate. A system is composed of modules, which is in turn
composed of units of code. The person responsible and in charge of the testing is Charles
Mancinelli the designer of the BrickOS Task and Memory Monitor. The details of these
units are described in the design and specification documents of the BTMM.




   2.2 Test Recording
            The result of the testing will be recorded in the following form:
                      Component name will list the name of the module or use case of
                       the system.
                      Test Specification includes the type of testing, the process used to
                       do the testing and expected results of the testing. The functionality
                       of this is explained in the software design document of the BTMM.
                      Date Tested is the date the test occurred which may have multiple
                       entries per field depending on the range of date and modules
                       actually tested.



                                                                                              6
               Testing Design Document for the BrickOS Task and Memory Monitor
                                      October 31, 2003




                  Name of Tester will be the name of the person who performed the
                   test, which will be Charles Mancinelli of possible Dr. Bi for
                   acceptance testing.
                  Result of Test will explain the results of the test in relation to the
                   expected results. They will be given a pass/fail grade depending on
                   the results of the testing based on the specifications of the system.



   Component            Test              Date            Name of           Result of   Comments/
     Name           Specification         Tested           Tester             Test      Notes



                     Figure 1 – Testing Record Form


2.3 Test Reporting

                   The results of the components tested will be listed in this form. It
           will be specified as to whether the testing of the component was
           successful. This will be indicated by the status of passed, failed, not test,
           or needs retest. The dates and names of components will also be listed.
           This is demonstrated in figure 2 below.

 Item Tested                        Status                        Date Scheduled /Date Tested




2.4 Static Testing
      Because a developer often misses logical errors in coding because the code
seems correct to him/her, the code for the BTMM will be read by an individual that is
qualified to do so. The process will be done line by examining both the semantic and
logic. All problems will be returned to the main developer for consideration.




                                                                                            7
               Testing Design Document for the BrickOS Task and Memory Monitor
                                      October 31, 2003


3. Verification Testing
3.1 Unit Testing
         Test drivers will be used to test the following units individually. This can
    then be used to see how the units will interoperate will other units of code. The
    will include both black box and white-box testing. Any unit that depends on
    anther another unit will have to be retested again after the testing of the
    dependable unit (regression testing). The units are categorized by their modules
    and then by their consisting units.

3.1.1 Doubly linked list module DBLList
       Module Description: Doubly linked list data structure and methods.
       Reference: SDD 3.1
       Test Specification: see Appendix
       Consisting Units:
       interface DList {
       public void insert(Object item);
       public void next();
       public void prev();
       public void setReadHead();
       public void setReadTail();
       public void readNext();
       public void readPrev();
       public Object readcurVal();
       public Object currValue();
       public boolean isEmpty();
       public boolean isInList();
       public boolean endOfList();
       public boolean frontOfList();
       }

3.1.2 Data Storage module dataStorage
       Module Description: Doubly linked list used to store packets of type
                             TCBPacket and MMPacket.
       Reference: SDD 3.1
       Test Specification: see Appendix
       Consisting Units:

       interface Storage {
       public void tcbListAdd(TCBPacket pac);
       public TCBPacket tcbGetNext();
       public TCBPacket tcbGetPrev();
       public int tidLstSize();
       public int isInList(TCBPacket pac);
       public void memListAdd(MMPacket pac);
       public MMPacket memListGetNext();
       public MMPacket memListGetPrev();


                                                                                        8
            Testing Design Document for the BrickOS Task and Memory Monitor
                                   October 31, 2003


     public int MMLstSize();
     public int isInList(MMPacket pac);
     }


3.1.3 Receiving Protocol thread recProtocol
     Module Description: The receiving protocol thread is one cohesive thread that
                           receives data and sends it to the data storage module.
     Reference: SDD 3.1
     Test Specification: see Appendix
     Consisting Units:
        public void run()

3.1.4 Memory data table display thread mmTableModel
     Module Description: JTable display thread, creates a new thread.
     Reference: SDD 3.1
     Test Specification: see Appendix
     Consisting Units:
       public   void   setDelay(int seconds)
       public   void   startUpdate()
       public   void   stopUpdate()
       public   void   rewindOn()
       public   void   rewindOff(){
       public   void   updateData()
       public   void   run()

     mmTableRefresh thread
       public   MMPacket getData(int index)
       public   void RewindOn()
       public   void RewindOff()
       public   void updateVector


3.1.5 Task data table display thread tcbTableModel
     Module Description: JTable display thread creates a new thread.
     Reference: SDD 3.1
     Test Specification: see Appendix
     Consisting Units:
       public   void   setDelay(int seconds)
       public   void   startUpdate()
       public   void   stopUpdate()
       public   void   rewindOn()
       public   void   rewindOff(){
       public   void   updateData()
       public   void   run()

       tcbTableRefresh thread
       public   MMPacket getData(int index)
       public   void RewindOn()
       public   void RewindOff()
       public   void updateVector


                                                                                 9
                Testing Design Document for the BrickOS Task and Memory Monitor
                                       October 31, 2003




  3.1.6 Pie Chart Module memChart
         Module Description:
         Reference: SDD 3.1
         Test Specification: see Appendix
         Consisting Units:

         public String getToolTipText(MouseEvent me)
         protected void calculatePercentages()
         protected void createLabelsAndTips()
         protected void updateLocalValues()
         public void run()


  3.2 Integrative Testing
           Once the units that compose the modules are tested the units themselves
     need to be tested. The modules of the system must function individually before
     they can be put together as one cohesive unit. The modules expressed in this
     document are used in conjunction with the units in the case of the software design
     document. These modules have been tested in their construction using the testing
     programs in the appendix. If more time is provide the modules will be tested in
     further detail testing every possible flaw or weakness of each module. The
     interoperability of these modules will be tested and they will be integrated in
     order to form the use cases method in the software design specification. The
     following modules will be tested along with the units that compose those
     modules.

       Module                    Accept or Reject Tests            Modules to be integrated with
recProtocol                                                        dataStorage
dataStorage                                                        dataStorage
DBLList                                                            dataStorage
mmTableModel                                                       dataStorage
tcbTableModel                                                      dataStorage
memChart                                                           dataStorage



                             Figure 3.2 Module testing




                                                                                            10
               Testing Design Document for the BrickOS Task and Memory Monitor
                                      October 31, 2003



4. Validation Testing
4.1 System Testing
           The goal of the systems testing for the BTMM is testing the functionality
    of the entire system from a perspective of the user. Therefore, the use cases
    come into play here. All functionality of the system and every operation the user
    can perform shall be tested for every possible exception and situation where
    error could possible occur. All of the use cases have been testing at this point
    but the testing should continue for proper evolution of the system. The best way
    to test the system as a whole is to go through the use cases as describe in the
    Software Requirement specification. The realizations of the use cases are also
    presented in the Software Design Specification.


                     Use Case Name                 Reference
                  Start Monitor                SDD 5.1
                  Pause Monitor                SDD 5.2
                  Memory Map Tab               SDD 5.3
                  Tasks Tab                    SDD 5.4
                  Fast-Forward                 SDD 5.5
                  Rewind                       SDD 5.5
                  Save As                      SDD 5.6
                  Contents                     SDD 5.7
                  About                        SDD 5.7
                  License                      SDD 5.7
                  Pie Chart Popup              SDD 5.8
                  Exit                         SDD 5.9


4.2 Acceptance and Beta Testing

    The black box testing of the system will consist of a blind test by the developers
and potential users of the system. The developer will test as if they don’t know how
the underlying architecture works and how it is implemented. The users in user
acceptance testing will further aid this. They uses are the best way to test the system
because they find all of the errors that developer don’t even think of. The interaction
and use the system in a way that a developer never would leading to new and
interesting exceptions.




                                                                                     11
                        Testing Design Document for the BrickOS Task and Memory Monitor
                                               October 31, 2003


                                                  Index


D                                                           P
Data Storage module · 5                                     Pie Chart Module · 6
Doubly linked list module · 5

                                                            R
F
                                                            Receiving Protocol thread · 5
Figure 1 – Testing Record Form · 4
Figure 3.2 Module testing · 7
                                                            S
M                                                           Schedules and Resources · 2

Memory data table display thread · 6
                                                            T
                                                            Task data table display thread · 6




                                                                                                 12
                        Testing Design Document for the BrickOS Task and Memory Monitor
                                               October 31, 2003


                                              Appendix
Dynamic Table Testing
import java.awt.*;
import javax.swing.*;

public class table extends JFrame {

    public table() {
      super("Dynamic Data Test");
      setSize(600, 400);
      setDefaultCloseOperation(EXIT ON CLOSE);

    Storage store = new dataStorage();
    recProtocol rec = new recProtocol(store);
    rec.start();

             dataModel dm = new dataModel(5, store);

                JTable jt = new JTable(dm);
            JScrollPane jsp = new JScrollPane(jt);
            getContentPane().add(jsp, BorderLayout.CENTER);
    }

    public static void main(String args[]) {
      table mt = new table();
      mt.setVisible(true);

    }
}

Table Refresher Tester
public static void main(String args[]) {

// run for testing purposes
         Storage store = new dataStorage();

                  store.memListAdd(new        MMPacket(1234,         3030, 10));
                  store.memListAdd(new        MMPacket(4321,         4330, 20));
                  store.memListAdd(new        MMPacket(2314,         34030, 430));
                  store.memListAdd(new        MMPacket(1234,         3030, 10));
                  store.memListAdd(new        MMPacket(4321,         4330, 23));
                  store.memListAdd(new        MMPacket(2314,         34030, 430));
                  store.memListAdd(new        MMPacket(4403,         3030, 60));
                  store.memListAdd(new        MMPacket(1234,         4330, 50));
                  store.memListAdd(new        MMPacket(4321,         34030, 70));

                  //MMnav nav = new MMnav(store);

        memTableRefresh nav = new memTableRefresh(store);

              }
        }




                                                                                          13
                   Testing Design Document for the BrickOS Task and Memory Monitor
                                          October 31, 2003


Vector Testing
import java.util.*;


    public class vectorTester {

        public static void main(String args[]) {

          Vector v = new Vector();
          MMPacket mem = new MMPacket(1234, 33404, 89);

          v.addElement(mem);
          MMPacket test = (MMPacket)v.elementAt(0);
          int ok = test.getTid();
          System.out.println(ok);

           mem = new MMPacket(1234, 44404, 4);
        v.addElement(mem);

    System.out.println(v.contains(mem) + " " + v.indexOf(mem));

    }
    }




Write to file testing
public static void main(String[] args) {

                Storage store = new dataStorage();

             store.tcbListAdd(new        TCBPacket(44304,          45670,    20, 1));
             store.tcbListAdd(new        TCBPacket(44506,          45454,    12, 2));
             store.tcbListAdd(new        TCBPacket(44546,          65535,    10, 3));
             store.tcbListAdd(new        TCBPacket(44504,          45670,    2, 4));
             store.tcbListAdd(new        TCBPacket(10933,          45454,    0, 5));

             store.tcbListAdd(new        TCBPacket(44304,          65535,    5, 6));
             store.tcbListAdd(new        TCBPacket(44506,          65656,    4, 7));
             store.tcbListAdd(new        TCBPacket(44546,          65535,    10, 8));
             store.tcbListAdd(new        TCBPacket(44304,          45670,    2, 9));
             store.tcbListAdd(new        TCBPacket(10933,          65535,    5, 10));

             store.memListAdd(new MMPacket(4403, 3030, 11));
             store.memListAdd(new MMPacket(443234, 4330, 12));
             store.memListAdd(new MMPacket(4433, 34030, 13));

                    store.sysPacketSet(7, 67400);


        writeToFile write = new writeToFile("Test.txt", store);
        write.start();
    }
}




                                                                                        14
                   Testing Design Document for the BrickOS Task and Memory Monitor
                                          October 31, 2003


Write to file testing
uublic static void main(String args[]) {

            Storage store = new dataStorage();

            store.tcbListAdd(new         TCBPacket(44304,          45670,    20, 1));
            store.tcbListAdd(new         TCBPacket(44506,          45454,    12, 2));
            store.tcbListAdd(new         TCBPacket(44546,          65535,    10, 3));
            store.tcbListAdd(new         TCBPacket(44504,          45670,    2, 4));
            store.tcbListAdd(new         TCBPacket(10933,          45454,    0, 5));

            store.tcbListAdd(new         TCBPacket(44304,          65535,    5, 6));
            store.tcbListAdd(new         TCBPacket(44506,          65656,    4, 7));
            store.tcbListAdd(new         TCBPacket(44546,          65535,    10, 8));
            store.tcbListAdd(new         TCBPacket(44304,          45670,    2, 9));
            store.tcbListAdd(new         TCBPacket(10933,          65535,    5, 10));

            store.printTCBList();


                      System.out.println("--------");
            while(true) {
               TCBPacket temp = store.tcbGetPrev();
              System.out.println(temp.getFlags());
            }


            TCBPacket test = new TCBPacket();
            boolean testy=true;

            while(testy) {
               test = store.tcbGetNext();
               System.out.println(test.getPid());
               //if(test.getPid() == 0) { testy=false; }
            }


            store.memListAdd(new MMPacket(4403, 3030, 10));
            store.memListAdd(new MMPacket(443234, 4330, 20));
            store.memListAdd(new MMPacket(4433, 34030, 430));

            store.printMMList();
            System.out.println("--------");
            while(true) {
               MMPacket temp = store.memListGetPrev();
               System.out.println(temp);
            }


        }
    }




                                                                                        15

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:25
posted:7/23/2011
language:English
pages:15