1

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:

  • Shared Project Tests: Login to google
  • Google Drive Project: Add, Upload Tests
  • Google Mail Project - Compose, Read, Unread Tests
  • Google Maps Project - Search Location Tests

Output:

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

Thanks for your answers

manizheh
  • 112
  • 14
IamRKY
  • 55
  • 10
  • Welcome to SO! Sadly your question may be too broad or perhaps subject to opinion. [ask] –  Jul 26 '16 at 10:37

2 Answers2

1
  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"
Peter Morris
  • 20,174
  • 9
  • 81
  • 146
  • Thanks. It worked for me. Additionally i removed the Build option to "none" solved my issue. Reference post http://stackoverflow.com/questions/3995315/how-to-use-shared-resource-file-between-projects-in-one-solution?rq=1 – IamRKY Jul 26 '16 at 10:57
  • What's wrong with a class library and **Add reference**? –  Jul 26 '16 at 22:08
  • @MickyD Nothing, if those are the only tests in the DLL. – Peter Morris Jul 27 '16 at 10:46
  • 1
    Oh you are talking about adding a link to a **.cs** file. My bad. I thought you were talking about something else :P Here have a +1 :) –  Jul 27 '16 at 13:05
0

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).

Euphoric
  • 12,645
  • 1
  • 30
  • 44