IamRKY
IamRKY

Reputation: 80

How to share unit test between other projects in the solution?

My sincere apologies, if am duplicating the question here. I have set of tests that need to shared among 3 other projects and my application is web paged

I am considering google as an example:

Output:

All the projects should have google login test added part of the test suite.

Thanks for your answers

Upvotes: 1

Views: 951

Answers (2)

Euphoric
Euphoric

Reputation: 12849

All the projects should have google login test added part of the test suite.

This is incorrect. There should be only one Login module for which there is tests. All other projects should have no login logic whatsoever. They should either assume user is already logged in or only receive relevant permissions.

Simply said : Duplicate tests signalize duplicate logic. And duplicate logic is A Bad Thing (tm).

Upvotes: 0

Peter Morris
Peter Morris

Reputation: 23234

  1. Right click the solution you wish to add the existing test to
  2. Click Add then Existing Item in the popup menu
  3. Find the existing file
  4. Single-click it to select it
  5. Click the DropDown icon next to the Add button
  6. Select "Add as link"

Upvotes: 1

Related Questions