Discuss the advantages and disadvantages to testing a Visual

Discuss the advantages and disadvantages to testing a Visual Basic application with valid and invalid data. What happens if you do not test your application? Provide at least one specific example.

Solution


The purpose of the application can be tested thoroughly by testing with valid data.
By testing with invalid data, we can identify whether the application is able to handle the input or not.
Because in real-time when the application is used, the user can mistype the input. The application must handle this.
Hence it is required to do negative testing as well.

Completely ignoring to testing your visual Basic Application can lead to a disaster since we are not sure of what will happen, when !

Here is an example an a simple Visual basic form

Public Sub SubA()
   \'.....some code
   mDate = CDate(vntDate)
End Sub

In this sub if the vntDate is not of the type Date, then it will crash the application.
These kind of issues can be figured out only through testing.

The code can then be modified as follows,

Public Sub SubA()
   If IsDate(vntDate) Then
mDate = CDate(vntDate)
Else
\' invalid data - Do something
End Sub

Discuss the advantages and disadvantages to testing a Visual Basic application with valid and invalid data. What happens if you do not test your application? Pr

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site