Testing the JDBC Database

Source: Internet
Author: User
Tags soapui

There are two ways to set up a JDBC connection:
    • Use project-level JDBC connections-In this case, the driver, connection string, and Password properties will use the configuration values of the selected JDBC connection (but these fields will be disabled and read-only).
    • Text field value using driver/connection string/password-in this case, the database connection is set to "None":

When you build the query and run Teststep, the specified settings (that is, the JDBC connection or driver, the connection string, and the password) are used.

The JDBC panel consists of the following components:

  1. Query Properties-number of properties can be added to replacement in query through Prepared Statement. Properties need to being specified in the query as ":p Ropertyname" and would by replaced by exact names. These properties can be added and made in a query by declaring variables Replace. The property needs to be specified as ": PropertyName" in the query and will be replaced by an exact name.
  2. JDBC Connection selection with options
    • Create-new-Add a new JDBC connection
    • None-Do not use the JDBC connection, but instead use the driver/connection string/password value
    • Project-level JDBC connections
  3. button for configuring the selected JDBC Connection-enabled only when connection is selected (this applies to project-level connection settings)
  4. Driver
  5. Connection string
  6. Password
  7. Buttons for configuring connection properties-enabled only when no connection is selected, but with normal connection properties
  8. Button for testing connection
  9. SQL Query
  10. Indicator if the query is a stored procedure call
  11. Button for building the SQL query (SoapUI Pro only)
  12. Assertions PANEL-JDBC results can be asserted like any other XML result, with two additional assertions: JDBC Timeout-If the query is executed within a predefined time, the JDBC status-assertion executes the query state
  13. Result can be displayed in XML view
  14. Outline View (SoapUI Pro only)
DatabaseConnection Configuration

Depending on the driver that you select from the list of configured JDBC driver properties, you can obtain a list of properties to populate or change to configure the connection. Configuration changes will also immediately affect the project level.

Configuring SQL queries

There are two options for configuring the SQL query you want to use:
    • A simple list of stored procedures and the available output parameters-starts when the stored procedure check box is selected
    • A powerful visual query builder for creating complex SQL queries with federation and subqueries-starts when the stored procedure check box is not selected

For the visual query Builder, there are two preview tabs at the bottom of the window:
    • SQL Preview-where you can view the SQL queries you have created and add the properties you want to use in your query
    • Result Preview-Displays the current query results as a normal table without additional options.

There are many possibilities for visually building queries, including
    • Add an object to a query-you can simply double-click the object in the right tree or drag it to the query area
    • You can also choose to add Union queries and subqueries by right-clicking the query area.

Testing the JDBC Database

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.