OMrun Help
Version 4.x
Version 4.x
  • Introduction
    • Features
      • 📊Facts
      • 🔢Figures
    • System Requirements
    • Terms and Definitions
    • Release Notes
      • 📄Version 4.2
      • 📄Version 4.1
      • 📄Version 4.0
    • ❓Getting Help
  • Installation
    • ↘️Install OMrun
      • 📃OMrun Paths
      • 🔑License Key
    • ✔️Verify Setup
    • 🗑️Uninstall OMrun
  • Configuration
    • Data Adaptor
      • Data Queries
    • Program Adaptor
    • Dashboard Configuration
    • Customize own adapter
      • Own data adapter
      • Own program adapter
    • Configuration Files
      • PublishConfig.cfg
      • OMrunDataProvider.cfg
      • OMrunGuiProvider.cfg
      • OMrun.exe.config
    • Using Variables
      • OMrun Variables
      • Environment Variables
      • Parameter
  • Start OMrun
    • Start via Desktop
    • Start via Batch File
    • Start via Task Scheduler
  • Menu Functions
    • ▶️Button Execute
    • ⏹️Button Stop
    • 🎓Button License
    • ⚙️Button Configuration
    • 📥Button Export
    • ❓Button Help
    • 📌Button About
    • 🗂️Button Windows
    • ⏩Shortcuts and Functions
  • Element Overview
    • Navigation Tree
    • Business System
    • Component
    • Environment
    • Scenario
    • Test Data Object
      • Query
      • Body
      • Business Mapping
    • Test Program Object
      • Batch
      • CSV Converter
      • Data Staging
      • Housekeeping
      • Json Converter
      • Program
      • RTL Generator
      • XML Converter
      • XML Converter XL
    • Parameter List
  • Result Analysis
    • Color Codes
    • OMrun Test Results
    • Excel Result Reports
    • OMdashboard
Powered by GitBook
On this page
  • Abstract
  • Data Source A / B
  • Query Conventions
  • Command String Previewer
  • Date Formats
  1. Element Overview
  2. Test Data Object

Query

PreviousTest Data ObjectNextBody

Last updated 1 year ago

Abstract

Generally the query consists of two sections (source A and source B).

For both sources the connect string is represented by an alias defined within the environment definition. This concept allows the user to simple switch environments and stll using the same queries.

Within the editor window it is possible to enter queries and PlSql code to select data from the defined data sources. For the editor there are some conventions to follow to ensure the sql parser is working properly (details see below).

Usually source A does represent the reference data and source B the data that is compared to the reference.


Data Source A / B


Query Conventions

  • Sql query part

Test Object Data execution order:

  1. Query Source A

  2. Body Source A

  3. Query Source B

  4. Body Source B

Rule
Description

Source DB query syntax

Generally you should follow the sql syntax used for the selected data base. Exceptions and special rules are described in seperate paragraphs.

Capital letters for key words in query (not necessary in release 4.1.1.2 or higher)

All keywords (like SELECT, FROM, AS...) have to be written in capital letters. The only exception is the key word "Group By", it is written in camel cases.

Key word SELECT (not necessary in release 4.1.1.2 or higher)

Between the SELECT key word and the first attribute a cr/lf is allways needded. Make sure the key word SELECT is allways written in capital letters.

Key word AS (not necessary in release 4.1.1.2 or higher)

It is recommanded to use allways aliases for attributes. The parser does not allow to add aliases for a few attributes only, it needs to have it for all attributes or for non of it. Make sure the keyword AS is allways written in capital letters.

Splitt the code between sql query and pl/sql

To separate the pl/sql block from the rest of the query the key word /*BODY*/ is needed.

Camel cases for key words in Pl/Sql section (not necessary in release 4.1.1.2 or higher)

All keywords (like Begin, End, Execute...) have to be written in camel cases. There are no exceptions.

Spaces in Attribute alias not allowed

It is possible to select data from tables with attribute names in double quotes containing space but it is not allowed to introduce an attribute alias name with a space between quotes. Use underscore instead of spaces in alias names. ("Alias Name" => Alias_Name)


Command String Previewer

There is a tooltip on label Query A and Query B

The tooltip is activated after 1 second keeping the mouse cursor over the label. After this delay the tooltip shows a preview of the command string (whole query) for about 10 seconds.

  • Showing the preview of the command string from query A/B with extracted variables.

  • Copies the command string A or B to the clipboard automaticaly


Date Formats

If a business system is stored centrally and used from different clients with mixed regional setting on their laptops, this may cause problems.

To avoid the major pitfalls take care of date functionality. If you query date field convert the date always with the TODATE function:

  • "TO_DATE( string1 [, format_mask] [, nls_language] )"

This applies also and is absolutely needed for attributes used as keys for row matching.

The drop down menu shows all available data sources define in the selected . It is possible to select any of the defined data sources and compare them to each other.

The query can consist of two parts and are separated by the tag

Query syntax to get data from different sources are listed under .

environment
/*BODY*/
Body part
Data queries
OMrun test data object query view
OMrun test object data sources
OMrun test object data - query element
OMrun test object data - query tooltip
Windows regional settings
OMrun test data object query view
OMrun test object data sources
OMrun test object data - query element
OMrun test object data - query tooltip
Windows regional settings