diff options
Diffstat (limited to 'testautomation/dbaccess/optional/includes/db_Query.inc')
-rw-r--r-- | testautomation/dbaccess/optional/includes/db_Query.inc | 48 |
1 files changed, 47 insertions, 1 deletions
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 |