Manual tests for Eclipse plugin

Guidelines for documenting the manual tests:

  • Summarize the elements covered in the test
  • Enumerate the steps (ordered list)
  • Call out test points with a TEST bullet
  • Include screenshots as appropriate; many of the manual tests will be visual, so screenshots are helpful

In-Progress tests for the new plug-in

Update URI

Use the Eclipse update site on the build server. The URI is determined by the build.

For example, for an M2 build of silverstone, the update site URI is: http://aeneis.raleigh.ibm.com/zero/silverstone/M2/update/zero.eclipse/

Eclipse-Java/Groovy

Use Update Manager to get Project Zero plug-ins

Tests confirm:
  • Eclipse Update site

Steps:

  1. Install fresh eclipse SDK from http://www.eclipse.org/downloads
  2. Click Help>Software Updates>Find and Install..., create a new remote site pointing to the Update URI
  3. Select all features
  4. Accept license and install all, restart after complete.
  5. TEST: Verify that there are no errors or exceptions in the {workspace}/.metadata/.log from the PZ eclipse update. You may see an error dialog indicating that the CLI is not configured. This is normal and should not be reported as a bug.

Configure CLI

Tests confirm:
  • Preferences

Steps:

  1. Open Window > Preferences > WebSphere sMash. You may see an error dialog indicating that the CLI is not configured. This is normal and should not be reported as a bug.
  2. In the "Zero home" field, enter a directory that does not contain a CLI.
  3. TEST: You should see an error message at the top of the preferences page. The module group combo should be disabled.
  4. Now enter the location of a valid CLI in the "Zero home" field. After, the "Loading..." message disappears from the combo, select a module group.
  5. TEST: You should see at least one module group in the list.
  6. Press OK.

Create a new application and run it

Tests confirm:
  • Eclipse New Wizard
  • zero.application.template
  • Eclipse Launch configuration

Steps:

  1. File>New>Project Zero Application
  2. Right-click new project select Run As>Project Zero Application
  3. Browse to http://localhost:8080
  4. TEST: Verify that a Project Zero Welcome index is displayed
  5. Now click Run As>Project Zero Application again without stopping the previous launch
  6. TEST: Console message should indicate a port conflict because the port is taken by the other launch

Export/Import Project Zero application

Tests confirm:
  • Export in shared mode including source and then reimport as project

Steps:

  1. Create new Project Zero Application
  2. Right-click a Zero project and select Export...>Project Zero>Project Zero Export Wizard
  3. TEST: Verify that you get an export dialog like the one shown below:
    zeroExportWizard.JPG
  4. Change export directory to a directory that is outside the workspace (not under the project directory), check 'Include Source' as shown below, and click OK
    includeSrc.JPG
  5. TEST: Look in configured export directory to verify that there is a file called projectname-version.zip
  6. Delete Project Zero application that you created from the workspace.
  7. Click File>Import>General/Existing Projects in Workspace>Select Archive File. Browse for the zip you exported and click OK
  8. TEST: Verify that package imports into workspace without any errors (check {workspace}/.metadata/.log)
  9. TEST: Run the project as a Project Zero Application and browse to http://localhost:8080.

Standalone Export of Zero Application

Tests Confirm:
  • Export in standalone mode and then unzip package and run from command-line

Steps:

  1. Create new Project Zero Application
  2. Right-click a Zero project and select Export...>Project Zero>Project Zero Export Wizard
  3. TEST: Verify that you get an export dialog like the one shown below:
    zeroExportWizard.JPG
  4. Leave the default export directory, check 'Standalone' as shown below, and click OK.
    standalone.JPG
  5. TEST: Refresh the project directory, verify that projectname-version-all.zip is created in the export directory
  6. Install the CLI as described in the CLI getting started
  7. Unzip package into a new temp directory
  8. Invoke 'zero resolve'
  9. Invoke 'zero start'
  10. TEST: Verify that console message indicates that application is successfully started on port 8080
  11. TEST: Verify that http://localhost:8080 successfully loads in a browser.
  12. Invoke 'zero stop'

Repository Management

Test confirm:
  • Search for new libraries in remote repository
  • Add new library from remote repository
  • Delete library from local repository

Steps:

  1. Click orange repository icon in toolbar to open Repository Management dialog.
  2. Type zero in the Organization field and *.demo in the Module field.
  3. Press the Search button.
  4. TEST: You should see several entries in the right-hand list, all of which have names that end with .demo.
  5. Select several of the entries from the right-hand list. Verify that none of the entries already exist in the left-hand list.
  6. Press the Download button.
  7. TEST: After the download operation finishes, you should see new entries in the left-hand list.
  8. Select a few of the .demo entries from the left-hand list. Then press the Remove button.
  9. TEST: After the remove operation finishes, the entries you selected should no longer appear in the left-hand list.

Groovy Debug/Global Context Debug view

Tests Confirm:
  • Java debugger breaks on breakpoint set in Groovy source
  • GlobalContext Debug view shows GC contents

Steps:

  1. Create New Zero Application
  2. Right click /public source folder and select New>Other...>General>File and type test.groovy for the name
  3. Answer yes to add Groovy support to project
  4. Copy the following code into test.groovy e.g.:
    println("foo")
    event.test = 'new string'
    event.test = 'updated string'
  5. Save the file
  6. Add a break point to the second line of the test.groovy file
  7. Right-click Project Debug As>Project Zero Application
  8. TEST: Verify console message indicates that application started on port 8080
  9. Browse to http://localhost:8080/test.groovy
  10. TEST: Verify that breakpoint hit and debugger is suspended at second line of Groovy code
  11. TEST: Verify that Global Context debug view is showing in top-right corner as shown below:
    groovyDebug.JPG
  12. TEST: Step to the next line and verify that there is a new node in the GlobalContext debug view called event/test set to "new string"
  13. TEST: Step again and verify that the event/test node has changed to "updated string"

Code Completion

  1. Create New Zero Application
  2. Right click /public source folder and select New>Other...>General>File and type test.groovy for the name (this should open the new file in the Groovy Editor)
  3. Answer yes to add Groovy support to project
  4. Type "request."
  5. TEST: You should get proposals like the following:
    request_completion.JPG
  6. On a new line type "re<ctrl-space>".
  7. TEST: You should get proposals for request like the ones shown above.
  8. On a new line type "request.coo<ctrl-space>".
  9. TEST: You should get proposals for request.cookies similar to the ones shown above.
  10. On a new line type "z".
  11. TEST: You should get proposals like the following:
    zmethod_completion.JPG

Eclipse-PHP

Use Update Manager to get Project Zero PHP plug-ins

Tests confirm:
  • Eclipse Update site

Steps:

  1. Delete your existing local repository ${userhome}/zero-repository.
  2. Install fresh PDT All-in-one SDK from http://download.eclipse.org/tools/pdt/downloads/index.php
  3. Click Help>Software Updates>Find and Install..., create a new remote site pointing to http://www.projectzero.org/update/zero.eclipse.php.latest or zero.eclipse.php.stable if testing a stable build
  4. Select all plug-ins including Project Zero and Project Zero Examples
  5. Accept license and install all, restart after complete.
  6. TEST: Verify that there are no errors or exceptions in the /.metadata/.log from the PZ eclipse update

Create a new PHP application and run it

Tests confirm:
  • Eclipse New PHP Wizard
  • Eclipse Launch configuration

Steps:

  1. File>New>Project Zero PHP Application
  2. Right-click new project select Run As>Project Zero Application
  3. Browse to http://localhost:8080
  4. TEST: Verify that a Project Zero Welcome index is displayed

Debug a PHP application

Tests confirm:

  • PDT modifications to Eclipse launch configuration and project resolve mechanism

Steps:

  1. This test uses the application created in the previous test.
  2. Edit the ivy.xml file and add the zero.data.php dependency. Resolve the dependency.
  3. TEST: Open the PHP perspective and verify that the Include Path contains the file JSONResultHandler.php from the zero.data.php location in the repository. (Skip this test bug 1927)
  4. Create new script under public named test.php. The contents should look like the file below.
  5. Open the file and set a breakpoint on the include line.
  6. Right click on the project and select: Debug As > Project Zero Application.
  7. Browse to http://localhost:8080/test.php
  8. TEST: You should see the debugger stop on the include line of test.php.
  9. Now step into JSONResultHandler.php then step out.
  10. Step over the echo line and play.

test.php

<?php
   include "JSONResultHandler.php";
   echo "Hello";
?>

PHP Code Assist

Tests confirm:

  • PDT project resolve mechanism
  • PDT code assist support

Steps:

  1. This test uses the application created previously.
  2. TEST: Open the PHP perspective and verify that the Include Path contains entries from the zero.php code-assist directory. There should be at least GlobalContextURIs.php and ZeroExtension.php.
  3. Create a new PHP file and type the following: "GlobalContextURIs_<ctrl-space>".
  4. TEST: You should see a list containing classes named after the GlobalContext app zones.
  5. In the same file, on a new line, type "z<ctrl-space>".
  6. TEST: You should see a list containing GlobalContext apis like zget, zput, etc.

Deprecated tests for the old plug-in

TODO: These tests should be removed when the new plug-in is promoted to the default update site.

Update URI

Use the Eclipse update site on the build server. The URI is determined by the build.

For example, for an M2 build of silverstone, the update site URI is: http://aeneis.raleigh.ibm.com/zero/silverstone/M2/update/zero.eclipse/

Upgrade prompts user for repository update

Test confirm:
  • User is prompted to change the repository when upgrading the plugin

Steps:

  1. Start with an instance of Eclipse with a previous version of the sMash plugin installed. (For example, if testing M5, then start with the M4 plugin.)
  2. Change the update site for the plugin to the one under test.
    1. Click Help > Software Updates > Find and Install..., edit the existing sMash plugin entry by changing the URL to the Update URI
    2. Select all plug-ins, install all, and allow Eclipse to restart.
  3. TEST: Confirm that a prompt appears during restart, similar to the following:
    expected_prompt.JPG
  4. Allow the plugin to update the repository pointer.
  5. TEST: Confirm that the repository URL was updated by checking Windows > Preferences... > Project Zero

Eclipse-Java/Groovy

Use Update Manager to get Project Zero plug-ins

Tests confirm:
  • Eclipse Update site
  • Eclipse Install handler
  • Repository seeding

Steps:

  1. Delete your existing local repository ${userhome}/zero-repository.
  2. Install fresh eclipse SDK from http://www.eclipse.org/downloads
  3. Click Help>Software Updates>Find and Install..., create a new remote site pointing to the Update URI
  4. Select all features
  5. Accept license and install all, restart after complete.
  6. TEST: Verify that there are no errors or exceptions in the {workspace}/.metadata/.log from the PZ eclipse update
  7. TEST: Verify that the Zero repository URL matches the level of the plugin. For example, if the plugin was obtained from http://aeneis.raleigh.ibm.com/zero/silverstone/M2/update/zero.eclipse/, then you should find https://www.projectzero.org/zero/silverstone/M2/repo in the Eclipse dialog at Window > Preferences > WebSphere sMash as part of the remote chain.

Create a new application and run it

Tests confirm:
  • Eclipse New Wizard
  • zero.application.template
  • Eclipse Launch configuration

Steps:

  1. File>New>Project Zero Application
  2. Right-click new project select Run As>Project Zero Application
  3. Browse to http://localhost:8080
  4. TEST: Verify that a Project Zero Welcome index is displayed
  5. Now click Run As>Project Zero Application again without stopping the previous launch
  6. TEST: Console message should indicate a port conflict because the port is taken by the other launch

Export/Import Project Zero application

Tests confirm:
  • Export in shared mode including source and then reimport as project

Steps:

  1. Create new Project Zero Application
  2. Right-click a Zero project and select Export...>Project Zero>Project Zero Export Wizard
  3. TEST: Verify that you get an export dialog like the one shown below:
    zeroExportWizard.JPG
  4. Change export directory to a directory that is outside the workspace (not under the project directory), check 'Include Source' as shown below, and click OK
    includeSrc.JPG
  5. TEST: Look in configured export directory to verify that there is a file called projectname-version.zip
  6. Delete Project Zero application that you created from the workspace.
  7. Click File>Import>General/Existing Projects in Workspace>Select Archive File. Browse for the zip you exported and click OK
  8. TEST: Verify that package imports into workspace without any errors (check {workspace}/.metadata/.log)
  9. TEST: Run the project as a Project Zero Application and browse to http://localhost:8080.

Standalone Export of Zero Application

Tests Confirm:
  • Export in standalone mode and then unzip package and run from command-line

Steps:

  1. Create new Project Zero Application
  2. Right-click a Zero project and select Export...>Project Zero>Project Zero Export Wizard
  3. TEST: Verify that you get an export dialog like the one shown below:
    zeroExportWizard.JPG
  4. Leave the default export directory, check 'Standalone' as shown below, and click OK.
    standalone.JPG
  5. TEST: Refresh the project directory, verify that projectname-version-all.zip is created in the export directory
  6. Install the CLI as described in the CLI getting started
  7. Unzip package into a new temp directory
  8. Invoke 'zero resolve'
  9. Invoke 'zero run'
  10. TEST: Verify that console message indicates that application is successfully started on port 8080
  11. TEST: Verify that http://localhost:8080 successfully loads in a browser.
  12. Type Ctrl-C to stop application

Repository Management/Resolver

Test confirm:
  • Search for new libraries in remote repository
  • Add new library from remote repository
  • Delete library from local repository
  • Configure Repository button links to Preferences correctly

Steps:

  1. Create new Project Zero Application
  2. Click orange repository icon in toolbar to open Repository Management dialog
  3. TEST: Click Configure... button to verify that Zero Repositories Preferences opens, then click Cancel to close it
  4. Delete the all versions of the zero.core library from your local repository, by selecting them and clicking Remove
  5. Then click Close on the Dialog
  6. TEST: You should get a pop-up like the following:
    MissingDeps.JPG
  7. Click Cancel so that you don't resolve the library.
  8. TEST: Verify that your Project Zero Application is marked with an error, and that the config/ivy.xml is marked with an error
  9. Open ivy.xml and switch to the Source tab.
  10. TEST: Verify that there is an error marker next to the zero.core dependency
  11. Switch back to the Zero Package Information tab, and click Add..., then click Manage Repository
  12. Type zero.core in Module field and click Search button to narrow the list to zero.core only
  13. Select zero.core and click Download button
  14. TEST: Verify that the zero.core library with correct version is added to the local repository list
  15. Click Cancel on the Dependency dialog and click close on the ivy.xml file
  16. TEST: Verify that the project errors are fixed.
  17. Click Window>Preferences>Project Zero
  18. TEST: Verify that preference page displays without errors as shown below:
    zeroPrefs.JPG

Groovy Debug/Global Context Debug view

Tests Confirm:
  • Java debugger breaks on breakpoint set in Groovy source
  • GlobalContext Debug view shows GC contents

Steps:

  1. Create New Zero Application
  2. Right click /public source folder and select New>Other...>General>File and type test.groovy for the name
  3. Answer yes to add Groovy support to project
  4. Copy the following code into test.groovy e.g.:
    println("foo")
    event.test = 'new string'
    event.test = 'updated string'
  5. Save the file
  6. Add a break point to the second line of the test.groovy file
  7. Right-click Project Debug As>Project Zero Application
  8. TEST: Verify console message indicates that application started on port 8080
  9. Browse to http://localhost:8080/test.groovy
  10. TEST: Verify that breakpoint hit and debugger is suspended at second line of Groovy code
  11. TEST: Verify that Global Context debug view is showing in top-right corner as shown below:
    groovyDebug.JPG
  12. TEST: Step to the next line and verify that there is a new node in the GlobalContext debug view called event/test set to "new string"
  13. TEST: Step again and verify that the event/test node has changed to "updated string"

Code Completion

  1. Create New Zero Application
  2. Right click /public source folder and select New>Other...>General>File and type test.groovy for the name (this should open the new file in the Groovy Editor)
  3. Answer yes to add Groovy support to project
  4. Type "request."
  5. TEST: You should get proposals like the following:
    request_completion.JPG
  6. On a new line type "re<ctrl-space>".
  7. TEST: You should get proposals for request like the ones shown above.
  8. On a new line type "request.coo<ctrl-space>".
  9. TEST: You should get proposals for request.cookies similar to the ones shown above.
  10. On a new line type "z".
  11. TEST: You should get proposals like the following:
    zmethod_completion.JPG

Eclipse / New CLI interplay

CLI creates repository, Eclipse uses it

  1. Download and install CLI to
  2. TEST: Create a new Zero application, run it, and make sure it works. This will also create a repository that we will use for the next steps.
  3. Open Eclipse and point the repository to /zero-repository/experimental (or another module group).
  4. Create a new Zero application.
  5. TEST: Run it and browse http://localhost:8080/

Eclipse creates repository, CLI uses it

  1. From a new Eclipse install, make sure the repository points to something like: {user.home}/zero-repository/experimental
  2. TEST: Create a new Zero application, run it, and make sure it works.
  3. TEST: After it completes, check to make sure there are two directories in the repository: modules and expanded.
  4. Download and instsll CLI to
  5. In /config/local.properties, update the following property: repo.root=${user.home}/zero-repository
  6. Create a new application: zero create MyApp
  7. TEST: Open the file /MyApp/.zero/private/resolved.properties and make sure the dependency paths point to ${user.home}/zero-repository subdirectories.
  8. TEST: Run the application with the CLI and make sure it works.

Eclipse-PHP

Use Update Manager to get Project Zero PHP plug-ins

Tests confirm:
  • Eclipse Update site
  • Eclipse Install handler
  • Repository seeding

Steps:

  1. Delete your existing local repository ${userhome}/zero-repository.
  2. Install fresh PDT All-in-one SDK from http://download.eclipse.org/tools/pdt/downloads/index.php
  3. Click Help>Software Updates>Find and Install..., create a new remote site pointing to http://www.projectzero.org/update/zero.eclipse.php.latest or zero.eclipse.php.stable if testing a stable build
  4. Select all plug-ins including Project Zero and Project Zero Examples
  5. Accept license and install all, restart after complete.
  6. TEST: Verify that there are no errors or exceptions in the /.metadata/.log from the PZ eclipse update

Create a new PHP application and run it

Tests confirm:
  • Eclipse New PHP Wizard
  • zero.php.application.template
  • Eclipse Launch configuration

Steps:

  1. File>New>Project Zero PHP Application
  2. Right-click new project select Run As>Project Zero Application
  3. Browse to http://localhost:8080
  4. TEST: Verify that a Project Zero Welcome index is displayed

Debug a PHP application

Tests confirm:

  • PDT modifications to Eclipse launch configuration and project resolve mechanism

Steps:

  1. This test uses the application created in the previous test.
  2. Edit the ivy.xml file and add the zero.data.php dependency. Resolve the dependency.
  3. TEST: Open the PHP perspective and verify that the Include Path contains the file JSONResultHandler.php from the zero.data.php location in the repository. (Skip this test bug 1927)
  4. Create new script under public named test.php. The contents should look like the file below.
  5. Open the file and set a breakpoint on the include line.
  6. Right click on the project and select: Debug As > Project Zero Application.
  7. Browse to http://localhost:8080/test.php
  8. TEST: You should see the debugger stop on the include line of test.php.
  9. Now step into JSONResultHandler.php then step out.
  10. Step over the echo line and play.

test.php

<?php
   include "JSONResultHandler.php";
   echo "Hello";
?>

PHP Code Assist

Tests confirm:

  • PDT project resolve mechanism
  • PDT code assist support

Steps:

  1. This test uses the application created previously.
  2. TEST: Open the PHP perspective and verify that the Include Path contains entries from the zero.php code-assist directory. There should be at least GlobalContextURIs.php and ZeroExtension.php.
  3. Create a new PHP file and type the following: "GlobalContextURIs_<ctrl-space>".
  4. TEST: You should see a list containing classes named after the GlobalContext app zones.
  5. In the same file, on a new line, type "z<ctrl-space>".
  6. TEST: You should see a list containing GlobalContext apis like zget, zput, etc.

(DO NOT EXECUTE) Manual tests for reworked plugin

These tests are a work in progress. They will only be valid after we migrate off of the current Eclipse plugin.

  1. Clean workspace tests (start with no sMash plugins, no sMash projects)
    1. Verify plugin installation
    2. Verify no error messages in Error Log after restart.
    3. Verify error messages indicating CLI is not initialized by doing the following:
      1. Create new sMash application
      2. Export wizard
      3. Repository manager
      4. Update module group action
    4. Preferences page
      1. Verify that an invalid CLI directory causes an error message
      2. Verify custom CLI can be configured
      3. Verify default CLI can be configured - which state do we leave them in, custom or default?
    5. Create new sMash application
    6. Launch application
    7. Export application
    8. Repository manager
    9. Update module group action
  2. Dirty workspace tests (restart Eclipse with workspace that was created during 'Clean workspace tests')
    1. Verify that preferences were restored correctly
    2. Resolve project
      1. Against normal workspace project
      2. Against project that is not at the workspace root
    3. Update project
  3. Error handling
    1. Create project wizard should indicate invalid project name
    2. Multiple project resolve failure should show error message for each project
    3. Export
      1. non-sMash application
      2. workspace
    4. Delete the CLI outside of Eclipse but leave preferences alone, resulting in an invalid CLI

  Attachment Action Size Date Who Comment
jpg MissingDeps.JPG props, move 16.7 K 12 Sep 2007 - 18:25 ajtarter Missing Dependencies Dialog
jpg expected_prompt.JPG props, move 18.0 K 20 Mar 2008 - 17:23 steveims  
jpg groovyDebug.JPG props, move 117.7 K 24 Oct 2007 - 22:22 ajtarter Groovy Debug Perspective
jpg groovyDebugM2.JPG props, move 163.6 K 24 Oct 2007 - 22:24 ajtarter  
jpg includeSrc.JPG props, move 14.6 K 17 Sep 2007 - 19:07 ajtarter  
jpg request_completion.JPG props, move 31.1 K 10 Dec 2007 - 15:43 ajtarter  
jpg standalone.JPG props, move 13.3 K 17 Sep 2007 - 19:09 ajtarter  
jpg zeroExportWizard.JPG props, move 23.6 K 12 Sep 2007 - 19:00 ajtarter Project Zero Export Wizard
jpg zeroPrefs.JPG props, move 48.4 K 24 Oct 2007 - 22:28 ajtarter Zero Eclipse Preferences
jpg zmethod_completion.JPG props, move 19.5 K 10 Dec 2007 - 15:42 ajtarter  
r13 - 03 Nov 2008 - 15:21:32 - csurface
Syndicate this site RSS ATOM
Copyright 2007 © IBM Corporation | Privacy | Terms of Use | About this site