Test Area 5: Change 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 source-control plug-in test area covers changing the source control via the Change Source Control command.

Change Source Control command provides four basic functions for the user:

  • Bind:

    Allows a user to establish or reestablish a source control link between a solution/project and the version store.

  • Unbind:

    Removes a project/solution from source control on a per-connection basis.

  • Connect/Disconnect:

    Toggles connected or offline state of the controlled solution, which is covered in Area 3. For more information, see Test Area 3: Check Out/Undo Checkout.

Command Menu Access

The following Visual Studio integrated development environment menu path is used in the test cases.

Change Source Control:File, Source Control, Change Source Control.

Test Cases

The following are specific test cases for the Change Source Control command test area.

Case 5a: Bind

Bind allows the user to add source code control info to the selected projects and solutions. The user is typically prompted to identify a project in source control to which these are to be added. The user may not create a new project in source control as part of this operation (contrast with Add to Source Control).

Action Test Steps Expected Results to Verify
Bind to empty location 1. Create a project.
2. Add the solution to source control.
3. Open Change Source Control dialog box (File, Source Control, Change Source Control).
4. Click Unbind.
5. Accept warning dialog box if it appears.
6. Select all items.
7. Click Bind.
8. Browse to an empty location in a source control store.
9. Click OK to close the Change Source Control dialog box.
10. Click Continue with these bindings in confirmation dialog box.
11. Click OK in the warning dialog box if it appears.
12. Check in everything. If this step succeeds, continue to next step.
13. Open solution from source control to a new location.
Result from Step 12:

Solution and project are bound to and written to the new target in the version store.

Solution and project files are checked in.

Version store project hierarchy matches folder hierarchy of the project on disk.

Result from Step 13:

All project items are downloaded.
Bind to location that is in sync with client 1. Create a project.
2. Add the solution to source control.
3. Create a duplicate of the solution and project in the version store (Share and Branch if using Visual SourceSafe).
4. Open Change Source Control dialog box (File, Source Control, Change Source Control).
5. Unbind All.
6. Click OK to close Change Source Control dialog box.
7. Reopen Change Source Control dialog box.
8. Select all.
9. Click Bind.
10. Browse to the branched location of the solution and project (from step 3)
11. Click OK to close the Change Source Control dialog box.
12. Get Latest recursively for all items.
File content after the get is the same as before the get.
Bind to location that is out of sync with client 1. Create a project.
2. Add the solution to source control.
3. Create a duplicate of the solution and project in the version store (Share and Branch if using Visual SourceSafe).
4. Modify files in the branched project in the version store.
5. Open Change Source Control dialog box (File, Source Control, Change Source Control).
6. Unbind all.
7. Click OK to close Change Source Control dialog box.
8. Reopen Change Source Control dialog box.
9. Select all.
10. Click Bind.
11. Browse to branched location for solution and project.
12. Click OK to close the Change Source Control dialog box.
13. Accept Warning dialog box if it appears.
14. Get Latest recursive for all items.
Files that were modified in Step 4 are also modified locally.
Bind solution that was never under source control 1. Create an empty folder in source control.
2. Create a client project.
3. Open Change Source Control dialog box (File, Source Control, Change Source Control).
4. Bind the solution to empty location in source control.
5. Click OK to close the Change Source Control dialog box.
6. Click Continue with these bindings in confirmation dialog box.
7. Click OK in the warning dialog box if it appears.
Solution is added to source control.

Solution and project are checked out.
Cancel Bind 1. Create a project.
2. Add the solution to source control.
3. Open the Change Source Control dialog box.
4. Unbind All.
5. Click OK button to close the dialog box. If this step succeeds, continue to next step.
6. Reopen the Change Source Control dialog box.
7. Bind to unrelated location.
8. Click Cancel.
Result from Step 5:

The solution is no longer under source control

Result from Step 8:

Solution is still NOT under source control.

Case 5b: Unbind

Unbind removes source code control info from projects and their solution. The affected projects and solution are based on a mix of user selection and how the items were added to source control.

Action Test Steps Expected Results to Verify
Unbind solution containing one File System or local IIS Web project and one client project 1. Create a File System or local IIS Web project.
2. Add the solution to source control.
3. Add a new client project to the solution.
4. Accept Check Out of the solution if prompted.
5. Open the Change Source Control dialog box.
6. Click Unbind.
7. Click OK to close the dialog box.
8. Attempt to check out solution, project, solution items, project items.
Solution and projects are NOT under source control.

Source Control menu commands do not appear.
Cancel Unbind 1. Create a project.
2. Add the solution to source control.
3. Open the Change Source Control dialog box.
4. Click Unbind all.
5. Click Cancel.
Solution is under source control.

Case 5c: Rebind

Rebind is simply a combination of unbind and bind—the process of rebinding a project/solution that was previously under source control and was unbound.

Action Test Steps Expected Results to Verify
Rebind solution and projects without closing the Change Source Control dialog box 1. Create a project.
2. Add the solution to source control.
3. Open the Change Source Control dialog box.
4. Click Unbind.
5. Select all rows.
6. Click Bind.
7. Click OK to close the Change Source Control dialog box.
8. Accept checkout if prompted.
Solution and project are under source control.
Rebind project only without closing Change Source Control dialog box 1. Create a project.
2. Add only the project to source control using (File->Source Control->Add Selected Projects to Source Control.
3. Open the Change Source Control dialog box.
4. Unbind only the project.
5. Bind only the project.
Solution remains uncontrolled.

Project remains controlled.
Rebind solution only without closing Change Source Control dialog box 1. Create a project.
2. Add only the solution to source control using (File, Source Control, Add Selected Projects to Source Control.
3. Open the Change Source Control dialog box.
4. Unbind only the solution (Do not close Change Source Control dialog box.)
5. Bind only the solution.
6. Click OK to close the dialog box.
7. Check out solution and solution items (if any.)
Solution remains controlled.

Project remains uncontrolled.
Rebind solution/project only when in same directory 1. Create a project.
2. Add only the project to source control using (File, Source Control, Add Selected Projects to Source Control.
3. Close the solution.
4. Create a new solution with at least two projects.
5. Add the solution to source control.
6. Add the project created in Step 1 from source control.
7. Accept the checkout of the solution if prompted.
8. Check in the entire solution.
9. Open the Change Source Control dialog box.
10. Select the added project (from Step 6) and click Unbind.
11. Click OK to close the dialog box.
12. Accept the checkout if prompted.
13. Reopen Change Source Control dialog box.
14. Select the added project (from Step 6) and click Bind.
15. Select the original location.
Solution and projects remain controlled.

See Also

Test Guide for Source Control Plug-ins