TS 72 LocalHistory

Local History Test Specification for NetBeans 7.2

Author: Štěpán Žebra
Version: 1.0
Last update: 2.5.2012
Introduction: Local History module provides some basic versioning functionality and is integrated in the NetBeans IDE. This document describes how this module should be tested in order to verify all of its functionality.
Comments: This document is heavily based on TS_71_LocalHistory which is now obsolete.

Contents


Test suite: Local History capabilities

Purpose: This suite will show you capabilities of Local History.
Setup: No special setup is needed.
Comments: The version that is added to history is a state of the file BEFORE you made changes that you are saving! The newest version is ONLY in the editor (and will be moved to history as soon as you make some changes and save the file again).

  1. Show Local History
    1. Create a new Java Application project and open its "Main.java" file in the editor.
    2. Select "Main.java" and invoke Team | Local History | Show Local History from main menu.
    • EXPECTED RESULT: Verify that "Main.java" was switched to the History tab. It should contain a table with two columns labeled "Version" and "Label" and it should be empty for now. On the lower part of the tab there should be empty area with gray text
      <Diff - No Version Selected>
      in the middle.
  2. Show Local History by History Tab
    1. Select any Java file and click on History tab.
    • EXPECTED RESULT: Verify that "Main.java" was switched to the History tab. It should contain a table with two columns labeled "Version" and "Label" and it should be empty for now. On the lower part of the tab there should be empty area with gray text
      <Diff - No Version Selected>
      in the middle.
  3. First Version
    1. Do some changes to the file and save it.
    2. Switch to the "Main.java" History tab.
    • EXPECTED RESULT: In the "Version" column there should be expanded node with folder icon and label "Today". It should have one child node named with date and time of the last modification of the file BEFORE last save. "Label" column should be empty. In the lower part of the tab there should be two areas with highlighted changes.
  4. More Versions
    1. Switch to the "Main.java" Source tab.
    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.
    5. Modify the file and save it several times.
    6. Switch to the "Main.java" History tab.
    • EXPECTED RESULT: There should be listed as many versions as you did save the file. Each of them is named with date and time of that save and has empty its "Label" column.
  5. Version labeling
    1. Click in the "Label" column of any version.
    2. Type some description and press "ENTER" and "TAB".
    • EXPECTED RESULT: Next entry in the table should be selected and there should be your message in the "Label" column of previous entry.
  6. Version diff
    1. Choose any version in the "Version" column.
    2. In the lower part of the tab there should two areas with highlighted changes. The right one is labeled "Current File" and the left one is labeled with a name of selected Version.
    3. Highlighting colors are used in a following pattern. New lines are green, removed lines are red and modified lines are blue.
    • EXPECTED RESULT: Verify functionality of "UP" and "DOWN" above areas with highlighted differences. They should navigate you among differences highlights. Selected difference has bold lines enclosing the area that differs.
  7. Revert from History
    1. Select the first version and invoke Revert from History popup menu action.
    • EXPECTED RESULT: Verify that content of the file in Editor was reverted to the chosen version and one new version was added to history. It should contain state of the file in Editor before the revert action. More to that there should be no differences between "Current File" and the version you reverted it to.
  8. Revert To...
    1. Switch to "Files" view, select "Main.java" and invoke Local History | Revert to... action from its popup menu.
    2. New "Revert to..." window should appear. It should contain the same table as in "Show Local History" test case.
    3. Select any version in the "Version" column and push "Revert" button.
    • EXPECTED RESULT: Result should be the same as it was in previous test case.
  9. Revert Deleted
    1. Delete file "Main.java".
    2. Switch to "Projects" view, select package which previously contained "Main.java" and invoke Local History | Revert Deleted action from its popup menu.
    3. Window "Select Files" appears with deleted files. Select deleted files and click "OK".
    • EXPECTED RESULT: Verify that "Main.java" appeared as a child node of that package again. It should also preserve its whole history it had before it was deleted. Action invoked on a folder/package should revert all deleted children files/folders/packages recursively.
  10. Revert Deleted particular files
    1. Create two new Java classes in the same package.
    2. Delete these newly created Java classes.
    3. In the "Projects" view, select package which previously contained created/deleted Java classes and invoke Local History | Revert Deleted action from its popup menu.
    4. Window Select Files appears with deleted files. Select deleted files and click "OK".
    • EXPECTED RESULT: Verify that deleted files were restored.
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