best experienced with

at 768x1024 resolution


Testing And Analysis

Testing is important as it garantees quality assurance. Our group has used several methods of testing, namely static and dynamic tests. Static tests include desk checking, walkthroughs, inspections and compilation of the source codes (ASP written using Visual Basic). Our group concentrated on dynamic testing, applying both white-box and black-box testing techniques. Please, do feel free to take a look at our testing methology and results.

Static and Integration Testing

Black Box Testing


White Box Testing

White box testing is a selective testing technique that focuses on the procedural logic of the software. It is also known as structural testing because it uses the internal structure of the program to derive the test cases. Our team has used the following three white box test techniques

1)basis path testing, consisting of Cyclomatic Complexity & Basis Set;

2)graph matrices and

3)loop testing

1)Basis Path Testing
1.1)Maximum Path Coverage

To ensure maximum path coverage, we need enough test cases to ensure that: every statement in a component has been executed at least once and every decision (branch or case statement) has been executed on its true and false side. The following lists our source code together with the identified nodes. This is the source code for our user interface, identified with the various nodes and predicate nodes, and subsequently develop the flowgraph.

//------------------begining of script----------------------------------------- //

  Code Node number
  • sub Page_Load(obj as Object, e as EventArgs) 1
         
  • if not Page.IsPostBack then 2
         
  • 'set up connection 3
         
  • dim objConn as new OleDbConnection _ 4
      ("Provider=Microsoft.Jet.OLEDB.4.0;" & _  
     

    "Data Source=C:\Inetpub\wwwroot\database\db\database.mdb")

     
         
  • 'open connection 5
      dim objCmd as OleDbCommand = new OleDbCommand _  
      ("select distinct StartPt from Road", objConn  
      dim objCmd1 as OleDbCommand = new OleDbCommand _  
      ("select distinct EndPt from Road", objConn)  
      objConn.Open()  
      spt.DataSource = objCmd.ExecuteReader(system.data.CommandBehavior.CloseConnection)  
      spt.DataBind()  
      objConn.Close()  
      objConn.Open()  
      ept.DataSource = objCmd1.ExecuteReader(system.data.CommandBehavior.CloseConnection)  
      ept.DataBind()  
      objConn.Close()  
         
  • end if 6
         
  • end sub 7
         
  • sub Submit(obj as Object, e as EventArgs) 8
         
  • dim objConn as new OleDbConnection _ 9
      ("Provider=Microsoft.Jet.OLEDB.4.0;" & _  
      "Data Source=C:\Inetpub\wwwroot\database\db\database.mdb")  
      dim objCmd as new OleDbDataAdapter _  
      ("select * from Route where StartPoint='"& spt.SelectedItem.Text &"'AND EndPoint='" &  
      ept.SelectedItem.Text &"'", objConn)  
      dim ds as DataSet = new DataSet()  
      objCmd.Fill(ds, "Route")  
      dim dTable as DataTable = ds.Tables("Route")  
      Dim CurrRows() as DataRow = dTable.Select(Nothing, _  
      Nothing, DataViewRowState.CurrentRows)  
      Dim I, J as integer // } busroute.Text = ""  
         
  • For I = 0 to CurrRows.Length - 1 10
         
  • For J = 0 to dTable.Columns.Count - 1 11
      busroute.Text = busroute.Text & "" &dTable.Columns(J). _ // }(11)  
      ColumnName & " : " & CurrRows(I)(J).ToString & _ ""  
         
      next 12
      busroute.Text = busroute.Text & "" // }  
         
     

    next

    13
         
  • end sub 14

    // ----------end of source code for user interface------------ //

    1.2)Cyclomatic Complexity

    No of predicate nodes = 3

    Hnce cyclomatic Complexity = 3+1 = 4

    1.3)Basis Set:

    Path 1: 1,2,5,6,7,8,9,10,11,12,[11,12,13],14

    Path 2: 1,2,5,6,7,8,9,10,11,12,[13,10,11,12,13,],14

    Path 3: 1,2,3,4,5,6,7,8,9,10,11,12,[11,12,13],14

    Path 4: 1,2,3,4,5.6,7,8,9,10,11,12,[13,10,11,12,13,],14

    2) Graph Matrices

    A graph matrix is a NxN square matrix where N is the number of nodes in a flowgraph.It is a structure which is used by the procedure for deriving the flowgraph and determining the basis set of independent paths. This can be mechanized through software.

    Link weight & the graph matrix

    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    12
    13
    14
    01
    a
                           
    02
     
    c
       
    b
                   
    03
       
    d
                       
    04
         
    e
                     
    05
           
    f
                   
    06
             
    g
                 
    07
               
    h
               
    08
                 
    i
             
    09
                   
    j
           
    10
                     
    k
         
    11
                       
    l
       
    12
                     
    p
     
    m
     
    13
                   
    o
         
    n
    14
                             
    01
    02
    03
    04
    05
    06
    07
    08
    09
    10
    11
    12
    13
    14
    01
    1
                           
    02
     
    1
       
    1
                   
    03
       
    1
                       
    04
         
    1
                     
    05
           
    1
                   
    06
             
    1
                 
    07
               
    1
               
    08
                 
    1
             
    09
                   
    1
           
    10
                     
    1
         
    11
                       
    1
       
    12
                     
    1
     
    1
     
    13
                   
    1
         
    1
    14
                             

    Total number of predicates = 3

    3) Loop Testing

    Loop testing is a white box testing technique that focuses exclusively on the validity of loop constructs.

    Four different classes of loops can be defined:

    1)simple loops,
    2)nested loops,

    3)concatenated loops and

    4)unstructured loops

    Our software used one nested loop and so we adopt the following test approach instead:

    Working outwards, we have conducted tests for the next loop but keeping all other outer loops at minimum values and other nested loops to "typical" values.

    And so we continued until all the loops have been tested.

    Below illustrates one test case of the same start point of Dunman Secondary School, and the loops have proven true as they cycle through the both column and rows to provide the output shown below, which is the identical to the expected output.

    Possible Route

    StartPoint

    Step 1

    Step 2

    Step 3

    Step 5

    Step 6

    Step 7

    Step 8

    Step 9

    Step 10

    Step 11

    EndPoint

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Gofty Int) at Holy Trinity Church

    Alight at Han's Building

               

    Han Building

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Gofty Int) at Holy Trinity Church

    Alight at Han's Building

    Walk to MRT station B

             

    MRT Station B

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Pearl Harbour

                   

    Pearl Harbour

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Pearl Harbour

    Walk to MRT station C

                 

    MRT Station C

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station D

         

    MRT Station D

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station D

    Walk to Gofty Int

       

    Gofty Int

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station E

         

    MRT Station E

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station E

    Walk to Mandai Zoo

       

    Mandai Zoo

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station F

         

    MRT Station F

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station F

    Walk to Franksman Mall

       

    Franksman Mall

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Gofty Int) at Dunman Secondary School

    Alight at Opp National Library

               

    Opp. National Library

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Gofty Int) at Dunman Secondary School

    Alight at Buckling Finance

               

    Buckling Finance

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station D

    Walk to Gofty Int

    Board Bus 1 (tow Tampy Int) at Gofty Int

    Alight at Pang's Hospital

    Pang Hospital

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Orange Park

                   

    Orange Park

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Board Bus 3 (tow Gofty Int) at Tampy Int

    Alight at Flying BirdPark

           

    Flying Birdpark

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

                   

    Holy Trinity church

    Solution

    Dunman Secondary School

    Board Bus 2 at Dunman Secondary School

    Alight at Holy Trinity Church

    Board Bus 1 (tow Tampy Int) at Dunman Secondary School

    Alight at Tampy Int

    Walk to MRT station A

    Take MRT

    Alight at station E

    Walk to Mandai

    Board Bus 3 (tow Tampy Int) at Mandai Zoo

    Alight at Tampy Police Station

    Tampy Police Station