Skip to main content
added 1 characters in body
Source Link

I take a little different approach with unit and integration tests. I try naming them based on features as much as possible. Then when all the tests pass you can see a list of all the features that work and don't work.

  • canRegisterUser
  • canHandleInvalidInput
  • canRelayDocumentBetweenServers
  • canCreateSchema
  • canLoginUsingWebService
  • canLoginUsingBasicAuth
  • canDeleteDocument
  • canAddDocument

It is not always pragmatic to name the tests this way, but it can be very helpful especially after reading through hundreds of unit and integration tests. The over all encompassing Class name that holds these methods should also be indicative of the features being teststested. It will help with organization.

I'd also suggest naming any unit tests for bugfixes with a unique prefix such as bugfix1002 to prove that the bug has been fixed.

I take a little different approach with unit and integration tests. I try naming them based on features as much as possible. Then when all the tests pass you can see a list of all the features that work and don't work.

  • canRegisterUser
  • canHandleInvalidInput
  • canRelayDocumentBetweenServers
  • canCreateSchema
  • canLoginUsingWebService
  • canLoginUsingBasicAuth
  • canDeleteDocument
  • canAddDocument

It is not always pragmatic to name the tests this way, but it can be very helpful especially after reading through hundreds of unit and integration tests. The over all encompassing Class name that holds these methods should also be indicative of the features being tests. It will help with organization.

I'd also suggest naming any unit tests for bugfixes with a unique prefix such as bugfix1002 to prove that the bug has been fixed.

I take a little different approach with unit and integration tests. I try naming them based on features as much as possible. Then when all the tests pass you can see a list of all the features that work and don't work.

  • canRegisterUser
  • canHandleInvalidInput
  • canRelayDocumentBetweenServers
  • canCreateSchema
  • canLoginUsingWebService
  • canLoginUsingBasicAuth
  • canDeleteDocument
  • canAddDocument

It is not always pragmatic to name the tests this way, but it can be very helpful especially after reading through hundreds of unit and integration tests. The over all encompassing Class name that holds these methods should also be indicative of the features being tested. It will help with organization.

I'd also suggest naming any unit tests for bugfixes with a unique prefix such as bugfix1002 to prove that the bug has been fixed.

Source Link

I take a little different approach with unit and integration tests. I try naming them based on features as much as possible. Then when all the tests pass you can see a list of all the features that work and don't work.

  • canRegisterUser
  • canHandleInvalidInput
  • canRelayDocumentBetweenServers
  • canCreateSchema
  • canLoginUsingWebService
  • canLoginUsingBasicAuth
  • canDeleteDocument
  • canAddDocument

It is not always pragmatic to name the tests this way, but it can be very helpful especially after reading through hundreds of unit and integration tests. The over all encompassing Class name that holds these methods should also be indicative of the features being tests. It will help with organization.

I'd also suggest naming any unit tests for bugfixes with a unique prefix such as bugfix1002 to prove that the bug has been fixed.