TS 72 Git

Git Support Test Specification for NetBeans 7.2

Author: Štěpán Žebra
Version: 1.0
Last update: 2.5.2012
Introduction: Git open source tool is one of the supported version control systems in the IDE. This document describes how Git support module should be tested in order to know whether all of its functionality works correctly.
Comments: This document is heavily based on TS_71_Git which is now obsolete.

Contents


Test suite: Creating new project

Purpose: Tests whether is it possible to initialize a new repository and clone from an existing repository.
Setup: IDE with activated Git module. Repositories configured for tested access methods, containing some NB projects.

  1. Initialize repository in a new project
    1. Invoke File | New Project... from main menu. "New Project" wizard shows up.
    2. In the first step of the wizard select "Java" category and "Java Application" project. Push Next > button.
    3. In the second step of the wizard enter "GitTestLocal" into the "Project Name" field and "gittestlocal.Main" into the "Create Main Class" field.
    4. Keep all other fields default and push Finish button.
    5. Invoke popup menu on the created project's root node in the "Projects" view. Select Versioning | Initialize Git Repository action. "Repository root path" dialog shows up.
    6. In the dialog, verify that correct path to the "GitTestLocal" project folder is specified in the "Root path" field and push OK button.
    • EXPECTED RESULT: Git repository is initialized in the "GitTestLocal" project folder. Git actions are now available from popup menu and main menu. Versioning states of project files are visualy represented as on attached pictures:
      Projects view Files view
  1. Clone using file:/// method
    1. Invoke Team | Git | Clone... from main menu. "Clone Repository" wizard shows up.
    2. In the first step of the wizard use Browse... button next to "Repository URL" field to find and select your local repository.
    3. Push Next > button. In the second step of the wizard check "master" branch.
    4. Push Next > button. In the third step of the wizard use Browse... button next to "Parent Directory" field to select a directory for your clone. Enter desired "Clone Name", verify values of "Checkout Branch" and "Remote Name".
    5. Push Finish button. Click Open Project in the following dialog.
    • EXPECTED RESULT: Repository is cloned and any valid NetBeans project from the repository is opened in "Projects" view. Git actions are now available from popup menu and main menu for those projects.
  2. Clone using http:// method
    1. Invoke Team | Git | Clone... from main menu. "Clone Repository" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid repository with "http://" connection type (e.g. "http://localhost/repo.git/").
    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.
    5. Push Next > button. Next step of "Clone Repository" wizard with "Select Remote Branches" field shows up. Select desired branch.
    6. Push Next > button to proceed to the third step. Set "Parent Directory" using Browse... button. Enter desired "Clone Name", verify values of "Checkout Branch" and "Remote Name".
    7. Push Finish button. Click Open Project in the following dialog.
    • EXPECTED RESULT: Repository is cloned and any valid NetBeans project from the repository is opened in "Projects" view. Git actions are now available from popup menu and main menu for those projects.
  3. Clone using https:// method
    1. TODO
    • EXPECTED RESULT: TODO
  4. Clone using ssh:// method
    1. Invoke Team | Git | Clone... from main menu. "Clone Repository" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid repository with "ssh://" connection type (e.g. "ssh://host.mycomcany.com/git/repo/").
    3. After setting up "ssh://" 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.
    5. Push Next > button. Click Yes to accept server fingerprint if pop-up dialog shows up. Next step of "Clone Repository" wizard with "Select Remote Branches" field shows up. Select desired branch.
    6. Push Next > button to proceed to the third step. Set "Parent Directory" using Browse... button. Enter desired "Clone Name", verify values of "Checkout Branch" and "Remote Name".
    7. Push Finish button. Click Open Project in the following dialog.
    • EXPECTED RESULT: Repository is cloned and any valid NetBeans project from the repository is opened in "Projects" view. Git actions are now available from popup menu and main menu for those projects.
  5. Clone using sftp:// method
    1. TODO
    • EXPECTED RESULT: TODO
  6. Clone using git:// method
    1. Invoke Team | Git | Clone... from main menu. "Clone Repository" wizard shows up.
    2. Switch to "Repository URL" field and set it to your valid repository with "git://" connection type (e.g. "git://localhost/repo.git/").
    3. Push Next > button. In the second step of the wizard check "master" branch.
    4. Push Next > button. In the third step of the wizard use Browse... button next to "Parent Directory" field to select a directory for your clone. Enter desired "Clone Name", verify values of "Checkout Branch" and "Remote Name".
    5. Push Finish button. Click Open Project in the following dialog.
    • EXPECTED RESULT: Repository is cloned and any valid NetBeans project from the repository is opened in "Projects" view. Git actions are now available from popup menu and main menu for those projects.

Test suite: Basic development

Purpose: Test all actions used during editing files - add, commit, diff, reset, revert, export patch, apply patch. Test correct behavior of editor and all views. Test functionality of Git, Diff and Conflicts Resolver window. Verify contents of Output window.
Setup: IDE with activated Git module. Opened "GitTestLocal" project from previous test suite. Initial commit must be performed on this project prior to start of the first test case.

  1. "Git" window
    1. Select the project root node in "Projects" view and invoke Git | Show Changes pop-up menu action.
    • EXPECTED RESULT: "Git" window is opened. Message
      <No Head/Working Tree Changes>
      should be shown there.
  2. "Output" window
    1. Select the project root node in "Projects" view and invoke Team | Open Output main menu action.
    • EXPECTED RESULT: "Output" window is opened. Project name and location is shown in the window/tab header. Window should contain output from last Git action performed on this project.
  3. File modifying
    1. Find a double-click "Main.java" file in "Projects" view to open it in the 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.
    • EXPECTED RESULT: For each modification, there should be a diff mark on the left side and a navigation mark on the right side of the editor. New lines are green, modified are blue, deleted are red. The file is shown in the "Git" window with "-/Modified" status. The file "Main.java" must change its font color to blue in the editor header, "Git" window and in all views. Nodes in the path to the file are marked with blue badges in all views.
  4. File creating
    1. Create new Java class "NewClass.java" file in the main package.
    • EXPECTED RESULT: File is created and opened into editor. Across whole file, there should be a green diff mark on the left side and a green navigation marks on the right side in the editor. The file is shown in the "Git" window with "-/Added" status. The file has green font color in the editor header, "Git" window and in all views. Nodes in the path to the file are marked with blue badges in all views.
  5. Diff sidebar
    1. Switch off View | Show Diff Sidebar option from main menu.
    2. Switch View | Show Diff Sidebar back on.
    • EXPECTED RESULT: When option is switched off, all diff marks and navigation marks in the editor should disappear. When turned back on, all marks should reappear again.
  6. Versioning labels
    1. Switch on View | Show Versioning Labels option from main menu.
    • EXPECTED RESULT: When switched on, versioning labels should be shown in "Projects", "Files" and "Favorites" views. Next to the project root, there should be a branch name (e.g. [master]). Next to the "Main.java", there should be [-/M], and next to the "NewClass.java", ther should be [-/A].
  7. Add
    1. Select "Main.java" in "Projects" view and invoke Git | Add pop-up menu action.
    2. Select "NewClass.java" in "Git" window and invoke Add pop-up menu action.
    • EXPECTED RESULT: Both files are staged. Their status in "Git" window changes to "Modified/-" for "Main.java" and "Added/-" for "NewClass.java". Versioning labels changes to [M/-] and [A/-] respectively. Colors, marks and badges remains the same. "Output" window contains details about performed Add actions.
  8. Commit
    1. Select the project root node in "Projects" view and invoke Team | Commit... main menu action. "Commit" dialog shows up.
    2. Files "Main.java" and "NewClass.java" should be listed in a table. Enter some "Commit Message" and modify "Author" and "Committer".
    3. Click Commit button.
    • EXPECTED RESULT: Commit is performed. Details can be reviewed in the "Output" window. All diff marks in the editor disappear. Both files disappear from "Git" window. All colors change back to black, all badges and modification labels disappear.
  9. Diff
    1. Make all types of changes (add, modify, remove) to both "Main.java" and "NewClass.java" and save them.
    2. Create new Java interface "NewInterface.java" in the main package.
    3. Select the project root node in "Projects" view and invoke Team | Diff .
    • EXPECTED RESULT: "Diff" window is opened. It lists both modified and one created file. All changes to the currently selected file are shown in a split pane. On the left there is the HEAD/Index state and on the right there is the Working Tree state. Right part is editable, left part isn't. Arrows can be used to navigate among files and their differences.
  10. Export Patch
    1. Select the project root node in "Projects" view and invoke Team | Export | Export Uncommitted Changes... main menu action. "Export Diff Patch" dialog shows up.
    2. Keep "Save as File" option selected and use "Browse..." button to select file location and name. Confirm it by pushing Save button.
    3. Push OK button.
    • EXPECTED RESULT: Patch file is created in the selected location and opened into editor.
  11. Simple Revert
    1. Select the project root node in "Projects" view and invoke Team | Revert | Revert Modifications... main menu action. "Revert Modifications" dialog shows up.
    2. Keep "Revert All Uncommitted Changes in Working Tree and Index" option selected, tick "Remove Also New Files and Folders" checkbox.
    3. Push Revert button.
    • EXPECTED RESULT: All uncommitted changes are reverted and newly created files removed. Details can be reviewed in the "Output" window. All diff marks in the editor disappear. All files disappear from "Git" window. All colors change back to black, all badges and modification labels disappear.
  12. Apply Patch
    1. Select the project root node in "Projects" view and invoke Tools | Apply Diff Patch... . File browser shows up.
    2. Find and select the previously created patch file and push Patch button.
    3. Click Yes button in the following question dialog.
    • EXPECTED RESULT: Patch is successfully applied. Details can be reviewed in the "Output" window/tab named "Patch Report". Diff windows are opened for all patched files. Files are shown exactly as before revert.
  13. Export Commit
    1. Commit all previously made changes.
    2. Select the project root node in "Projects" view and invoke Team | Export | Export Commit... . "Export Diff" dialog shows up.
    3. Push Select button next to "Revision" field. "Select Revision" dialog shows up. Select the last revision you just committed and push Select.
    4. Keep "Save as File" option selected and use "Browse..." button to select file location and name. Confirm it by pushing Save button.
    5. Push OK button.
    • EXPECTED RESULT: Patch file with changes from selected revision is created in the selected location and opened into editor. "Output" window contains details about performed Export action.
  14. Revert Commit
    1. Select the project root node in "Projects" view and invoke Team | Revert | Revert Commit... main menu action. "Revert Commit" dialog shows up.
    2. Push Select button next to "Revision" field. "Select Revision" dialog shows up. Select the last revision and push Select.
    3. Untick "Commit Revert Changes" checkbox. "Commit Message" text field should disappear.
    4. Push Revert button.
    • EXPECTED RESULT: Changes from selected revision are reverted. Details can be reviewed in the "Output" window. Affected files should have their changes and statuses marked accordingly and should be staged.

Test suite: Team development

Purpose: Tests pull and push actions.
Setup: IDE with activated Git module. Opened Git versioned project. Team repository available.

  1. Pull
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  2. Push
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  3. Create Conflict
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  4. Resolve Conflict
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO

Test suite: Working with branches

Purpose: Tests branching actions.
Setup: IDE with activated Git module. Opened Git versioned project.

  1. Show branch
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  2. Create branch
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  3. Switch branch
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  4. Merge
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO

Test suite: Versioning history

Purpose: Tests history searching.
Setup: IDE with activated Git module. Opened Git versioned project.

  1. Show history
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
  2. Show annotations
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO

Test suite: Git options

Purpose: Tests functionality of available options.
Setup: IDE with activated Git module. Opened Git versioned project.

  1. Change options
    1. TODO
    2. TODO
    3. TODO
    • EXPECTED RESULT: TODO
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