|
| Hi, This is my first time doing testing, therefore here to request someone will be kind enough to show how to do a simple Basis Path Testing and the computation of the Cyclomatic Complexity (CG).
Thank you in advance and here is code as an example.
code: Select Case Text1.Text (1)
Case "Available" (2)
'Text1.Text = "Available"
msg = MsgBox("Car Available" & vbCrLf & "Proceed to make a rental?", vbYesNo, "Availability") (3)
Select Case msg
Case vbYes (4)
Invoice.Show (5)
Unload Me
Exit Sub (6)
Case vbNo (7)
Unload Me (8)
Exit Sub (9)
End Select (10)
Case "On Rent" (11)
'Text1.Text = "On Rent"
msg = MsgBox("Car is not Available" & vbCrLf & "Do you want to Resserve?", vbYesNo, "Availability") (12)
Select Case msg (13)
Case vbYes (14)
Reserve.Show (15)
Unload Me
Exit Sub (16)
Case vbNo (17)
Unload Me (18)
Exit Sub (19)
End Select (20)
Case Else (21)
MsgBox "Select Car"
End Select (22)
End Sub (23)
|
|