VWSanityTestInstructions

Contents


How to Run Visual Web Sanity Tests

Run Sanity Tests Against Your Local VW Build

1. Check out visual web source and build.

  http://wiki.netbeans.org/wiki/view/VisualWebBuildInstructions 

2. Specify glassfish location in the property file.

  • cd <nb_workspace>/visualweb/kit/test/data
  • cp DefaultDeploymentTargets.properties.template DefaultDeploymentTargets.properties
  • Specify glassfish location in DefaultDeploymentTargets.properties.

Here is a sample of DefaultDeploymentTargets.properties:

# Default Deployment Target
  deployment.target.type = Sun Java System Application Server
  # Sun Java System Application Server
  deployment.target.name.Sun\ Java\ System\ Application\ Server = glassfish
  deployment.target.path.Sun\ Java\ System\ Application\ Server = c:/sun/glassfish
  deployment.target.domain.Sun\ Java\ System\ Application\ Server = RAVE_J2EE_HOME/domains/domain1
  deployment.target.login.Sun\ Java\ System\ Application\ Server = admin
  deployment.target.password.Sun\ Java\ System\ Application\ Server = adminadmin

3. Check out necessary modules that used by sanity tests and run sanity

  • Inside SWAN
  • Set JAVA_HOME environment variable
  • Set CVSROOT environment variable
  • cd <nb_workspace>/visualweb.gravy
  • ant
  • cd <nb_workspace>
  • ant -f visualweb.kit/build.xml -Dtest.config=uicommit test
  • Outside SWAN
  • Set JAVA_HOME environment variable
  • cd <nb_workspace>/visualweb.gravy
  • ant
  • cd <nb_workspace>
  • ant -f visualweb.kit/build.xml -Dtest.config=uicommit test

Note: Most of time, you just need to run ant in visualweb.gravy once unless there are changes in these testtool modules. QE should inform public about the changes.

Run Sanity Test Against Production Build

1. Download and install netbeans/vw at <IDE_INSTALL_DIR>. Copy muduleCluster.properties(in attachment) to <IDE_INSTALL_DIR>

2. Check out visualweb's test, gravy and ravebuild modules

  • cd <nb_workspace>
  • hg clone

3. Specify glassfish location in the property file.

  • cd <nb_workspace>/visualweb/kit/test/data
  • cp DefaultDeploymentTargets.properties.template DefaultDeploymentTargets.properties
  • Specify glassfish location in DefaultDeploymentTargets.properties.

Here is a sample of DefaultDeploymentTargets.properties:

# Default Deployment Target
  deployment.target.type = Sun Java System Application Server
  # Sun Java System Application Server
  deployment.target.name.Sun\ Java\ System\ Application\ Server = glassfish
  deployment.target.path.Sun\ Java\ System\ Application\ Server = c:/sun/glassfish
  deployment.target.domain.Sun\ Java\ System\ Application\ Server = RAVE_J2EE_HOME/domains/domain1
  deployment.target.login.Sun\ Java\ System\ Application\ Server = admin
  deployment.target.password.Sun\ Java\ System\ Application\ Server = adminadmin

3. Check out necessary modules that used by sanity tests and run sanity

  • Inside SWAN
  • Set JAVA_HOME environment variable
  • Set CVSROOT environment variable
  • cd <nb_workspace>/visualweb.gravy
  • ant -Dnetbeans.dist.dir=<IDE_INSTALL_DIR>
  • cd <nb_workspace>
  • ant -f visualweb.kit/build.xml -Dtest.config=uicommit test -Dnetbeans.dist.dir=<IDE_INSTALL_DIR>
  • Outside SWAN
  • cd <nb_workspace>/visualweb.gravy
  • ant -Dnetbeans.dist.dir=<IDE_INSTALL_DIR>
  • cd <nb_workspace>
  • ant -f visualweb.kit/build.xml -Dtest.config=uicommit test -Dnetbeans.dist.dir=<IDE_INSTALL_DIR>

Note: Most of time, you just need to run ant in visualweb.gravy once unless there are changes in these testtool modules. QE should inform public about the changes.

The results can be found at <nb_workspace>/visualweb/kit/test/results/index.html

What do Sanity Tests test? (last updated 3/14/07)

  • testAddApplicationServer
  • Add glassfish application server
  • testCreateProject
  • Create a J2EE 1.4 project.
  • testAddButton
  • Drop a button, change its text property to "GO"
  • Switch to JSP editor
  • testBackingFile
  • Go back to designer
  • Double click button to open Java Editor. Add code
    return "go";
  • testCloseProject
  • Close this project
  • testCreateJavaEE5Project
  • Create a Java EE 5 project
  • testAddComponents
  • In Palette, double click at Label component. The label should be added to designer's upper-right corner
  • In property sheet window, Change label component's text to "JEE 5 Project"
  • DnD a button
  • In property sheet window, Change the button component's text to "Push me". Double click at the button
  • In Java Editor, add line in button1_action()
    label1.setValue("Clicked on button");
  • testExcution
  • Deploy the project
  • testCheckIDELog
  • Check IDE's message.log to ensure there is not any unexpected exception


Trouble Shooting

  • My sanity tests fail, where can I look at the detail results?
  • The results is at <your_nb_workspace>/visualweb/kit/test/results/index.html. Click the link in the first column of the tables until you see individual failed tests(in red color). Click at "fail" link in Status column you can get exception stack trace. You can also click "Yes" link in Workdir column. You can see the jemmy.log with trace messages which sometime may help and screen.png containing screen shot at the time of the failure. There are also 2 log files may help you diagnose the failures:
  • message.log - click on module name, then testbag name - there should be link IDE Logs which points to messages.log
  • build script log - click the link "Logs from build scripts" - you can find message such as compilation errors etc.
  • IDE shows and sanity tests seems do nothing
  • Make sure you have copy of <your_nb_workspace>/visualweb/kit/test/data/DefaultDeploymentTargets.properties and glassfish location is correct in this file.


  • Can not run sanity tests on the Mac:
  • As workaround you can specify path to jemmy_VWSanityTestInstructions.jar of the older version (from release50 is OK for example) in build-qa-functional.xml or replace jemmy_VWSanityTestInstructions.jar in jemmy module with older version (it's attached).
  • Timeout to locate gui object. (get timeout exception)
  • Mostly caused by performance or time condition due to system's configuration. Increase the time in TestUtils.wait() or add wait() if there is not one.


  • Timeout during deployment test
  • If the output of appserver show the same message as bug 99891 , rerun the test.
  • Sometime, it could be AppServer is exhausted. Reset AppServer.
  • IDE throws exceptions during sanity tests. But it is not reproducible manually.
  • If the exception appears in a popup dialog and is confirmed as harmless, modify visualweb/kit/test/build.xml to set xtest.ide.error.manager to false:
    <property name="xtest.ide.error.manager" value="false"/> 
  • If the exception appears in message.log and is confirmed as harmless, add this exception to known exception list in SanityTests.java: testCheckIDELog()


  • Compilation error
  • If it is due to module or java class is removed, update the code in visualweb/kit/gravy module
  • If you see many errors, it can be visualweb is not built properly
  • IDE never show up and I get 0% pass rate
  • Check sanity test's build script log(for the log location, see the first trouble shooting entry). Make sure your JAVA_HOME variable is set properly.
  • Sanity fail and can reproduce manually
  • File bug
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