TS 74 Subversion Sanity

Subversion Support Test Specification for NetBeans 7.4

Author: Martin Kanak
Version: 1.0
Lastupdate: 21.6.2013
Introduction: Testcases for sanity testing of the Subversion.

Subversion open source tool is one of the supported version control systems in the IDE. This document describes how SVN profile for NetBeans SVN Support module should be tested in order to know whether all of its functionality works correctly. All Test Suites should be performed with all access method types: "file:///", "svn://", "svn+ssh://", "http://" and "https://"

Comments: This document is heavily based on TS_71_Subversion_Sanity which is now obsolete.

IMPORTANT:
Since 6.8 the scanning of project takes place after a SVN task is finished. It is important to watch for the occurence of "Scanning in progress" in the bottom status bar. Please, follow these rules during testing:

  • Use repository with large amount of data. Also use actions that affect more files, so the scanning takes longer time and is easily noticeable
  • Always make sure, that the scanning is performed *after* a SVN task is finished

Since 7.0 the SVN client may run on three types of implementation. These are:

  • javahl - uses bundled or external SVN client with JavaHL library
  • svnkit - uses full java SVN client, integrated in 7.0
  • commandline - uses external SVN client via console commands

NetBeans chooses which type to use according to their availability. At first it tries javahl, then svnkit, then commandline. Because svnkit was integrated into IDE, it's always available and no external client is needed. Practically, it means that normal behavior is to check for javahl, and if it isn't avaliable, then use svnkit. For testing and debugging purposes, NetBeans can be forced to use desired type by starting IDE with parameter

-J-DsvnClientAdapterFactory=commandline

where argument is the name of desired type ("commandline" in example). Note, that if you force IDE to use type which isn't available, it will still checks for next available type lower in hierarchy and use that instead.
Since 7.2 the SVN version 1.7 is supported by all clients. Older checkouts can be upgraded via the IDE, svnkit client can work with both 1.6 and 1.7 checkouts.

ADDITIONAL NOTES:

  • SVN actions are selection sensitive.
  • Basic actions are accessible both from main menu and project explorer's context menu.
  • If SVN versioned content is selected, SVN actions are avaliable from main menu directly (Not just from submenu "Subversion").

Contents


Test suite: Setting up URL and content checkout

Purpose: This suite tests whether it is possible to access valid Subversion repository using different types of connections.
Comments: In "svn","svn+ssh", "http" and "https" connection types there is also "Save Username and Password" checkbox. If you check it, the username and password will be stored in a file (of course NOT in plain text).
Setup: If IDE runs with SVN client adapter on svnkit, no setup is needed, otherwise Subversion client version 1.5 or higher has to be installed on tested platform.

  1. svn://
    1. Invoke Team | Subversion | Checkout... action from main menu. "Checkout" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid repository with "svn://" connection type (e.g. "svn://localhost/svn").
    3. After setting up "svn://" connection type there should be visible "User", "Password" and "Proxy Configuration..." components.
    4. Setup username and password and verify functionality of "Save Username and Password" checkbox and "Proxy Configuration..." button.
    • EXPECTED RESULT: Push Next button. Next dialog of "Checkout" wizard should show up. Verify that "Browse..." buttons are shown for "Repository Folder(s)", "Repository Revision" and "Local Folder", and "Search" button for "Repository Revision" in this step of "Checkout" dialog. Use "Browse..." button next to "Repository Folder(s)" field to enter valid folder for checkout. Push Finish button. Verify the result of checkout action.
  2. svn+ssh://
    1. NOTE: On Windows platform, in case of not using svnkit, "plink" application should have been installed.
    2. Invoke Team | Subversion | Checkout... action from main menu. "Checkout" wizard shows up.
    3. Switch to "Repository URL" field and set it to your valid repository with "svn+ssh://" connection type (e.g. "svn+ssh://localhost/svn").
    4. After setting up "svn+ssh://" connection type, if IDE runs with SVN client on svnkit, then there should be visible "User", "Password", "Port Number", "Identity File", "Passphrase" and "Proxy Configuration..." components, otherwise there should be visible "Use External Tunnel" text field.
    5. Setup username, password, path to certificate and passphrase or setup valid external tunnel command. Verify functionality of "Save Username and Password" checkbox and "Proxy Configuration..." button.
    • EXPECTED RESULT: Push Next button. Next dialog of "Checkout" wizard should show up. Verify that "Browse..." buttons are shown for "Repository Folder(s)", "Repository Revision" and "Local Folder", and "Search" button for "Repository Revision" in this step of "Checkout" dialog. Use "Browse..." button next to "Repository Folder(s)" field to enter valid folder for checkout. Push Finish button. Verify the result of checkout action.
  3. file:///
    1. Invoke Team | Subversion | Checkout... action from main menu. "Checkout" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid local repository (e.g. "file:///svnrepo").
    • EXPECTED RESULT: Push Next button. Next dialog of "Checkout" wizard should show up. Verify that "Browse..." buttons are shown for "Repository Folder(s)", "Repository Revision" and "Local Folder", and "Search" button for "Repository Revision" in this step of "Checkout" dialog. Use "Browse..." button next to "Repository Folder(s)" field to enter valid folder for checkout. Push Finish button. Verify the result of checkout action.
  4. http://
    1. Invoke Team | Subversion | Checkout... action from main menu. "Checkout" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid repository with "http://" connection type (e.g. "http://localhost/svnrepo").
    3. After setting up "http://" connection type there should be visible "User", "Password" and "Proxy Configuration..." components.
    4. Setup username and password and verify functionality of "Save Username and Password" checkbox and "Proxy Configuration..." button.
    • EXPECTED RESULT: Push Next button. Next dialog of "Checkout" wizard should show up. Verify that "Browse..." buttons are shown for "Repository Folder(s)", "Repository Revision" and "Local Folder", and "Search" button for "Repository Revision" in this step of "Checkout" dialog. Use "Browse..." button next to "Repository Folder(s)" field to enter valid folder for checkout. Push Finish button. Verify the result of checkout action.
  5. https://
    1. Invoke Team | Subversion | Checkout... action from main menu. "Checkout" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid repository with "https://" connection type (e.g. "https://localhost/svnrepo").
    3. After setting up "https://" connection type there should be visible "User", "Password" and "Proxy Configuration..." components.
    4. Setup username, password, path to certificate and passphrase. Verify functionality of "Save Username and Password" checkbox and "Proxy Configuration..." button.
    • EXPECTED RESULT: Push Next button. You will be asked to accept the certificate. Next dialog of "Checkout" wizard should show up. Verify that "Browse" buttons are shown for "Repository Folder(s)", "Repository Revision" and "Local Folder", and "Search" button for "Repository Revision" in this step of "Checkout" dialog. Use "Browse..." button next to "Repository Folder(s)" field to enter valid folder for checkout. Push Finish button. Verify the result of checkout action.
  6. Relocate
    1. NOTE: You can relocate your project only to the same repository (same UUID) using different login or access method.
    2. Select project root and invoke Team | Subversion | Working Copy | Relocate... main menu action.
    3. New window with two noneditable text fields labeled "Working Copy" and "Current URL" and one editable text field labeled "New URL" appears.
    4. Edit the last mentioned text field, setup a new URL and push Relocate button.
    • EXPECTED RESULT: Switch to the "Output Tab". There should be message like
      ==[IDE]== Mar 11, 2011 1:16:23 PM Relocating... finished.
      indicating that the command was successful. Since now you are going to connect to the same repository as another user or via another access method.


Test suite: Importing new project

Purpose: The goal of this suite is to create new project and upload it to Subversion repository.
Setup: No setup is necessary.

  1. Project import
    1. Invoke File | New Project... from main menu.
    2. "New Project" wizard shows up. Choose e.g "Java" and "Java Application" and push Next button.
    3. Setup name of the project, project location as desired and push Finish button.
    4. Switch to "Projects" view and select the root of the project.
    5. Invoke Team | Subversion | Import into Repository... from main menu.
    6. "Import" wizard shows up.
    7. Setup "Repository URL" as desired and all necessary fields for chosen access method and push Next button. All displayed components depends on access method type - see Setting up URL.
    8. Push Browse... button. Verify that browsing through the repository is allowed. Verify also functionality of "Into a new Folder" button (it creates only virtual folders, nothing is changed in the repository).
    9. Enter some comment into "Specify the Message" field and push Next button.
    10. Third step of Import wizard shows up. Verify whether you can change values in "Commit Action" column (Add as Text, Add as Binary and Exclude from Commit).
    • EXPECTED RESULT: In "Output" tab verify whether "Import" command finished successfully. Now context commands on this project root in "Projects" view shouldn't contain "Import into Repository..." action. All sources should be imported and Subversion actions should be available.


Test suite: Standard development of project

Purpose: This suite tests the most often used commands of typical Subversion user.
Setup: No setup is necessary except steps from previous test suite.

  1. File modifying
    1. Select e.g. "Main.java" file, modify it.
    2. Insert brand-new line somewhere into the file.
    3. Delete some other line, but not directly next to the new line.
    4. Modify another line, but not directly next to the lines mentioned above, and save the file.
    • EXPECTED RESULT: The file "Main.java" must change its foreground color to blue.
  2. File differences
    1. Switch off View | Show Diff Sidebar option from main menu. Diff column marks should disappear.
    2. Switch on View | Show Diff Sidebar option from main menu. Diff column should be shown in the left of side of editor.
    3. Switch on View | Show Versioning Labels option from main menu. Labels should be shown in the Project Explorer window.
    4. Select this file.
    5. Invoke Team | Diff action from main menu.
    • EXPECTED RESULT: All three differences must be highlighted in a special window with both versions of the file. New line is green, removed line is red and modified one is blue. Verify UP and DOWN arrows, that should navigate among differences.
  3. Files/Folders differences
    1. Create new package "xx.yy" in this project.
    2. Create new Java class "NewClass" in package "xx.yy".
    3. Select the project root and invoke Team | Show Changes from main menu.
    4. Files should be listed in "Subversion" tab - "Main.java" as "Locally Modified", "NewClass.java" and also the new packages "xx" and "yy" should be displayed as "Locally New".
    5. Select the root of the project and invoke Subversion | Diff popup menu action.
    • EXPECTED RESULT: New tab labeled "Project_Name [Diff]" is displayed. Both files "Main.java" and "NewClass.java" should be contained in a table. Verify functionality of "UP" and "DOWN" arrows. (Arrows navigate among all differences in processed files). Then verify functionality of "Diff all" icon in "Subversion" tab - it should give the same result as step 5 of this case. Also verify that "Update" and "Commit" icons behave the same both in "Diff" tab and "Subversion" tab.
  4. Subversion tab action
    1. Select the root of the project and invoke Subversion | Show Changes popup menu action.
    2. There should be "Show Both Locally and Remotely Modified Files", "Show Locally Modified Files" and "Show Remotely Modified Files" toggle buttons and icons with tooltips "Refresh Status", "Diff All", "Update All" and "Commit All".
    • EXPECTED RESULT: Verify the functionality of "Subversion" tab actions. Setting "Show Both Locally and Remotely Modified Files" - displays both locally and remotely modified files, "Show Locally Modified Files" - displays only locally modified files and "Show Remotely Modified Files" - displays only remotely modified files. "Refresh Status" - refreshes the status of the selected files and folders. Files displayed in the Versioning window can be refreshed to reflect any changes that may have been made externally. "Diff All" - opens the Diff Viewer providing you with a side-by-side comparison of your local copies and the versions maintained in the repository. "Update All" - updates all files from the repository. "Commit All" - enables you to commit local changes to the repository.
  5. Open file from "Subversion" tab
    1. Close "NewClass.java" from editor.
    2. Switch to "Subversion" tab and invoke Open popup menu action on "NewClass.java" record.
    • EXPECTED RESULT: Verify that file is opened into editor.
  6. Commit files/folders
    1. Switch to "Subversion" tab.
    2. Push "Commit All" icon.
    3. "Commit dialog" shows up. It should contain two files: "Main.java", "NewClass.java", and two folders "xx" and "yy". Enter some commit message and push Commit button.
    • EXPECTED RESULT: Verify that blue badges disappeared. Files and folders/packages should disappear from "Subversion" tab immediately too.
  7. Creation of patch
    1. Modify "Main.java" file and save it.
    2. Modify "NewClass.java" file and save it.
    3. Select project root and invoke Team | Patches | Export Uncommitted Changes... from main menu. Select desired output file for patch and confirm the dialog.
    • EXPECTED RESULT: Patch should be created in your chosen file and opened into editor.
  8. Applying patch
    1. Switch to "Files" view and select project root.
    2. Invoke Team | Revert Modifications... from main menu. In shown dialog, select "Revert Local Changes" option and push Revert button.
    3. Make sure that all modified files are "up-to-date" now.
    4. Select project root and invoke Team | Patches | Apply Diff Patch... popup menu action. In shown file browser, select patch created in previous test case and push Patch button.
    5. Answer "Yes" in question dialog to confirm watching differences.
    • EXPECTED RESULT: Verify that new Diff tabs were opened into the editor for all patched files. Verify results displayed in both "Graphical" and "Textual" representation of Diff tabs.
  9. Create conflict
    1. Modify "Main.java" file at two separate lines and save it.
    2. Invoke Team | Checkout... from main menu and setup the parameters to checkout the same project, but into different "Local Folder".
    3. Open the checked out project, modify "Main.java" class at the same lines as in first step, and commit it.
    4. Return to previous project, select the project root and invoke Subversion | Update | Update with Dependencies popup menu action.
    • EXPECTED RESULT: "Warning" dialog should be displayed, press OK. Path to "Main.java" file should be indicated with red badges. This file should change its color to red too.
  10. Resolve conflict
    1. Invoke Subversion | Resolve Conflicts... popup menu action on "Main.java" node.
    2. Merging tool must get opened in editor area highlighting the lines with conflicts. Left pane should read "Local Working File", right pane "Remote file" and bottom should read "Result after merge".
    3. Select left modification (the working one) and push Accept & Next button above its pane.
    4. Make sure that colors changed to blue or green and the cursor (asterisk) moved to the next line of conflict.
    5. Push OK button. Question dialog shows up. There should be a message that not all conflicts were resolved. Push Cancel.
    6. Select left modification (the working one) and push Accept button above its pane.
    7. Make sure that colors changed to blue or green and "Unresolved" in top of the component says "0" conflicts. Push OK button and confirm your decision.
    • EXPECTED RESULT: The "Main.java" node should change back to normal and should have appropriate badge (blue badges for path). In addition, the merge tool must be closed.
  11. Conflict resolved
    1. Do all steps from Create conflict test case.
    2. Invoke Subversion | Show Changes on project root.
    3. From within editor resolve manually all conflicts by editing the "Main.java" file and save the file.
    4. Invoke Subversion | Resolve Conflicts... popup menu action on "Main.java" node from "Subversion" tab.
    • EXPECTED RESULT: Merging tool shouldn't be opened. The "Main.java" node should change back to normal and should have appropriate badge (blue badges for path).
  12. Delete file
    1. Switch to "Projects" view and expand "xx.yy" package node.
    2. Invoke Delete popup menu action on "NewClass.java" file node.
    3. Confirm your decision by clicking OK in follow-up question dialog.
    4. File should disappear from all explorer views. It should appear in "Subversion" tab with "Locally Deleted" status.
    5. Select "NewClass.java" in "Subversion" tab and invoke Revert Delete popup menu action.
    6. Push Revert in follow-up question dialog.
    7. File should appear in all of explorer views.
    8. Invoke Delete popup menu action on "NewClass.java" file node again.
    9. Confirm your decision by clicking OK in follow-up question dialog.
    10. Select "NewClass.java" in "Subversion" tab and invoke Commit... popup menu action.
    11. "Commit" dialog shows up. Fill commit message and push Commit.
    • EXPECTED RESULT: File "NewClass.java" should disappear from all explorer views, and from "Subversion" tab.
  13. Delete locally new file
    1. Switch to "Projects" view and invoke Subversion | Show Changes on project root.
    2. Create new java class "NewClass1.java" in the package "xx.yy".
    3. Invoke Delete popup menu action within "Subversion" tab on "NewClass1.java" file node.
    4. Confirm your decision by clicking Yes in follow-up question dialog.
    • EXPECTED RESULT: File "NewClass1.java" should disappear from all explorer views, and from "Subversion" tab.
  14. Delete Folder(s)
    1. Create new Java interface "NewInterface.java" in "xx.yy" package and commit it.
    2. Invoke Delete popup menu action on the "xx.yy" package node.
    3. Confirm your decision by clicking OK in follow-up question dialog.
    4. Select all deleted nodes in "Subversion" tab and invoke Revert Delete popup menu action.
    5. Confirm your decision by clicking Revert in follow-up question dialog.
    6. Package and its files should appear in all of explorer views.
    7. Repeat 2nd and 3rd step.
    8. On "Subversion" tab push Commit All button.
    • EXPECTED RESULT: Content of the package should disappear from all views.
  15. Project Deletion
    1. Create new project.
    2. Import this project into SVN repository. Select its root and invoke Subversion | Show Changes from main menu.
    3. Select project root node and invoke Delete popup menu action. (Confirm dialog and delete also sources)
    • EXPECTED RESULT: All files should appear in "Subversion" tab. These files should be in "Locally Deleted" status. Select all files in "Locally Deleted" state and invoke Revert Delete popup menu action. After successful action it should be possible to open this project again.
  16. Exclude file from commit
    1. Invoke Subversion | Show Changes action on the project root.
    2. Create new package "xx.zz" and create new "JFrame Form" in it.
    3. Switch to "Subversion" tab, there should be listed "xx", "zz", "NewJFrame.java" and "NewJFrame.form" files. Select all the files and invoke Commit....
    4. "Commit" dialog should be displayed with these JFrame files and packages. Change the "Commit Action" to "Exclude from Commit" for all files.
    5. "Commit" button should be disabled. Press Cancel.
    6. From within "Subversion" tab select all files of newly created JFrame and invoke Exclude from Commit popup menu action.
    • EXPECTED RESULT: All files have to be excluded from commit with no change of their statuses. "Include in Commit" action should be accessible in popup menu actions in "Subversion" tab and performing "Include in Commit" must return file to "committing" status.
  17. Ignore file
    1. Create new Java class "NewClass2.java" into "javaapplication" package.
    2. Select this Java file and invoke Team | Ignore from main menu.
    • EXPECTED RESULT: "NewClass2.java" should change its color to gray in all explorer views and it should disappear from "Subversion" tab. Its parent package should appear there instead marked as "Locally Modified". If you invoke diff on it, there should be property named "svn:ignore" with value "NewClass2.java".
  18. Ignore folders
    1. Create new package "newpackage" into "javaapplication" package.
    2. Select this "newpackage" package and invoke Subversion | Ignore popup menu action.
    • EXPECTED RESULT: "newpackage" should disappear from "Subversion" tab. "javaaplication" should be listed there instead. Invoke Diff popup menu action on it. There should be "svn:ignore" in the "Property" column of the table. In the "Locally Modified" part of the diff view there should be value "newpackage". Alternatively you can externally verify that ".svn" administrative directory of parent folder of "newpackage" package contains file "dir-props" listing "newpackage" package.
  19. Unignore file
    1. Select "NewClass2.java" in "Projects" view and invoke Subversion | Unignore popup menu action.
    2. "Subversion" tab should contain "NewClass2.java" file with "Locally New" status. Path to this should be indicated with blue badges.
    3. Select project root and invoke Team | Commit... action from main menu.
    4. "Commit" dialog shows up, enter some commit message and push Commit button.
    • EXPECTED RESULT: File should disappear from "Subversion" tab. Font color of "NewClass2.java" file is black now. Externally verify that ".svn" administrative directory of parent folder of "NewClass2.java" package doesn't contain this file listed in "dir-props".
  20. Reverting modifications
    1. Open "NewClass2.java" to editor.
    2. Insert brand-new line somewhere into the file.
    3. Delete some other line, but not directly next to the new line.
    4. Modify another line, but not directly next to the lines mentioned above and save the file. File name color should change to blue, verify the path indicating blue badges.
    5. Select "NewClass2.java" in "Projects" view and invoke Subversion | Revert Modifications popup menu action.
    6. "Revert Modifications" dialog should show up. There are three choices: "Revert Local Changes", "Revert Modifications from Single Commit" and "Revert Modifications from Previous Commits". "Revision" should be enabled for second choice. "Starting Revision" and "Ending Revision" revision should be enabled for third choice only. This dialog provide also the functionality of rollbacking changes. For each of these fields "Search..." button should be available. You can also check "Remove newly added Files and Folders" checkbox for all three choices. That would result in deleting any newly added files.
    7. Push the Revert button.
    • EXPECTED RESULT: All changes should be reverted. Indicating badges should disappear. "NewClass2.java" file should not be listed in "Subversion" tab.
  21. Actions in "Projects" view
    1. Add new package "aa" and new "NewInterface.java" into it.
    2. Add new package "aa.bb" and new "NewClass.java" into it.
    3. Invoke Subversion | Commit... on "aa" package.
    4. Commit dialog shows up. There should be "NewInterface.java", "aa" and "bb" listed in commit dialog. Push Commit button.
    5. Make sure that only "aa" and its files were added. Have a look for SVN URL in "Output" window.
    • EXPECTED RESULT: Subversion actions invoked on packages in "Projects" view shouldn't be performed recursively. Make sure that Update, Diff, Switch to Copy, Merge Changes, Export Diff Patch and Revert Modifications work correctly. In case of branching actions verify whether new files and folders are added/removed properly.
  22. Refactoring
    1. Select "Main.java" node and invoke Refactor | Rename... popup menu action on it.
    2. Enter new name for it and push Refactor.
    3. File with new name should be listed in "Subversion" view as "Locally Copied" and the old one as "Locally Deleted".
    4. Commit both files and verify whether new file inherited history by refactoring.
    5. Switch to "Files" view, select package "xx" and invoke Refactor | Rename... popup menu action on it.
    6. Enter new name "yz" for it and push Refactor button.
    7. Make sure that all refactored nodes with new name are marked as "Locally Copied" (for directories only "Locally Added").
    • EXPECTED RESULT: Push Commit, make sure that file nodes disappear and all files/directories were committed as well.


Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo