TS 61 LocalHistory

Local History Test Specification for

Author: Martin Novak
Version: Revision: 1.1
Lastupdate: Date: 2008/01/28 04:12:53
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.

Contents

Test suite: Local History capabilities

Purpose: This suite will show you capabilities of Local History.
Setup: No special setup is needed.

  1. Show Local History
    1. Setup a new standard java application project and open its
      "Main.java"
      file in the editor.
    2. Select
      "Main.java"
      and invoke Versioning | Local History | Show Local History from main menu.
    • EXPECTED RESULT: Verify that new tab labeled
      "Main.java [LocalHistory]"
      was opened in editor. 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. First Version
    • Comments: NOTE: 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. Do some changes to the file and save it.
    2. Switch to the
      "Main.java [LocalHistory]"
      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 two areas with highlighted changes.
  3. More Versions
    1. Switch to
      "Main.java"
      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 [LocalHistory]"
      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.
  4. 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.
  5. 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.
  6. 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.
  7. 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.
  8. Revert Deleted
    • Comments: NOTE: Revert Deleted action invoked on a folder/package should revert ALL deleted children files/folders/packages recursively.
    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.
    • 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.

}}
}}

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