TS 74 HG

Mercurial Support Test Specification for NetBeans 7.4

Author: Martin Kanak
Version: 1.0
Last update: 8.7.2013
Introduction: Mercurial open source tool is one of the supported version control systems in the IDE. This document describes how mercurial profile for NetBeans Mercurial Support module should be tested in order to know whether all of its functionality work correctly.
Comments: This document is heavily based on TS_72_HG which is now obsolete.

IMPORTANT Since 6.8 the scanning of project takes place after a Hg 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 Hg task is finished

Contents


Test suite: Creating new project

Purpose: The goal of this suite is to create new project and create its Mercurial repository.
Setup: No setup is necessary.

  1. Initialize new repository
    1. Invoke File | New Project... from main menu.
    2. "New Project" wizard shows up. Choose e.g "Java | 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 | Mercurial | Initialize Repository... from main menu.
    6. The mercurial output tab should list the files to be added to the "Mercurial" tab.
    7. Switch to Files tab and confirm that private directory is excluded, i.e. grayed out.
    8. From the context menu of the project invoke Mercurial | Status. Seven files, build.xml, manifest.mf, build-impl.xml, genfiles.properties, project.properties, project.xml and Main.java should be listed as Locally New.
    9. Invoke Diff All icon from status window. The Diff window should be displayed with a combo box to allow you to inspect the differences for any of the files.
    10. From the context menu of the project invoke Mercurial | Commit.... Specify a commit message and press Commit button.
    • EXPECTED RESULT: In "Output" tab verify that "Initialize" and "Commit" command finished successfully. Mercurial actions should be available.
  2. Clone project
    1. With some item in the project selected invoke Team | Clone <ProjectName>, where <ProjectName> is the name of the project.
    • EXPECTED RESULT: In "Output" tab verify that "Clone" command finished successfully. The cloned project should be set as the main project.


Test suite: Standard development of project

Purpose: This suite tests the most often used commands of typical Mercurial user.
Setup: No setup is necessary except steps from previous test suite. This work should be done in the cloned project unless other specified.

  1. "Mercurial" tab
    1. Invoke Team | Show Changes from main menu.
    • EXPECTED RESULT: Verify that in "Mercurial" tab is opened.
  2. Update action
    1. Switch to "Files" view.
    2. Delete "Main.java".
    3. Invoke Team | Update... main menu action on project root
    4. New dialog appears, check the checkbox "Do a Forced Update - Any local changes to this Repository will be lost" in "Options" and press Update in following dialog.
    5. Confirm your decision in the next dialog and press OK button.
    • EXPECTED RESULT: Verify that "Main.java" is in "Projects" view again and in "Output" tab there is following message:
      1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  3. 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.
  4. File differences
    1. Switch off View | Show Diff Sidebar option from main menu.
    2. Switch on View | Show Diff Sidebar option from main menu. Diff column should be shown in the left of side of editor.
    3. Select this file.
    4. Invoke Team | Diff | Diff to Base 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.
  5. 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 root of the project and invoke Team | Show Changes from main menu.
    4. Files should be listed in "Mercurial" tab - "Main.java" and "NewClass.java".
    5. Select the root of the project and invoke Mercurial | Diff | Diff to Base 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 "Mercurial" tab - it should give the same result as step 5 of this case. Also verify that "Commit" icon behave is the same in "Diff" tab and "Mercurial" tab.
  6. Files differences in commit dialog
    1. Select the project root and invoke Team | Show Changes from main menu.
    2. Files should be listed in "Mercurial" tab - "Main.java" and "NewClass.java".
    3. In "Mercurial" tab push "Commit All" icon
    4. In the commit dialog, which appears, double click on e.g. "Main.java"
    • EXPECTED RESULT: New diff tab in commit dialog is displayed. Verify functionality of "UP" and "DOWN" arrows. (Arrows navigate among all differences in processed file). Verify results displayed in both "Graphical" and "Textual" representation of Diff tab.
  7. Mercurial tab action
    1. Select the root of the project and invoke Mercurial | Show Changes popup menu action.
    2. There should be icons with tooltips "Refresh Status", "Diff All", "Update All" and "Commit All".
    • EXPECTED RESULT: Verify the functionality of "Mercurial" tab actions. "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 selected files from the repository. "Commit All" - enables to commit local changes to the repository.
  8. Open file from "Mercurial" tab
    1. Close "NewClass.java" from editor.
    2. Switch to "Mercurial" tab and invoke Open popup menu action on "NewClass.java" record.
    • EXPECTED RESULT: Verify that file is opened into editor.
  9. Commit files/folders
    1. Switch to "Mercurial" window.
    2. Push "Commit all" icon.
    3. "Commit" dialog shows up. It should contain two files: "Main.java", "NewClass.java". Enter some commit message and push Commit button.
    • EXPECTED RESULT: Verify that blue and green annotations of the files disappear. Files should disappear from "Mercurial" tab immediately too.
  10. 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.
    4. Select desired output file for patch and confirm the dialog.
    • EXPECTED RESULT: Patch should be created in your chosen file.
  11. Applying patch
    1. Switch to original project - revert changes.
    2. Invoke Team | Patches | Apply Diff Patch... from main menu.
    3. Select patch file created in previous step and press Patch.
    4. 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.
  12. Create conflict
    1. Modify "Main.java" file and save it.
    2. Invoke Team | Mercurial | Clone Other... from main menu and setup the same parameters "Repository URL" for the initial clone - used in test suite Creating new project - test case - "Project import".
    3. In the 2nd step of "Clone Other..." wizard leave all values. Push "Next" button.
    4. Choose "Parent Directory" and "Clone Name" as desired (Clone Name - should not exist).
    5. Open the same project, modify "Main.java" class at the same line as in previous test suite, and commit it and invoke Mercurial | Share | Push Other main menu action.
    6. In upcoming dialog specify "Repository URL" - for the original project location. (It can be found out by "Project Properties" popup menu action invoked on project root - "Project Folder" field)
    • EXPECTED RESULT: "Confirm Push with Local Modifications" dialog should be displayed. Answer "YES". Path to "Main.java" file should be indicated with red badges. This file should change its color to red too.
  13. Resolve conflict
    1. Invoke Mercurial | Resolve conflicts popup menu action on "Main.java" node.
    2. Merging tool must get opened in editor area highlighting the line with conflict. Left pane should read "Working File", right pane "Remote File" and bottom should read "Merge Result".
    3. Select left modification (the working one) and push Accept button above its pane.
    4. 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 data node should change back to "Main.java" and should have appropriate badge (blue badges for path). In addition, the merge tool must be closed.
  14. Conflict Resolved
    1. Do all steps - "Create conflict" test case.
    2. Invoke Mercurial | Status on project root.
    3. From within editor resolve manually all conflict by editing the "Main.java" file and save the file.
    4. Invoke Mark as Resolved popup menu action on "Main.java" node from "Mercurial" tab.
    • EXPECTED RESULT: The data node should change back to "Main.java" and should have appropriate badge (blue badges for path).
  15. 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 Yes in follow-up question dialog.
    4. File should disappear from all explorer views. It should appear in "Mercurial" tab with "Locally Removed" status.
    5. Select "NewClass.java" in "Status" window and invoke Commit...
    6. "Commit" dialog shows up. Fill commit message and push Commit.
    • EXPECTED RESULT: File "NewClass.java" should disappear from all explorer views, and from "Mercurial" tab.
  16. Delete locally new file
    1. Switch to "Projects" view, invoke Mercurial | Status and expand "xx.yy" package node.
    2. Create new Java class "NewClass1.java" in the package "xx.yy".
    3. Invoke Delete popup menu action from within "Mercurial" tab on "NewClass1.java" file node.
    4. Confirm your decision by clicking OK in follow-up question dialog.
    • EXPECTED RESULT: File "NewClass1.java" should disappear from all explorer views, and from "Mercurial" tab.
  17. Exclude file from commit
    1. Create "JFrame" in "xx.yy" package.
    2. Invoke Mercurial | Commit... on this JFrame in "Projects" view.
    3. "Commit" dialog should be displayed with these JFrame files. Change the "Commit Action" to "Exclude from Commit" for both files.
    4. "Commit" button should be disabled.
    5. Invoke Mercurial | Status action on the project root.
    6. From within "Mercurial" tab select both files of newly created JFrame and invoke Exclude from commit popup menu action.
    • EXPECTED RESULT: Both 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 "Mercurial" tab and performing Include in Commit must return file to "committing" status.
  18. Ignore file
    1. Create new Java class "NewClass2" into "xx.yy" package.
    2. Select this Java file and invoke Mercurial | Toggle Ignore.
    • EXPECTED RESULT: "NewClass2.java" should change its color to gray with [[[Ignored | [Ignored]] annotations in all explorer views and it should not appear in "Status" output or "Commit" dialog. Verify externally that file has been added to .hgignore in project directory
  19. Unignore file
    1. Select "NewClass2.java" in "Projects" view and invoke Mercurial | Toggle Ignore popup menu action.
    2. "Status" output should contain "NewClass2.java (Locally New)" files. 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 "Status" output. Font color of "NewClass2.java" file is black now. Externally verify that the file is removed from .hgignore in project directory.
  20. Reverting modifications 1
    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" and invoke Mercurial | Revert Modifications
    6. "Revert Modifications" dialog should show up. Accept the latest revision in the combo box.
    7. Push the Revert button.
    • EXPECTED RESULT: All changes should be reverted. Indicating badges should disappear. "NewClass2.java" file should not be listed in "Status" window.
  21. Reverting modifications 2
    1. Open "NewClass2.java" to editor.
    2. Modify the file in some way and Save the file. File name color should change to blue, verify the path indicating blue badges.
    3. In Status window select "NewClass2.java" and invoke Revert Modifications from context menu.
    4. "Revert Modifications" dialog should show up. Accept the latest revision in the combo box.
    5. Push the Revert button.
    • EXPECTED RESULT: All changes should be reverted. Indicating badges should disappear. "NewClass2.java" file should not be listed in "Status" window.
  22. Reverting modifications 3
    1. Select "xx.yy" package and invoke Mercurial | Revert Modifications.
    2. "Revert Modifications" dialog should show up. Accept the first revision in the combo box.
    3. Push the Revert button.
    • EXPECTED RESULT: The file "NewClass2.java" should be Locally Removed and should disappear from Project view.
  23. Reverting modifications 4
    1. In Status window select "NewClass2.java" and invoke Revert Delete from context menu.
    2. "Revert Modifications" dialog should show up. Accept the latest revision in the combo box.
    3. Push the Revert button.
    • EXPECTED RESULT: The file "NewClass2.java" should disappear from "Status Window" and should appear in Project view.
  24. Actions in Projects view
    1. Add new package "aa" and new "Interface.java"
    2. Add new package "aa.bb" and new "NewClass.java"
    3. Invoke Mercurial | Commit... on "aa" package.
    4. Commit dialog shows up. There should be "Interface.java" listed in commit dialog. Push "Commit" button.
    5. Make sure that only "Interface.java" was added.
    • EXPECTED RESULT: Mercurial actions invoked on packages "Projects" view shouldn't be performed recursively. Make sure that Diff, and Revert Modifications work correctly.
  25. Refactoring
    1. Select "Main.java" node and invoke Refactor | Rename... popup menu action on it.
    2. Enter new name for it and push "Next" button. Special window shows up, push Refactor.
    3. File with new name should be listed in "Mercuial" view as "[Copied]" and old one "[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 "Next" button. Special window shows up, push "Refactor".
    7. Make sure that all refactored nodes with new name are marked as "[Copied | Copied]" (for directories only "[New]").
    • EXPECTED RESULT: Push Commit make sure that file nodes disappear. And all files/directories were committed as well.


Test suite: Mercurial Properties

Purpose: This suite tests editing of Mercurial properties for projects.
Setup: Mercurial versioned project needs to be selected.

  1. Opening Mercurial Properties Editor
    1. Select any Mercurial versioned file in "Projects" view and invoke Mercurial | Properties... from its popup menu.
    • EXPECTED RESULT: New window labeled "Hg Properties Editor" should open in the middle of your screen. Verify that there is a table with columns "Name" and "Value" and a text area with label "Property Value:" are present. The table should have three rows labeled "default-pull", "default-push" and "username"
  2. Changing properties
    1. Select the "username" row.
    2. Type something into the "Property Value" text area.
    3. Select any other row in the table.
    • EXPECTED RESULT: Verify that "Value" column of the "username" row was changed to the text you typed in step 2. Verify also externally that there is file <project_home>/.hg/.hgrc and three properties from previous dialog are there.


Test suite: Work on shared project

Purpose: This suite tests actions in standard workflow on shared project.
Setup: Initialize a new mercurial project (referred to as 'original') and create its clone (referred to as 'clone').

  1. Show Out
    1. Add a new "NewClass.java" to the clone and modify "Main.java".
    2. Commit both files to the clone.
    3. Select the clone root and invoke Mercurial | Show Out popup menu action.
    4. New tab labeled "Mercurial Out - <project_name>" is opened in editor. Push the "Search" button.
    • EXPECTED RESULT: Verify that both files are listed (in fact "NewClass.java" is present twice as it was added).
  2. Push to Default
    1. Select the clone root and invoke Team | Share | Push to - default main menu action.
    • EXPECTED RESULT: Verify that the "NewClass.java" file was added to the original project and "Main.java" reflects changes made to the same file in clone.
  3. Show Incomming
    1. In original project, delete the "NewClass.java", make changes to "Main.java" and commit it.
    2. Select root of clone and invoke Mercurial | Show Incomming popup menu action.
    3. New tab labeled "Mercurial Incomming - <project_name>" is opened in editor. Push the "Search" button.
    • EXPECTED RESULT: Verify that both files are listed (in fact "NewClass.java" is present twice as it was removed).
  4. Pull from Default
    1. Select the clone root and invoke Team | Share | Pull from - default main menu action.
    • EXPECTED RESULT: Verify that the "NewClass.java" file was removed from the clone and "Main.java" reflects changes made to the same file in original.
  5. Merge
    1. Add a new "Original.java" file to the original and commit it.
    2. Add a new "Clone.java" file to the clone and commit it.
    3. Select clone root and invoke Team | Share | Push to - default main menu action.
    4. A warning dialog appears reading that you have to perform Pull and Merge to be able to commit.
    5. Select clone root and invoke Team | Share | Pull from - default main menu action.
    6. Dialog asking whether you want to merge changes appears. Push "No" button.
    7. Select clone root and invoke Team | Merge | Merge Changes main menu action and proceed merging the changes using merge tool defined in hgrc. Note that the tool would be executed if you had pressed "Yes" in preceding dialog.
    • EXPECTED RESULT: Verify that in Output tab there is:
      1 files updated, 0 files merged, 0 files removed, 0 files unresolved
      and that the "Original.java" is now present in the clone as well. Verify that you are able to commit and push changes to the original now.
  6. Fetch
    1. Modify some line in Original.java" in original and commit it.
    2. Modify the same line in Original.java" in clone differently and commit it.
    3. Select clone root and invoke Team | Fetch main menu action and proceed merging the changes using merge tool defined in hgrc.
    • EXPECTED RESULT: The Fetch command should do the same as Pull, Update and Merge, ie. the result should be the same as in previous test case but using only one step.


Test suite: Recover from erroneous commits

Purpose: This suite tests actions that can be used to recover from erroneous commits.
Setup: Initialize a new mercurial project.

  1. Backout
    1. Do some changes to the project (eg. modify "Main.java" somewhere) and commit it.
    2. Repeat previous step three times.
    3. Select "Main.java" and invoke Team | Recover | Backout... main menu action.
    4. Select the third revision from the "Choose from Revisions:" combobox and push "Backout" button.
    5. Dialog informing that backout was proceeded and now merge is required appears. Push "Yes" button.
    6. "Main.java" should be marked as modified after the merge, commit the changes.
    • EXPECTED RESULT: Verify that "Main.java" does not contain changes made in revision 3 and that it is recorded in history.
  2. Rollback
    1. Select project root and invoke Mercurial | Show History popup menu action and push "Search" button. Remember the last revision number.
    2. Select "Main.java" and invoke Team | Recover | Rollback main menu action.
    3. A warning dialog appears and asks whether you are sure you want to rollback last revision in repository as there is no way to recover it afterwards. Push "Yes" button.
    4. After performing the rollback, another dialog appears asking whether you want to update your working copy. Push "No" button.
    5. Select project root and invoke Mercurial | Show History popup menu action and push "Search" button again.
    • EXPECTED RESULT: Verify that the last revision is no longer in history as it was rolled back. Verify also that invoking rollback on the same project won't do anything until there is new revision in your repository.
  3. Strip
    1. Select project root and invoke Mercurial | Show History popup menu action and push "Search" button. Remember the number of revisions.
    2. Select project root and invoke Mercurial | Recover | Strip... main menu action.
    3. In "Choose from Revision:" combobox select the last but one revision and then push "Strip" button.
    4. Switch to "Mercurial History - <project_name>" tab and push the "Search" button again.
    • {{result|EXPECTED RESULT: Verify that last two revisions that were present in step 1 of this scenario are no longer there as they were stripped from repository.
  4. Verify
    1. Select project root and invoke Mercurial | Recover | Verify main menu action.
    • EXPECTED RESULT: Verify that last that in appropriate OUTPUT tab there is a result of verify action.


Test suite: Archeology

Purpose: This suite tests "archeology" searching with various criteria.
Setup: No setup is necessary.
Note: Annotations will disappear after any action is invoked through them.

  1. Annotations
    1. Select "Main.java" node and invoke Mercurial | Show Annotations popup menu action.
    2. "Annotations" column and "Stripes" should be displayed around the editor area of this file.
    3. Select desired line (with revision e.g. "12").
    4. All lines with revision ("12") should be colored blue in "annotations" column. "Stripes" should show navigations to this revision too.
    5. Move mouse pointer over "Revision" column and invoke popup menu.
    • EXPECTED RESULT: There should be Diff 12 to 11, Revert Modifications... and Close Annotations actions listed in popup menu.
  2. Annotations actions
    1. Choose Diff... action.
    2. "Diff" tab should be opened into the editor for specified revisions.
    3. Choose Revert Modifications... action.
    4. This action should show "Revert Modifications" dialog.
    5. Choose Close Annotations action.
    6. This action should hide annotation column and stripes too.
    • EXPECTED RESULT: Verify functionality on various revisions and navigations with the use of "Stripes".
  3. Show History - single file
    1. Switch to "Projects" view and select "Main.java" file.
    2. Invoke Mercurial | Show History popup menu action.
    • EXPECTED RESULT: "Mercurial History" tab for this project should be displayed in editor area. Verify that there are NO text fields labeled "Message, "username", "From:" and "To:" and a "Search" button in upper part of this tab. There should be "Summary" / "Diff" togglebutton, two difference navigating arrows, "Show merges" and "Show All Change Paths" checkboxes. The list of changesets should be displayed automatically.
  4. Show History - GUI Form
    1. Switch to "Projects" view and "JFrame" from "xx.yy" package.
    2. Invoke Mercurial | Show History popup menu action.
    • EXPECTED RESULT: "Mercurial History" tab for this project should be displayed in editor area. Verify that there are NO text fields labeled "Message, "username", "From:" and "To:" and a "Search" button in upper part of this tab. There should be "Summary" / "Diff" togglebutton, two difference navigating arrows, "Show merges" and "Show All Change Paths" checkboxes. The list of changesets should be displayed automatically.
  5. Show History - Show All Change Path
    1. Switch to "Projects" view and select "Main.java" file.
    2. Invoke Mercurial | Show History popup menu action.
    3. Check "Show All Change Paths" check box, expand criteria panel (bold down arrow) and push Search button.
    • EXPECTED RESULT: History of "Main" file should be listed. Now the extra capital letter should be listed next to the "Path" of the file - A for added file or M for modified in appropriate change set respectively. There should be listed files (Paths) for files that were committed with "Main" file either.
  6. Show History - Show Merges
    1. Switch to "Projects" view and select "Main.java" file.
    2. Invoke Mercurial | Show History popup menu action.
    3. Check "Show Merges" check box, expand criteria panel (bold down arrow) and push Search button.
    • EXPECTED RESULT: History of "Main" file should be listed. Make sure that merge change sets are listed. Close all tabs from editor area.
  7. Show History - project root
    1. Switch to "Projects" view and select project root.
    2. Invoke Mercurial | Show History popup menu action.
    • EXPECTED RESULT: "Mercurial History" tab for this project should be displayed in editor area. Verify that there are text fields labeled "Message, "username", "From:" and "To:" and a "Search" button in upper part of this tab and "Summary" / "Diff" togglebutton, two difference navigating arrows and "Show merges" and "Show All Change Paths" checkboxes.
  8. Summary Functionality
    1. Make sure that "Summary" toggle button is pushed.
    2. Push Search button.
    • EXPECTED RESULT: Verify that all revisions are listed in "Summary" output area. Every revision should contain "revision number", "changeset", "username", "date" and "commit message" and "Diff", "Revert" and "Export Diff" links. Besides this, every file entry should have a letter at the beginning of its row meaning what happened with it and should have its location there.
  9. Summary Revision entry actions
    1. Select any revision and invoke popup menu.
    • EXPECTED RESULT: Verify that menu has two entries (for "0" revision there is only "Backout...")- "Diff to Prevoious Revision" and "Backout...". Behavior of both actions was described already. Verify all actions provided.
  10. Summary File entry actions
    1. Select any file entry and invoke popup menu.
    • EXPECTED RESULT: Verify that menu has four entries - "Diff to Prevoious Revision", "Revert to <previous_revision>", "View" and "Export file Diff...". Behavior of all actions was described already. "View" action displays file into editor area in appropriate revision. Verify all actions provided.
  11. Diff Functionality
    1. Push "Diff" togglebutton.
    • EXPECTED RESULT: Table with columns "File Revision", "Time", "User" and Message should be displayed. You should be able to expand the first column nodes to see a list of all affected files in that revision.
  12. Diff revision actions
    1. Select any revision entry and invoke popup menu.
    • EXPECTED RESULT: "Backout..." and "List Options" actions should be available.
  13. Diff file actions
    1. Select any file entry and invoke popup menu.
    • EXPECTED RESULT: "Revert to <previous_revision>" and "List Options" actions should be available.
  14. Diff Arrows
    1. There should be two: UP and DOWN arrows displayed next to "Summary" and "Diff" buttons - make sure that they are enabled for "Diff" section only.
    • EXPECTED RESULT: Verify the functionality of each arrow. Make sure that each time arrow button is pushed current difference is moved forwards (backwards) accordingly.


Test suite: Mercurial Options

Purpose: This suite tests some configurable options of Mercurial module.
Setup: No setup is necessary.

  1. Invoking Mercurial Options
    1. Invoke Tools | Options from main menu.
    2. Push "Miscellaneous" button.
    3. Select "Versioning" tab and then "Mercurial" in Versioning Systems list.
    • EXPECTED RESULT: There should be six configurable options: "Mercurial User Name:", "Mercurial executable path:" with "Browse" button, Default Export Filename:" with "Browse" button, "Mercurial Status Labels" with "Add Variable.." button, "Manage Extensions" button and "On Revert Modifications save Locally Modified files to <file>.orig checkbox.
  2. Setting up Mercurial User Name
    1. Enter text into the field. It should be something like: User Name <user.name@example.com>. Choose a name which is different from that currently reported as user in Show History output. Press OK button.
    2. Make a change in some project and commit it. Ensure that username is not specified in the Mercurial properties for that project.
    • EXPECTED RESULT: The text specified should be stored as username in ui section of ~/.hgrc. Check Show History output to ensure that newly specified user name is used.
  3. Setting up Mercurial executable path
    1. Push the "Browse" button.
    2. "Browse for the Mercurial Executable" dialog appears. Use it to locate Mercurial executable and press "OK" button.
    • EXPECTED RESULT: After confirmation (using "OK") button, NetBeans should be able to work with Mercurial.
  4. Default Export FileName
    1. Enter the name of your default export file. It is expected that some of the formatting characters specified in the output of the command "hg help export" or push the "Browse" button to help you specify the directory.
    • EXPECTED RESULT: The name specified should appear in the dialog displayed by Team
  5. Manage Extensions
    1. Push the "Manage Extensions" button.
    2. In Mercurial Extensions Editor, specify the name of the extension to be loaded in Property Name field and the location from which it should be loaded if not from mercurial's path.
    • EXPECTED RESULT: The specified extensions should be specified in extensions section of ~/.hgrc.
  6. Manage Labels
    1. Push the "Add Variable..." button.
    2. New window labeled "Select Variables" appears. You can choose any from offered variables and press "OK" button.
    3. Every time you add a variable, it is added at the end of the "Status Label Format" text field. You can also edit it by yourself. Explanation of all variables is displayed in the "Select Variables" window.
    • EXPECTED RESULT: Verify that status labels are as defined in previous steps.
  7. Creating .orig files after Revert Modifications
    1. Uncheck the "On Revert Modifications save Locally Modified files to <file>.orig" checkbox and press "OK".
    2. Modify some file, save it and revert it following Reverting modifications 1 test case.
    • EXPECTED RESULT: Verify that no .orig file was created for that file. Verify that it is created, if you check mentioned checkbox in options again.


Test suite: Shelve Changes

Purpose: Tests whether Shelving feature works correctly.
Setup: Mercurial versioned project opened in the IDE.

  1. Shelve Changes
    1. Modify some file and save it, don't commit.
    2. Invoke Team | Shelve Changes | Shelve Changes... action from main menu.
    3. Verify that window "Shelve Changes" appears and contains field "Patch Name:" with default value "unfinishedChanges" and buttons "Shelve", "Cancel" and "Help".
    4. Keep default value and push Shelve.
    • EXPECTED RESULT: The file "unfinishedChanges.patch" appears and contains all changes that we made.
  2. Unshelve Changes
    1. Invoke Team | Shelve Changes | Unshelve Changes... action from main menu.
    2. Verify that window "Shelved Changes" appears and contains "Patches" combobox with "unfinishedChanges" selected, "Keep Patch File" checkbox and buttons "Unshelve", "Remove Patch", "Cancel" and "Help".
    3. Keep selection and push Unshelve Changes.
    4. Verify that the window "Question" with report "Patch applied successfully. View applied changes? (patched binary files will not be displayed)" appears.
    5. Confirm by pushing Yes button.
    • EXPECTED RESULT: All shelved changes from "unfinishedChanges" are correctly applied. New Diff tab showing applied changes is opened into editor.
  3. Unshelve "unfinishedChanges"
    1. Invoke Team | Shelve Changes | Shelve Changes... action from main menu.
    2. Keep default name and push Shelve.
    3. Invoke Team | Shelve Changes | Unshelve unfinishedChanges action from main menu.
    4. Verify that the window "Question" with report "Patch applied successfully. View applied changes? (patched binary files will not be displayed)" appears.
    5. Confirm by pushing Yes button.
    • EXPECTED RESULT: All shelved changes from "unfinishedChanges" are correctly applied. New Diff tab showing applied changes is opened into editor.
  4. Remove Patch
    1. Invoke Team | Shelve Changes | Shelve Changes... action from main menu.
    2. Keep default name and push Shelve.
    3. Invoke Team | Shelve Changes | Unshelve Changes... action from main menu.
    4. Push Remove Patch button.
    • EXPECTED RESULT: Patch with shelved changes is dropped.


Test suite: Branches and Tags

Purpose: Tests work with branches and tags.
Setup: Mercurial versioned project opened in the IDE. Versioning labels turned on.

  1. Create Branch
    1. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Branch | Create Branch... main menu action.
    2. "Create Branch" dialog shows up. Type mybranch into "Branch name" text field and push Create button.
    3. Modify "Main.java" by adding /*mybranch*/ comment on the first line of the file and save it.
    4. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Commit... main menu action.
    5. Enter some commit message and push Commit.
    • EXPECTED RESULT: Commit action is successfully finished and label next to the project root node reads mybranch as current branch. See "Output" to verify that Create Branch and Commit (to branch) actions were performed correctly.
  2. Switch Branch
    1. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Branch | Switch Branch... main menu action.
    2. "Switch Branch In Repository - <project name>" dialog shows up. Select the "default" branch and push Switch button
    • EXPECTED RESULT: Switch Branch action is successfully finished and label next to the project root node reads default as current branch. See "Output" to verify that Switch Branch action was performed correctly. Verify that the /*mybranch*/ comment from the first line of "Main.java" file disappeared.
  3. Diff between revisions
    1. Use the "default" and "mybranch" branch from previous testcases
    2. Modify some files in "default" branch and commit it
    3. Select the project root in "Project" view and invoke Team | Diff | Diff To Revision...
    4. New dialog appears, select "Local Changes to Revision" and push the 'Select button
    5. In the new dialog select some revision and push the Select button
    6. Push the Diff button
    • EXPECTED RESULT: New tab labeled "Project_Name" is displayed. All differencies between the revisions are highlighted.
  4. Close Branch
    1. Switch back to "mybranch" again.
    2. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Branch | Close Branch... main menu action.
    3. "Commit - closing branch "mybranch" - <project name>" dialog shows up. Enter some commit message and push Commit button.
    • EXPECTED RESULT: Close Branch action is successfully finished. See "Output" to verify that Close Branch action was performed correctly.
  5. Create New Tag
    1. Make some modifications and commit them.
    2. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Tag | Create Tag... main menu action.
    3. "Create Tag" dialog shows up. Enter some "Tag Name" and some commit "Message".
    4. Keep "parent of the working copy" revision selected and push Create button.
    • EXPECTED RESULT: Create Tag action is successfully finished. See "Output" to verify that Create Tag action was performed correctly. Open "Mercurial History" and verify that last commit added the new tag into .hgtags and the previous commit is tagged.
  6. Create Local Tag
    1. Make some modifications and commit them.
    2. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Tag | Create Tag... main menu action.
    3. "Create Tag" dialog shows up. Enter some "Tag Name".
    4. Tick the "Local Tag" checkbox.
    5. Keep "parent of the working copy" revision selected and push Create button.
    • EXPECTED RESULT: Create Tag action is successfully finished. No commit is performed. See "Output" to verify that Create Tag action was performed correctly. Open "Mercurial History" and verify that the last commit is tagged. Externally verify that the tag was added to the <project dir>/.hg/localtags file.
  7. Manage Tags - Update To
    1. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Tag | Manage Tags... main menu action.
    2. "Manage Tags" manager shows up with a list of tags and details about tagged revision for currently selected tag.
    3. From the list, select the tag created in "Create New Tag" test case and click "Update To" link.
    • EXPECTED RESULT: "Manage Tags" manager is closed and "Update Repository" dialog is shown instead with the tagged revision fixedly selected. Push Update button and verify the results of the update action.
  8. Manage Tags - Remove
    1. In the "Projects" view, select the root node of your Mercurial project and invoke Team | Tag | Manage Tags... main menu action.
    2. "Manage Tags" manager shows up with a list of tags and details about tagged revision for currently selected tag.
    3. From the list, select the tag created in "Create New Tag" test case and click "Remove" link.
    4. Enter some commit message in the following popup window and push Remove button.
    • EXPECTED RESULT: The selected tag disappers from the "Tags" list. See "Output" to verify that Remove Tag action was performed correctly. Open "Mercurial History" and verify that last commit zeroed the tag in .hgtags and that the afected commit is no longer tagged.
  9. Rebase Support
    1. Create new branch
    2. Modify some file and commit these changes
    3. Select the project root in "Project" view and invoke Team | Branch/Tag | Rebase...
    4. Rebase dialog appears, select "Current Revision to Arbitrary Revision" in "Rebase" combobox
    5. Push the Browse button and in the new dialog select the last revision of "default" branch, click on Select button
    6. Push Rebase button
    • EXPECTED RESULT: Verify that if you go to Team


Test suite: Queues

  1. Create Patch
    1. Modify "Main.java" file and save it.
    2. Invoke Team | Queues | Create Patch...
    3. "Create Patch" dialog appears, enter some "Patch Name" and "Patch Message", push the Create Patch button
    • EXPECTED RESULT: Patch is applied.
  2. Refresh Patch
    1. Modify "Main.java" file and save it
    2. Invoke Team | Queues | Refresh Patch
    3. "Refresh Patch" dialog appears, verify that the "Patch Name" is not possible to change, enter some "Patch Message", push the Refresh Patch button
    • EXPECTED RESULT: Changes/Patch are/is applied. Go to Team
  3. Pop all patches
    1. Create another patch, all patches are applied
    2. Invoke Team | Queues | Pop All Patches
    • EXPECTED RESULT: All patches are unapplied, all files are in state before patches.
  4. Push all patches
    1. Invoke Team | Queues | Push All Patches
    • EXPECTED RESULT: All patches are applied.
  5. Switching between queues
    1. Prerequisite: Must have two existing queues. One queue exists as default, so you must create another queue via commandline "hg qqueue -c nameOfQueue"
    2. Go to Team | Queues | Go To Patch...
    3. New dialog appears and there is a list of queues which exists (two queues: "patches","nameOfQueue"), "nameOfQueue" should be active, push Cancel button
    4. Create some patch
    5. Go to Team | Queues | Go To Patch... again and verify that the patch is in the active queue "nameOfQueue"
    6. In the list of queues select the inactive queue "patches" and push Go button
    7. Create another patch
    • EXPECTED RESULT: Verify that the new patch is in the "patches" queue.


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