TS 68 Mercurial Sanity

Revision as of 17:39, 5 November 2009 by Admin (Talk | contribs)
(diff) ← Older revision | Current revision (diff) | Newer revision → (diff)

NetBeans Mercurial Sanity Test

Author: Daniel Krezelok
Version: 1.0.0
Last update: 20.08.2009
Introduction: Testcases for sanity testing of the Mercurial

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. Project import
    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 Hg 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. Now context commands on this project root in "Projects" view shouldn't contain "Initialize Repository..." action. 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.
  3. Disabled Initialize Repository
    1. Switch to Files view and ensure that nothing is selected
    2. Invoke Team | Mercurialfrom main menu.
    • EXPECTED RESULT: The menu option Initialize Repository should be disabled.

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
    • Setup: Steps from previous test case are required.
    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: 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
    1. Switch to "Projects" view and select project root.
    2. Invoke Mercurial | Show History popup menu action.
    • EXPECTED RESULT: "MercurialHistory" 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" checkbox.
  4. 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.
  5. Summary Revision entry actions
    1. Select any revision and invoke popup menu.
    • EXPECTED RESULT: Verify that menu has two entries - "Diff to Prevoious Revision" and "Backout...". Behavior of both actions was decribed already.
  6. 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 decribed already.
  7. 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.
  8. Diff revision actions
    1. Select any revision entry and invoke popup menu.
    • EXPECTED RESULT: "Backout..." and "List Options" actions should be available.
  9. 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.

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
    • Comments: This test allows you to specify the committer of a changeset created when running commit.
    • Setup: Follow steps from "Invoking Mercurial Options" test case.
    1. Enter text into the field. It should be something like: Padraig O'Briain <padraig.obriain@sun.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.
    • {{result|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
    • Comments: This test case is needed only if the Mercurial executable is not in the PATH variable and NetBeans is unable to locate it.
    • Setup: Follow steps from "Invoking Mercurial Options" test case.
    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
    • Setup: Follow steps from "Invoking Mercurial Options" test case.
    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 Versioning
  5. Manage Extensions
    • Comments: This test case allows one to specify Mercurial extensions to be loaded
    • Setup: Follow steps from "Invoking Mercurial Options" test case.
    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. (It is necessary to have View
  7. Creating .orig files after Revert Modifications
    • Setup: Follow steps from "Invoking Mercurial Options" test case.
    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.

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