What conclusion can you draw?

You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the testing and stabilization of applications. Domain.com operates in the Credit Card Services department of a financial institution.
You and your team are currently developing an Extensible Markup Language (XML) Web service. When completed this Web service will allow merchants to verify and charge a customer’s credit card. A Web method named Verify accepts a String parameter that represents the customer’s credit card number. Verify’s main function will be to ensure that a credit card number is valid. Verify will be configured to throw an exception in the event of the card number being invalid. Following is the unit strategy testing as it will be implemented:
1. Use the automatically generated Microsoft ASP.NET Web page to test the Verify Web method.
2. Ensure that no exception is thrown when you pass a valid credit card number to the Web method.

What conclusion can you draw?

You work as the Enterprise application developer at Domain.com. The Domain.com network consists of a single Active Directory domain named Domain.com. All servers in the domain run Windows Server 2003. Your responsibilities at Domain.com include the testing and stabilization of applications. Domain.com operates in the Credit Card Services department of a financial institution.
You and your team are currently developing an Extensible Markup Language (XML) Web service. When completed this Web service will allow merchants to verify and charge a customer’s credit card. A Web method named Verify accepts a String parameter that represents the customer’s credit card number. Verify’s main function will be to ensure that a credit card number is valid. Verify will be configured to throw an exception in the event of the card number being invalid. Following is the unit strategy testing as it will be implemented:
1. Use the automatically generated Microsoft ASP.NET Web page to test the Verify Web method.
2. Ensure that no exception is thrown when you pass a valid credit card number to the Web method.

What conclusion can you draw?

A.
The unit testing strategy is correct.

B.
The unit testing strategy is incorrect, since you need to ensure that an exception is thrown when an invalid credit card number is passed to the Web method.

C.
The unit testing strategy is incorrect since you need to perform unit testing from a merchant’s client application.

D.
The unit testing strategy is incorrect since you only need to ensure that an exception is thrown when an invalid credit card number is passed to the Web method.

Explanation:
This strategy is inadequate. When performing unit testing you essentially ensure that a method behaves in the way it is expected to behave. In this case the Verify Web method must throw an exeption when an invalid credit card number is passed. You need to:
Call the Web method and pass a valid credit card number. Ensure that no exception is thrown.
Call the Web method. Ensure that the exception is thrown. to complete the test and the test will only be passes if these two conditions pass.
Incorrect answers:
A: This option is incorrect since not all the conditions will be met.
C: This option is suggesting integration testing.
D: You also need to ensure that verification succeeds when a valid credit card number is passed to the Web method. An exception should not be thrown in the event of validation success.



Leave a Reply 0

Your email address will not be published. Required fields are marked *