Compartilhar via


Test Area 2: Get From Source Control

Note

This article applies to Visual Studio 2015. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here

This test area covers test cases for retrieving items from the version store via the Get command. These test cases can be applied to both local and to Web projects.

Command Menu Access

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

Get Latest Version:
  • File, Source Control, Get Latest Version.

  • File, Get Latest Version.

  • Shortcut menu, Get Latest Version.

  • Get: File, Source Control, Get.

Expected Behavior

Get Latest Version:

Performs a silent (no UI) retrieval of the latest version of the item from the version store.

Get:

Displays the Get dialog box and allows the user to make changes to the file set that will be retrieved as well as modify the options that affect how the files are retrieved.

Test Cases

Action Test Steps Expected Results to Verify
Get Latest Version of a file that does NOT exist locally 1. Create a project.
2. Add an item to the project.
3. Put the project under source control.
4. Delete local copy of item.
5. Get Latest Version of the item (Shortcut Menu, Get Latest Version).
Item file is retrieved locally.
Get a file that does NOT exist locally 1. Create a project.
2. Add an item to the project.
3. Put the project under source control.
4. Delete local copy of item.
5. Get the item (File, Source Control, Get <item>).
Item file is retrieved locally.
Get a file that has been checked out exclusively and modified locally 1. Create a project.
2. Add an item to the project.
3. Put the project under source control.
4. Check out the project item exclusively.
5. Modify the local copy.
6. Get Latest Version of the item (File, Get Latest Version of <item>). If this step succeeds, continue to next step.
7. Click Replace button in the warning dialog box.
ReResult from Step 6 :

Warning dialog box indicates that file is checked out.

ReResult from Step 7:

Modified local file is replaced by the original version from the version store.

File is read/write.
Get and Replace file that is checked out, shared, and modified locally 1. Create a new project.
2. Add an item to the project.
3. Put the project under source control.
4. Check out the project item as shared.
5. Modify the local copy.
6. Get Latest Version of the item (File, Get Latest Version of <item>). If this step succeeds, continue to next step.
7. Click Replace in the warning dialog box.
Result from Step 6:

Warning dialog box indicates that file is checked out.

Result from Step 7:

Modified local file is replaced by the original version from the version store.

File is read/write.
Get a file that DOES exist locally, same as latest version in the version store 1. Create a new project.
2. Add an item to the project.
3. Put the project under source control.
4. Get the item (File, Source Control, Get <item>).
Local file is unchanged.
Get a solution with one project 1. Create a solution with one project.
2. Place the solution under source control.
3. Delete all the project files locally.
4. Get the solution (File, Source Control, Get).
All deleted files are restored locally.

See Also

Test Guide for Source Control Plug-ins