summaryrefslogtreecommitdiff
path: root/testautomation/dbaccess
diff options
context:
space:
mode:
authorMarc Neumann [msc] <Marc.Neumann@oracle.com>2011-01-31 12:29:39 +0100
committerMarc Neumann [msc] <Marc.Neumann@oracle.com>2011-01-31 12:29:39 +0100
commita7432ec69f6aa2fdb574a94540107e5de5439277 (patch)
tree0979c838173cfc215a57310294fb01b846e16d68 /testautomation/dbaccess
parentc08743f5e4f19f11c99cf9ecf07fb7b20d339e21 (diff)
cws dba34b: fix for i116042
Diffstat (limited to 'testautomation/dbaccess')
-rw-r--r--testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc6
-rw-r--r--testautomation/dbaccess/optional/includes/db_Query.inc48
-rw-r--r--testautomation/dbaccess/tools/tabletools.inc1
3 files changed, 51 insertions, 4 deletions
diff --git a/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc b/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc
index 93f864d7e0d4..3eb00cc6a011 100644
--- a/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc
+++ b/testautomation/dbaccess/optional/includes/db_JDBCMySQL.inc
@@ -197,10 +197,10 @@ testcase db_JDBCMySQL
'call fInsertIntoTable( aFieldContent(), sTableName)
'call fCloseDatabase
- 'use "dbaccess/optional/includes/b_lvl1_Query.inc"
- 'call b_lvl1_Query(sFileName,"dbase")
+ use "dbaccess/optional/includes/db_Query.inc"
+ call db_Query(sFileName,"MYSQL_JDBC")
- call tRelation( sFileName, aDatabaseProperties(6), "rel1", "rel2" )
+ 'call tRelation( sFileName, aDatabaseProperties(6), "rel1", "rel2" )
else
warnlog "Data Source could not be created - beyond testcases stopped"
diff --git a/testautomation/dbaccess/optional/includes/db_Query.inc b/testautomation/dbaccess/optional/includes/db_Query.inc
index 46dce6e903c6..b9d88142698f 100644
--- a/testautomation/dbaccess/optional/includes/db_Query.inc
+++ b/testautomation/dbaccess/optional/includes/db_Query.inc
@@ -45,7 +45,9 @@ function db_Query( sFileName , optional sType , optional sPassword)
case "ODBC", "JDBC"
sType = "2"
case "HSQLDB"
- sType = "2"
+ sType = "2"
+ case "MYSQL_JDBC"
+ sType = "3"
case else
sType = "1"
end select
@@ -57,6 +59,10 @@ function db_Query( sFileName , optional sType , optional sPassword)
call tQueryJoin( sFileName , sType, sPassword )
call tQueriesInQueries(sFileName)
endif
+
+ if sType = "3" then 'run only with database type MYSQL_JDBC
+ call tCastQuery( sFileName , sPassword )
+ endif
call tSortQueryWithAlias(sFileName , sPassword)
@@ -825,6 +831,46 @@ sub tTest8
sleep(2)
end sub
'--------------------------------------------------------------------
+sub tCastQuery( sFileName , sPassword )
+
+ fOpenDatabase(sFileName,sPassword)
+
+ if ( fOpenNewQueryDesign ) then
+ if ( fChooseTableInQueryAddTableDialog("TT_Query3") ) then
+ Kontext "QueryDesignCriterion"
+ sleep(1)
+ QueryDesignCriterion.TypeKeys "<MOD1 PAGEUP>" , true
+ sleep(1)
+ QueryDesignCriterion.TypeKeys "cast(f_date_s as date)" , true
+ sleep(1)
+ QueryDesignCriterion.TypeKeys "<RETURN>" , true
+ sleep(1)
+ Kontext "Toolbar"
+ printlog "- Executing query"
+ ExecuteBtn.Click
+ sleep(5)
+
+ Kontext "TableView"
+ if TableView.Exists(3) then
+
+ DataWindow.TypeKeys "<MOD1 C>"
+ if GetClipboard <> "40219" then
+ warnlog "the result should be 40219 but it is " + GetClipboard
+ else
+ printlog "the result is OK"
+ endif
+ else
+ warnlog "Execution of a query failed!"
+ end if
+
+ call fCloseQueryDesign
+
+ endif
+ endif
+ call fCloseDatabase
+
+end sub
+'--------------------------------------------------------------------
function tSortQueryWithAlias(sFileName, optional sPassword) ' test for isse 27832
if IsMissing(sPassword) then
diff --git a/testautomation/dbaccess/tools/tabletools.inc b/testautomation/dbaccess/tools/tabletools.inc
index 99c4abf723b3..461ef8ff2da3 100644
--- a/testautomation/dbaccess/tools/tabletools.inc
+++ b/testautomation/dbaccess/tools/tabletools.inc
@@ -340,6 +340,7 @@ function fCreateTable(aFieldTypeContent(),sTableName,optional sCatalog,optional
sleep 1
FieldType.TypeKeys "<RETURN>" , TRUE
Description.TypeKeys "<RETURN>" , TRUE
+ CellDescription.TypeKeys "<RETURN>" , TRUE
printlog "-------------------------------"
next
sleep(1)