Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Http://wiki.eclipse.org/EclipseLink/Development/Testing/DBWS/2.5.0 Server Tests

Revision as of 11:58, 17 August 2012 by Unnamed Poltroon (Talk)


Existing DBWS Server Tests

The current DBWS server tests are direct ports of the original DWBS examples. These basic examples were intended to be run against an EclipseLink install. The three main steps for running the examples are:

  • resetDatabase - execute SQL statements to generate tables, procedures, etc
  • build - run the DBWS builder to generate a web archive to be deployed manually to an active server instance
  • runClient - runs basic tests against the deployed service

The directory/file layout in the Git repository for each is as follows:
utils
  └── eclipselink.dbws.builder.test.oracle.server
        ├── attachedbinary
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    │   ├── swaref.xsd
        │    │   └── teardown.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── .classpath
        │    ├── .project
        │    ├── build.cmd
        │    ├── build.xml
        │    ├── env.bat
        │    ├── resetDatabase.cmd
        │    └── runtime.properties
        ├── inlinebinary
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    │   └── teardown.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── .classpath
        │    ├── .project
        │    ├── build.cmd
        │    ├── build.xml
        │    ├── env.bat
        │    ├── resetDatabase.cmd
        │    └── runtime.properties
        ├── mtom
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    │   └── teardown.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── .classpath
        │    ├── .project
        │    ├── build.cmd
        │    ├── build.xml
        │    ├── env.bat
        │    ├── resetDatabase.cmd
        │    └── runtime.properties
        ├── simpleplsql
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── build.cmd
        │    ├── build.sh
        │    ├── build.xml
        │    ├── env.bat
        │    ├── env.sh
        │    ├── readme.html
        │    ├── resetDatabase.cmd
        │    ├── resetDatabase.sh
        │    ├── runClient.cmd
        │    ├── runClient.sh
        │    └── runtime.properties
        ├── simplesp
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── build.cmd
        │    ├── build.sh
        │    ├── build.xml
        │    ├── env.bat
        │    ├── env.sh
        │    ├── readme.html
        │    ├── resetDatabase.cmd
        │    ├── resetDatabase.sh
        │    ├── runClient.cmd
        │    ├── runClient.sh
        │    └── runtime.properties
        ├── simplesql
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── build.cmd
        │    ├── build.sh
        │    ├── build.xml
        │    ├── env.bat
        │    ├── env.sh
        │    ├── readme.html
        │    ├── resetDatabase.cmd
        │    ├── resetDatabase.sh
        │    ├── runClient.cmd
        │    ├── runClient.sh
        │    └── runtime.properties
        ├── simpletable
        │    ├── config
        │    │   ├── dbws-builder.xml
        │    │   ├── fixed.properties
        │    │   ├── fixed.xml
        │    │   ├── setup.sql
        │    ├── src
        │    │    └── test
        │    │        └── Client.java
        │    ├── build.cmd
        │    ├── build.sh
        │    ├── build.xml
        │    ├── env.bat
        │    ├── env.sh
        │    ├── readme.html
        │    ├── resetDatabase.cmd
        │    ├── resetDatabase.sh
        │    ├── runClient.cmd
        │    ├── runClient.sh
        │    └── runtime.properties

Proposed changes

There are a number of changes that are to be made to get the DBWS server tests lined up with the existing DBWS JUnit suites:

  • The tests should be converted to JUnit test suites
  • The package should match those of the other DWBS tests
  • ANT scripts should be created with two main targets
  1. test-builder
  2. test-service
  • For running in the Eclipse IDE, two suites (and a .launch) will be added:
  1. AllBuilderTests
  2. AllServerTests
  • There should one .project and .classpath for these tests, as opposed to random ones scattered among the various tests
  • The basic workflow should be:
  1. Run the builder tests - these generate web archives for each test
  2. Manually deploy the generated .war files to an active server instance
  3. Run the service tests against the deployed web services

Package layout

Following is the new directory/file layout for the server tests:
utils
  └── eclipselink.dbws.builder.test.oracle.server
        ├── src
        │    ├── dbws
        │    │   ├── testing
        │    │   │    ├── attachedbinary
        │    │   │    │    ├── AttachedBinaryBuilderTestSuite.java
        │    │   │    │    └── AttachedBinaryServiceTestSuite.java
        │    │   │    ├── inlinebinary
        │    │   │    │    ├── InlineBinaryBuilderTestSuite.java
        │    │   │    │    └── InlineBinaryServiceTestSuite.java
        │    │   │    ├── mtom
        │    │   │    │    ├── MTOMBuilderTestSuite.java
        │    │   │    │    └── MTOMServiceTestSuite.java
        │    │   │    ├── simpleplsql
        │    │   │    │    ├── SimplePLSQLBuilderTestSuite.java
        │    │   │    │    └── SimplePLSQLServiceTestSuite.java
        │    │   │    ├── simplepsp
        │    │   │    │    ├── SimpleSPBuilderTestSuite.java
        │    │   │    │    └── SimpleSPServiceTestSuite.java
        │    │   │    ├── simplepsql
        │    │   │    │    ├── SimpleSQLBuilderTestSuite.java
        │    │   │    │    └── SimpleSQLServiceTestSuite.java
        │    │   │    ├── simpletable
        │    │   │    │    ├── SimpleTableBuilderTestSuite.java
        │    │   │    │    └── SimpleTableServiceTestSuite.java
        │    │   │    ├── AllBuilderTests.java
        │    │   │    ├── AllServerTests.java
        │    │   │    └── DBWSTestSuite.java
        ├── .classpath
        ├── .project
        ├── All server tests (builder).launch
        ├── All server tests (service).launch
        ├── antbuild.properties
        ├── antbuild.xml
        └── build.properties

Configuring to run using ANT

The ANT build script will look for test.properties in the user.home folder. All the db and server properties should be set here, notable ones being:

  • db.driver (default is 'oracle.jdbc.OracleDriver')
  • db.url (default is 'jdbc:oracle:thin:@localhost:1521:ORCL')
  • db.user (default is 'user')
  • db.pwd (default is 'password')
  • db.platform (default is 'org.eclipse.persistence.platform.database.oracle.Oracle11Platform')
  • server.host (default is 'localhost')
  • server.port (default is '7001')
  • server.platform (default is 'wls')
  • server.datasource (default is 'jdbc/DBWStestDS')

Back to the top