Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

CosmosDataReportingComponent10 Testing Guide

Revision as of 14:14, 13 December 2007 by Sleeloy.ca.ibm.com (Talk | contribs) (Running UI Test Page)

Back to Data Reporting Design

Overview

This document provides the UI infrastructure code based on 209226 UI Visualization infrastructure design document.

The reader should be aware that the modules for the User Interface follow a team sharing structure. The team structure strategies outlined in "Eclipse Web Tools Platform: Developing Java Web Applications" technical document were used. Chapter 6 covers these stategies: Organize your Web Tools platform (WTP) development project.

One can view chapter 6 online at http://whitepapers.zdnet.com/abstract.aspx?docid=307008

Installing

Cosmosi8Install5.gif

Cosmosi8Install6.gif

  • You now need to define a Tomcat Server Runtime. Go to Windows>Preferences..
  • Select the "Server>Installed Runtimes" node and click the "Add.." button.

Cosmosi8Install7.gif

  • Specify Apache Tomcat 5.5 runtime and click Next.

Cosmosi8Install8.gif

  • Enter the location of the tomcat directory and click Finish. Then click OK.

Cosmosi8Install9.gif

  • Now you need to set up the org.eclipse.cosmos.examples.e2e.web.ui directory. Note that the WebContent directories under the org.eclipse.cosmos.examples.e2e.web.ui use linked folders. This step is needed since eclipse does not use relative paths to link folders.
    • Right click the org.eclipse.cosmos.examples.e2e.web.ui project and create a new Folder by selecting New>Folder from the popup menu. Click the "<<Advance Button" and click the "Link to folder in the file system" check box

Cosmosi8Install10.gif

    • Click the "Variables..." button. This should bring up a dialog box.
    • Then click the "New..." button. This should bring up dialog box where you can enter a variable name. The linked folders use a variable named "WORKSPACE" to resolve the workspace directory. Therefore we need to define this variable as follows:

Cosmosi8Install11.gif

    • Click OK, Click OK again and then Cancel. Note that we don't want to create a directory we just needed to add a variable name since the directories are already created.
  • Right click the org.eclipse.cosmos.examples.e2e.web.ui project and select "Refresh".
  • Right click the org.eclipse.cosmos.dr.tests.web.ui and select "Refresh".
  • At this point the workspace is setup to run. Right click the org.eclipse.cosmos.examples.e2e.web.ui project and select "Run As>Run on Server".
  • Select Tomcat v5.5 Server and click Next

Cosmosi8Install12.gif

  • Make sure that org.eclipse.cosmos.dr.tests.web.ui and org.eclipse.cosmos.examples.e2e.web.ui projects are selected and click Finish. The server will start.

Testui1.gif

Running UI Test Page

  • Now open FireFox 2.0 or IE 6+ and type http://localhost:8080/COSMOSUITests/?page=tests. You should see the COSMOS UI Test Page. This page provides several configured test pages that tests widgest and various data visualization components.

Testui2.gif

  • The following shows the test page to test the COSMOS tree widget. As you can see that the page presents three configuration of the tree. The tester would normally view this page and make sure that the widget is rendered and operates properly.

Testui3.gif

Testui4.gif

Creating Outputter Testcases

  • It is very easy to create unit tests cases for an outputter. First be aware that an outputter tests is basically sending an input request to the outputter and recieving a output stream. A basic test would be compose of sending an input to an outputter and comparing the output produced with an expected output. The COSMOS UI Outputter Test requires the following files:
    • An input file that contains the parameters for the outputter
    • An output file that contains the expected generated output based on the input parameters
  • The following diagram shows where to deploy the input and output file in the COSMOS UI test environtment:

Testui5.gif

Back to the top