Test Area 3: Check Out/Undo Checkout
This source-control plug-in test area covers editing and reverting items from the version store via the Check Out and Undo Checkout commands.
Check Out: Marks an item in the version store as checked out, modifies the local copy to read/write.
Undo Checkout: Marks an item in the version store as checked in, reverts local copy to state before the check out (depending on options).
Command Menu Access
The following Visual Studio integrated development environment menu paths are used in the test cases.
Check Out:
File, Source Control, Check Out.
File, Check Out.
Shortcut Menu, Check Out.
Undo Checkout: File, Source Control, Undo Checkout.
Common Expected Behavior
After the check out operation, the target file(s) and/or folder(s) are marked as checked out in the version store.
The version store attributes the checkout to the correct user.
The time and date of the checkout are correct (per the user's settings).
Test Cases
The following are specific test cases for the Checkout/Undo Checkout test area.
Case 3a: Check Out
This section focuses on the operation of the check-out command.
Action |
Test Steps |
Expected Results to Verify |
---|---|---|
Check Out Exclusive (COE) a client project |
|
Check out occurs. |
Check Out Exclusive (COE) a File System or local IIS Web project |
|
Check out occurs. |
Check out solution items in a solution (new method for handling other files) |
|
Selected files are checked out. |
Check Out Local Version (if plug-in under test supports this feature) |
|
Local version of the file is checked out. Modifications by user 2 are not applied to User 1 file. |
Case 3b: Disconnected Check out
Operating in disconnected mode allows users some level of continued source control support when not attached directly to a version store. This is done by locally caching all relevant information about the enlisted solution and projects.
Exclusive check out operations can only occur while connected to the source control store. Shared check out operations can occur at any time, whether connected or disconnected. Therefore, when disconnected from the version store, only the Check Out Shared (COS) command is enabled. While disconnected, Undo Checkout is disabled because the old version cannot be retrieved to replace changes made by the user.
When the user reconnects to the version store, the checkout states of all of the enlisted solutions and projects are synchronized. This does the necessary updates to the store for the checkouts that the user has performed. Once the synchronization has happened, the user is able to continue working as normal (connected).
Expected Behavior
Cannot use Check Out Exclusively command while disconnected from the version store.
Cannot use Undo Checkout command while disconnected from the version store.
Shared Check Out command works.
Action |
Test Steps |
Expected Results to Verify |
---|---|---|
While disconnected, check out a file, then connect for syncing |
|
Common Expected Behavior |
Case 3c: Query Edit/Query Save (QEQS)
Items under source control are tracked for edits, changes, and saves to help users easily manage their files. When a controlled item that is "checked in" is edited, QEQS intercepts the attempted edit and asks the user if he wants to check out the file to edit it. Depending on Tools, Options settings, the user is either forced to check out the file in order to edit or may be allowed to edit a copy in memory and check out later. If the user's Tools, Options setting is not set to display the check out dialog box and to just check it out, then as the user makes his edit, the file automatically checks out, whenever possible.
Expected Behavior
After the check out operation, the target file(s) and/or folder(s) are marked as checked out in the version store.
The version store attributes the check out to the correct user.
The time and date of the check out are correct (per the user's settings).
The local copy of the target file or folder is writeable.
Action |
Test Steps |
Expected Results to Verify |
---|---|---|
Edit text file that is checked in |
|
Result of step 6: Check out for Edit dialog box appears. Result of step 7: The file is unchanged. Result of step 9: Check out for Edit dialog box appears. Result of step 10: You can edit the project file in memory. Result of step 11: On save, the Check out on save dialog box appears. |
Edit a solution file that is checked in |
Repeat the steps as described in previous test but instead of modifying a text file, modify solution by changing solution properties. |
Same as previous test |
Edit a project file that is checked in |
Repeat the steps as described in previous test but instead of modifying a text file, modify project by changing project properties. |
Same as previous test. |
Case 3d: Silent Check Out
This sub-area covers check out scenarios where the Check Out dialog box does not appear per user's Tools, Options, Source Control settings.
Expected Behavior
After the check out operation, the target file(s) and/or folder(s) are marked as checked out in the version store.
The version store attributes the check out to the correct user.
The time and date of the check out is correct (per the user's settings).
The local copy of the target file or folder is writeable.
Action |
Test Steps |
Expected Results to Verify |
---|---|---|
Silent checkout for a file |
|
File is checked out silently (no UI). |
Silent checkout for a project |
|
File is checked out silently (no UI). |
Case 3e: Undo Check Out
Undo Check Out is used to cancel a file's checked out status and avoid checking in changes made to the file.
Expected Behavior
The default is based upon the user's Check out Local Version setting. If the user has chosen to check out local version, then the default for undo checkout is to always revert to the version checked out.
Upon acceptance of the undo, the icons in Solution Explorer are updated for affected files and the item is removed from the Pending Checkins window.
Action |
Test Steps |
Expected Results to Verify |
---|---|---|
Undo Checkout of a single file that is checked out Exclusively |
|
Common Expected Behavior. |
Undo Checkout of a single file that is checked out Shared |
|
Common Expected Behavior. |
Undo Checkout of a project after adding file(s) to the project |
|
Added file is removed from the project in Solution Explorer. Project is no longer checked out. |
Undo Checkout of a project after deleting file(s) from the project |
|
Deleted file appears under the project in Solution Explorer. Project is no longer checked out. |