diff --git a/Data/Test/apau.log b/Data/Test/apau.log deleted file mode 100644 index b3ad078..0000000 --- a/Data/Test/apau.log +++ /dev/null @@ -1,50 +0,0 @@ - -SQL*Loader: Release 8.1.7.0.0 - Production on Wed Nov 28 12:28:34 2007 - -(c) Copyright 2000 Oracle Corporation. All rights reserved. - -Control File: apau.ctl -Data File: apau.ctl - Bad File: apau.bad - Discard File: none specified - - (Allow all discards) - -Number to load: ALL -Number to skip: 0 -Errors allowed: 50 -Bind array: 64 rows, maximum of 65536 bytes -Continuation: none specified -Path used: Conventional - -Table APEX_AUTHORIZATION, loaded from every logical record. -Insert option in effect for this table: REPLACE - - Column Name Position Len Term Encl Datatype ------------------------------- ---------- ----- ---- ---- --------------------- -RT_CODE FIRST * | CHARACTER -COMPONENT_NAME NEXT * | CHARACTER -COMPONENT_TYPE NEXT * | CHARACTER -PRIVILEGE NEXT * | CHARACTER - - -Table APEX_AUTHORIZATION: - 17 Rows successfully loaded. - 0 Rows not loaded due to data errors. - 0 Rows not loaded because all WHEN clauses were failed. - 0 Rows not loaded because all fields were null. - - -Space allocated for bind array: 65016 bytes(63 rows) -Space allocated for memory besides bind array: 0 bytes - -Total logical records skipped: 0 -Total logical records read: 17 -Total logical records rejected: 0 -Total logical records discarded: 0 - -Run began on Wed Nov 28 12:28:34 2007 -Run ended on Wed Nov 28 12:28:34 2007 - -Elapsed time was: 00:00:00.04 -CPU time was: 00:00:00.03 diff --git a/Data/Test/apex_auto_install.rb b/Data/Test/apex_auto_install.rb new file mode 100644 index 0000000..c7aac81 --- /dev/null +++ b/Data/Test/apex_auto_install.rb @@ -0,0 +1,111 @@ +#requires +require 'watir' +#email stuff +require 'net/smtp' + +#includes +include Watir +@@ie = IE.new +@@ie.visible= false +#set the speed of watir +@@ie.speed = :fast + +#Set constants for import +ORIGINAL_APP_ID = '155' +NEW_APP_ID = '102' +SCHEMA = 'MIP_TEST' +APEX_EXPORT_SCRIPTS_DIR = 'c:\\webmip\\trunk\\Screens\\' +APPLICATION_SCRIPT = 'f155.sql' +CSS_SCRIPT = 'css.sql' +IMAGES_SCRIPT = 'f155_img.sql' +THEME_SCRIPT = 'f155_theme_101.sql' +ADID = '4550' #APEX admin identifier +WORKSPACE = 'MIP_TEST' +USER = 'ADMIN' +PASSWORD = 'password' + +def importpageone (p_file, p_file_type, p_charset) + @@ie.link(:title, 'Application Builder').click + @@ie.wait + @@ie.button(:value, 'Import >').click + @@ie.wait + @@ie.file_field(:id, "P460_FILE").set(p_file) + @@ie.select_list(:id, "P460_FILE_TYPE").select p_file_type + @@ie.select_list(:id, "P460_FILE_CHARSET").select p_charset + @@ie.button(:value, 'Next >').click + @@ie.wait + @@ie.button(:value, 'Next >').click + @@ie.wait +end + +begin + #Login + @@ie.goto("http://loordv01/pls/apex/f?p=#{ADID}:1") + @@ie.text_field(:id, "F#{ADID}_P1_COMPANY").set(WORKSPACE) + @@ie.text_field(:id, "F#{ADID}_P1_USERNAME").set(USER) + @@ie.text_field(:id, "F#{ADID}_P1_PASSWORD").set(PASSWORD) + @@ie.button(:value, 'Login').click + @@ie.wait + #Import Application export file + importpageone(APEX_EXPORT_SCRIPTS_DIR+APPLICATION_SCRIPT, + 'Application, Page or Component Export', + 'Western European Windows 1252') + #parse page + @@ie.select_list(:id, "P49_PARSE_AS" ).select(SCHEMA) + @@ie.select_list(:id, "P49_BUILD_STATUS" ).select 'Run and Build Application' + @@ie.radio(:id, "P49_NEW_FLOW_OPT_2" ).set + @@ie.wait + @@ie.text_field(:id, "P49_NEW_FLOW_ID").set(NEW_APP_ID) + @@ie.button(:value, 'Install').click + @@ie.wait + #This button won't appear the first time the import occurs + if @@ie.button(:value, 'Replace Existing Application '+NEW_APP_ID).exists? + @@ie.button(:value, 'Replace Existing Application '+NEW_APP_ID).click + @@ie.wait + end + #Install Supporting objects + @@ie.radio(:id, "P2100_ACTION_0" ).set + @@ie.button(:value, 'Next >').click + @@ie.wait + @@ie.button(:value, 'Install').click + @@ie.wait + #Install CSS + + #Need to delete the existing CSS file before installing a new one + #have decided to just install the application for the moment. + #back to install page start + + #importpageone(APEX_EXPORT_SCRIPTS_DIR+CSS_SCRIPT, + # 'CSS Export', + # 'Western European Windows 1252') + + + + @@ie.close + +rescue StandardError => anyerror +#Hopefully we never get here but, we'll try and send an email if the +#script errors so we can fix it +#don't leave memory hungry instances of ie running if we get an error +@@ie.close + +#build the email +from_addr = 'jamie.priest@advantica.com' +to_addr = 'jamie.priest@advanticagroup.com' +project = 'webMIP test build process' +emailtext = < +To: Jamie Priest <#{to_addr}> +Subject: #{project} automated test failure + +An automated assertion failed for the project +#{project} + +#{anyerror} + +END_EMAIL + Net::SMTP.start('LOMAIL01') do |smtp| + smtp.sendmail emailtext, from_addr, to_addr + end + +end \ No newline at end of file diff --git a/InstallMIP.cmd b/InstallMIP.cmd index 0cc0987..b2213e5 100644 --- a/InstallMIP.cmd +++ b/InstallMIP.cmd @@ -35,10 +35,14 @@ cd ..\.. goto :done :test -@echo Install Test +@echo Install Test data cd Data\test call InstallData %3/%4@%5 +@echo Installed Test data +@echo Installing Test application in APEX... +ruby apex_auto_install.rb cd ..\.. + @echo Test Complete goto :done