Test Area 7: Share

This test area covers sharing items between locations via the Share command.

A hhare operation is the apparent duplication of files and folder items between two or more locations within a source control file hierarchy. Duplication does not really occur on the server, but the user does see the same file in two or more specified locations. Whenever changes are made to any of the shared items, those changes appear in all other shared locations.

Sharing into folders works if you select a folder with at least one file under source control in it. The share command is disabled under the following conditions:

  • If the selected folder is an empty folder.

  • If there is a real folder, but it contains no source control files.

  • If there is a virtual folder, whether files under source control are in it or not.

  • If there is a Remote Site Web project.

Command Menu Access

The following Visual Studio integrated development environment menu paths are used in the test cases.

Share: File->Source Control->Share.

Expected Behavior

  • Shared file appears in shared location.

  • Viewing the source control version store history shows that file(s) are shared.

  • Editing a shared file edits both locations of the file.

Test Cases

The following are specific test cases for the Share test area.

Action

Test Steps

Expected Results to Verify

Share a file from one loaded project under source control to another loaded project

  1. Create a new project.

  2. Add a second project to the solution.

  3. Create a file in the second project with a name that is not in first project.

  4. Add the solution to source control.

  5. Select the first project.

  6. Open Share dialog box (File -> Source Control -> Share).

  7. Share the file from the second project to the first project.

  8. Accept Check Out if prompted.

Common Expected Behavior.

Share a file from one project to another

  1. Create a new project.

  2. Add it to source control.

  3. Close the solution.

  4. Create a second project (new solution.)

  5. Add the solution to source control.

  6. Select the project.

  7. Open the Share dialog box (File -> Source Control -> Share).

  8. Share a file from the previously added project to the open project.

  9. Accept Check Out if prompted.

Common Expected Behavior.

Share a file not part of project from source control into the currently loaded project

  1. Create a new project.

  2. Add the solution to source control.

  3. Add a file to source control that is not part of the project or solution.

  4. Select the project and open the Share dialog box (File -> Source Control -> Share).

  5. Select a file within the Share dialog box that does not exist within the current project or solution and share it.

  6. Accept Check Out if prompted.

The source control store has performed a Get, so the file is now at the local location of the project.

Share files within the same project to a different folder

  1. Select Check out automatically in Tools -> Options -> Source Control.

  2. Create a new project and add it to source control.

  3. Add a folder to the project.

  4. Add a file to the folder and check in the folder.

  5. Select the folder.

  6. Open Share dialog box (File -> Source Control -> Share).

  7. Share file to the selected folder.

Common Expected Behavior.

Folder must be checked in with a file in it before it can be used for share.

Share a folder into the loaded Project — Recursive

  1. Create a new project.

  2. Add the solution to source control.

  3. Select the project.

  4. Open the Share dialog box (File -> Source Control -> Share).

  5. Select a folder.

  6. Share the folder recursively into the project.

Common Expected Behavior.

Share several files from one project to another

  1. Create a new project with several files in it.

  2. Add the solution to source control.

  3. Close the solution.

  4. Create a new project in a new solution.

  5. Add the solution to source control.

  6. Select the project.

  7. Open the Share dialog box (File -> Source Control -> Share).

  8. Share several files from the previously created project to the currently open project.

Common Expected Behavior.

See Also

Concepts

Test Guide for Source Control Plug-ins