From 9048b0553f317a7cc208ef06ae746731a30cad1c Mon Sep 17 00:00:00 2001 From: Oleksandr Deriabin Date: Wed, 25 Sep 2019 15:05:45 +0300 Subject: [PATCH 01/64] Update common modules to support mobile applications with syncMsgVersion less than 5.0 --- user_modules/sequences/actions.lua | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/user_modules/sequences/actions.lua b/user_modules/sequences/actions.lua index b26cdb91a1..9d02e7b73f 100644 --- a/user_modules/sequences/actions.lua +++ b/user_modules/sequences/actions.lua @@ -53,16 +53,9 @@ local function getMobConnectionFromSession(pMobSession) return pMobSession.mobile_session_impl.connection end -local function getPolicyAppId(pAppId) - local appParams = m.app.getParams(pAppId) - local appId = appParams.fullAppID - if not appId then appId = appParams.appID end - return appId -end - --- Get HMI key for App by script's App id local function getHmiAppIdKey(pAppId) - local appId = getPolicyAppId(pAppId) + local appId = m.app.getPolicyAppId(pAppId) local connection = getMobConnectionFromSession(m.mobile.getSession(pAppId)) return utils.getDeviceName(connection.host, connection.port) .. tostring(appId) @@ -474,7 +467,7 @@ local function policyTableUpdateProprietary(pPTUpdateFunc, pExpNotificationFunc) { requestType = "PROPRIETARY", fileName = m.sdl.getPTSFilePath() }) local ptuTable = getPTUFromPTS() for i, _ in pairs(m.mobile.getApps()) do - ptuTable.policy_table.app_policies[m.app.getParams(i).fullAppID] = m.ptu.getAppData(i) + ptuTable.policy_table.app_policies[m.app.getPolicyAppId(i)] = m.ptu.getAppData(i) end if pPTUpdateFunc then pPTUpdateFunc(ptuTable) @@ -509,8 +502,8 @@ end local function policyTableUpdateHttp(pPTUpdateFunc, pExpNotificationFunc) local ptuFileName = os.tmpname() local ptuTable = getPTUFromPTS() - for i = 1, m.getAppsCount() do - ptuTable.policy_table.app_policies[m.getConfigAppParams(i).fullAppID] = m.ptu.getAppData(i) + for i, _ in pairs(m.mobile.getApps()) do + ptuTable.policy_table.app_policies[m.app.getPolicyAppId(i)] = m.ptu.getAppData(i) end if pPTUpdateFunc then pPTUpdateFunc(ptuTable) @@ -637,6 +630,19 @@ function m.app.getParams(pAppId) return config["application" .. pAppId].registerAppInterfaceParams end +--[[ @app.getPolicyAppId: get application policy id +--! @parameters: +--! pAppId - script's mobile application id +--! @return: application policy id +--]] +function m.app.getPolicyAppId(pAppId) + local appParams = m.app.getParams(pAppId) + if appParams.syncMsgVersion.majorVersion < 5 or appParams.fullAppID == nil then + return appParams.appID + end + return appParams.fullAppID +end + --[[ @app.getHMIIds: get HMI application Ids collection --! @parameters: none --! @return: HMI Ids collection @@ -712,7 +718,7 @@ function m.app.setHMIId(pHMIAppId, pAppId) if not pAppId then pAppId = 1 end hmiAppIds[getHmiAppIdKey(pAppId)] = { hmiId = pHMIAppId, - policyId = getPolicyAppId(pAppId) + policyId = m.app.getPolicyAppId(pAppId) } end From fd1de81a30054640f8d7d5fef2d24ee8c447fe50 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Fri, 15 Nov 2019 12:00:13 +0200 Subject: [PATCH 02/64] Update for existed scripts --- ...4_Applying_since_until_for_custom_data.lua | 99 ++++++++++++++++--- ...25_Applying_deprecated_for_custom_data.lua | 12 +-- .../026_Applying_removed_for_custom_data.lua | 28 +++--- .../034_PTU_empty_vehicle_data.lua | 2 +- ...I_permissions_after_ptu_with_empty_VDI.lua | 2 +- .../commonGenericNetSignalData.lua | 11 ++- ...uccess_deviceStatus_primaryAudioSource.lua | 12 ++- ...s_flow_deviceStatus_primaryAudioSource.lua | 12 ++- .../API/VehicleData/commonVehicleData.lua | 49 +++++++++ ...isterAppInterface_PositiveCase_SUCCESS.lua | 2 +- .../read_generic_network_signal_data.txt | 2 +- 11 files changed, 185 insertions(+), 46 deletions(-) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua index c1e5a0bae2..061a541b73 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua @@ -5,9 +5,9 @@ -- Precondition: -- 1. Preloaded file contains VehicleDataItems for all RPC spec VD --- 2. App1 is registered with majorVersion = 3 --- 3. App2 is registered with majorVersion = 6 --- 4. PTU is performed, the update contains VehicleDataItems with since, until parameters +-- 2. App1 is registered with majorVersion = 3.0 +-- 3. App2 is registered with majorVersion = 5.9 +-- 4. PTU is performed, the update contains single VehicleDataItems with since, until parameters -- 5. Custom VD is allowed -- Sequence: @@ -23,21 +23,23 @@ local common = require('test_scripts/API/VehicleData/GenericNetworkSignalData/co runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 3 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 -config.application2.registerAppInterfaceParams.syncMsgVersion.majorVersion = 6 -config.application2.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 +config.application2.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application2.registerAppInterfaceParams.syncMsgVersion.minorVersion = 9 --[[ Local Variables ]] local itemInteger local vehicleDataName = "custom_vd_item1_integer" +local validVDvalueForApp1 = 50 +local validVDvalueForApp2 = 150 for VDkey, VDitem in pairs (common.customDataTypeSample)do if VDitem.name == vehicleDataName then + itemInteger = common.cloneTable(common.customDataTypeSample[VDkey]) common.customDataTypeSample[VDkey]["since"] = "1.0" common.customDataTypeSample[VDkey]["until"] = "5.0" - itemInteger = common.cloneTable(common.customDataTypeSample[VDkey]) itemInteger.minvalue = 101 itemInteger.maxvalue = 1000 - itemInteger.since = "5.0" + itemInteger.since = "5.1" end end @@ -50,14 +52,13 @@ local appSessionId1 = 1 local appSessionId2 = 2 local function setNewParams() - common.VehicleDataItemsWithData[vehicleDataName].value = 150 + common.VehicleDataItemsWithData[vehicleDataName].value = validVDvalueForApp2 end local function getVehicleDataGenericError(pAppId, pData) local mobRequestData = { [common.VehicleDataItemsWithData[pData].name] = true } local hmiRequestData = common.getHMIrequestData(pData) local hmiResponseData = common.getVehicleDataResponse(pData) - local cid = common.getMobileSession(pAppId):SendRPC("GetVehicleData", mobRequestData) common.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", hmiRequestData) :Do(function(_, data) @@ -66,6 +67,57 @@ local function getVehicleDataGenericError(pAppId, pData) common.getMobileSession(pAppId):ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) end +local function onVD2AppsWithDifferentValues() + common.VehicleDataItemsWithData[vehicleDataName].value = validVDvalueForApp1 + local HMInotifData1 = common.getVehicleDataResponse(vehicleDataName) + common.VehicleDataItemsWithData[vehicleDataName].value = validVDvalueForApp2 + local HMInotifData2, mobileNotifData2 = common.getVehicleDataResponse(vehicleDataName) + common.getHMIConnection():SendNotification("VehicleInfo.OnVehicleData", HMInotifData1) + common.getHMIConnection():SendNotification("VehicleInfo.OnVehicleData", HMInotifData2) + + common.getMobileSession(1):ExpectNotification("OnVehicleData", mobileNotifData2) + common.getMobileSession(2):ExpectNotification("OnVehicleData", mobileNotifData2) + + common.wait(500) +end + +local function subscriptionFor2Apps() + local vehicleData = common.VehicleDataItemsWithData[vehicleDataName] + local mobileRequest = { [vehicleDataName] = true } + local hmiRequestData = common.getHMIrequestData(vehicleDataName) + local hmiResponseData = { + [vehicleData.key] = { + dataType = common.CUSTOM_DATA_TYPE, + resultCode = "SUCCESS" + } + } + + local cid1 = common.getMobileSession(1):SendRPC("SubscribeVehicleData", mobileRequest) + common.getHMIConnection():ExpectRequest("VehicleInfo.SubscribeVehicleData", hmiRequestData) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", hmiResponseData) + end) + + local mobileResponseData = { [vehicleDataName] = common.cloneTable(hmiResponseData[vehicleData.key]) } + mobileResponseData[vehicleDataName].oemCustomDataType = vehicleData.type + mobileResponseData.success = true + mobileResponseData.resultCode = "SUCCESS" + common.getMobileSession(1):ExpectResponse(cid1, mobileResponseData) + :ValidIf(function(_,data) + return common.validation(data.payload, mobileResponseData, "SubscribeVehicleData response") + end) + :Do(function() + local cid2 = common.getMobileSession(2):SendRPC("SubscribeVehicleData", mobileRequest) + common.getMobileSession(2):ExpectResponse(cid2, mobileResponseData) + :ValidIf(function(_,data) + return common.validation(data.payload, mobileResponseData, "SubscribeVehicleData response") + end) + end) + + common.getMobileSession(1):ExpectNotification("OnHashChange") + common.getMobileSession(2):ExpectNotification("OnHashChange") +end + -- [[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions) @@ -81,27 +133,42 @@ runner.Step("App2 activation", common.activateApp, { appSessionId2 }) runner.Title("Test") runner.Step("App1 SubscribeVehicleData " .. vehicleDataName, common.VDsubscription, { appSessionId1, vehicleDataName, "SubscribeVehicleData" }) -runner.Step("App1 OnVehicleData " .. vehicleDataName, common.onVD, { appSessionId1, vehicleDataName }) +runner.Step("App1 OnVehicleData " .. vehicleDataName, common.onVD, + { appSessionId1, vehicleDataName, common.VD.NOT_EXPECTED }) runner.Step("App1 UnsubscribeVehicleData " .. vehicleDataName, common.VDsubscription, { appSessionId1, vehicleDataName, "UnsubscribeVehicleData" }) -runner.Step("App1 GetVehicleData " .. vehicleDataName, common.GetVD, { appSessionId1, vehicleDataName }) +runner.Step("App1 GetVehicleData " .. vehicleDataName, getVehicleDataGenericError, { appSessionId1, vehicleDataName }) -runner.Step("Update parameter values according to since and until values", setNewParams) runner.Step("App2 SubscribeVehicleData " .. vehicleDataName, common.VDsubscription, { appSessionId2, vehicleDataName, "SubscribeVehicleData" }) -runner.Step("App2 OnVehicleData " .. vehicleDataName, common.onVD, { appSessionId2, vehicleDataName }) +runner.Step("App2 OnVehicleData " .. vehicleDataName, common.onVD, + { appSessionId2, vehicleDataName, common.VD.NOT_EXPECTED }) runner.Step("App2 UnsubscribeVehicleData " .. vehicleDataName, common.VDsubscription, { appSessionId2, vehicleDataName, "UnsubscribeVehicleData" }) -runner.Step("App2 GetVehicleData " .. vehicleDataName, common.GetVD, { appSessionId2, vehicleDataName }) +runner.Step("App2 GetVehicleData " .. vehicleDataName, getVehicleDataGenericError, + { appSessionId2, vehicleDataName }) + +runner.Step("Update parameter values according to since and until values", setNewParams) +runner.Step("App2 SubscribeVehicleData " .. vehicleDataName .. " with updated values", common.VDsubscription, + { appSessionId2, vehicleDataName, "SubscribeVehicleData" }) +runner.Step("App2 OnVehicleData " .. vehicleDataName, common.onVD, + { appSessionId2, vehicleDataName, common.VD.EXPECTED }) +runner.Step("App2 UnsubscribeVehicleData " .. vehicleDataName .. " with updated values", common.VDsubscription, + { appSessionId2, vehicleDataName, "UnsubscribeVehicleData" }) +runner.Step("App2 GetVehicleData " .. vehicleDataName .. " with updated values", common.GetVD, + { appSessionId2, vehicleDataName }) runner.Step("App1 SubscribeVehicleData " .. vehicleDataName .. " with updated values", common.VDsubscription, { appSessionId1, vehicleDataName, "SubscribeVehicleData" }) runner.Step("App1 OnVehicleData " .. vehicleDataName .. " with updated values", common.onVD, - { appSessionId1, vehicleDataName, common.VD.NOT_EXPECTED }) + { appSessionId1, vehicleDataName, common.VD.EXPECTED }) runner.Step("App1 UnsubscribeVehicleData " .. vehicleDataName .. " with updated values", common.VDsubscription, { appSessionId1, vehicleDataName, "UnsubscribeVehicleData" }) -runner.Step("App1 GetVehicleData " .. vehicleDataName .. " with updated values", getVehicleDataGenericError, +runner.Step("App1 GetVehicleData " .. vehicleDataName .. " with updated values", common.GetVD, { appSessionId1, vehicleDataName }) +runner.Step("SubscribeVehicleData for 2 apps " .. vehicleDataName, subscriptionFor2Apps) +runner.Step("Two apps onVehicleData " .. vehicleDataName, onVD2AppsWithDifferentValues) + runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua index 627a199697..824ab059f9 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua @@ -5,8 +5,8 @@ -- Precondition: -- 1. Preloaded file contains VehicleDataItems for all RPC spec VD --- 2. App1 is registered with majorVersion = 3 --- 3. App2 is registered with majorVersion = 6 +-- 2. App1 is registered with majorVersion = 3.0 +-- 3. App2 is registered with majorVersion = 5.9 -- 4. PTU is performed, the update contains VehicleDataItems with deprecated parameter -- 5. Custom VD is allowed @@ -23,19 +23,19 @@ local common = require('test_scripts/API/VehicleData/GenericNetworkSignalData/co runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 3 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 -config.application2.registerAppInterfaceParams.syncMsgVersion.majorVersion = 6 -config.application2.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 +config.application2.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application2.registerAppInterfaceParams.syncMsgVersion.minorVersion = 9 --[[ Local Variables ]] local itemBool for VDkey, VDitem in pairs (common.customDataTypeSample)do if VDitem.name == "custom_vd_item5_boolean" then + itemBool = common.cloneTable(common.customDataTypeSample[VDkey]) common.customDataTypeSample[VDkey]["since"] = "1.0" common.customDataTypeSample[VDkey]["until"] = "5.0" - itemBool = common.cloneTable(common.customDataTypeSample[VDkey]) itemBool.deprecated = true - itemBool.since = "5.0" + itemBool.since = "5.1" elseif VDitem.name == "custom_vd_item6_array_string" then common.customDataTypeSample[VDkey].deprecated = false end diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua index cc24701db7..a4a6d469bb 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua @@ -31,11 +31,11 @@ local itemEnum for VDkey, VDitem in pairs (common.customDataTypeSample)do if VDitem.name == "custom_vd_item3_enum" then + itemEnum = common.cloneTable(common.customDataTypeSample[VDkey]) common.customDataTypeSample[VDkey]["since"] = "1.0" common.customDataTypeSample[VDkey]["until"] = "5.0" - itemEnum = common.cloneTable(common.customDataTypeSample[VDkey]) itemEnum.removed = true - itemEnum.since = "5.0" + itemEnum.since = "5.1" elseif VDitem.name == "custom_vd_item4_string" then common.customDataTypeSample[VDkey].removed = false end @@ -71,19 +71,19 @@ for i=1,2 do runner.Step("App" .. i .. " GetVehicleData custom_vd_item4_string", common.GetVD, { i, "custom_vd_item4_string" }) end -runner.Step("App2 SubscribeVehicleData custom_vd_item4_string", common.VDsubscription, - { appSessionId2, "custom_vd_item4_string", "SubscribeVehicleData" }) -runner.Step("App2 OnVehicleData custom_vd_item4_string", common.onVD, { appSessionId2, "custom_vd_item4_string" }) -runner.Step("App2 UnsubscribeVehicleData custom_vd_item4_string", common.VDsubscription, - { appSessionId2, "custom_vd_item4_string", "UnsubscribeVehicleData" }) -runner.Step("App2 GetVehicleData custom_vd_item4_string", common.GetVD, { appSessionId2, "custom_vd_item4_string" }) +runner.Step("App1 SubscribeVehicleData custom_vd_item3_enum", common.VDsubscription, + { appSessionId1, "custom_vd_item3_enum", "SubscribeVehicleData" }) +runner.Step("App1 OnVehicleData custom_vd_item3_enum", common.onVD, { appSessionId1, "custom_vd_item3_enum" }) +runner.Step("App1 UnsubscribeVehicleData custom_vd_item3_enum", common.VDsubscription, + { appSessionId1, "custom_vd_item3_enum", "UnsubscribeVehicleData" }) +runner.Step("App1 GetVehicleData custom_vd_item3_enum", common.GetVD, { appSessionId1, "custom_vd_item3_enum" }) -runner.Step("App1 SubscribeVehicleData custom_vd_item3_enum", common.errorRPCprocessing, - { appSessionId1, "custom_vd_item3_enum", "SubscribeVehicleData", "INVALID_DATA"}) -runner.Step("App1 OnVehicleData custom_vd_item3_enum", common.onVD, - { appSessionId1, "custom_vd_item3_enum", common.VD.NOT_EXPECTED }) -runner.Step("App1 GetVehicleData custom_vd_item3_enum", common.errorRPCprocessing, - { appSessionId1, "custom_vd_item3_enum", "GetVehicleData", "INVALID_DATA"}) +runner.Step("App2 SubscribeVehicleData custom_vd_item3_enum", common.errorRPCprocessing, + { appSessionId2, "custom_vd_item3_enum", "SubscribeVehicleData", "INVALID_DATA"}) +runner.Step("App2 OnVehicleData custom_vd_item3_enum", common.onVD, + { appSessionId2, "custom_vd_item3_enum", common.VD.NOT_EXPECTED }) +runner.Step("App2 GetVehicleData custom_vd_item3_enum", common.errorRPCprocessing, + { appSessionId2, "custom_vd_item3_enum", "GetVehicleData", "INVALID_DATA"}) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/034_PTU_empty_vehicle_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/034_PTU_empty_vehicle_data.lua index 903571cfc9..42c12c940c 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/034_PTU_empty_vehicle_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/034_PTU_empty_vehicle_data.lua @@ -47,7 +47,7 @@ local function ptuFuncWithVDI(pTbl) rpcsGroupWithAllVehicleData.SubscribeVehicleData.parameters = allVehicleData rpcsGroupWithAllVehicleData.UnsubscribeVehicleData.parameters = allVehicleData - pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { + pTbl.policy_table.app_policies[common.getPolicyAppId(1)].groups = { "Base-4", "NewGroupWithAllData" } end diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/035_VDI_permissions_after_ptu_with_empty_VDI.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/035_VDI_permissions_after_ptu_with_empty_VDI.lua index c33119232b..13d2beef5a 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/035_VDI_permissions_after_ptu_with_empty_VDI.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/035_VDI_permissions_after_ptu_with_empty_VDI.lua @@ -53,7 +53,7 @@ local function ptuFuncWithVDI(pTbl) rpcsGroupWithAllVehicleData.SubscribeVehicleData.parameters = allVehicleData rpcsGroupWithAllVehicleData.UnsubscribeVehicleData.parameters = allVehicleData - pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { + pTbl.policy_table.app_policies[common.getPolicyAppId(1)].groups = { "Base-4", "NewGroupWithAllData" } end diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua index 7e45fcebfc..a1936705e1 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua @@ -19,6 +19,7 @@ local SDL = require("modules/SDL") --[[ Local Variables ]] local common = {} +common.getPolicyAppId = actions.app.getPolicyAppId common.start = actions.start common.setSDLIniParameter = actions.setSDLIniParameter common.activateApp = actions.activateApp @@ -38,6 +39,8 @@ common.tableToString = utils.tableToString common.tableToJsonFile = utils.tableToJsonFile common.jsonFileToTable = utils.jsonFileToTable common.isFileExist = utils.isFileExist +common.isFileExist = utils.isFileExist +common.wait = utils.wait common.GetPathToSDL = commonPreconditions.GetPathToSDL @@ -803,7 +806,7 @@ function common.ptuFuncWithCustomData(pTbl) rpcsGroupWithAllVehicleData.SubscribeVehicleData.parameters = customDataNames rpcsGroupWithAllVehicleData.UnsubscribeVehicleData.parameters = customDataNames - pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { + pTbl.policy_table.app_policies[actions.app.getPolicyAppId(1)].groups = { "Base-4", "GroupWithAllRpcSpecVehicleData", "GroupWithAllVehicleData" } end @@ -811,7 +814,7 @@ end function common.ptuFuncWithCustomData2Apps(pTbl) common.ptuFuncWithCustomData(pTbl) - pTbl.policy_table.app_policies[common.getConfigAppParams(2).fullAppID].groups = { + pTbl.policy_table.app_policies[actions.app.getPolicyAppId(2)].groups = { "Base-4", "GroupWithAllRpcSpecVehicleData", "GroupWithAllVehicleData" } end @@ -829,7 +832,7 @@ function common.ignitionOff() :Do(function() removeSessions() StopSDL() - utils.wait(1000) + common.wait(1000) end) common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "SUSPEND" }) common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLPersistenceComplete") @@ -899,7 +902,7 @@ function common.cleanSessions() test.mobileSession[i] = nil end) end - utils.wait() + common.wait() end function common.updateCustomDataTypeSample(pName, dParam, pValue) diff --git a/test_scripts/API/VehicleData/GetVehicleData/004_Success_deviceStatus_primaryAudioSource.lua b/test_scripts/API/VehicleData/GetVehicleData/004_Success_deviceStatus_primaryAudioSource.lua index dbc2568c94..70f80a19e4 100644 --- a/test_scripts/API/VehicleData/GetVehicleData/004_Success_deviceStatus_primaryAudioSource.lua +++ b/test_scripts/API/VehicleData/GetVehicleData/004_Success_deviceStatus_primaryAudioSource.lua @@ -45,7 +45,17 @@ local function processRPCSuccess(pAudioSource) local cid = common.getMobileSession():SendRPC(rpc.name, rpc.params) local vehicleDataValues = { deviceStatus = { - primaryAudioSource = pAudioSource + primaryAudioSource = pAudioSource, + voiceRecOn = false, + btIconOn = false, + callActive = false, + phoneRoaming = false, + textMsgAvailable = false, + battLevelStatus = "TWO_LEVEL_BARS", + stereoAudioOutputMuted = false, + monoAudioOutputMuted = false, + signalLevelStatus = "ONE_LEVEL_BARS", + eCallEventActive = false } } common.getHMIConnection():ExpectRequest("VehicleInfo." .. rpc.name, rpc.params) diff --git a/test_scripts/API/VehicleData/OnVehicleData/005_Success_flow_deviceStatus_primaryAudioSource.lua b/test_scripts/API/VehicleData/OnVehicleData/005_Success_flow_deviceStatus_primaryAudioSource.lua index f91a1a7d29..08f533906a 100644 --- a/test_scripts/API/VehicleData/OnVehicleData/005_Success_flow_deviceStatus_primaryAudioSource.lua +++ b/test_scripts/API/VehicleData/OnVehicleData/005_Success_flow_deviceStatus_primaryAudioSource.lua @@ -50,7 +50,17 @@ local rpc2 = { name = "OnVehicleData", params = { deviceStatus = { - primaryAudioSource = "CD" + primaryAudioSource = "CD", + voiceRecOn = false, + btIconOn = false, + callActive = false, + phoneRoaming = false, + textMsgAvailable = false, + battLevelStatus = "TWO_LEVEL_BARS", + stereoAudioOutputMuted = false, + monoAudioOutputMuted = false, + signalLevelStatus = "ONE_LEVEL_BARS", + eCallEventActive = false } } } diff --git a/test_scripts/API/VehicleData/commonVehicleData.lua b/test_scripts/API/VehicleData/commonVehicleData.lua index 3e410da050..6e63d42435 100644 --- a/test_scripts/API/VehicleData/commonVehicleData.lua +++ b/test_scripts/API/VehicleData/commonVehicleData.lua @@ -271,6 +271,9 @@ m.wait = utils.wait m.extendedPolicy = sdl.buildOptions.extendedPolicy m.setSDLIniParameter = actions.setSDLIniParameter m.cloneTable = utils.cloneTable +m.cprint = utils.cprint +m.getPreloadedPT = actions.sdl.getPreloadedPT +m.setPreloadedPT = actions.sdl.setPreloadedPT --[[ Common Functions ]] local function getVDParams() @@ -342,4 +345,50 @@ function m.checkNotificationIgnored(pData) :Times(0) end +function m.updatePreloadedFile(pUpdateFunc) + local pt = m.getPreloadedPT() + pt.policy_table.functional_groupings["DataConsent-2"].rpcs = utils.json.null + pUpdateFunc(pt) + m.setPreloadedPT(pt) +end + +function m.processGetVDsuccess(pData) + local reqParams = { + [pData] = true + } + local hmiResParams = { + [pData] = m.allVehicleData[pData].value + } + local cid = m.getMobileSession():SendRPC("GetVehicleData", reqParams) + m.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", reqParams) + :Do(function(_, data) + m.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", hmiResParams) + end) + local mobResParams = m.cloneTable(hmiResParams) + mobResParams.success = true + mobResParams.resultCode = "SUCCESS" + m.getMobileSession():ExpectResponse(cid, mobResParams) +end + +function m.processGetVDunsuccess(pData) + local reqParams = { + [pData] = true + } + local cid = m.getMobileSession():SendRPC("GetVehicleData", reqParams) + m.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", reqParams) :Times(0) + m.getMobileSession():ExpectResponse(cid, { resultCode = "INVALID_DATA", success = false }) +end + +function m.processGetVDwithCustomDataSuccess() + local cid = m.getMobileSession():SendRPC("GetVehicleData", { custom_vd_item1_integer = true }) + m.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", { OEM_REF_INT = true }) + :Do(function(_, data) + m.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { OEM_REF_INT = 10 }) + end) + local mobResParams = { custom_vd_item1_integer = 10 } + mobResParams.success = true + mobResParams.resultCode = "SUCCESS" + m.getMobileSession():ExpectResponse(cid, mobResParams) +end + return m diff --git a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua index 6d90559750..76284e1545 100644 --- a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua @@ -78,7 +78,7 @@ local function SetNotificationParams() transportType = "WIFI", isSDLAllowed = true } - notificationParams.application.policyAppID = requestParams.fullAppID + notificationParams.application.policyAppID = requestParams.appID notificationParams.ttsName = requestParams.ttsName notificationParams.vrSynonyms = requestParams.vrSynonyms return notificationParams diff --git a/test_sets/read_generic_network_signal_data.txt b/test_sets/read_generic_network_signal_data.txt index a3ebff45d4..292f5c9b04 100644 --- a/test_sets/read_generic_network_signal_data.txt +++ b/test_sets/read_generic_network_signal_data.txt @@ -21,7 +21,7 @@ ./test_scripts/API/VehicleData/GenericNetworkSignalData/021_Not_applying_mandatory_root_level.lua ./test_scripts/API/VehicleData/GenericNetworkSignalData/022_Applying_mandatory_child_level.lua ./test_scripts/API/VehicleData/GenericNetworkSignalData/023_VehicleDataItems_only_mandatory.lua -;./test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua https://github.com/smartdevicelink/sdl_core/issues/2997 +./test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua ./test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua ./test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua ./test_scripts/API/VehicleData/GenericNetworkSignalData/027_VDI_permissions_in_next_ign_cycle.lua From 4c8596e7f9bb5ad6b9f81ef0c8f7013e220af727 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Fri, 15 Nov 2019 12:08:39 +0200 Subject: [PATCH 03/64] Scripts for vehicle data versioning --- ...pp_version_more_then_parameter_version.lua | 45 ++++++++++++++ ...DB_app_version_equal_parameter_version.lua | 45 ++++++++++++++ ...pp_version_less_then_parameter_version.lua | 45 ++++++++++++++ ...pp_version_more_then_parameter_version.lua | 56 ++++++++++++++++++ ...pp_version_more_then_parameter_version.lua | 56 ++++++++++++++++++ ...pp_version_more_then_parameter_version.lua | 56 ++++++++++++++++++ ...app_version_equal_to_parameter_version.lua | 56 ++++++++++++++++++ ...pp_version_less_then_parameter_version.lua | 59 +++++++++++++++++++ ...pp_version_more_then_parameter_version.lua | 56 ++++++++++++++++++ ...pp_version_more_then_parameter_version.lua | 59 +++++++++++++++++++ ...PI_app_version_equal_parameter_version.lua | 59 +++++++++++++++++++ ...pp_version_less_then_parameter_version.lua | 59 +++++++++++++++++++ test_sets/vehicle_data_versioning.txt | 12 ++++ 13 files changed, 663 insertions(+) create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/001_VD_parameter_in_API_DB_app_version_more_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/002_VD_parameter_in_API_DB_app_version_equal_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/003_VD_parameter_in_API_DB_app_version_less_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/004_VD_parameter_in_API_DB_different_values_app_version_more_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/005_VD_parameter_in_API_DB_different_values_version_in_DB_more_then_version_of_API_app_version_more_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/006_VD_parameter_DB_app_version_more_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/007_VD_parameter_DB_app_version_equal_to_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/008_VD_parameter_DB_app_version_less_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/009_VD_parameter_DB_version_more_then_API_app_version_more_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/010_VD_parameter_in_API_app_version_more_then_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/011_VD_parameter_in_API_app_version_equal_parameter_version.lua create mode 100644 test_scripts/API/VehicleData/VehicleDataVersioning/012_VD_parameter_in_API_app_version_less_then_parameter_version.lua create mode 100644 test_sets/vehicle_data_versioning.txt diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/001_VD_parameter_in_API_DB_app_version_more_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/001_VD_parameter_in_API_DB_app_version_more_then_parameter_version.lua new file mode 100644 index 0000000000..e7e38c3b8e --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/001_VD_parameter_in_API_DB_app_version_more_then_parameter_version.lua @@ -0,0 +1,45 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is more then parameter version, +-- parameter is listed in DB and API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.5 +-- 2. Parameter has since=5.0 in API and DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 5 + +--[[ Local Variables ]] +-- fuelRange has since="5.0" in API +local vehicleDataName = "fuelRange" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/002_VD_parameter_in_API_DB_app_version_equal_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/002_VD_parameter_in_API_DB_app_version_equal_parameter_version.lua new file mode 100644 index 0000000000..51bf8f6952 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/002_VD_parameter_in_API_DB_app_version_equal_parameter_version.lua @@ -0,0 +1,45 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is equal to parameter version, +-- parameter is listed in DB and API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.0 +-- 2. Parameter has since=5.0 in API and DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 + +--[[ Local Variables ]] +-- fuelRange has since="5.0" in API +local vehicleDataName = "fuelRange" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/003_VD_parameter_in_API_DB_app_version_less_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/003_VD_parameter_in_API_DB_app_version_less_then_parameter_version.lua new file mode 100644 index 0000000000..65391cf4bd --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/003_VD_parameter_in_API_DB_app_version_less_then_parameter_version.lua @@ -0,0 +1,45 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is NOT able to retrieve the parameter in case app version is less then parameter version, +-- parameter is listed in DB and API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.0 +-- 2. Parameter has since=5.1 in API and DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. reject the request as empty one +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 + +--[[ Local Variables ]] +-- cloudAppVehicleID has since="5.1" in API +local vehicleDataName = "cloudAppVehicleID" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData INVALID_DATA", common.processGetVDunsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/004_VD_parameter_in_API_DB_different_values_app_version_more_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/004_VD_parameter_in_API_DB_different_values_app_version_more_then_parameter_version.lua new file mode 100644 index 0000000000..919e07aa07 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/004_VD_parameter_in_API_DB_different_values_app_version_more_then_parameter_version.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is more then parameter version, +-- parameter is listed in DB and API and parameter has different version in DB and API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.5 +-- 2. Parameter has since=5.0 in API and since 6.0 in DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful because SDL perform validation according to API and ignore the version from DB +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 5 + +--[[ Local Variables ]] +-- fuelRange has since="5.0" in API +local vehicleDataName = "fuelRange" + +--[[ Local Functions ]] +local function preloadedUpdFunc(pTbl) + for key, value in pairs (pTbl.policy_table.vehicle_data.schema_items) do + if value.name == vehicleDataName then + pTbl.policy_table.vehicle_data.schema_items[key].since = "6.0.0" + elseif key == #pTbl.policy_table.vehicle_data.schema_items then + common.cprint(35, vehicleDataName .. " was not found in preloaded file") + end + end +end + +local function ptuFunc(pTbl) + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Update preloaded file since=6.0 for fuelRange", common.updatePreloadedFile, { preloadedUpdFunc }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/005_VD_parameter_in_API_DB_different_values_version_in_DB_more_then_version_of_API_app_version_more_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/005_VD_parameter_in_API_DB_different_values_version_in_DB_more_then_version_of_API_app_version_more_then_parameter_version.lua new file mode 100644 index 0000000000..77793ac323 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/005_VD_parameter_in_API_DB_different_values_version_in_DB_more_then_version_of_API_app_version_more_then_parameter_version.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is more then API version + -- and parameter version, parameter is listed in DB and API and parameter in DB has version more than version of API + +-- In case: +-- 1. App is registered with syncMsgVersion=8.0 +-- 2. Parameter has since=5.0 in API and since 6.1 in DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 8 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 + +--[[ Local Variables ]] +-- fuelRange has since="5.0" in API +local vehicleDataName = "fuelRange" + +--[[ Local Functions ]] +local function preloadedUpdFunc(pTbl) + for key, value in pairs (pTbl.policy_table.vehicle_data.schema_items) do + if value.name == vehicleDataName then + pTbl.policy_table.vehicle_data.schema_items[key].since = "6.1.0" + elseif key == #pTbl.policy_table.vehicle_data.schema_items then + common.cprint(35, vehicleDataName .. " was not found in preloaded file") + end + end +end + +local function ptuFunc(pTbl) + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Update preloaded file since=6.0 for fuelRange", common.updatePreloadedFile, { preloadedUpdFunc }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/006_VD_parameter_DB_app_version_more_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/006_VD_parameter_DB_app_version_more_then_parameter_version.lua new file mode 100644 index 0000000000..e3bc09ef29 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/006_VD_parameter_DB_app_version_more_then_parameter_version.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is more then parameter version, +-- parameter is listed in DB + +-- In case: +-- 1. App is registered with syncMsgVersion=6.0 +-- 2. Parameter has since=5.0 DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 6 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 +config.ValidateSchema = false + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "5.0.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { "custom_vd_item1_integer" } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDwithCustomDataSuccess) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/007_VD_parameter_DB_app_version_equal_to_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/007_VD_parameter_DB_app_version_equal_to_parameter_version.lua new file mode 100644 index 0000000000..88d81944f2 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/007_VD_parameter_DB_app_version_equal_to_parameter_version.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is equal parameter version, +-- parameter is listed in DB + +-- In case: +-- 1. App is registered with syncMsgVersion=5.5 +-- 2. Parameter has since=5.5 DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 5 +config.ValidateSchema = false + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "5.5.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { "custom_vd_item1_integer" } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDwithCustomDataSuccess) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/008_VD_parameter_DB_app_version_less_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/008_VD_parameter_DB_app_version_less_then_parameter_version.lua new file mode 100644 index 0000000000..24fdff4246 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/008_VD_parameter_DB_app_version_less_then_parameter_version.lua @@ -0,0 +1,59 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is NOT able to retrieve the parameter in case app version is less then parameter version, +-- parameter is listed in DB + +-- In case: +-- 1. App is registered with syncMsgVersion=5.0 +-- 2. Parameter has since=5.9 DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. reject the request as empty one +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 +config.ValidateSchema = false + +--[[ Local Variables ]] +local vehicleDataName = "custom_vd_item1_integer" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "5.9.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { "custom_vd_item1_integer" } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData INVALID_DATA", common.processGetVDunsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/009_VD_parameter_DB_version_more_then_API_app_version_more_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/009_VD_parameter_DB_version_more_then_API_app_version_more_then_parameter_version.lua new file mode 100644 index 0000000000..ac5a57cea0 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/009_VD_parameter_DB_version_more_then_API_app_version_more_then_parameter_version.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is more then parameter version, +-- parameter is listed in DB, version of parameter is more then version of the API + +-- In case: +-- 1. App is registered with syncMsgVersion=8.0 +-- 2. Parameter has since=7.0 DB +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 8 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 +config.ValidateSchema = false + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "7.0.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { "custom_vd_item1_integer" } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDwithCustomDataSuccess) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/010_VD_parameter_in_API_app_version_more_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/010_VD_parameter_in_API_app_version_more_then_parameter_version.lua new file mode 100644 index 0000000000..4203aef988 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/010_VD_parameter_in_API_app_version_more_then_parameter_version.lua @@ -0,0 +1,59 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is more then parameter version, +-- parameter is listed API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.5 +-- 2. Parameter has since=5.0 in API +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 5 + +--[[ Local Variables ]] +-- fuelRange has since="5.0" in API +local vehicleDataName = "fuelRange" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "5.0.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/011_VD_parameter_in_API_app_version_equal_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/011_VD_parameter_in_API_app_version_equal_parameter_version.lua new file mode 100644 index 0000000000..66a3577001 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/011_VD_parameter_in_API_app_version_equal_parameter_version.lua @@ -0,0 +1,59 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is able to retrieve the parameter in case app version is equal to parameter version, +-- parameter is listed in API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.0 +-- 2. Parameter has since=5.0 in API +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. process the request successful +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 + +--[[ Local Variables ]] +-- fuelRange has since="5.0" in API +local vehicleDataName = "fuelRange" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "5.0.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData", common.processGetVDsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/API/VehicleData/VehicleDataVersioning/012_VD_parameter_in_API_app_version_less_then_parameter_version.lua b/test_scripts/API/VehicleData/VehicleDataVersioning/012_VD_parameter_in_API_app_version_less_then_parameter_version.lua new file mode 100644 index 0000000000..0ca75109e2 --- /dev/null +++ b/test_scripts/API/VehicleData/VehicleDataVersioning/012_VD_parameter_in_API_app_version_less_then_parameter_version.lua @@ -0,0 +1,59 @@ +--------------------------------------------------------------------------------------------------- +-- Description: The app is NOT able to retrieve the parameter in case app version is less then parameter version, +-- parameter is listed in API + +-- In case: +-- 1. App is registered with syncMsgVersion=5.0 +-- 2. Parameter has since=5.1 in API +-- 3. App requests GetVehicleData() +-- SDL does: +-- a. reject the request as empty one +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/API/VehicleData/commonVehicleData') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 +config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 + +--[[ Local Variables ]] +-- cloudAppVehicleID has since="5.1" in API +local vehicleDataName = "cloudAppVehicleID" + +--[[ Local Functions ]] +local function ptuFunc(pTbl) + pTbl.policy_table.vehicle_data = {} + pTbl.policy_table.vehicle_data.schema_version = "00.00.01" + pTbl.policy_table.vehicle_data.schema_items = { + { + name = "custom_vd_item1_integer", + type = "Integer", + key = "OEM_REF_INT", + array = false, + mandatory = false, + minvalue = 0, + maxvalue = 100, + since = "5.0.0" + } + } + pTbl.policy_table.functional_groupings.NewTestCaseGroup = common.cloneTable(pTbl.policy_table.functional_groupings["Emergency-1"]) + pTbl.policy_table.functional_groupings.NewTestCaseGroup.rpcs.GetVehicleData.parameters = { vehicleDataName } + pTbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID].groups = { "Base-4", "NewTestCaseGroup" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("RPC GetVehicleData INVALID_DATA", common.processGetVDunsuccess, { vehicleDataName }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/vehicle_data_versioning.txt b/test_sets/vehicle_data_versioning.txt new file mode 100644 index 0000000000..8cb36f06b2 --- /dev/null +++ b/test_sets/vehicle_data_versioning.txt @@ -0,0 +1,12 @@ +./test_scripts/API/VehicleData/VehicleDataVersioning/001_VD_parameter_in_API_DB_app_version_more_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/002_VD_parameter_in_API_DB_app_version_equal_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/003_VD_parameter_in_API_DB_app_version_less_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/004_VD_parameter_in_API_DB_different_values_app_version_more_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/005_VD_parameter_in_API_DB_different_values_version_in_DB_more_then_version_of_API_app_version_more_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/006_VD_parameter_DB_app_version_more_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/007_VD_parameter_DB_app_version_equal_to_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/008_VD_parameter_DB_app_version_less_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/009_VD_parameter_DB_version_more_then_API_app_version_more_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/010_VD_parameter_in_API_app_version_more_then_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/011_VD_parameter_in_API_app_version_equal_parameter_version.lua +./test_scripts/API/VehicleData/VehicleDataVersioning/012_VD_parameter_in_API_app_version_less_then_parameter_version.lua From 3e0c0a2601908ee43b1cc824cb6b7dea03c052c9 Mon Sep 17 00:00:00 2001 From: Collin Date: Mon, 6 Jan 2020 16:09:56 -0500 Subject: [PATCH 04/64] fix typos in 6_0 set (missing .lua) --- test_sets/sdl_6_0.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_sets/sdl_6_0.txt b/test_sets/sdl_6_0.txt index 19d458b61e..5b077e74f2 100644 --- a/test_sets/sdl_6_0.txt +++ b/test_sets/sdl_6_0.txt @@ -515,7 +515,7 @@ ./test_scripts/API/ShowAppMenu/009_Show_App_Menu_RPC_without_HMI_response_GENERIC_ERROR.lua ./test_scripts/API/ShowAppMenu/010_Show_App_Menu_RPC_different_MenuID_with_Sub_Menu_ID_INVALID_ID.lua ./test_scripts/API/ShowAppMenu/011_Show_App_Menu_RPC_with_invalid_data_type_MenuID_INVALID_DATA.lua -./test_scripts/API/ShowAppMenu/012_Show_App_Menu_RPC_hmi_Level_FULL_SC_VRSESSION_HMI_OBSCURED_ALERT_REJECTED. +./test_scripts/API/ShowAppMenu/012_Show_App_Menu_RPC_hmi_Level_FULL_SC_VRSESSION_HMI_OBSCURED_ALERT_REJECTED.lua ; ; Update & Unpublish App Services ; @@ -535,7 +535,7 @@ ; Navigation Subscription Buttons ; ./test_scripts/Smoke/API/046_NavApp_SubscribeButtonRequest_SUCCESS.lua -./test_scripts/Smoke/API/047_NonNavApp_SubscribeButtonRequest_REJECTED. +./test_scripts/Smoke/API/047_NonNavApp_SubscribeButtonRequest_REJECTED.lua ; ; SDL Passenger Mode ; From 214978dbf09edc90b8a6cd53bf221317379edad1 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Wed, 8 Jan 2020 11:38:21 -0500 Subject: [PATCH 05/64] Replace new 2nd app by existing one (#2295) --- ...314_ATF_Check_count_of_user_selections.lua | 98 +++++-------------- 1 file changed, 24 insertions(+), 74 deletions(-) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua b/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua index 1319958c88..dd917eab13 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua @@ -1,5 +1,5 @@ --------------------------------------------------------------------------------------------- --- Requirement summary: + -- Requirement summary: -- [Policies] "usage_and_error_counts" and "count_of_rejections_duplicate_name" update -- -- Description: @@ -35,61 +35,6 @@ local mobile_session = require('mobile_session') require('cardinalities') require('user_modules/AppTypes') ---[[ Local variables ]] -local HMIAppID - -local application1 = -{ - registerAppInterfaceParams = - { - syncMsgVersion = - { - majorVersion = 3, - minorVersion = 0 - }, - appName = "Test Application", -- the same name in config.application1 - isMediaApplication = true, - languageDesired = 'EN-US', - hmiDisplayLanguageDesired = 'EN-US', - appHMIType = { "NAVIGATION" }, - appID = "0000001", --ID different - deviceInfo = - { - os = "Android", - carrier = "Megafon", - firmwareRev = "Name: Linux, Version: 3.4.0-perf", - osVersion = "4.4.2", - maxNumberRFCOMMPorts = 1 - } - } -} - -local application2 = -{ - registerAppInterfaceParams = - { - syncMsgVersion = - { - majorVersion = 3, - minorVersion = 0 - }, - appName = "Test Application", -- the same name in application1 - isMediaApplication = true, - languageDesired = 'EN-US', - hmiDisplayLanguageDesired = 'EN-US', - appHMIType = { "NAVIGATION" }, - appID = "0000003", --ID different - deviceInfo = - { - os = "Android", - carrier = "Megafon", - firmwareRev = "Name: Linux, Version: 3.4.0-perf", - osVersion = "4.4.2", - maxNumberRFCOMMPorts = 1 - } - } -} - --[[Preconditions]] commonFunctions:newTestCasesGroup("Preconditions") @@ -118,34 +63,39 @@ function Test:Precondition_ConnectMobile() self:connectMobile() end -function Test:Precondition_StartSession() +function Test:Precondition_RegisterApp() self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) self.mobileSession:StartService(7) + :Do(function() + local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) + end) end -function Test:Precondition_RegisterApp() - local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", application1.registerAppInterfaceParams) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") - :Do(function(_,data) - HMIAppID = data.params.application.appID - EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) +function Test:Precondition_RegisterApp2() + self.mobileSession2 = mobile_session.MobileSession(self, self.mobileConnection) + self.mobileSession2:StartService(7) + :Do(function() + local CorIdRAI = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + self.mobileSession2:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS"}) end) end +function Test:Precondition_UnRegisterApp2() + local CorIdUAI = self.mobileSession2:SendRPC("UnregisterAppInterface",{}) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) + self.mobileSession2:ExpectResponse(CorIdUAI, { success = true, resultCode = "SUCCESS"}) +end + --[[ Test ]] commonFunctions:newTestCasesGroup("Test") function Test:TestStep1_RegisterSecondApp_DuplicateData() - self.mobileSession1 = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession1:StartService(7) - :Do(function (_,_) - local correlationId = self.mobileSession1:SendRPC("RegisterAppInterface", application2.registerAppInterfaceParams) - self.mobileSession1:ExpectResponse(correlationId, { success = false, resultCode = "DUPLICATE_NAME" }) - end) -end - -function Test.TestStep2_ActivateAppInSpecificLevel() - commonSteps:ActivateAppInSpecificLevel(Test,HMIAppID) + config.application2.registerAppInterfaceParams.appName = "Test Application" -- the same name as for the 1st app + local correlationId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) + self.mobileSession2:ExpectResponse(correlationId, { success = false, resultCode = "DUPLICATE_NAME" }) end function Test.Wait() @@ -153,7 +103,7 @@ function Test.Wait() end function Test:TestStep2_Check_count_of_rejections_duplicate_name_incremented_in_PT() - local appID = "0000003" + local appID = "0000002" local query = "select count_of_rejections_duplicate_name from app_level where application_id = '" .. appID .. "'" local CountOfRejectionsDuplicateName = commonFunctions:get_data_policy_sql(config.pathToSDL.."/storage/policy.sqlite", query)[1] if CountOfRejectionsDuplicateName == '1' then From 54a1c539ab06d54eda2581ee15d6798ca5b63b49 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Wed, 8 Jan 2020 13:55:05 -0500 Subject: [PATCH 06/64] Add additional scripts to check 3130 core issue (#2299) --- ...12_Same_app_name_mobile_app_Disallowed.lua | 106 +++++++++++++++++ ..._Same_app_name_mobile_app_Unregistered.lua | 111 ++++++++++++++++++ test_sets/cloudApp_RPCs.txt | 2 + 3 files changed, 219 insertions(+) create mode 100644 test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua create mode 100644 test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua diff --git a/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua b/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua new file mode 100644 index 0000000000..b026d6e811 --- /dev/null +++ b/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua @@ -0,0 +1,106 @@ +--------------------------------------------------------------------------------------------------- +-- Precondition: +-- 1) Application with is registered on SDL. +-- 2) Specific permissions are assigned for with SetCloudAppProperties +-- 3) Application defines 2 cloud apps in PT by sending SetCloudAppProperties RPC requests: +-- - AppA (hybridAppPreference=CLOUD) +-- - AppB (hybridAppPreference=BOTH) +-- +-- Steps: +-- 1) Cloud AppA is registered successfully +-- 2) Mobile AppA is trying to register +-- SDL responds with USER_DISALLOWED +-- 3) Cloud AppB is registered successfully +-- 4) Mobile AppB is trying to register +-- SDL responds with SUCCESS +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/CloudAppRPCs/commonCloudAppRPCs') +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Functions ]] +local function setHybridApp(pAppId, pAppNameCode, pHybridAppPreference) + local params = { + properties = { + nicknames = { "HybridApp" .. pAppNameCode }, + appID = "000000" .. pAppId, + enabled = true, + authToken = "ABCD12345" .. pAppId, + cloudTransportType = "WSS", + hybridAppPreference = pHybridAppPreference, + endpoint = "ws://127.0.0.1:8080/" + } + } + + local cid = common.getMobileSession():SendRPC("SetCloudAppProperties", params) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +local function PTUfunc(tbl) + tbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID] = common.getCloudAppStoreConfig(1); +end + +local function connectMobDevice() + local conId = 2 + local deviceInfo = { host = "1.0.0.1", port = config.mobilePort } + utils.addNetworkInterface(conId, deviceInfo.host) + common.mobile.createConnection(conId, deviceInfo.host, deviceInfo.port) + common.mobile.connect(conId) + :Do(function() + common.mobile.allowSDL(conId) + end) +end + +local function deleteMobDevices() + utils.deleteNetworkInterface(2) +end + +local function registerApp(pAppId, pConId, pAppNameCode, pResultCode) + local success + local occurences + if pResultCode == "SUCCESS" then + success = true + occurences = 1 + elseif pResultCode == "USER_DISALLOWED" then + success = false + occurences = 0 + end + local session = common.getMobileSession(pAppId, pConId) + session:StartService(7) + :Do(function() + local params = utils.cloneTable(common.app.getParams()) + params.appName = "HybridApp" .. pAppNameCode + params.appID = "000" .. pAppId + params.fullAppID = "000000" .. pAppId + local cid = session:SendRPC("RegisterAppInterface", params) + session:ExpectResponse(cid, { success = success, resultCode = pResultCode }) + session:ExpectNotification("OnPermissionsChange"):Times(occurences) + session:ExpectNotification("OnHMIStatus"):Times(occurences) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppRegistered"):Times(occurences) + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { PTUfunc }) +runner.Step("Activate App", common.activateApp) +runner.Step("Add additional connection", connectMobDevice) +runner.Step("Define Hybrid App A in PT as CLOUD", setHybridApp, { 2, "A", "CLOUD" }) +runner.Step("Define Hybrid App B in PT as BOTH", setHybridApp, { 3, "B", "BOTH" }) + +runner.Title("Test") +runner.Step("Register Cloud App A SUCCESS", registerApp, { 2, 2, "A", "SUCCESS"}) +runner.Step("Register Mobile App A USER_DISALLOWED", registerApp, { 4, 1, "A", "USER_DISALLOWED" }) +runner.Step("Register Cloud App B SUCCESS", registerApp, { 3, 2, "B", "SUCCESS"}) +runner.Step("Register Mobile App B SUCCESS", registerApp, { 5, 1, "B", "SUCCESS" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) +runner.Step("Remove additional connection", deleteMobDevices) diff --git a/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua b/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua new file mode 100644 index 0000000000..087e79d2c3 --- /dev/null +++ b/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua @@ -0,0 +1,111 @@ +--------------------------------------------------------------------------------------------------- +-- Precondition: +-- 1) Application with is registered on SDL. +-- 2) Specific permissions are assigned for with SetCloudAppProperties +-- 3) Application defines 2 cloud apps in PT by sending SetCloudAppProperties RPC requests: +-- - AppA (hybridAppPreference=CLOUD) +-- - AppB (hybridAppPreference=BOTH) +-- +-- Steps: +-- 1) Mobile AppA is registered successfully +-- 2) Cloud AppA is trying to register +-- SDL does: +-- - register cloud AppA successfully +-- - unregister mobile AppA successfully +-- 3) Mobile AppB is registered successfully +-- 4) Cloud AppB is trying to register +-- SDL does: +-- - register cloud AppB successfully +-- - not unregister mobile AppB +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/CloudAppRPCs/commonCloudAppRPCs') +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Functions ]] +local function setHybridApp(pAppId, pAppNameCode, pHybridAppPreference) + local params = { + properties = { + nicknames = { "HybridApp" .. pAppNameCode }, + appID = "000000" .. pAppId, + enabled = true, + authToken = "ABCD12345" .. pAppId, + cloudTransportType = "WSS", + hybridAppPreference = pHybridAppPreference, + endpoint = "ws://127.0.0.1:8080/" + } + } + + local cid = common.getMobileSession():SendRPC("SetCloudAppProperties", params) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +local function PTUfunc(tbl) + tbl.policy_table.app_policies[common.getConfigAppParams(1).fullAppID] = common.getCloudAppStoreConfig(1); +end + +local function connectMobDevice() + local conId = 2 + local deviceInfo = { host = "1.0.0.1", port = config.mobilePort } + utils.addNetworkInterface(conId, deviceInfo.host) + common.mobile.createConnection(conId, deviceInfo.host, deviceInfo.port) + common.mobile.connect(conId) + :Do(function() + common.mobile.allowSDL(conId) + end) +end + +local function deleteMobDevices() + utils.deleteNetworkInterface(2) +end + +local function registerApp(pAppId, pConId, pAppNameCode, pUnregAppId) + local session = common.getMobileSession(pAppId, pConId) + session:StartService(7) + :Do(function() + local params = utils.cloneTable(common.app.getParams()) + params.appName = "HybridApp" .. pAppNameCode + params.appID = "000" .. pAppId + params.fullAppID = "000000" .. pAppId + local cid = session:SendRPC("RegisterAppInterface", params) + session:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + session:ExpectNotification("OnPermissionsChange") + session:ExpectNotification("OnHMIStatus") + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppRegistered") + :Do(function(_, d) + common.setHMIAppId(d.params.application.appID, pAppId) + end) + end) + local occurrences = 0 + if pUnregAppId then occurrences = 1 end + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(pUnregAppId), unexpectedDisconnect = false }) + :Times(occurrences) + utils.wait(2000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { PTUfunc }) +runner.Step("Activate App", common.activateApp) +runner.Step("Add additional connection", connectMobDevice) +runner.Step("Define Hybrid App A in PT as CLOUD", setHybridApp, { 2, "A", "CLOUD" }) +runner.Step("Define Hybrid App B in PT as BOTH", setHybridApp, { 3, "B", "BOTH" }) + +runner.Title("Test") +runner.Step("Register Mobile App A SUCCESS", registerApp, { 4, 1, "A" }) +runner.Step("Register Cloud App A SUCCESS, Unregister Mobile App A", registerApp, { 2, 2, "A", 4 }) + +runner.Step("Register Mobile App B SUCCESS", registerApp, { 3, 1, "B" }) +runner.Step("Register Cloud App B SUCCESS", registerApp, { 5, 2, "B" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) +runner.Step("Remove additional connection", deleteMobDevices) diff --git a/test_sets/cloudApp_RPCs.txt b/test_sets/cloudApp_RPCs.txt index 3e54635dee..dc08b1595e 100644 --- a/test_sets/cloudApp_RPCs.txt +++ b/test_sets/cloudApp_RPCs.txt @@ -9,3 +9,5 @@ ./test_scripts/CloudAppRPCs/009_GetCloudAppProperties_DATA_NOT_AVAILABLE.lua ./test_scripts/CloudAppRPCs/010_get_icon_url.lua ./test_scripts/CloudAppRPCs/011_UpdateAppList_NewCloudApplication.lua +./test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua +./test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua From f16ea311f156890fcc2c3a2a4585b90e12d80c80 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Thu, 9 Jan 2020 14:55:59 +0200 Subject: [PATCH 07/64] fixup! Scripts for vehicle data versioning --- .../024_Applying_since_until_for_custom_data.lua | 2 +- .../025_Applying_deprecated_for_custom_data.lua | 2 +- .../026_Applying_removed_for_custom_data.lua | 2 +- .../GenericNetworkSignalData/commonGenericNetSignalData.lua | 1 - .../API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua | 6 +++--- 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua index 061a541b73..86584caa59 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/024_Applying_since_until_for_custom_data.lua @@ -39,7 +39,7 @@ for VDkey, VDitem in pairs (common.customDataTypeSample)do common.customDataTypeSample[VDkey]["until"] = "5.0" itemInteger.minvalue = 101 itemInteger.maxvalue = 1000 - itemInteger.since = "5.1" + itemInteger.since = "5.0" end end diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua index 824ab059f9..3686f23297 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/025_Applying_deprecated_for_custom_data.lua @@ -35,7 +35,7 @@ for VDkey, VDitem in pairs (common.customDataTypeSample)do common.customDataTypeSample[VDkey]["since"] = "1.0" common.customDataTypeSample[VDkey]["until"] = "5.0" itemBool.deprecated = true - itemBool.since = "5.1" + itemBool.since = "5.0" elseif VDitem.name == "custom_vd_item6_array_string" then common.customDataTypeSample[VDkey].deprecated = false end diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua index a4a6d469bb..93adaeb70d 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/026_Applying_removed_for_custom_data.lua @@ -35,7 +35,7 @@ for VDkey, VDitem in pairs (common.customDataTypeSample)do common.customDataTypeSample[VDkey]["since"] = "1.0" common.customDataTypeSample[VDkey]["until"] = "5.0" itemEnum.removed = true - itemEnum.since = "5.1" + itemEnum.since = "5.0" elseif VDitem.name == "custom_vd_item4_string" then common.customDataTypeSample[VDkey].removed = false end diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua index a1936705e1..19c82c9e1d 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua @@ -39,7 +39,6 @@ common.tableToString = utils.tableToString common.tableToJsonFile = utils.tableToJsonFile common.jsonFileToTable = utils.jsonFileToTable common.isFileExist = utils.isFileExist -common.isFileExist = utils.isFileExist common.wait = utils.wait common.GetPathToSDL = commonPreconditions.GetPathToSDL diff --git a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua index 76284e1545..cb92c03537 100644 --- a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua @@ -31,8 +31,8 @@ local commonSmoke = require('test_scripts/Smoke/commonSmoke') --[[ Local Variables ]] local requestParams = { syncMsgVersion = { - majorVersion = 2, - minorVersion = 2, + majorVersion = 5, + minorVersion = 0, }, appName = "SyncProxyTester", ttsName = { @@ -78,7 +78,7 @@ local function SetNotificationParams() transportType = "WIFI", isSDLAllowed = true } - notificationParams.application.policyAppID = requestParams.appID + notificationParams.application.policyAppID = requestParams.fullAppID notificationParams.ttsName = requestParams.ttsName notificationParams.vrSynonyms = requestParams.vrSynonyms return notificationParams From d8b4458bd8dd1837cfb2a9cc0d9c84ad9e1c69e6 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Tue, 14 Jan 2020 22:10:52 +0200 Subject: [PATCH 08/64] Fix/scripts for 3138 issue (#2301) * Update for policy scripts * Update for the same app scripts * Remove appID in order to conform the description of the script * Remove unused module Co-authored-by: Dmytro Boltovskyi (GitHub) --- ..._external_consent_status_groups_struct.lua | 22 ++++--------------- ...F_OnAppPermissionConsent_without_appID.lua | 11 ++++++---- ..._ATF_OnAppPermissionConsent_with_appID.lua | 7 ++++-- ...c_calls_counter_same_appID_and_appName.lua | 2 +- ..._calls_counter_diff_appID_same_appName.lua | 2 +- ...mi_none_counter_same_appID_and_appName.lua | 2 +- ...i_none_counter_diff_appID_same_appName.lua | 2 +- 7 files changed, 20 insertions(+), 28 deletions(-) diff --git a/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua index a372eb68f0..70b13bd8e1 100644 --- a/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua @@ -33,8 +33,6 @@ config.defaultProtocolVersion = 2 --[[ Required Shared Libraries ]] local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local json = require("modules/json") local testCasesForExternalUCS = require('user_modules/shared_testcases/testCasesForExternalUCS') local utils = require ('user_modules/utils') @@ -44,13 +42,8 @@ local grpId = "Location-1" local checkedSection = "external_consent_status_groups" --[[ Local Functions ]] -local function replaceSDLPreloadedPtFile() - local preloadedFile = commonPreconditions:GetPathToSDL() .. - commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") - local preloadedTable = testCasesForExternalUCS.createTableFromJsonFile(preloadedFile) - preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null - -- - preloadedTable.policy_table.app_policies[appId] = { +local function ptuFunc(pTable) + pTable.policy_table.app_policies[appId] = { default_hmi = "NONE", keep_context = false, priority = "NONE", @@ -59,20 +52,17 @@ local function replaceSDLPreloadedPtFile() "Base-4", grpId } } - preloadedTable.policy_table.functional_groupings[grpId].disallowed_by_external_consent_entities_on = { + pTable.policy_table.functional_groupings[grpId].disallowed_by_external_consent_entities_on = { { entityID = 128, entityType = 0 } } - testCasesForExternalUCS.createJsonFileFromTable(preloadedTable, preloadedFile) end --[[ General Precondition before ATF start ]] commonFunctions:SDLForceStop() commonSteps:DeleteLogsFileAndPolicyTable() -commonPreconditions:BackupFile("sdl_preloaded_pt.json") -replaceSDLPreloadedPtFile() testCasesForExternalUCS.removePTS() --[[ General Settings for configuration ]] @@ -98,7 +88,7 @@ function Test:RAI_1() end function Test:ActivateApp_1() - testCasesForExternalUCS.activateApp(self, 1) + testCasesForExternalUCS.activateApp(self, 1, "UP_TO_DATE", ptuFunc) end function Test:SendExternalConsent() @@ -146,8 +136,4 @@ function Test:CheckPTS() StopSDL() end - function Test.Postcondition_RestorePreloadedFile() - commonPreconditions:RestoreFile("sdl_preloaded_pt.json") - end - return Test diff --git a/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua b/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua index d7f53c9a59..85c76cd974 100644 --- a/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua @@ -28,11 +28,11 @@ local commonFunctions = require ('user_modules/shared_testcases/commonFunctions' local commonSteps = require('user_modules/shared_testcases/commonSteps') local testCasesForPolicyTableSnapshot = require('user_modules/shared_testcases/testCasesForPolicyTableSnapshot') local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") local utils = require ('user_modules/utils') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() -testCasesForPolicyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent.json") --[[ General Settings for configuration ]] Test = require('connecttest') @@ -45,6 +45,10 @@ function Test:Precondition_trigger_getting_device_consent() testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) end +function Test:UpdatePolicy() + testCasesForPolicyAppIdManagament:updatePolicyTable(self, "files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent_ptu.json") +end + function Test:Precondition_ExitApplication() self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = self.applications["Test Application"], reason = "USER_EXIT"}) EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) @@ -64,7 +68,7 @@ function Test:TestStep_User_consent_on_activate_app() EXPECT_HMIRESPONSE( RequestId1, {result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) :Do(function(_,_) - local request_id_list_of_permissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", { appID = self.applications[config.application1.registerAppInterfaceParams.appName] }) + local request_id_list_of_permissions = self.hmiConnection:SendRequest("SDL.GetListOfPermissions", { appID = nil }) EXPECT_HMIRESPONSE(request_id_list_of_permissions) :Do(function(_,data) local groups = {} @@ -80,7 +84,7 @@ function Test:TestStep_User_consent_on_activate_app() self.hmiConnection:SendNotification("SDL.OnAppPermissionConsent", { consentedFunctions = groups, source = "GUI", - appID = self.applications[config.application1.registerAppInterfaceParams.appName] + appID = nil }) EXPECT_NOTIFICATION("OnPermissionsChange") end) @@ -120,7 +124,6 @@ end --[[ Postconditions ]] commonFunctions:newTestCasesGroup("Postconditions") -testCasesForPolicyTable:Restore_preloaded_pt() function Test.Postcondition_Stop() StopSDL() end diff --git a/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua b/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua index fcb492445e..931a4fb46a 100644 --- a/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua @@ -28,11 +28,11 @@ local commonFunctions = require ('user_modules/shared_testcases/commonFunctions' local commonSteps = require('user_modules/shared_testcases/commonSteps') local testCasesForPolicyTableSnapshot = require('user_modules/shared_testcases/testCasesForPolicyTableSnapshot') local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") local utils = require ('user_modules/utils') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() -testCasesForPolicyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent.json") --[[ General Settings for configuration ]] Test = require('connecttest') @@ -45,6 +45,10 @@ function Test:Precondition_trigger_getting_device_consent() testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) end +function Test:UpdatePolicy() + testCasesForPolicyAppIdManagament:updatePolicyTable(self, "files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent_ptu.json") +end + function Test:Precondition_ExitApplication() self.hmiConnection:SendNotification("BasicCommunication.OnExitApplication", {appID = self.applications["Test Application"], reason = "USER_EXIT"}) EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) @@ -118,7 +122,6 @@ end --[[ Postconditions ]] commonFunctions:newTestCasesGroup("Postconditions") -testCasesForPolicyTable:Restore_preloaded_pt() function Test.Postcondition_Stop() StopSDL() diff --git a/test_scripts/TheSameApp/Policies/CountersValidation/001_Check_count_of_rejected_rpc_calls_counter_same_appID_and_appName.lua b/test_scripts/TheSameApp/Policies/CountersValidation/001_Check_count_of_rejected_rpc_calls_counter_same_appID_and_appName.lua index 41997e0d17..f03ae64157 100644 --- a/test_scripts/TheSameApp/Policies/CountersValidation/001_Check_count_of_rejected_rpc_calls_counter_same_appID_and_appName.lua +++ b/test_scripts/TheSameApp/Policies/CountersValidation/001_Check_count_of_rejected_rpc_calls_counter_same_appID_and_appName.lua @@ -102,7 +102,7 @@ runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devi runner.Step("Allow SDL for Device 1", common.mobile.allowSDL, {1}) runner.Step("Allow SDL for Device 2", common.mobile.allowSDL, {2}) runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, true}) -runner.Step("Register App1 from device 2", common.registerAppEx, {2, appParams[1], 2, true}) +runner.Step("Register App1 from device 2", common.registerAppEx, {2, appParams[1], 2, false}) runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) runner.Title("Test") diff --git a/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua b/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua index e43be10281..4522f3163f 100644 --- a/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua +++ b/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua @@ -148,7 +148,7 @@ runner.Step("Start SDL and HMI", common.start) runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) runner.Step("Allow SDL for Device 1", common.mobile.allowSDL, {1}) runner.Step("Allow SDL for Device 2", common.mobile.allowSDL, {2}) -runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, true}) +runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, false}) runner.Step("Register App2 from device 2", common.registerAppEx, {2, appParams[2], 2, true}) runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) diff --git a/test_scripts/TheSameApp/Policies/CountersValidation/003_Check_count_of_rpcs_sent_in_hmi_none_counter_same_appID_and_appName.lua b/test_scripts/TheSameApp/Policies/CountersValidation/003_Check_count_of_rpcs_sent_in_hmi_none_counter_same_appID_and_appName.lua index 084202dd53..5bd21adc64 100644 --- a/test_scripts/TheSameApp/Policies/CountersValidation/003_Check_count_of_rpcs_sent_in_hmi_none_counter_same_appID_and_appName.lua +++ b/test_scripts/TheSameApp/Policies/CountersValidation/003_Check_count_of_rpcs_sent_in_hmi_none_counter_same_appID_and_appName.lua @@ -95,7 +95,7 @@ runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devi runner.Step("Allow SDL for Device 1", common.mobile.allowSDL, {1}) runner.Step("Allow SDL for Device 2", common.mobile.allowSDL, {2}) runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, true}) -runner.Step("Register App1 from device 2", common.registerAppEx, {2, appParams[1], 2, true}) +runner.Step("Register App1 from device 2", common.registerAppEx, {2, appParams[1], 2, false}) runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) runner.Title("Test") diff --git a/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua b/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua index 8a2f60453c..0ebb73683f 100644 --- a/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua +++ b/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua @@ -135,7 +135,7 @@ runner.Step("Start SDL and HMI", common.start) runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) runner.Step("Allow SDL for Device 1", common.mobile.allowSDL, {1}) runner.Step("Allow SDL for Device 2", common.mobile.allowSDL, {2}) -runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, true}) +runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, false}) runner.Step("Register App2 from device 2", common.registerAppEx, {2, appParams[2], 2, true}) runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) From c76a5f69d35f635d633454cf1ae79e28ec3bf0c2 Mon Sep 17 00:00:00 2001 From: "Mykola Korniichuk (GitHub)" <42380041+mkorniichuk@users.noreply.github.com> Date: Wed, 15 Jan 2020 16:06:02 +0200 Subject: [PATCH 09/64] Script for defect 3142 (#2298) * Add scripts for 3142 issue * Update and address comments * Improve streaming speed * Address comments Co-authored-by: Dmytro Boltovskyi (GitHub) --- ...ence_of_misplaced_OnVideoDataStreaming.lua | 89 +++++++ ...ence_of_misplaced_OnAudioDataStreaming.lua | 89 +++++++ .../Defects/6_1/common_3139_3140_3142.lua | 220 ++++++++++++++++++ test_sets/Defects/6_1/3142.txt | 2 + 4 files changed, 400 insertions(+) create mode 100644 test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua create mode 100644 test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua create mode 100644 test_scripts/Defects/6_1/common_3139_3140_3142.lua create mode 100644 test_sets/Defects/6_1/3142.txt diff --git a/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua b/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua new file mode 100644 index 0000000000..01adce9641 --- /dev/null +++ b/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua @@ -0,0 +1,89 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3142 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 and VideoDataStoppedTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register 2 NAVIGATION applications: App_1 and App_2 +-- 4. Activate App_1 and start Video streaming +-- 5. Deactivate App_1 (streaming still continue since app has STREAMABLE state) +-- 6. Activate App_2 and start Video streaming +-- 7. App_1 and App_2 continue streaming data within 'StopStreamingTimeout' timeout +-- SDL does: +-- - switch streaming between apps and provides HMI with streaming data from App_2 +-- - not unregister App_1 since timeout is not yet expired +-- 8. App_1 stops streaming within 'StopStreamingTimeout' timeout +-- SDL does: +-- - not send Navi.OnVideoDataStreaming(false) notification to HMI since App_2 still continue streaming +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "NAVIGATION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Functions ]] +local function stopStreaming(pAppId, pServiceId) + common.hmi.getConnection():ExpectRequest("Navigation.StopStream", { appID = common.app.getHMIId(pAppId)}) + :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) + common.mobile.getSession(pAppId):ExpectEndService(pServiceId) + :Do(function() common.mobile.getSession(pAppId):SendEndServiceAck(pServiceId) end) +end + +local function startStreaming(pAppId, pServiceId) + common.mobile.getSession(pAppId):StartService(pServiceId) + :Do(function() + common.mobile.getSession(pAppId):StartStreaming(pServiceId, common.streamFiles[pAppId], 160*1024) + common.log("App " .. pAppId .." starts streaming ...") + common.streamingStatus[pAppId] = true + end) + common.hmi.getConnection():ExpectRequest("Navigation.StartStream", { appID = common.app.getHMIId(pAppId) }) + :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) +end + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + common.hmi.getConnection():ExpectResponse(cid) + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) + :Do(function() + startStreaming(2, 11) + end) + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming"):Times(0) +end + +local function stopStreamingWONotification() + common.stopStreaming(1) + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming"):Times(0) + common.wait(5000) +end + +local function stopStreamingWithNotification() + common.stopStreaming(2) + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + common.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions, {{ StopStreamingTimeout = 3000, VideoDataStoppedTimeout = 3000 }}) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start video streaming", common.startStreaming, { 1, 11 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated", activateApp2) +runner.Step("App 1 stop video streaming without notification", stopStreamingWONotification) +runner.Step("App 2 stop video streaming with notification", stopStreamingWithNotification) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua b/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua new file mode 100644 index 0000000000..aba239f768 --- /dev/null +++ b/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua @@ -0,0 +1,89 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3142 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 and AudioDataStoppedTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register 2 NAVIGATION applications: App_1 and App_2 +-- 4. Activate App_1 and start Audio streaming +-- 5. Deactivate App_1 (streaming still continue since app has STREAMABLE state) +-- 6. Activate App_2 and start Audio streaming +-- 7. App_1 and App_2 continue streaming data within 'StopStreamingTimeout' timeout +-- SDL does: +-- - switch streaming between apps and provides HMI with streaming data from App_2 +-- - not unregister App_1 since timeout is not yet expired +-- 8. App_1 stops streaming within 'StopStreamingTimeout' timeout +-- SDL does: +-- - not send Navi.OnAudioDataStreaming(false) notification to HMI since App_2 still continue streaming +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "NAVIGATION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Functions ]] +local function stopStreaming(pAppId, pServiceId) + common.hmi.getConnection():ExpectRequest("Navigation.StopAudioStream", { appID = common.app.getHMIId(pAppId)}) + :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) + common.mobile.getSession(pAppId):ExpectEndService(pServiceId) + :Do(function() common.mobile.getSession(pAppId):SendEndServiceAck(pServiceId) end) +end + +local function startStreaming(pAppId, pServiceId) + common.mobile.getSession(pAppId):StartService(pServiceId) + :Do(function() + common.mobile.getSession(pAppId):StartStreaming(pServiceId, common.streamFiles[pAppId], 40*1024) + common.log("App " .. pAppId .." starts streaming ...") + common.streamingStatus[pAppId] = true + end) + common.hmi.getConnection():ExpectRequest("Navigation.StartAudioStream", { appID = common.app.getHMIId(pAppId) }) + :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) +end + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + common.hmi.getConnection():ExpectResponse(cid) + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Do(function() + startStreaming(2, 10) + end) + common.hmi.getConnection():ExpectNotification("Navigation.OnAudioDataStreaming"):Times(0) +end + +local function stopStreamingWONotification() + common.stopStreaming(1) + common.hmi.getConnection():ExpectNotification("Navigation.OnAudioDataStreaming"):Times(0) + common.wait(5000) +end + +local function stopStreamingWithNotification() + common.stopStreaming(2) + common.hmi.getConnection():ExpectNotification("Navigation.OnAudioDataStreaming", { available = false }) + common.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions, {{ StopStreamingTimeout = 3000, AudioDataStoppedTimeout = 3000 }}) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start audio streaming", common.startStreaming, { 1, 10 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated", activateApp2) +runner.Step("App 1 stop audio streaming", stopStreamingWONotification) +runner.Step("App 2 stop audio streaming with notification", stopStreamingWithNotification) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/common_3139_3140_3142.lua b/test_scripts/Defects/6_1/common_3139_3140_3142.lua new file mode 100644 index 0000000000..0a2b7b9668 --- /dev/null +++ b/test_scripts/Defects/6_1/common_3139_3140_3142.lua @@ -0,0 +1,220 @@ +--------------------------------------------------------------------------------------------------- +-- Common module +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local actions = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local constants = require('protocol_handler/ford_protocol_constants') +local atf_logger = require("atf_logger") +local message_dispatcher = require("message_dispatcher") +local consts = require("user_modules/consts") + +--[[ Module ]] +local m = {} + +m.streamFiles = { + [1] = "files/SampleVideo_5mb.mp4", + [2] = "files/MP3_4555kb.mp3" +} + +m.streamingStatus = { + [1] = nil, + [2] = nil +} + +m.tollerance = 500 --ms + +m.ts = {} +m.seq = { + hmi = {}, + app1 = {}, + app2 = {} +} + +--[[ Proxy Functions ]] +m.start = actions.start +m.activateApp = actions.activateApp +m.app = actions.app +m.hmi = actions.hmi +m.mobile = actions.mobile +m.sdl = actions.sdl +m.run = actions.run +m.wait = actions.run.wait +m.color = consts.color + +--[[ Common Functions ]] +function m.print(...) utils.cprint(m.color.magenta, ...) end + +function m.printTable(...) utils.cprintTable(m.color.magenta, ...) end + +function m.timestamp(pEventName, pConType) + m.ts[pEventName] = timestamp() + + local function isExist(pArray, pItem) + for _, v in pairs(pArray) do + if v == pItem then return true end + end + return false + end + + local function insert(pTable, pItem) + if not isExist(pTable, pItem) then table.insert(pTable, pItem) end + end + if pConType then + insert(m.seq[pConType], pEventName) + else + for k in pairs(m.seq) do + insert(m.seq[k], pEventName) + end + end +end + +function m.log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(m.color.magenta, str) +end + +function m.preconditions(pParamValues) + actions.preconditions() + if pParamValues and type(pParamValues) == "table" then + for p, v in pairs(pParamValues) do + utils.cprint(m.color.magenta, p, v) + m.sdl.setSDLIniParameter(p, v) + end + end +end + +function m.postconditions() + for appId, v in pairs(m.streamingStatus) do + if v == true then + m.stopStreaming(appId) + end + end + actions.postconditions() +end + +function m.startStreaming(pAppId, pServiceId) + local notName + local reqName + if pServiceId == 10 then + notName = "Navigation.OnAudioDataStreaming" + reqName = "Navigation.StartAudioStream" + elseif pServiceId == 11 then + notName = "Navigation.OnVideoDataStreaming" + reqName = "Navigation.StartStream" + end + m.mobile.getSession(pAppId):StartService(pServiceId) + :Do(function() + m.mobile.getSession(pAppId):StartStreaming(pServiceId, m.streamFiles[pAppId], 10000) + m.hmi.getConnection():ExpectNotification(notName, { available = true }) + m.log("App " .. pAppId .." starts streaming ...") + m.streamingStatus[pAppId] = true + end) + m.hmi.getConnection():ExpectRequest(reqName, { appID = m.app.getHMIId(pAppId) }) + :Do(function(_, data) + m.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) +end + +function m.stopStreaming(pAppId) + if m.streamingStatus[pAppId] == true then + m.mobile.getSession(pAppId):StopStreaming(m.streamFiles[pAppId]) + m.log("App " .. pAppId .. " stops streaming") + m.streamingStatus[pAppId] = false + else + utils.cprint(m.color.yellow, "Streaming is unable to stop since it's not started") + end +end + +function m.registerApp(pAppId) + if not pAppId then pAppId = 1 end + local session = m.mobile.createSession(pAppId) + session:StartService(7) + :Do(function() + local corId = session:SendRPC("RegisterAppInterface", m.app.getParams(pAppId)) + m.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppRegistered") + :Do(function(_, d) + m.app.setHMIId(d.params.application.appID, pAppId) + end) + session:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + function session:ExpectEndService(pServiceId) + local event = m.run.createEvent() + event.matches = function(_, data) + return data.frameType == constants.FRAME_TYPE.CONTROL_FRAME and + data.serviceType == pServiceId and + data.sessionId == self.sessionId and + data.frameInfo == constants.FRAME_INFO.END_SERVICE + end + return session:ExpectEvent(event, "End Service Event") + end + function session:SendEndServiceAck(pServiceId) + self:Send({ + frameType = constants.FRAME_TYPE.CONTROL_FRAME, + serviceType = pServiceId, + frameInfo = constants.FRAME_INFO.END_SERVICE_ACK + }) + end + end) + return session:ExpectNotification("OnHMIStatus", { hmiLevel = "NONE" }) +end + +function m.checkTimeout(pBaseParam, pVerifiedParam, pExpTS, pTollerance) + if not pTollerance then pTollerance = m.tollerance end + if m.ts[pBaseParam] then + if m.ts[pVerifiedParam] == nil then + m.run.fail(pVerifiedParam .. " is not received") + else + local delay = math.abs(m.ts[pVerifiedParam] - m.ts[pBaseParam]) + if delay > pExpTS + pTollerance then + m.run.fail("Delay between `" .. pBaseParam .. "` and `" .. pVerifiedParam .. "` is too high, expected ~ " + .. pExpTS .. "ms(+" .. pTollerance .. "), actual " .. delay .. "ms") + end + if delay < pExpTS - pTollerance then + m.run.fail("Delay between `" .. pBaseParam .. "` and `" .. pVerifiedParam .. "` is too low, expected ~ " + .. pExpTS .. "ms(-" .. pTollerance .. "), actual " .. delay .. "ms") + end + end + end +end + +function m.checkSequence(pConType, pExpSeq) + local function arraysEqual(pTbl1, pTbl2) + if #pTbl1 ~= #pTbl2 then return false end + for k in pairs(pTbl1) do + if pTbl1[k] ~= pTbl2[k] then return false end + end + return true + end + local seq = m.seq[pConType] + if not arraysEqual(pExpSeq, seq) then + m.run.fail("Expected sequence:\n" .. utils.tableToString(pExpSeq) .. "\nActual:\n" .. utils.tableToString(seq)) + end +end + +function m.deactivateApp(pAppId) + m.hmi.getConnection():SendNotification("BasicCommunication.OnAppDeactivated", { appID = m.app.getHMIId(pAppId) }) + m.mobile.getSession(pAppId):ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", videoStreamingState = "STREAMABLE" }) +end + +local FileStream_Orig = message_dispatcher.FileStream +function message_dispatcher.FileStream(...) + local stream = FileStream_Orig(...) + local frameSize = (constants.FRAME_SIZE["P" .. stream.version] - constants.PROTOCOL_HEADER_SIZE) + local chunkSize = (frameSize < stream.bandwidth) and frameSize or (stream.bandwidth) + local numberOfChunksPerSecond = 10 -- allow to send 10 chunks per 1 second + stream.chunksize = math.floor(chunkSize / numberOfChunksPerSecond + 0.5) + local GetMessage_Orig = stream.GetMessage + function stream:GetMessage(...) + local msg = GetMessage_Orig(self, ...) + return msg, 10 + end + return stream +end + +return m diff --git a/test_sets/Defects/6_1/3142.txt b/test_sets/Defects/6_1/3142.txt new file mode 100644 index 0000000000..f566e4c792 --- /dev/null +++ b/test_sets/Defects/6_1/3142.txt @@ -0,0 +1,2 @@ +./test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua +./test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua From 1fdbf675761ad0ad7dc768cec00e1cceb6c00fd5 Mon Sep 17 00:00:00 2001 From: "Mykola Korniichuk (GitHub)" <42380041+mkorniichuk@users.noreply.github.com> Date: Fri, 17 Jan 2020 18:36:28 +0200 Subject: [PATCH 10/64] Script for defect 3139 (#2297) * Add scripts for 3139 issue * Address comments * Remove variation in expectations related to merged fix Co-authored-by: Dmytro Boltovskyi (GitHub) --- ...01_Stop_streaming_gracefully_1st_timer.lua | 129 ++++++++++++++++ ...02_Stop_streaming_gracefully_2nd_timer.lua | 139 +++++++++++++++++ ...eaming_forcibly_app_continue_streaming.lua | 143 ++++++++++++++++++ ...rcibly_app_does_not_send_EndServiceAck.lua | 142 +++++++++++++++++ test_sets/Defects/6_1/3139.txt | 4 + 5 files changed, 557 insertions(+) create mode 100644 test_scripts/Defects/6_1/3139_01_Stop_streaming_gracefully_1st_timer.lua create mode 100644 test_scripts/Defects/6_1/3139_02_Stop_streaming_gracefully_2nd_timer.lua create mode 100644 test_scripts/Defects/6_1/3139_03_Stop_streaming_forcibly_app_continue_streaming.lua create mode 100644 test_scripts/Defects/6_1/3139_04_Stop_streaming_forcibly_app_does_not_send_EndServiceAck.lua create mode 100644 test_sets/Defects/6_1/3139.txt diff --git a/test_scripts/Defects/6_1/3139_01_Stop_streaming_gracefully_1st_timer.lua b/test_scripts/Defects/6_1/3139_01_Stop_streaming_gracefully_1st_timer.lua new file mode 100644 index 0000000000..740dbfae74 --- /dev/null +++ b/test_scripts/Defects/6_1/3139_01_Stop_streaming_gracefully_1st_timer.lua @@ -0,0 +1,129 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3139 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register PROJECTION (App_1) and NAVIGATION (App_2) applications +-- 4. Activate App_1 and start Video streaming +-- 5. Deactivate App_1 (streaming still continue since app has STREAMABLE state) +-- 6. Activate App_2 +-- SDL does: +-- - send OnHMIStatus(FULL, STREAMABLE) notification to App_2 +-- - send OnHMIStatus(LIMITED, NOT_STREAMABLE) notification to App_1 +-- - send Navi.OnVideoDataStreaming(false) notification to HMI +-- - start 1st 'StopStreamingTimeout' timeout +-- 7. App_1 stops streaming within 'StopStreamingTimeout' timeout +-- SDL does: +-- - not send Navi.StopStream(App_1) request to HMI +-- - not send EndService(VIDEO) request to App_1 +-- - not send OnAppInterfaceUnregistered notification to App_1 +-- - not send BC.OnAppUnregistered notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "PROJECTION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local stopStreamingTimeout = 3000 +local videoDataStoppedTimeout = 1000 + +--[[ Local Functions ]] +local log = common.log +local ts = common.timestamp + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + log("SDL->HMI ", "SDL.ActivateApp(2)") + ts("ActivateApp") + common.hmi.getConnection():ExpectResponse(cid) + :Do(function() + log("SDL->HMI ", "SUCCESS: SDL.ActivateApp") + end) + + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) + :Do(function() + log("SDL->App2", "OnHMIStatus(FULL)") + ts("OnHMIStatus_Full", "app2") + end) + + common.mobile.getSession(1):ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", videoStreamingState = "NOT_STREAMABLE" }) + :Do(function() + log("SDL->App1", "OnHMIStatus(NOT_STREAMABLE)") + ts("OnHMIStatus_Not_Streamable", "app1") + common.stopStreaming(1) + end) + + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + :DoOnce(function() + log("SDL->HMI ","Navi.OnVideoDataStreaming(false)") + ts("Navi.OnVideoDataStreaming", "hmi") + end) + + common.hmi.getConnection():ExpectRequest("Navigation.StopStream") + :Do(function() + log("SDL->HMI ","Navi.StopStream") + end) + :Times(0) + + common.mobile.getSession(1):ExpectEndService(11) + :Do(function() + log("SDL->App1", "EndService(VIDEO)") + end) + :Times(0) + + common.mobile.getSession(1):ExpectNotification("OnAppInterfaceUnregistered") + :Do(function() + log("SDL->App1", "OnAppInterfaceUnregistered") + end) + :Times(0) + + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered") + :Do(function() + log("SDL->HMI ","BC.OnAppUnregistered(App1)") + end) + :Times(0) + + common.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean and setup environment", common.preconditions, + { { StopStreamingTimeout = stopStreamingTimeout, VideoDataStoppedTimeout = videoDataStoppedTimeout } }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start video streaming", common.startStreaming, { 1, 11 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated, App 1 is not unregistered", activateApp2) +runner.Step("App 2 start video streaming", common.startStreaming, { 2, 11 }) + +runner.Step("Verify timeout for OnHMIStatus_Not_Streamable", common.checkTimeout, + { "ActivateApp", "OnHMIStatus_Not_Streamable", 0 }) + +runner.Step("Verify timeout for Navi.OnVideoDataStreaming", common.checkTimeout, + { "ActivateApp", "Navi.OnVideoDataStreaming", videoDataStoppedTimeout }) + +runner.Step("Check App1 messages sequence", common.checkSequence, + { "app1", { "ActivateApp", "OnHMIStatus_Not_Streamable" } }) +runner.Step("Check App2 messages sequence", common.checkSequence, + { "app2", { "ActivateApp", "OnHMIStatus_Full" } }) +runner.Step("Check HMI messages sequence", common.checkSequence, + { "hmi", { "ActivateApp", "Navi.OnVideoDataStreaming" } }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3139_02_Stop_streaming_gracefully_2nd_timer.lua b/test_scripts/Defects/6_1/3139_02_Stop_streaming_gracefully_2nd_timer.lua new file mode 100644 index 0000000000..a08604a25a --- /dev/null +++ b/test_scripts/Defects/6_1/3139_02_Stop_streaming_gracefully_2nd_timer.lua @@ -0,0 +1,139 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3139 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register PROJECTION (App_1) and NAVIGATION (App_2) applications +-- 4. Activate App_1 and start Video streaming +-- 5. Deactivate App_1 (streaming still continue since app has STREAMABLE state) +-- 6. Activate App_2 +-- SDL does: +-- - send OnHMIStatus(FULL, STREAMABLE) notification to App_2 +-- - send OnHMIStatus(LIMITED, NOT_STREAMABLE) notification to App_1 +-- - send Navi.OnVideoDataStreaming(false) notification to HMI +-- - start 1st 'StopStreamingTimeout' timeout +-- Once timeout is expired SDL does: +-- - send Navi.StopStream(App_1) request to HMI +-- - send EndService(VIDEO) request to App_1 +-- - start 2nd 'StopStreamingTimeout' timeout +-- 7. App_1 stops streaming within 2nd 'StopStreamingTimeout' timeout +-- SDL does: +-- - not send OnAppInterfaceUnregistered notification to App_1 +-- - not send BC.OnAppUnregistered notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "PROJECTION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local stopStreamingTimeout = 3000 +local videoDataStoppedTimeout = 1000 + +--[[ Local Functions ]] +local log = common.log +local ts = common.timestamp + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + log("SDL->HMI ", "SDL.ActivateApp(2)") + ts("ActivateApp") + common.hmi.getConnection():ExpectResponse(cid) + :Do(function() + log("SDL->HMI ", "SUCCESS: SDL.ActivateApp") + end) + + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) + :Do(function() + log("SDL->App2", "OnHMIStatus(FULL)") + ts("OnHMIStatus_Full", "app2") + end) + + common.mobile.getSession(1):ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", videoStreamingState = "NOT_STREAMABLE" }) + :Do(function() + log("SDL->App1", "OnHMIStatus(NOT_STREAMABLE)") + ts("OnHMIStatus_Not_Streamable", "app1") + end) + + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + :DoOnce(function() + log("SDL->HMI ","Navi.OnVideoDataStreaming(false)") + ts("Navi.OnVideoDataStreaming", "hmi") + end) + + common.hmi.getConnection():ExpectRequest("Navigation.StopStream", { appID = common.app.getHMIId(1)}) + :Do(function(_, data) + log("SDL->HMI ","Navi.StopStream") + ts("Navi.StopStream", "hmi") + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL ","SUCCESS: Navi.StopStream") + end) + + common.mobile.getSession(1):ExpectEndService(11) + :Do(function() + log("SDL->App1", "EndService(VIDEO)") + ts("EndService", "app1") + common.stopStreaming(1) + common.mobile.getSession(1):SendEndServiceAck(11) + log("App1->SDL", "EndServiceAck") + end) + + common.mobile.getSession(1):ExpectNotification("OnAppInterfaceUnregistered") + :Do(function() + log("SDL->App1", "OnAppInterfaceUnregistered") + end) + :Times(0) + + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered") + :Do(function() + log("SDL->HMI ","BC.OnAppUnregistered(App1)") + end) + :Times(0) + + common.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean and setup environment", common.preconditions, + { { StopStreamingTimeout = stopStreamingTimeout, VideoDataStoppedTimeout = videoDataStoppedTimeout } }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start video streaming", common.startStreaming, { 1, 11 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated, App 1 is not unregistered", activateApp2) +runner.Step("App 2 start video streaming", common.startStreaming, { 2, 11 }) + +runner.Step("Verify timeout for OnHMIStatus_Not_Streamable", common.checkTimeout, + { "ActivateApp", "OnHMIStatus_Not_Streamable", 0 }) +runner.Step("Verify timeout for EndService", common.checkTimeout, + { "ActivateApp", "EndService", stopStreamingTimeout }) + +runner.Step("Verify timeout for Navi.OnVideoDataStreaming", common.checkTimeout, + { "ActivateApp", "Navi.OnVideoDataStreaming", videoDataStoppedTimeout }) +runner.Step("Verify timeout for Navi.StopStream", common.checkTimeout, + { "ActivateApp", "Navi.StopStream", stopStreamingTimeout }) + +runner.Step("Check App1 messages sequence", common.checkSequence, + { "app1", { "ActivateApp", "OnHMIStatus_Not_Streamable", "EndService" } }) +runner.Step("Check App2 messages sequence", common.checkSequence, + { "app2", { "ActivateApp", "OnHMIStatus_Full" } }) +runner.Step("Check HMI messages sequence", common.checkSequence, + { "hmi", { "ActivateApp", "Navi.OnVideoDataStreaming", "Navi.StopStream" } }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3139_03_Stop_streaming_forcibly_app_continue_streaming.lua b/test_scripts/Defects/6_1/3139_03_Stop_streaming_forcibly_app_continue_streaming.lua new file mode 100644 index 0000000000..29922eaf2a --- /dev/null +++ b/test_scripts/Defects/6_1/3139_03_Stop_streaming_forcibly_app_continue_streaming.lua @@ -0,0 +1,143 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3139 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register PROJECTION (App_1) and NAVIGATION (App_2) applications +-- 4. Activate App_1 and start Video streaming +-- 5. Deactivate App_1 (streaming still continue since app has STREAMABLE state) +-- 6. Activate App_2 +-- SDL does: +-- - send OnHMIStatus(FULL, STREAMABLE) notification to App_2 +-- - send OnHMIStatus(LIMITED, NOT_STREAMABLE) notification to App_1 +-- - send Navi.OnVideoDataStreaming(false) notification to HMI +-- - start 1st 'StopStreamingTimeout' timeout +-- Once timeout is expired SDL does: +-- - send Navi.StopStream(App_1) request to HMI +-- - send EndService(VIDEO) request to App_1 +-- - start 2nd 'StopStreamingTimeout' timeout +-- 7. App_1 does not stop streaming but sends EndServiceAck within 2nd 'StopStreamingTimeout' timeout +-- Once timeout is expired SDL does: +-- - send OnAppInterfaceUnregistered(PROTOCOL_VIOLATION) notification to App_1 +-- - send BC.OnAppUnregistered(unexpectedDisconnect=false) notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "PROJECTION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local stopStreamingTimeout = 3000 +local videoDataStoppedTimeout = 1000 + +--[[ Local Functions ]] +local log = common.log +local ts = common.timestamp + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + log("SDL->HMI ", "SDL.ActivateApp(2)") + ts("ActivateApp") + common.hmi.getConnection():ExpectResponse(cid) + :Do(function() + log("SDL->HMI ", "SUCCESS: SDL.ActivateApp") + end) + + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) + :Do(function() + log("SDL->App2", "OnHMIStatus(FULL)") + ts("OnHMIStatus_Full", "app2") + end) + + common.mobile.getSession(1):ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", videoStreamingState = "NOT_STREAMABLE" }) + :Do(function() + log("SDL->App1", "OnHMIStatus(NOT_STREAMABLE)") + ts("OnHMIStatus_Not_Streamable", "app1") + end) + + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + :DoOnce(function() + log("SDL->HMI ","Navi.OnVideoDataStreaming(false)") + ts("Navi.OnVideoDataStreaming", "hmi") + end) + + common.hmi.getConnection():ExpectRequest("Navigation.StopStream", { appID = common.app.getHMIId(1)}) + :Do(function(_, data) + log("SDL->HMI ","Navi.StopStream") + ts("Navi.StopStream", "hmi") + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL ","SUCCESS: Navi.StopStream") + end) + + common.mobile.getSession(1):ExpectEndService(11) + :Do(function() + log("SDL->App1", "EndService(VIDEO)") + ts("EndService", "app1") + -- App_1 continue streaming + common.mobile.getSession(1):SendEndServiceAck(11) + log("App1->SDL", "EndServiceAck") + end) + + common.mobile.getSession(1):ExpectNotification("OnAppInterfaceUnregistered", + { reason = "PROTOCOL_VIOLATION" }) + :Do(function() + log("SDL->App1", "OnAppInterfaceUnregistered(PROT_VIO)") + ts("OnAppInterfaceUnregistered", "app1") + end) + + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { unexpectedDisconnect = false, appID = common.app.getHMIId(1) }) + :Do(function() + log("SDL->HMI ","BC.OnAppUnregistered(App1)") + ts("BC.OnAppUnregistered", "hmi") + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean and setup environment", common.preconditions, + { { StopStreamingTimeout = stopStreamingTimeout, VideoDataStoppedTimeout = videoDataStoppedTimeout } }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start video streaming", common.startStreaming, { 1, 11 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated, App 1 unregistered with PROTOCOL_VIOLATION", activateApp2) +runner.Step("App 2 start video streaming", common.startStreaming, { 2, 11 }) + +runner.Step("Verify timeout for OnHMIStatus_Not_Streamable", common.checkTimeout, + { "ActivateApp", "OnHMIStatus_Not_Streamable", 0 }) +runner.Step("Verify timeout for EndService", common.checkTimeout, + { "ActivateApp", "EndService", stopStreamingTimeout }) +runner.Step("Verify timeout for OnAppInterfaceUnregistered", common.checkTimeout, + { "ActivateApp", "OnAppInterfaceUnregistered", stopStreamingTimeout * 2 }) + +runner.Step("Verify timeout for Navi.OnVideoDataStreaming", common.checkTimeout, + { "ActivateApp", "Navi.OnVideoDataStreaming", videoDataStoppedTimeout }) +runner.Step("Verify timeout for Navi.StopStream", common.checkTimeout, + { "ActivateApp", "Navi.StopStream", stopStreamingTimeout }) +runner.Step("Verify timeout for BC.OnAppUnregistered", common.checkTimeout, + { "ActivateApp", "BC.OnAppUnregistered", stopStreamingTimeout * 2 }) + +runner.Step("Check App1 messages sequence", common.checkSequence, + { "app1", { "ActivateApp", "OnHMIStatus_Not_Streamable", "EndService", "OnAppInterfaceUnregistered" } }) +runner.Step("Check App2 messages sequence", common.checkSequence, + { "app2", { "ActivateApp", "OnHMIStatus_Full" } }) +runner.Step("Check HMI messages sequence", common.checkSequence, + { "hmi", { "ActivateApp", "Navi.OnVideoDataStreaming", "Navi.StopStream", "BC.OnAppUnregistered" } }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3139_04_Stop_streaming_forcibly_app_does_not_send_EndServiceAck.lua b/test_scripts/Defects/6_1/3139_04_Stop_streaming_forcibly_app_does_not_send_EndServiceAck.lua new file mode 100644 index 0000000000..d4f1e035e5 --- /dev/null +++ b/test_scripts/Defects/6_1/3139_04_Stop_streaming_forcibly_app_does_not_send_EndServiceAck.lua @@ -0,0 +1,142 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3139 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register PROJECTION (App_1) and NAVIGATION (App_2) applications +-- 4. Activate App_1 and start Video streaming +-- 5. Deactivate App_1 (streaming still continue since app has STREAMABLE state) +-- 6. Activate App_2 +-- SDL does: +-- - send OnHMIStatus(FULL, STREAMABLE) notification to App_2 +-- - send OnHMIStatus(LIMITED, NOT_STREAMABLE) notification to App_1 +-- - send Navi.OnVideoDataStreaming(false) notification to HMI +-- - start 1st 'StopStreamingTimeout' timeout +-- Once timeout is expired SDL does: +-- - send Navi.StopStream(App_1) request to HMI +-- - send EndService(VIDEO) request to App_1 +-- - start 2nd 'StopStreamingTimeout' timeout +-- 7. App_1 stops streaming but dos not send EndServiceAck within 2nd 'StopStreamingTimeout' timeout +-- Once timeout is expired SDL does: +-- - send OnAppInterfaceUnregistered(PROTOCOL_VIOLATION) notification to App_1 +-- - send BC.OnAppUnregistered(unexpectedDisconnect=false) notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "PROJECTION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local stopStreamingTimeout = 3000 +local videoDataStoppedTimeout = 1000 + +--[[ Local Functions ]] +local log = common.log +local ts = common.timestamp + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + log("SDL->HMI ", "SDL.ActivateApp(2)") + ts("ActivateApp") + common.hmi.getConnection():ExpectResponse(cid) + :Do(function() + log("SDL->HMI ", "SUCCESS: SDL.ActivateApp") + end) + + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) + :Do(function() + log("SDL->App2", "OnHMIStatus(FULL)") + ts("OnHMIStatus_Full", "app2") + end) + + common.mobile.getSession(1):ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", videoStreamingState = "NOT_STREAMABLE" }) + :Do(function() + log("SDL->App1", "OnHMIStatus(NOT_STREAMABLE)") + ts("OnHMIStatus_Not_Streamable", "app1") + end) + + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + :DoOnce(function() + log("SDL->HMI ","Navi.OnVideoDataStreaming(false)") + ts("Navi.OnVideoDataStreaming", "hmi") + end) + + common.hmi.getConnection():ExpectRequest("Navigation.StopStream", { appID = common.app.getHMIId(1)}) + :Do(function(_, data) + log("SDL->HMI ","Navi.StopStream") + ts("Navi.StopStream", "hmi") + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL ","SUCCESS: Navi.StopStream") + end) + + common.mobile.getSession(1):ExpectEndService(11) + :Do(function() + log("SDL->App1", "EndService(VIDEO)") + ts("EndService", "app1") + common.stopStreaming(1) + -- App_1 doesn't send EndServiceAck + end) + + common.mobile.getSession(1):ExpectNotification("OnAppInterfaceUnregistered", + { reason = "PROTOCOL_VIOLATION" }) + :Do(function() + log("SDL->App1", "OnAppInterfaceUnregistered(PROT_VIO)") + ts("OnAppInterfaceUnregistered", "app1") + end) + + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { unexpectedDisconnect = false, appID = common.app.getHMIId(1) }) + :Do(function() + log("SDL->HMI ","BC.OnAppUnregistered(App1)") + ts("BC.OnAppUnregistered", "hmi") + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean and setup environment", common.preconditions, + { { StopStreamingTimeout = stopStreamingTimeout, VideoDataStoppedTimeout = videoDataStoppedTimeout } }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start video streaming", common.startStreaming, { 1, 11 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated, App 1 unregistered with PROTOCOL_VIOLATION", activateApp2) +runner.Step("App 2 start video streaming", common.startStreaming, { 2, 11 }) + +runner.Step("Verify timeout for OnHMIStatus_Not_Streamable", common.checkTimeout, + { "ActivateApp", "OnHMIStatus_Not_Streamable", 0 }) +runner.Step("Verify timeout for EndService", common.checkTimeout, + { "ActivateApp", "EndService", stopStreamingTimeout }) +runner.Step("Verify timeout for OnAppInterfaceUnregistered", common.checkTimeout, + { "ActivateApp", "OnAppInterfaceUnregistered", stopStreamingTimeout * 2 }) + +runner.Step("Verify timeout for Navi.OnVideoDataStreaming", common.checkTimeout, + { "ActivateApp", "Navi.OnVideoDataStreaming", videoDataStoppedTimeout }) +runner.Step("Verify timeout for Navi.StopStream", common.checkTimeout, + { "ActivateApp", "Navi.StopStream", stopStreamingTimeout }) +runner.Step("Verify timeout for BC.OnAppUnregistered", common.checkTimeout, + { "ActivateApp", "BC.OnAppUnregistered", stopStreamingTimeout * 2 }) + +runner.Step("Check App1 messages sequence", common.checkSequence, + { "app1", { "ActivateApp", "OnHMIStatus_Not_Streamable", "EndService", "OnAppInterfaceUnregistered" } }) +runner.Step("Check App2 messages sequence", common.checkSequence, + { "app2", { "ActivateApp", "OnHMIStatus_Full" } }) +runner.Step("Check HMI messages sequence", common.checkSequence, + { "hmi", { "ActivateApp", "Navi.OnVideoDataStreaming", "Navi.StopStream", "BC.OnAppUnregistered" } }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3139.txt b/test_sets/Defects/6_1/3139.txt new file mode 100644 index 0000000000..f7c3bc3950 --- /dev/null +++ b/test_sets/Defects/6_1/3139.txt @@ -0,0 +1,4 @@ +./test_scripts/Defects/6_1/3139_01_Stop_streaming_gracefully_1st_timer.lua +./test_scripts/Defects/6_1/3139_02_Stop_streaming_gracefully_2nd_timer.lua +./test_scripts/Defects/6_1/3139_03_Stop_streaming_forcibly_app_continue_streaming.lua +./test_scripts/Defects/6_1/3139_04_Stop_streaming_forcibly_app_does_not_send_EndServiceAck.lua From 35d6d04a987d153475baeacfd98269cd0042b32d Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 28 Jan 2020 13:52:14 -0500 Subject: [PATCH 11/64] Update existing scripts due to issue 2384 (#2146) --- .../DTLS/007_Processing_multiple_frames.lua | 37 ------------------- test_scripts/Security/DTLS/common.lua | 4 +- test_sets/SDL5_0/dtls_encryption.txt | 1 - test_sets/SDL5_0/sdl_5_0_test_suite.txt | 1 - test_sets/security.txt | 1 - 5 files changed, 1 insertion(+), 43 deletions(-) delete mode 100644 test_scripts/Security/DTLS/007_Processing_multiple_frames.lua diff --git a/test_scripts/Security/DTLS/007_Processing_multiple_frames.lua b/test_scripts/Security/DTLS/007_Processing_multiple_frames.lua deleted file mode 100644 index 7f69fc13e9..0000000000 --- a/test_scripts/Security/DTLS/007_Processing_multiple_frames.lua +++ /dev/null @@ -1,37 +0,0 @@ ---------------------------------------------------------------------------------------------------- --- In case: --- 1) SDL is configured with parameter ‘Protocol = DTLSv1.0’ --- 2) And app is configured to use DTLS protocol for communication with SDL --- 3) And this app is registered and RPC service is started in protected mode --- 4) And this app tries to send multi-packet RPC (e.g. PutFile) --- 5) And 1st frame is non-encrypted (or encrypted) and other frames are encrypted --- SDL does: --- 1) Process this RPC successfully in protected mode ---------------------------------------------------------------------------------------------------- ---[[ Required Shared libraries ]] -local common = require('test_scripts/Security/DTLS/common') -local runner = require('user_modules/script_runner') - ---[[ Test Configuration ]] -runner.testSettings.isSelfIncluded = false - ---[[ Scenario ]] -runner.Title("Preconditions") -runner.Step("Clean environment", common.preconditions) -runner.Step("Set DTLS protocol in SDL", common.setSDLIniParameter, { "Protocol", "DTLSv1.0" }) -runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) -runner.Step("Register App", common.registerApp) -runner.Step("Policy Table Update Certificate", common.policyTableUpdate, { common.ptUpdate }) -runner.Step("Activate App", common.activateApp) - -runner.Title("Test") -runner.Step("Switch RPC service to Protected mode", common.startServiceProtected, { 7 }) -runner.Step("PutFile. Session Secure. Sent data Protected. 1st frame UNprotected", common.putFileByFrames, { - { isSessionEncrypted = true, isSentDataEncrypted = true, isFirstFrameEncrypted = false } -}) -runner.Step("PutFile. Session Secure. Sent data Protected. 1st frame Protected", common.putFileByFrames, { - { isSessionEncrypted = true, isSentDataEncrypted = true, isFirstFrameEncrypted = true } -}) - -runner.Title("Postconditions") -runner.Step("Stop SDL, restore SDL settings", common.postconditions) diff --git a/test_scripts/Security/DTLS/common.lua b/test_scripts/Security/DTLS/common.lua index 9124c09f5d..e581a2e4d0 100644 --- a/test_scripts/Security/DTLS/common.lua +++ b/test_scripts/Security/DTLS/common.lua @@ -163,9 +163,7 @@ function m.putFileByFrames(pParams) firstFrameMessage.frameType = 0x02 firstFrameMessage.frameInfo = 0 firstFrameMessage.binaryData = int32ToBytes(binaryDataSize) .. int32ToBytes(countOfDataFrames) - if pParams.isFirstFrameEncrypted ~= nil then - firstFrameMessage.encryption = pParams.isFirstFrameEncrypted - end + firstFrameMessage.encryption = false table.insert(frames, 1, firstFrameMessage) else table.insert(frames, msg) diff --git a/test_sets/SDL5_0/dtls_encryption.txt b/test_sets/SDL5_0/dtls_encryption.txt index e9c79d6866..07d9511633 100644 --- a/test_sets/SDL5_0/dtls_encryption.txt +++ b/test_sets/SDL5_0/dtls_encryption.txt @@ -4,4 +4,3 @@ ./test_scripts/Security/DTLS/004_Processing_of_RPC.lua ./test_scripts/Security/DTLS/005_Ignore_malformed_packet.lua ./test_scripts/Security/DTLS/006_Ignore_unexpected_packet.lua -./test_scripts/Security/DTLS/007_Processing_multiple_frames.lua diff --git a/test_sets/SDL5_0/sdl_5_0_test_suite.txt b/test_sets/SDL5_0/sdl_5_0_test_suite.txt index b1e39196cb..240077c786 100644 --- a/test_sets/SDL5_0/sdl_5_0_test_suite.txt +++ b/test_sets/SDL5_0/sdl_5_0_test_suite.txt @@ -47,7 +47,6 @@ ./test_scripts/Security/DTLS/004_Processing_of_RPC.lua ./test_scripts/Security/DTLS/005_Ignore_malformed_packet.lua ./test_scripts/Security/DTLS/006_Ignore_unexpected_packet.lua -./test_scripts/Security/DTLS/007_Processing_multiple_frames.lua ; ;Duplicate Correlation ID handling ; diff --git a/test_sets/security.txt b/test_sets/security.txt index 4058923bad..30f57e8c87 100644 --- a/test_sets/security.txt +++ b/test_sets/security.txt @@ -4,7 +4,6 @@ ./test_scripts/Security/DTLS/004_Processing_of_RPC.lua ./test_scripts/Security/DTLS/005_Ignore_malformed_packet.lua ./test_scripts/Security/DTLS/006_Ignore_unexpected_packet.lua -./test_scripts/Security/DTLS/007_Processing_multiple_frames.lua ./test_scripts/Security/GetSystemTime/001_GetSystemTime_is_sent.lua ./test_scripts/Security/GetSystemTime/002_GetSystemTime_is_not_sent.lua ./test_scripts/Security/GetSystemTime/003_GetSystemTime_mobile_sdl_cer_are_expired.lua From 27a2316e1eef18f1b625981a547211612a5a66f6 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Wed, 29 Jan 2020 10:43:13 -0500 Subject: [PATCH 12/64] Script for defect 3140 (#2316) * Add scripts for 3140 issue * Address comments --- ...ming_after_activate_deactivate_2nd_app.lua | 111 ++++++++++++++++++ test_sets/Defects/6_1/3140.txt | 1 + 2 files changed, 112 insertions(+) create mode 100644 test_scripts/Defects/6_1/3140_01_1st_app_is_able_to_continue_streaming_after_activate_deactivate_2nd_app.lua create mode 100644 test_sets/Defects/6_1/3140.txt diff --git a/test_scripts/Defects/6_1/3140_01_1st_app_is_able_to_continue_streaming_after_activate_deactivate_2nd_app.lua b/test_scripts/Defects/6_1/3140_01_1st_app_is_able_to_continue_streaming_after_activate_deactivate_2nd_app.lua new file mode 100644 index 0000000000..294df3c947 --- /dev/null +++ b/test_scripts/Defects/6_1/3140_01_1st_app_is_able_to_continue_streaming_after_activate_deactivate_2nd_app.lua @@ -0,0 +1,111 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3140 +-- +-- Steps: +-- 1. Set StopStreamingTimeout = 3000 in SDL .INI file +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register 2 NAVIGATION applications: App_1 and App_2 +-- 4. Activate App_1 and start Video streaming +-- SDL does: +-- - start streaming successfully +-- 5. Deactivate App_1 and activate App_2 +-- SDL does: +-- - stop streaming successfully +-- 6. Deactivate App_2, activate App_1 and start Video streaming (within StopStreamingTimeout) +-- SDL does: +-- - not send OnAppInterfaceUnregistered notification to App_1 +-- - not send BC.OnAppUnregistered notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Defects/6_1/common_3139_3140_3142") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "NAVIGATION" } +common.app.getParams(2).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local stopStreamingTimeout = 3000 +local videoDataStoppedTimeout = 1000 + +--[[ Local Functions ]] +local log = common.log + +local function activateApp2() + local cid = common.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = common.app.getHMIId(2) }) + log("SDL->HMI ", "SDL.ActivateApp(2)") + common.hmi.getConnection():ExpectResponse(cid) + :Do(function() + log("SDL->HMI ", "SUCCESS: SDL.ActivateApp") + end) + + common.mobile.getSession(2):ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) + :Do(function() + log("SDL->App2", "OnHMIStatus(FULL)") + end) + + common.mobile.getSession(1):ExpectNotification("OnHMIStatus", + { hmiLevel = "BACKGROUND", videoStreamingState = "NOT_STREAMABLE" }) + :Do(function() + log("SDL->App1", "OnHMIStatus(NOT_STREAMABLE)") + end) + + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + :Do(function() + log("SDL->HMI ","Navi.OnVideoDataStreaming(false)") + end) + :Times(AtLeast(1)) -- number of occurrences may be >1 due to issue 3142 + + common.hmi.getConnection():ExpectRequest("Navigation.StopStream", { appID = common.app.getHMIId(1)}) + :Do(function(_, data) + log("SDL->HMI ","Navi.StopStream") + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL ","SUCCESS: Navi.StopStream") + end) + + common.mobile.getSession(1):ExpectEndService(11) + :Do(function() + log("SDL->App1", "EndService(VIDEO)") + common.mobile.getSession(1):SendEndServiceAck(11) + log("App1->SDL", "EndServiceAck") + common.stopStreaming(1) + end) +end + +local function startStreaming() + common.startStreaming(1, 11) + common.mobile.getSession(1):ExpectNotification("OnAppInterfaceUnregistered"):Times(0) + :Do(function() + log("SDL->App1", "OnAppInterfaceUnregistered(PROT_VIO)") + end) + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered"):Times(0) + :Do(function() + log("SDL->HMI ","BC.OnAppUnregistered(App1)") + end) + common.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean and setup environment", common.preconditions, + { { StopStreamingTimeout = stopStreamingTimeout, VideoDataStoppedTimeout = videoDataStoppedTimeout } }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 1", common.activateApp, { 1 }) + +runner.Title("Test") +runner.Step("App 1 start video streaming", common.startStreaming, { 1, 11 }) +runner.Step("App 1 deactivated", common.deactivateApp, { 1 }) +runner.Step("App 2 activated", activateApp2) +runner.Step("App 2 deactivated", common.deactivateApp, { 2 }) +runner.Step("App 1 activated", common.activateApp, { 1 }) +runner.Step("App 1 continue video streaming", startStreaming, { 1, 11 }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3140.txt b/test_sets/Defects/6_1/3140.txt new file mode 100644 index 0000000000..d93989f7ed --- /dev/null +++ b/test_sets/Defects/6_1/3140.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/3140_01_1st_app_is_able_to_continue_streaming_after_activate_deactivate_2nd_app.lua From f83ccadf508ef725050edc4844f37ba0d3c33846 Mon Sep 17 00:00:00 2001 From: "Taras Myza (GitHub)" <40491384+TMyza@users.noreply.github.com> Date: Wed, 29 Jan 2020 20:40:19 +0300 Subject: [PATCH 13/64] Script for defect 2442 json lib (#2085) * Script for defect 2442 * Fix for script * Fix for script according to changes in SDL core * Move script to 6_1 Co-authored-by: Dmytro Boltovskyi (GitHub) --- ...442_Fix_mem_seg_fault_error_in_jsoncpp.lua | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 test_scripts/Defects/6_1/2442_Fix_mem_seg_fault_error_in_jsoncpp.lua diff --git a/test_scripts/Defects/6_1/2442_Fix_mem_seg_fault_error_in_jsoncpp.lua b/test_scripts/Defects/6_1/2442_Fix_mem_seg_fault_error_in_jsoncpp.lua new file mode 100644 index 0000000000..d9b47229c9 --- /dev/null +++ b/test_scripts/Defects/6_1/2442_Fix_mem_seg_fault_error_in_jsoncpp.lua @@ -0,0 +1,65 @@ +--------------------------------------------------------------------------------------------------- +-- User story: https://github.com/smartdevicelink/sdl_core/issues/2442 +-- +-- Description: +-- The root cause of the issue is a stack overflow which is occurring due to recursive call of deeply nested areas +-- and objects. We have readValue(..) which calls readObject(..) or readArray(..), which call readValue(...). +-- Steps to reproduce: +-- 1) SDL and HMI are started +-- 2) App1 is registered and triggered PTU +-- 3) Json file with 995 nestings for PTU, PTU is performed successful +-- 4) App2 is registered and triggered PTU +-- 5) Json file with 996 nestings for PTU +-- SDL does: +-- - a) Ignore json file +-- - b) PTU is performed unsuccessful +--------------------------------------------------------------------------------------------------- +-- [[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('user_modules/sequences/actions') + + -- [[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +-- -- [[ Local Functions ]] +local function getRTable(deep) + if 0 == deep then + return {} + end + local curentrez = {} + curentrez[#curentrez .. tostring(deep)] = getRTable(deep - 1) + return curentrez +end + +local function pTUpdateFunc1(tbl) + local Group = { + rpcs = getRTable(995) + } + tbl.policy_table.functional_groupings["Group"] = Group + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].groups = {"Base-4", "Group"} +end + +local function pTUpdateFunc2(tbl) + local Group = { + rpcs = getRTable(996) + } + tbl.policy_table.functional_groupings["Group"] = Group + tbl.policy_table.app_policies[config.application2.registerAppInterfaceParams.fullAppID].groups = {"Base-4", "Group"} +end + +local function expNotificationFunc() + common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) +end + +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App1", common.registerApp, { 1 }) +runner.Step("Success PTU, json with 995 nestings", common.policyTableUpdate, { pTUpdateFunc1 }) + +runner.Title("Test") +runner.Step("Register App2", common.registerApp, { 2 }) +runner.Step("Unsuccess PTU, json with 996 nestings", common.policyTableUpdate, { pTUpdateFunc2, expNotificationFunc }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) From c0eb934cd532ac210b12ddcbd4ab0d693fc20201 Mon Sep 17 00:00:00 2001 From: "Yaroslav Mamykin (GitHub)" <33784535+YarikMamykin@users.noreply.github.com> Date: Fri, 31 Jan 2020 18:50:00 +0200 Subject: [PATCH 14/64] Fix sdl sending of PerformInteraction unsuccess response to mobile in case choice id selected via VR (#2293) * Update of existed scripts * Extending of the coverage for PI in smoke tests * fixup! Extending of the coverage for PI in smoke tests Co-authored-by: Getmanets Irina (GitHub) <11210973+GetmanetsIrina@users.noreply.github.com> --- .../005_PerfomInteraction.lua | 2 +- ...PerfomInteraction_PositiveCase_SUCCESS.lua | 120 +++++++++++++++- ...raction_Non_Media_PositiveCase_SUCCESS.lua | 131 ++++++++++++++++-- ...URED_for_the_main_and_a_widget_windows.lua | 3 +- 4 files changed, 241 insertions(+), 15 deletions(-) diff --git a/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/005_PerfomInteraction.lua b/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/005_PerfomInteraction.lua index 5c61b44749..9b329427e0 100644 --- a/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/005_PerfomInteraction.lua +++ b/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/005_PerfomInteraction.lua @@ -300,7 +300,7 @@ local function PI_PerformViaBOTH(paramsSend) RUN_AFTER(uiResponse, 30) end) ExpectOnHMIStatusWithAudioStateChanged_PI("BOTH") - common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "WARNINGS", + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "WARNINGS", info = "Requested image(s) not found., Perform Interaction error response." }) end diff --git a/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua index 0f44693f5c..0333f6dfb6 100644 --- a/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua @@ -282,7 +282,10 @@ local function PI_PerformViaVR_ONLY(paramsSend, self) vrHelpTitle = paramsSend.initialText, }) :Do(function(_,data) - self.hmiConnection:SendResponse( data.id, data.method, "SUCCESS", { } ) + EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + :Do(function() + self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + end) end) ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") self.mobileSession1:ExpectResponse(cid, @@ -385,6 +388,114 @@ local function PI_PerformViaBOTH(paramsSend, self) self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) end +--! @PI_PerformViaBOTHuiChoice: Processing PI with interaction mode BOTH with user choice on UI part +--! @parameters: +--! paramsSend - parameters for PI request +--! self - test object +--! @return: none +local function PI_PerformViaBOTHuiChoice(paramsSend, self) + paramsSend.interactionMode = "BOTH" + local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) + EXPECT_HMICALL("VR.PerformInteraction", { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("VR.Started") + self.hmiConnection:SendNotification("TTS.Started") + SendOnSystemContext(self,"VRSESSION") + local function firstSpeakTimeOut() + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendNotification("TTS.Started") + end + RUN_AFTER(firstSpeakTimeOut, 1000) + local function vrResponse() + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + self.hmiConnection:SendNotification("VR.Stopped") + end + RUN_AFTER(vrResponse, 2000) + end) + EXPECT_HMICALL("UI.PerformInteraction", { + timeout = paramsSend.timeout, + choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + initialText = { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + }, + vrHelp = paramsSend.vrHelp, + vrHelpTitle = paramsSend.initialText + }) + :Do(function(_,data) + local function choiceIconDisplayed() + SendOnSystemContext(self,"HMI_OBSCURED") + end + RUN_AFTER(choiceIconDisplayed, 2050) + local function uiResponse() + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", + { choiceID = paramsSend.interactionChoiceSetIDList[1] }) + SendOnSystemContext(self,"MAIN") + end + RUN_AFTER(uiResponse, 3000) + end) + ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "MENU" }) +end + +--! @PI_PerformViaBOTHvrChoice: Processing PI with interaction mode BOTH with user choice on VR part +--! @parameters: +--! paramsSend - parameters for PI request +--! self - test object +--! @return: none +local function PI_PerformViaBOTHvrChoice(paramsSend, self) + paramsSend.interactionMode = "BOTH" + local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) + EXPECT_HMICALL("VR.PerformInteraction", { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendNotification("VR.Started") + SendOnSystemContext(self,"VRSESSION") + local function firstSpeakTimeOut() + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(firstSpeakTimeOut, 1000) + local function vrResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", + { choiceID = paramsSend.interactionChoiceSetIDList[1] }) + self.hmiConnection:SendNotification("VR.Stopped") + SendOnSystemContext(self, "MAIN") + end + RUN_AFTER(vrResponse, 2000) + end) + EXPECT_HMICALL("UI.PerformInteraction", { + timeout = paramsSend.timeout, + choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + initialText = { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + }, + vrHelp = paramsSend.vrHelp, + vrHelpTitle = paramsSend.initialText + }) + :Do(function(_,data) + EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + :Do(function() + self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + end) + end) + ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "VR" }) +end + --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonSmoke.preconditions) @@ -400,8 +511,11 @@ runner.Step("CreateInteractionChoiceSet no VR commands with id 400", CreateInter runner.Title("Test") runner.Step("PerformInteraction with VR_ONLY interaction mode", PI_PerformViaVR_ONLY, {requestParams}) runner.Step("PerformInteraction with MANUAL_ONLY interaction mode", PI_PerformViaMANUAL_ONLY, {requestParams}) -runner.Step("PerformInteraction with MANUAL_ONLY interaction mode no VR commands", PI_PerformViaMANUAL_ONLY, {requestParams_noVR}) -runner.Step("PerformInteraction with BOTH interaction mode", PI_PerformViaBOTH, {requestParams}) +runner.Step("PerformInteraction with MANUAL_ONLY interaction mode no VR commands", PI_PerformViaMANUAL_ONLY, + {requestParams_noVR}) +runner.Step("PerformInteraction with BOTH interaction mode TIMED_OUT", PI_PerformViaBOTH, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode choice via UI", PI_PerformViaBOTHuiChoice, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode choice via VR", PI_PerformViaBOTHvrChoice, {requestParams}) runner.Title("Postconditions") diff --git a/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua index a6410261f8..3fe0c7caef 100644 --- a/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua @@ -96,11 +96,11 @@ local requestParams = { --[[ Local Functions ]] ---! @setChoiseSet: Creates Choice structure +--! @setChoiceSet: Creates Choice structure --! @parameters: --! choiceIDValue - Id for created choice --! @return: table of created choice structure -local function setChoiseSet(choiceIDValue) +local function setChoiceSet(choiceIDValue) local temp = { { choiceID = choiceIDValue, @@ -127,11 +127,11 @@ local function SendOnSystemContext(self, ctx) { appID = commonSmoke.getHMIAppId(), systemContext = ctx }) end ---! @setExChoiseSet: ChoiceSet structure for UI.PerformInteraction request +--! @setExChoiceSet: ChoiceSet structure for UI.PerformInteraction request --! @parameters: --! choiceIDValues - value of choice id --! @return: none -local function setExChoiseSet(choiceIDValues) +local function setExChoiceSet(choiceIDValues) local exChoiceSet = { } for i = 1, #choiceIDValues do exChoiceSet[i] = { @@ -180,7 +180,7 @@ local function CreateInteractionChoiceSet(choiceSetID, self) local choiceID = choiceSetID local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { interactionChoiceSetID = choiceSetID, - choiceSet = setChoiseSet(choiceID), + choiceSet = setChoiceSet(choiceID), }) EXPECT_HMICALL("VR.AddCommand", { cmdID = choiceID, @@ -227,7 +227,10 @@ local function PI_PerformViaVR_ONLY(paramsSend, self) vrHelpTitle = paramsSend.initialText, }) :Do(function(_,data) - self.hmiConnection:SendResponse( data.id, data.method, "SUCCESS", { } ) + EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + :Do(function() + self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + end) end) ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") self.mobileSession1:ExpectResponse(cid, @@ -254,7 +257,7 @@ local function PI_PerformViaMANUAL_ONLY(paramsSend, self) end) EXPECT_HMICALL("UI.PerformInteraction", { timeout = paramsSend.timeout, - choiceSet = setExChoiseSet(paramsSend.interactionChoiceSetIDList), + choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", fieldText = paramsSend.initialText @@ -306,7 +309,7 @@ local function PI_PerformViaBOTH(paramsSend, self) end) EXPECT_HMICALL("UI.PerformInteraction", { timeout = paramsSend.timeout, - choiceSet = setExChoiseSet(paramsSend.interactionChoiceSetIDList), + choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", fieldText = paramsSend.initialText @@ -330,6 +333,114 @@ local function PI_PerformViaBOTH(paramsSend, self) self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) end +--! @PI_PerformViaBOTHuiChoice: Processing PI with interaction mode BOTH with user choice on UI part +--! @parameters: +--! paramsSend - parameters for PI request +--! self - test object +--! @return: none +local function PI_PerformViaBOTHuiChoice(paramsSend, self) + paramsSend.interactionMode = "BOTH" + local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) + EXPECT_HMICALL("VR.PerformInteraction", { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("VR.Started") + self.hmiConnection:SendNotification("TTS.Started") + SendOnSystemContext(self,"VRSESSION") + local function firstSpeakTimeOut() + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendNotification("TTS.Started") + end + RUN_AFTER(firstSpeakTimeOut, 1000) + local function vrResponse() + self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + self.hmiConnection:SendNotification("VR.Stopped") + end + RUN_AFTER(vrResponse, 2000) + end) + EXPECT_HMICALL("UI.PerformInteraction", { + timeout = paramsSend.timeout, + choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + initialText = { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + }, + vrHelp = paramsSend.vrHelp, + vrHelpTitle = paramsSend.initialText + }) + :Do(function(_,data) + local function choiceIconDisplayed() + SendOnSystemContext(self,"HMI_OBSCURED") + end + RUN_AFTER(choiceIconDisplayed, 2050) + local function uiResponse() + self.hmiConnection:SendNotification("TTS.Stopped") + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", + { choiceID = paramsSend.interactionChoiceSetIDList[1] }) + SendOnSystemContext(self,"MAIN") + end + RUN_AFTER(uiResponse, 3000) + end) + ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "MENU" }) +end + +--! @PI_PerformViaBOTHvrChoice: Processing PI with interaction mode BOTH with user choice on VR part +--! @parameters: +--! paramsSend - parameters for PI request +--! self - test object +--! @return: none +local function PI_PerformViaBOTHvrChoice(paramsSend, self) + paramsSend.interactionMode = "BOTH" + local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) + EXPECT_HMICALL("VR.PerformInteraction", { + helpPrompt = paramsSend.helpPrompt, + initialPrompt = paramsSend.initialPrompt, + timeout = paramsSend.timeout, + timeoutPrompt = paramsSend.timeoutPrompt + }) + :Do(function(_,data) + self.hmiConnection:SendNotification("TTS.Started") + self.hmiConnection:SendNotification("VR.Started") + SendOnSystemContext(self,"VRSESSION") + local function firstSpeakTimeOut() + self.hmiConnection:SendNotification("TTS.Stopped") + end + RUN_AFTER(firstSpeakTimeOut, 1000) + local function vrResponse() + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", + { choiceID = paramsSend.interactionChoiceSetIDList[1] }) + self.hmiConnection:SendNotification("VR.Stopped") + SendOnSystemContext(self, "MAIN") + end + RUN_AFTER(vrResponse, 2000) + end) + EXPECT_HMICALL("UI.PerformInteraction", { + timeout = paramsSend.timeout, + choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + initialText = { + fieldName = "initialInteractionText", + fieldText = paramsSend.initialText + }, + vrHelp = paramsSend.vrHelp, + vrHelpTitle = paramsSend.initialText + }) + :Do(function(_,data) + EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + :Do(function() + self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + end) + end) + ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") + self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "VR" }) +end + --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonSmoke.preconditions) @@ -344,7 +455,9 @@ runner.Step("CreateInteractionChoiceSet with id 300", CreateInteractionChoiceSet runner.Title("Test") runner.Step("PerformInteraction with VR_ONLY interaction mode", PI_PerformViaVR_ONLY, {requestParams}) runner.Step("PerformInteraction with MANUAL_ONLY interaction mode", PI_PerformViaMANUAL_ONLY, {requestParams}) -runner.Step("PerformInteraction with BOTH interaction mode", PI_PerformViaBOTH, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode TIMED_OUT", PI_PerformViaBOTH, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode choice via UI", PI_PerformViaBOTHuiChoice, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode choice via VR", PI_PerformViaBOTHvrChoice, {requestParams}) runner.Title("Postconditions") runner.Step("Stop SDL", commonSmoke.postconditions) diff --git a/test_scripts/WidgetSupport/OnHMIStatus/007_SystemContext_from_MAIN_to_VRSESSION_and_HMI_OBSCURED_for_the_main_and_a_widget_windows.lua b/test_scripts/WidgetSupport/OnHMIStatus/007_SystemContext_from_MAIN_to_VRSESSION_and_HMI_OBSCURED_for_the_main_and_a_widget_windows.lua index 3c0c13f20b..fca56ffc2a 100644 --- a/test_scripts/WidgetSupport/OnHMIStatus/007_SystemContext_from_MAIN_to_VRSESSION_and_HMI_OBSCURED_for_the_main_and_a_widget_windows.lua +++ b/test_scripts/WidgetSupport/OnHMIStatus/007_SystemContext_from_MAIN_to_VRSESSION_and_HMI_OBSCURED_for_the_main_and_a_widget_windows.lua @@ -119,12 +119,11 @@ local function performInteraction(pAppId) RUN_AFTER(choiceIconDisplayed, 25) local function uiResponse() common.getHMIConnection():SendNotification("TTS.Stopped") - common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") sendOnSystemContext("MAIN", pMainId) sendOnSystemContext("MAIN", params.windowID) end RUN_AFTER(uiResponse, 30) - common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) common.getMobileSession(pAppId):ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", windowID = pMainId }, From c4f899fa48d89a66dcf166f8be6cd4ab82abd487 Mon Sep 17 00:00:00 2001 From: theresalech Date: Mon, 3 Feb 2020 16:18:22 -0500 Subject: [PATCH 15/64] update license --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index ae3e57d852..6dc6f78f09 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2017 - 2018 SmartDeviceLink Consortium, Inc. +Copyright (c) 2017 - 2020 SmartDeviceLink Consortium, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without From 12df6b10fd802cbeb664535033a66edcad9116cc Mon Sep 17 00:00:00 2001 From: "Ira Lytvynenko (GitHub)" Date: Wed, 5 Feb 2020 20:31:31 +0200 Subject: [PATCH 16/64] Feature/HMI Policy Table Update using vehicle modem (#2315) * Initial scripts for HMI PTU * Update TheSameApp scripts * Update RGNSD scripts * Update Policy common modules and files * Update Policy scripts * Exclude not applicable policy scripts from test set Co-authored-by: Getmanets Irina (GitHub) <11210973+GetmanetsIrina@users.noreply.github.com> --- .../OnAppPermissionConsent.json | 2 +- .../commonGenericNetSignalData.lua | 9 +- ..._external_consent_status_groups_struct.lua | 38 +++- .../Policies/HMI_PTU/001_Success_flow.lua | 44 ++++ ...ssful_responses_from_the_policy_server.lua | 56 +++++ ..._from_assigned_group_after_PTU_via_HMI.lua | 56 +++++ ...m_not_assigned_group_after_PTU_via_HMI.lua | 44 ++++ ...ond_PTU_via_HMI_after_registering_App2.lua | 56 +++++ ...istering_App2_and_first_PTU_via_mobile.lua | 56 +++++ ...bile_for_App2_after_failed_PTU_via_HMI.lua | 69 +++++++ ...imeout_after_receiving_OnSystemRequest.lua | 67 ++++++ ...ence_HMI_has_timeout_more_then_SDL_ext.lua | 192 ++++++++++++++++++ ...ce_HMI_has_timeout_more_then_SDL_propr.lua | 133 ++++++++++++ ...ING_status_after_PolicyUpdate_response.lua | 72 +++++++ ..._after_erroneous_PolicyUpdate_response.lua | 54 +++++ ...eout_expired_for_PolicyUpdate_response.lua | 50 +++++ ...r_failed_retry_consequtive_trigger_ext.lua | 104 ++++++++++ ...failed_retry_consequtive_trigger_propr.lua | 96 +++++++++ ...fter_failed_retry_parallel_trigger_ext.lua | 125 ++++++++++++ ...er_failed_retry_parallel_trigger_propr.lua | 114 +++++++++++ .../Policies/HMI_PTU/common_hmi_ptu.lua | 183 +++++++++++++++++ ...usUpdate_UPDATE_NEEDED_new_PTU_request.lua | 6 +- ...oliciesManager_changes_status_UPDATING.lua | 78 ------- .../140_ATF_timeout_countdown_start.lua | 2 +- .../145_ATF_PTU_Merge_Into_LPT.lua | 3 +- ...licy_Table_Update_Trigger_After_N_Days.lua | 7 +- ...TU_Merge_Of_Consumer_Friendly_Messages.lua | 8 +- ...ot_From_Sync_After_Getting_The_Updates.lua | 6 +- ...anager_Changes_Status_To_UPDATE_NEEDED.lua | 2 +- .../156_ATF_PTU_OnStatusUpdate_Trigger.lua | 3 +- ...ies_Manager_Changes_Status_To_UPDATING.lua | 93 --------- ...s_Manager_Changes_Status_To_UP_TO_DATE.lua | 17 +- ...F_Default_Policy_For_The_App_After_PTU.lua | 11 +- ...r_NewApp_not_exist_inLocalPT_FinishPTU.lua | 1 - ...t_exist_inLocalPT_start_PTU_for_NewApp.lua | 8 +- ...F_OnAppPermissionConsent_without_appID.lua | 3 + ..._ATF_OnAppPermissionConsent_with_appID.lua | 3 +- ...des_data_consent_prompt_on_HMI_request.lua | 2 +- ...6_ATF_OnPolicyUpdate_initiation_of_PTU.lua | 3 +- ...ATF_Get_Status_Update_Request_from_HMI.lua | 5 +- ...idation_rules_optional_parameters_type.lua | 7 +- ...idation_rules_required_parameters_type.lua | 7 +- ...ATF_pt_update_validation_rules_general.lua | 7 +- ...dation_rules_consumer_friendly_message.lua | 7 +- ..._Validate_default_hmi_default_policies.lua | 8 +- ...e_preconsented_groups_default_policies.lua | 8 +- ...2_ATF_Validate_groups_default_policies.lua | 8 +- ...TF_Validate_default_hmi_appId_policies.lua | 8 +- ...Store_pt_exchanged_at_odometer_x_in_PT.lua | 8 +- ...ATF_Validate_appHMIType_appID_policies.lua | 7 +- ...299_ATF_Memory_Kb_Constraints_Ignoring.lua | 3 +- ...s_update_app_registration_language_vui.lua | 8 +- ...nt_of_run_attempts_while_revoked_in_PT.lua | 4 +- ...TF_Check_app_registration_language_gui.lua | 9 +- ...App_Interface_Assign_Existing_Policies.lua | 3 + ...ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua | 48 +++-- ..._exist_inLocalPT_FinishPTU_PROPRIETARY.lua | 5 + ...I_In_Case_PTU_Is_Triggered_PROPRIETARY.lua | 7 +- ...changes_status_to_UPDATING_PROPRIETARY.lua | 3 +- ...egy_during_previous_IGN_ON_PROPRIETARY.lua | 4 + .../108_ATF_PTU_Trigger_days_PROPRIETARY.lua | 3 + ...ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua | 26 ++- .../189_ATF_isAppPermissionsRevoked_true.lua | 2 +- ...9_ATF_appPermissionsConsentNeeded_true.lua | 2 +- ..._calls_counter_diff_appID_same_appName.lua | 15 +- ...i_none_counter_diff_appID_same_appName.lua | 14 +- test_sets/hmi_ptu.txt | 18 ++ ...icies_happy_paths_EXTERNAL_PROPRIETARY.txt | 4 +- .../testCasesForExternalUCS.lua | 4 +- .../testCasesForPolicyAppIdManagament.lua | 2 +- .../testCasesForPolicyTable.lua | 8 +- .../testCasesForPolicyTableSnapshot.lua | 8 + 72 files changed, 1858 insertions(+), 298 deletions(-) create mode 100644 test_scripts/Policies/HMI_PTU/001_Success_flow.lua create mode 100644 test_scripts/Policies/HMI_PTU/002_PTU_is_performed_via_app_if_HMI_receives_unsuccessful_responses_from_the_policy_server.lua create mode 100644 test_scripts/Policies/HMI_PTU/003_SDL_processes_rpc_from_assigned_group_after_PTU_via_HMI.lua create mode 100644 test_scripts/Policies/HMI_PTU/004_SDL_rejects_rpc_from_not_assigned_group_after_PTU_via_HMI.lua create mode 100644 test_scripts/Policies/HMI_PTU/005_perform_second_PTU_via_HMI_after_registering_App2.lua create mode 100644 test_scripts/Policies/HMI_PTU/006_perform_second_PTU_via_HMI_after_registering_App2_and_first_PTU_via_mobile.lua create mode 100644 test_scripts/Policies/HMI_PTU/007_perform_second_PTU_via_mobile_for_App2_after_failed_PTU_via_HMI.lua create mode 100644 test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua create mode 100644 test_scripts/Policies/HMI_PTU/009_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_ext.lua create mode 100644 test_scripts/Policies/HMI_PTU/010_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_propr.lua create mode 100644 test_scripts/Policies/HMI_PTU/011_UPDATING_status_after_PolicyUpdate_response.lua create mode 100644 test_scripts/Policies/HMI_PTU/012_UPDATING_status_absence_after_erroneous_PolicyUpdate_response.lua create mode 100644 test_scripts/Policies/HMI_PTU/013_UPDATING_status_absence_after_timeout_expired_for_PolicyUpdate_response.lua create mode 100644 test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua create mode 100644 test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua create mode 100644 test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua create mode 100644 test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua create mode 100644 test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua delete mode 100644 test_scripts/Policies/Policy_Table_Update/139_ATF_PoliciesManager_changes_status_UPDATING.lua delete mode 100644 test_scripts/Policies/Policy_Table_Update/157_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATING.lua create mode 100644 test_sets/hmi_ptu.txt diff --git a/files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent.json b/files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent.json index 6fd3fa8c3b..a11ddd073d 100644 --- a/files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent.json +++ b/files/jsons/Policies/Related_HMI_API/OnAppPermissionConsent.json @@ -5,7 +5,7 @@ "exchange_after_x_ignition_cycles": 100, "exchange_after_x_kilometers": 1800, "exchange_after_x_days": 20, - "timeout_after_x_seconds": 60, + "timeout_after_x_seconds": 5, "seconds_between_retries": [ 1, 5, diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua index 19c82c9e1d..9c3cda708e 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua @@ -917,14 +917,7 @@ function common.updateCustomDataTypeSample(pName, dParam, pValue) end function common.expUpdateNeeded() - if test.sdlBuildOptions.extendedPolicy == "EXTERNAL_PROPRIETARY" then - common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate", - { status = "UPDATING" }, - { status = "UPDATE_NEEDED" }) - :Times(2) - else - common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) - end + common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) end function common.getCustomAndRpcSpecDataNames() diff --git a/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua index 70b13bd8e1..7c1ddb8902 100644 --- a/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua @@ -33,8 +33,11 @@ config.defaultProtocolVersion = 2 --[[ Required Shared Libraries ]] local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local json = require("modules/json") local testCasesForExternalUCS = require('user_modules/shared_testcases/testCasesForExternalUCS') local utils = require ('user_modules/utils') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') --[[ Local variables ]] local appId = config.application1.registerAppInterfaceParams.fullAppID @@ -42,8 +45,17 @@ local grpId = "Location-1" local checkedSection = "external_consent_status_groups" --[[ Local Functions ]] -local function ptuFunc(pTable) - pTable.policy_table.app_policies[appId] = { +local function ptuFile(pPtuFileName) + local preloadedFile = commonPreconditions:GetPathToSDL() .. + commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") + local preloadedTable = testCasesForExternalUCS.createTableFromJsonFile(preloadedFile) + if next(preloadedTable) ~= nil then + preloadedTable.policy_table.consumer_friendly_messages = nil + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null + preloadedTable.policy_table.module_config.preloaded_pt = nil + preloadedTable.policy_table.vehicle_data = nil + end + preloadedTable.policy_table.app_policies[appId] = { default_hmi = "NONE", keep_context = false, priority = "NONE", @@ -52,14 +64,14 @@ local function ptuFunc(pTable) "Base-4", grpId } } - pTable.policy_table.functional_groupings[grpId].disallowed_by_external_consent_entities_on = { + preloadedTable.policy_table.functional_groupings[grpId].disallowed_by_external_consent_entities_on = { { entityID = 128, entityType = 0 } } + testCasesForExternalUCS.createJsonFileFromTable(preloadedTable, pPtuFileName) end - --[[ General Precondition before ATF start ]] commonFunctions:SDLForceStop() commonSteps:DeleteLogsFileAndPolicyTable() @@ -88,7 +100,14 @@ function Test:RAI_1() end function Test:ActivateApp_1() - testCasesForExternalUCS.activateApp(self, 1, "UP_TO_DATE", ptuFunc) + testCasesForExternalUCS.activateApp(self, 1) +end + +function Test:PolicyTableUpdate() + local ptuFileName = os.tmpname() + ptuFile(ptuFileName) + testCasesForPolicyTable:updatePolicyInDifferentSessions( + self, ptuFileName, config.application1.registerAppInterfaceParams.appName, self["mobileSession" .. 1]) end function Test:SendExternalConsent() @@ -96,18 +115,15 @@ function Test:SendExternalConsent() externalConsentStatus = { { entityType = 0, entityID = 128, status = "OFF" } } }) + utils.wait(3000) end function Test.RemovePTS() testCasesForExternalUCS.removePTS() end -function Test:StartSession_2() - testCasesForExternalUCS.startSession(self, 2) -end - -function Test:RAI_2() - testCasesForExternalUCS.registerApp(self, 2) +function Test:CreateNewPTS() + self.hmiConnection:SendNotification("SDL.OnPolicyUpdate") EXPECT_HMICALL("BasicCommunication.PolicyUpdate") :Do(function(_, d) testCasesForExternalUCS.pts = testCasesForExternalUCS.createTableFromJsonFile(d.params.file) end) end diff --git a/test_scripts/Policies/HMI_PTU/001_Success_flow.lua b/test_scripts/Policies/HMI_PTU/001_Success_flow.lua new file mode 100644 index 0000000000..0088669de7 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/001_Success_flow.lua @@ -0,0 +1,44 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md + +-- Description: Check that PTU is successfully performed via HMI + +-- In case: +-- 1. SDL and HMI are started +-- 2. App is registered +-- 3. PTU is triggered +-- SDL does: +-- a) send UPDATE_NEDDED to HMI +-- b) create the snapshot +-- c) send BC.PolicyUpdate request to HMI +-- 4. HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL +-- SDL does: +-- a) set PTU status to UPDATING and sends OnStatusUpdate notification to HMI +-- 5. HMI requests endpoints for service 7 sending GetPolicyConfigurationData rpc to the SDL +-- SDL does: +-- a) send GetPolicyConfigurationData response with endpoints for the requested service 7 +-- 6. HMI gets the update and sends SDL.OnReceivedPolicyUpdate() to SDL +-- SDL does: +-- a) apply the update and sends OnStatusUpdate(UP_TO_DATE) to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("HMI PTU", common.ptuViaHMI) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/002_PTU_is_performed_via_app_if_HMI_receives_unsuccessful_responses_from_the_policy_server.lua b/test_scripts/Policies/HMI_PTU/002_PTU_is_performed_via_app_if_HMI_receives_unsuccessful_responses_from_the_policy_server.lua new file mode 100644 index 0000000000..3b81fb989f --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/002_PTU_is_performed_via_app_if_HMI_receives_unsuccessful_responses_from_the_policy_server.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md + +-- Description: Check that PTU is performed via a mobile app after the unsuccessful PTU attempt via HMI + +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered +-- Steps: +-- 1) PTU via HMI is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI +-- b) create the PTS +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL +--SDL does: +-- a) send SDL.OnStatusUpdate(UPDATING) notification to the HMI +-- 3) HMI requests endpoints for service 7 by sending GetPolicyConfigurationData rpc to the SDL +-- SDL does: +-- a) send GetPolicyConfigurationData response with the endpoints for the requested service 7 +-- 4) PTU via HMI fails +-- 5) HMI starts the PTU via a mobile app and sends BC.OnSystemRequest notification to the SDL +-- SDL does: +-- a) send an OnSystemRequest notification to the app +-- 6) App gets PTU file and sends SystemRequest request with received file to the SDL +-- SDL does: +-- a) send BC.SystemRequest to HMI +-- 7) HMI responds successfully to BC.SystemRequest request from SDL +-- SDL does: +-- a) resend successful SystemRequest response the app +-- 8) HMI decodes the received file from policy server successfully and sends OnReceivedPolicyUpdate to the SDL +-- SDL does: +-- a) check that PTU is correct and send SDL.OnStatusUpdate(UP_TO_DATE) notification to the HMI +-- b) send OnPermissionsChange notification to the app +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) + +runner.Title("Test") +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Successful PTU via a mobile app", common.policyTableUpdate) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/003_SDL_processes_rpc_from_assigned_group_after_PTU_via_HMI.lua b/test_scripts/Policies/HMI_PTU/003_SDL_processes_rpc_from_assigned_group_after_PTU_via_HMI.lua new file mode 100644 index 0000000000..5cf708aff8 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/003_SDL_processes_rpc_from_assigned_group_after_PTU_via_HMI.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Check that SDL correctly processes RPC after PTU via HMI was performed +-- +-- Preconditions: +-- 1. SDL and HMI are started +-- 2. App is registered +-- 3. PTU via HMI was performed successfully +-- 4. App is activated +-- +-- Steps: +-- 1) App sends GetVehicleData request from the allowed group according to PTU +-- SDL does: +-- a) send VehicleInfo.GetVehicleData request to the HMI +-- 2) HMI sends successful response VehicleInfo.GetVehicleData to the SDL +-- SDL does: +-- a) send GetVehicleData( resultCode = SUCCESS ) response to the App +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[Local Variables]] +local requestData = { fuelLevel = true } +local responseData = { fuelLevel = 34 } + +--[[Local Functions]] +local function sendAllowedRPC(pRequestData, pResponseData) + local cid = common.mobile():SendRPC("GetVehicleData", pRequestData) + common.hmi():ExpectRequest("VehicleInfo.GetVehicleData", pRequestData) + :Do(function(_, data) + common.hmi():SendResponse(data.id, data.method, "SUCCESS", pResponseData) + end) + + common.mobile():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", fuelLevel = pResponseData.fuelLevel }) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU via HMI", common.ptuViaHMI, { common.PTUfuncWithNewGroup }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("Send allowed GetVehicleData RPC from the App", sendAllowedRPC, { requestData, responseData }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/004_SDL_rejects_rpc_from_not_assigned_group_after_PTU_via_HMI.lua b/test_scripts/Policies/HMI_PTU/004_SDL_rejects_rpc_from_not_assigned_group_after_PTU_via_HMI.lua new file mode 100644 index 0000000000..0f8a187864 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/004_SDL_rejects_rpc_from_not_assigned_group_after_PTU_via_HMI.lua @@ -0,0 +1,44 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Check that SDL rejects RPC from the group not assigned to the App after PTU via HMI was performed +-- +-- Preconditions: +-- 1. SDL and HMI are started +-- 2. App is registered +-- 3. PTU via HMI was performed successfully +-- 4. App is activated +-- +-- Steps: +-- 1) App sends GetVehicleData RPC from the group not assigned to it +-- SDL does: +-- a) send GetVehicleData( resultCode = DISALLOWED ) response to the App +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[Local Functions]] +local function sendProhibitedRPC() + local cid = common.mobile():SendRPC("GetVehicleData", { fuelLevel = true }) + common.mobile():ExpectResponse(cid, { success = false, resultCode = "DISALLOWED"}) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU via HMI", common.ptuViaHMI) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("Send not allowed GetVehicleData RPC from the App", sendProhibitedRPC) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/005_perform_second_PTU_via_HMI_after_registering_App2.lua b/test_scripts/Policies/HMI_PTU/005_perform_second_PTU_via_HMI_after_registering_App2.lua new file mode 100644 index 0000000000..1e8f2985aa --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/005_perform_second_PTU_via_HMI_after_registering_App2.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Check that if the first PTU via HMI was performed for App1, the second PTU via HMI +-- will be performed successfully after registration of the App2 +-- +-- Preconditions: +-- 1. SDL and HMI are started +-- 2. App1 is registered +-- 3. PTU via HMI for the App1 was performed successfully +-- 4. App2 is registered +-- +-- Steps: +-- 1) The second PTU is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI, +-- b) create the PTS, +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATING) notification to the HMI +-- 3) HMI requests endpoints for service 7 by sending GetPolicyConfigurationData RPC to the SDL +-- SDL does: +-- a) send GetPolicyConfigurationData response with endpoints for requested service 7 +-- 4) HMI decodes the file received from the policy server successfully and +-- sends OnReceivedPolicyUpdate notification to the SDL +-- SDL does: +-- a) check that PTU is correct and send SDL.OnStatusUpdate(UP_TO_DATE) notification to the HMI +-- b) send OnPermissionsChange notification to the App1 and to the App2 +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local appSessionId1 = 1 +local appSessionId2 = 2 + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App1", common.registerApp, { appSessionId1 }) +runner.Step("PTU via HMI", common.ptuViaHMI) +runner.Step("Register App2", common.registerApp, { appSessionId2 }) + +runner.Title("Test") +runner.Step("Second PTU via HMI", common.ptuViaHMI, { common.PTUfuncWithNewGroup }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/006_perform_second_PTU_via_HMI_after_registering_App2_and_first_PTU_via_mobile.lua b/test_scripts/Policies/HMI_PTU/006_perform_second_PTU_via_HMI_after_registering_App2_and_first_PTU_via_mobile.lua new file mode 100644 index 0000000000..d1f8622e5e --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/006_perform_second_PTU_via_HMI_after_registering_App2_and_first_PTU_via_mobile.lua @@ -0,0 +1,56 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Check that if the first PTU via mobile application for the App1 was performed, the second PTU via HMI +-- will be performed successfully after registration of the App2 +-- +-- Preconditions: +-- 1. SDL and HMI are started +-- 2. App1 is registered +-- 3. PTU via mobile App1 was performed successfully +-- 4. App2 is registered +-- +-- Steps: +-- 1) The second PTU is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI, +-- b) create the PTS, +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATING) notification to the HMI +-- 3) HMI requests endpoints for service 7 sending GetPolicyConfigurationData rpc to the SDL +-- SDL does: +-- a) send GetPolicyConfigurationData response with endpoints for the requested service 7 +-- 4) HMI decodes the file received from the policy server successfully and +-- sends OnReceivedPolicyUpdate notification to the SDL +-- SDL does: +-- a) check that PTU is correct and send SDL.OnStatusUpdate(UP_TO_DATE) notification to the HMI +-- b) send OnPermissionsChange notification to the App1 and to the App2 +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local appSessionId1 = 1 +local appSessionId2 = 2 + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App1", common.registerApp, { appSessionId1 }) +runner.Step("PTU via mobile application", common.policyTableUpdate) +runner.Step("Register App2", common.registerApp, { appSessionId2 }) + +runner.Title("Test") +runner.Step("Second PTU via HMI", common.ptuViaHMI, { common.PTUfuncWithNewGroup }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/007_perform_second_PTU_via_mobile_for_App2_after_failed_PTU_via_HMI.lua b/test_scripts/Policies/HMI_PTU/007_perform_second_PTU_via_mobile_for_App2_after_failed_PTU_via_HMI.lua new file mode 100644 index 0000000000..e2e1bc3ae8 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/007_perform_second_PTU_via_mobile_for_App2_after_failed_PTU_via_HMI.lua @@ -0,0 +1,69 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Check that the second PTU via mobile app2 after the failed attempt via HMI for the App2 will be +-- performed successfully +-- +-- Preconditions: +-- 1. SDL and HMI are started +-- 2. App1 is registered +-- 3. PTU via mobile App1 was performed successfully +-- 4. App2 is registered +-- +-- Steps: +-- 1) PTU via HMI is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI +-- b) create the PTS +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATING) notification to the HMI +-- 3) HMI requests with endpoints for the service 7 by sending GetPolicyConfigurationData rpc to the SDL +-- SDL does: +-- a) send GetPolicyConfigurationData response with endpoints for the requested service 7 +-- 4) PTU is triggered via a mobile app in case of failed attempt via HMI +-- 5) HMI sends BC.OnSystemRequest notification without appId to the SDL +-- SDL does: +-- a) send OnSystemRequest notification to the App2 +-- 6) App2 gets PTU file and sends SystemRequest request with the file to the SDL +-- SDL does: +-- a) send BC.SystemRequest to the HMI +-- 7) HMI sends BC.SystemRequest response to the SDL +-- SDL does: +-- a) resend successful SystemRequest response to the App2 +-- 8) HMI decodes the file received from the policy server successfully +-- and sends OnReceivedPolicyUpdate notification to the SDL +-- SDL does: +-- a) check that PTU is correct and send SDL.OnStatusUpdate(UP_TO_DATE) notification to the HMI +-- b) send OnPermissionsChange notifications to the App1 and to the App2 +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local appSessionId1 = 1 +local appSessionId2 = 2 + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App1", common.registerApp, { appSessionId1 }) +runner.Step("Activate App1", common.activateApp, { appSessionId1 }) +runner.Step("PTU via HMI", common.ptuViaHMI) +runner.Step("Register App2", common.registerApp, { appSessionId2 }) +runner.Step("Activate App2", common.activateApp, { appSessionId2 }) + +runner.Title("Test") +runner.Step("Unsuccessful PTU via HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Successful PTU via mobile App2", common.policyTableUpdate) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua b/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua new file mode 100644 index 0000000000..be4484fcb9 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua @@ -0,0 +1,67 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md + +-- Description: Reseting of the SDL timeout after receiving onSystemRequest notification + +-- In case: +-- 1. timeout_after_x_seconds is set to 6 seconds in preloaded file +-- 2. Mobile app is registered and activated +-- 3. PTU via HMI is started +-- SDL does: +-- a. start timeout_after_x_seconds timeout +-- 4. In some time before timeout_after_x_seconds is finishes SDL receives onSystemRequest(PROPRIETARY) from HMI +-- SDL does: +-- a. renew PTU timeout to timeout_after_x_seconds after receiving notification +-- 5. timeout_after_x_seconds timeout is expired +-- 6. SDL sends SDL.OnStatusUpdate(UPDATE_NEEDED) to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local timeout_after_x_seconds = 6 -- in sec +local inaccuracy = 500 -- in msec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds +end + +local function resetTimeoutAfterOnSystemRequest() + local systemRequestTime = timestamp() + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) + :ValidIf(function() + local updateNeddedTime = timestamp() + local passedTime = updateNeddedTime - systemRequestTime -- in msec + -- timeout_after_x_seconds*1000 - convert timeout_after_x_seconds from sec to msec + if passedTime > timeout_after_x_seconds*1000 + inaccuracy or + passedTime < timeout_after_x_seconds*1000 - inaccuracy then + return false , "SDL timer was not updated. Expected time " .. timeout_after_x_seconds*1000 .. " ms. Actual time " + .. passedTime + end + return true + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) + +runner.Title("Test") +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Reseting timer after onSystemRequest", resetTimeoutAfterOnSystemRequest) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/009_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_ext.lua b/test_scripts/Policies/HMI_PTU/009_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_ext.lua new file mode 100644 index 0000000000..1f5478f9dd --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/009_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_ext.lua @@ -0,0 +1,192 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Retry strategy after failed HMI PTU on external_proprietary flow + +-- In case: +-- 1. timeout_after_x_seconds is set to 4 seconds in preloaded file +-- 2. secondsBetweenRetries is set to { 1, 2 } in preloaded file +-- 3. Mobile app is registered and activated +-- 4. PTU via HMI is started +-- SDL does: +-- a. start timeout_after_x_seconds timeout +-- 5. Timeout expired +-- SDL does: +-- a. send SDL.OnStatusUpdate(UPDATE_NEEDED) to HMI +-- 6. SDL receives OnSystemRequest(Proprietary) from HMI +-- SDL does: +-- a. send PTU status to updating +-- b. start timeout_after_x_seconds timeout +-- 7. All timeouts expired +-- SDL does: +-- a. send SDL.OnStatusUpdate(UPDATE_NEEDED) to HMI +-- 8. SDL receives OnSystemRequest(Proprietary) from HMI in timeout_after_x_seconds after the first notification +-- SDL does: +-- a. send PTU status to updating +-- b. start timeout_after_x_seconds timeout +-- 9. All timeouts expired +-- SDL does: +-- a. send SDL.OnStatusUpdate(UPDATE_NEEDED) to HMI +-- 10. SDL receives OnSystemRequest(Proprietary) from HMI in secondsBetweenRetries[1] after second notification +-- SDL does: +-- a. send PTU status to updating +-- b. start timeout_after_x_seconds timeout +-- 11. All timeouts expired +-- SDL does: +-- a. send SDL.OnStatusUpdate(UPDATE_NEEDED) to HMI +-- 12. SDL receives OnSystemRequest(Proprietary) from HMI in secondsBetweenRetries[2] after third notification +-- Retry strategy is finished, HMI does not sent OnSystemRequest notification any more till next ignition cycle +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') +local test = require('testbase') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } -- in sec +local timeout_after_x_seconds = 4 -- in sec +local timeToCheckOnSystemNot = {} +local retryNotificationTime = {} +local expectedTime = { -- in msec + timeout_after_x_seconds*1000, + (timeout_after_x_seconds + secondsBetweenRetries[1])*1000, + (timeout_after_x_seconds + secondsBetweenRetries[2])*1000 } +local expectedTimeRetry = { -- in msec + (timeout_after_x_seconds + secondsBetweenRetries[1])*1000, + (timeout_after_x_seconds + secondsBetweenRetries[2])*1000 +} +local inaccuracy = 500 -- in msec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function unsuccesfullMobileUpdate() + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }) + :DoOnce(function() + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + end) + :Times(2) + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function() + table.insert(timeToCheckOnSystemNot, timestamp()) + end) +end + +local function startRetrySequece() + local function sendOnSystemRequest() + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + common.log("HMI->SDL:", "BC.OnSystemRequest") + end + sendOnSystemRequest() + RUN_AFTER(sendOnSystemRequest, expectedTimeRetry[1]) + RUN_AFTER(sendOnSystemRequest, expectedTimeRetry[2] + expectedTimeRetry[1]) +end + +local function retrySequence() + local inaccuracyOneSec = 1000 + -- timeout_after_x_seconds*1000 - convert timeout_after_x_seconds from sec to msec + local reserveTime = timeout_after_x_seconds*1000 + inaccuracyOneSec + local timeout = expectedTime[1] + expectedTime[2] + expectedTime[3] + reserveTime + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Times(3) + :Timeout(timeout) + :Do(function() + table.insert(timeToCheckOnSystemNot, timestamp()) + end) + + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }) + :Times(7) + :Timeout(timeout) + :Do(function(exp, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if exp.occurences == 1 then + startRetrySequece() + elseif data.params.status == "UPDATING" then + table.insert(retryNotificationTime, timestamp()) + elseif data.params.status == "UPDATE_NEEDED" then + table.insert(retryNotificationTime, timestamp()) + end + end) +end + +local function checkOnStatusUpdateNotificationTimers() + local checkTimeIterations = { + firstIteration = { + retryNotificationTime[1], + retryNotificationTime[2] + }, + secondIteration = { + retryNotificationTime[3], + retryNotificationTime[4] + }, + thirdIteration = { + retryNotificationTime[5], + retryNotificationTime[6] + } + } + local actualCheckTime = {} + for _, value in pairs(checkTimeIterations) do + table.insert(actualCheckTime, value[2] - value[1]) + end + + for _, retryTime in pairs(actualCheckTime) do + -- timeout_after_x_seconds*1000 - convert timeout_after_x_seconds from sec to msec + if retryTime > timeout_after_x_seconds*1000 + inaccuracy or retryTime < timeout_after_x_seconds*1000 - inaccuracy + then + test:FailTestCase("Time between messages UPDATING and UPDATE_NEEDED is not equal to timeout_after_x_seconds.\n" + .. "Expected time is " .. timeout_after_x_seconds*1000 , ", actual time is " .. retryTime) + end + end +end + +local function checkOnSystemRequestTimers() + local actualTime = {} + local i = 1 + while i < #timeToCheckOnSystemNot do + table.insert(actualTime, timeToCheckOnSystemNot[i + 1] - timeToCheckOnSystemNot[i]) + i = i + 1 + end + + for key, _ in pairs(actualTime) do + if actualTime[key] > expectedTime[key] + inaccuracy or actualTime[key] < expectedTime[key] - inaccuracy then + test:FailTestCase("Time between messages is not equal to retry timeouts.\nExpected result: " .. expectedTime[key] + .. ". Actual Result: " .. actualTime[key]) + end + end +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.registerApp) +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccesfullMobileUpdate) +runner.Step("Retry sequence", retrySequence) +runner.Step("Check OnStatusUpdate Notification Timers", checkOnStatusUpdateNotificationTimers) +runner.Step("Check OnSystemRequest Timers", checkOnSystemRequestTimers) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/010_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_propr.lua b/test_scripts/Policies/HMI_PTU/010_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_propr.lua new file mode 100644 index 0000000000..f27f367f2f --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/010_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_propr.lua @@ -0,0 +1,133 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Retry strategy after failed HMI PTU on proprietary flow + +-- In case: +-- 1. timeout_after_x_seconds is set to 4 seconds in preloaded file +-- 2. secondsBetweenRetries is set to { 1, 2 } in preloaded file +-- 3. Mobile app is registered and activated +-- 4. PTU via HMI is started +-- SDL does: +-- a. start timeout_after_x_seconds timeout +-- 5. Timeout expired +-- SDL does: +-- a. start retry strategy +-- b. send SDL.OnStatusUpdate(UPDATE_NEDDED) to HMI +-- c. send OnSystemRequest(Proprietary) to mobile app +-- d. sends SDL.OnStatusUpdate(UPDATING) to HMI +-- i. start timeout_for_first_try = timeout_after_x_seconds + secondsBetweenRetries[1] +-- 6. Timeout expired +-- SDL does: +-- a. send SDL.OnStatusUpdate(UPDATE_NEDDED) to HMI +-- b. send OnSystemRequest(Proprietary) to mobile app +-- c. sends SDL.OnStatusUpdate(UPDATING) to HMI +-- d. start timeout_for_second_try = timeout_for_first_try + secondsBetweenRetries[2] +-- 7. Timeout expired +-- SDL does: +-- a. send SDL.OnStatusUpdate(UPDATE_NEDDED) to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') +local test = require('testbase') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } -- in sec +local timeout_after_x_seconds = 4 -- in sec +local retryNotificationTime = {} +local expectedTimeRetry = { -- in msec + timeout_after_x_seconds*1000, + (timeout_after_x_seconds + secondsBetweenRetries[1])*1000, + (timeout_after_x_seconds*#secondsBetweenRetries + secondsBetweenRetries[1] + secondsBetweenRetries[2])*1000 +} +local inaccuracy = 500 -- in msec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +function common.registerApp() + common.register() + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }) + :Times(2) + :Do(function(_, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if data.params.status == "UPDATING" then table.insert(retryNotificationTime, timestamp()) end + end) +end + +local function retrySequence() + local reserveTime = 2000 + local timeout = expectedTimeRetry[1] + expectedTimeRetry[2] + expectedTimeRetry[3] + reserveTime + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Times(2) + :Timeout(timeout) + + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }) + :Times(5) + :Timeout(timeout) + :Do(function(_, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + table.insert(retryNotificationTime, timestamp()) + end) +end + +local function checkOnStatusUpdateNotificationTimers() + local actualCheckTime = {} + + local checkTimeIterations = { + firstIteration = { + retryNotificationTime[1], + retryNotificationTime[2] + }, + secondIteration = { + retryNotificationTime[3], + retryNotificationTime[4] + }, + thirdIteration = { + retryNotificationTime[5], + retryNotificationTime[6] + } + } + for _, value in ipairs(checkTimeIterations) do + table.insert(actualCheckTime, value[2] - value[1]) + end + + for key, retryTime in pairs(actualCheckTime) do + if retryTime > expectedTimeRetry[key] + inaccuracy or retryTime < expectedTimeRetry[key] - inaccuracy + then + test:FailTestCase("Time between messages UPDATING and UPDATE_NEEDED is not equal to expected.\n" + .. "Expected time is " .. expectedTimeRetry[key] .. ", actual time is " .. retryTime) + end + end +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.registerApp) +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Retry sequence", retrySequence) +runner.Step("Check OnStatusUpdate Notification Timers", checkOnStatusUpdateNotificationTimers) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/011_UPDATING_status_after_PolicyUpdate_response.lua b/test_scripts/Policies/HMI_PTU/011_UPDATING_status_after_PolicyUpdate_response.lua new file mode 100644 index 0000000000..fb93598acb --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/011_UPDATING_status_after_PolicyUpdate_response.lua @@ -0,0 +1,72 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md + +-- Description: Check that SDL.OnStatusUpdate(UPDATING) is sent only after successful BC.PolicyUpdate response + +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered +-- Steps: +-- 1) PTU via HMI is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI +-- b) create the PTS +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI sends BC.PolicyUpdate response with resultCode "SUCCESS" to the SDL +--SDL does: +-- a) send SDL.OnStatusUpdate(UPDATING) notification to the HMI after receiving BC.PolicyUpdate response +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local actualResponseSendingTime +local responseTime = 3000 + +--[[ Local Functions ]] +local function registerApp() + common.registerNoPTU() + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }) + :ValidIf(function(_, data) + if data.params.status == "UPDATING" then + local updatingNotificationTime = timestamp() + local timeBetweenResNot = updatingNotificationTime - actualResponseSendingTime + + if timeBetweenResNot < 0 and timeBetweenResNot > 200 then + return false, "UPDATING notification is not received right after BC.PolicyUpdate response.\n" + .. "Actual time is " .. timeBetweenResNot + end + return true + end + return true + end) + :Times(2) + + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + actualResponseSendingTime = timestamp() + local function response() + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end + RUN_AFTER(response, responseTime) + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("RAI with BC.PolicyUpdate delayed response", registerApp) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/012_UPDATING_status_absence_after_erroneous_PolicyUpdate_response.lua b/test_scripts/Policies/HMI_PTU/012_UPDATING_status_absence_after_erroneous_PolicyUpdate_response.lua new file mode 100644 index 0000000000..377464d153 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/012_UPDATING_status_absence_after_erroneous_PolicyUpdate_response.lua @@ -0,0 +1,54 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md + +-- Description: Check that SDL does not send SDL.OnStatusUpdate(UPDATING) after unsuccessful BC.PolicyUpdate response + +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered +-- Steps: +-- 1) PTU via HMI is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI +-- b) create the PTS +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI sends BC.PolicyUpdate response with resultCode "GENERIC_ERROR" to the SDL +--SDL does: +-- a) not send SDL.OnStatusUpdate(UPDATING) notification to the HMI after receiving error BC.PolicyUpdate response +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Functions ]] +local function registerApp() + common.registerNoPTU() + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }) + + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + local function response() + common.hmi():SendError(data.id, data.method, "GENERIC_ERROR", "Error message") + end + RUN_AFTER(response, 1000) + end) + + common.wait(3000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("RAI with error BC.PolicyUpdate", registerApp) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/013_UPDATING_status_absence_after_timeout_expired_for_PolicyUpdate_response.lua b/test_scripts/Policies/HMI_PTU/013_UPDATING_status_absence_after_timeout_expired_for_PolicyUpdate_response.lua new file mode 100644 index 0000000000..505ce4a242 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/013_UPDATING_status_absence_after_timeout_expired_for_PolicyUpdate_response.lua @@ -0,0 +1,50 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md + +-- Description: Check that SDL does not send SDL.OnStatusUpdate(UPDATING) in case +-- HMI does not respond to BC.PolicyUpdate request + +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered +-- Steps: +-- 1) PTU via HMI is triggered +-- SDL does: +-- a) send SDL.OnStatusUpdate(UPDATE_NEEDED) notification to the HMI +-- b) create the PTS +-- c) send BC.PolicyUpdate request to the HMI +-- 2) HMI does not send BC.PolicyUpdate response to the SDL +--SDL does: +-- a) not send SDL.OnStatusUpdate(UPDATING) notification to the HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Functions ]] +local function registerApp() + common.registerNoPTU() + common.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }) + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function() + -- no response from HMI + end) + common.wait(11000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("RAI without BC.PolicyUpdate response", registerApp) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua b/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua new file mode 100644 index 0000000000..202e2adbc9 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua @@ -0,0 +1,104 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Successful 2nd HMI PTU if it's triggered after failed retry for the 1st PTU +-- Note: script is applicable for EXTERNAL_PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) HMI or App_1 don't provide PTU update +-- SDL does: +-- - finish PTU retry sequence with `UPDATE_NEEDED` status +-- 2) App_2 is registered +-- SDL does: +-- - start new PTU sequence +-- 3) HMI provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } -- in sec +local timeout_after_x_seconds = 4 -- in sec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +function common.registerApp(pAppId) + common.register(pAppId) + local exp = { { status = "UPDATE_NEEDED" }, { status = "UPDATING" } } + common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) + :Times(#exp) + :Do(function(_, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + end) +end + +local function sendOnSystemRequest() + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + common.log("HMI->SDL:", "BC.OnSystemRequest") +end + +local function unsuccessfulPTUviaMobile() + local timeout = 60000 + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function() + common.log("SDL->MOB:", "OnSystemRequest") + end) + :Times(3) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" } + } + common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if data.params.status == "UPDATE_NEEDED" and e.occurences < #exp then + common.runAfter(sendOnSystemRequest, 1000) + end + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App1", common.registerApp, { 1 }) +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) +runner.Step("Check PTU status UPDATE_NEEDED", common.checkPTUStatus, { "UPDATE_NEEDED" }) + +runner.Step("Register App2", common.registerApp, { 2 }) +runner.Step("Successful PTU via HMI", common.ptuViaHMI) +runner.Step("Check PTU status UP_TO_DATE", common.checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua b/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua new file mode 100644 index 0000000000..ff61a3d99d --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua @@ -0,0 +1,96 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Successful 2nd HMI PTU if it's triggered after failed retry for the 1st PTU +-- Note: script is applicable for PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) HMI or App_1 don't provide PTU update +-- SDL does: +-- - finish PTU retry sequence with `UPDATE_NEEDED` status +-- 2) App_2 is registered +-- SDL does: +-- - start new PTU sequence +-- 3) HMI provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } -- in sec +local timeout_after_x_seconds = 4 -- in sec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +function common.registerApp(pAppId) + common.register(pAppId) + local exp = { + [1] = { { status = "UPDATE_NEEDED" }, { status = "UPDATING" } }, + [2] = { { status = "UPDATE_NEEDED" }, { status = "UPDATING" } } + } + common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp[pAppId])) + :Times(#exp[pAppId]) + :Do(function(_, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + end) +end + +local function unsuccessfulPTUviaMobile() + local timeout = 60000 + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function() + common.log("SDL->MOB:", "OnSystemRequest") + end) + :Times(2) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" } + } + common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(_, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.registerApp, { 1 }) +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) +runner.Step("Check PTU status UPDATE_NEEDED", common.checkPTUStatus, { "UPDATE_NEEDED" }) + +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Successful PTU via HMI", common.ptuViaHMI) +runner.Step("Check PTU status UP_TO_DATE", common.checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua b/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua new file mode 100644 index 0000000000..31d728da95 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua @@ -0,0 +1,125 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Successful 2nd HMI PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for EXTERNAL_PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) HMI or App_1 don't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status and send `BC.PolicyUpdate` request to HMI +-- 4) HMI provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } -- in sec +local timeout_after_x_seconds = 4 -- in sec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function sendOnSystemRequest() + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + common.log("HMI->SDL:", "BC.OnSystemRequest") +end + +local function unsuccessfulPTUviaMobile() + local timeout = 60000 + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_, data) + common.log("SDL->MOB1:", "OnSystemRequest", data.payload.requestType) + end) + :Times(4) + :Timeout(timeout) + + local isBCPUReceived = false + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + isBCPUReceived = true + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if data.params.status == "UPDATE_NEEDED" and e.occurences < #exp - 2 then + common.runAfter(sendOnSystemRequest, 1000) + end + if e.occurences == 2 then + common.checkPTUStatus("UPDATING") + end + if e.occurences == 3 then + common.registerNoPTU(2) + common.log("SDL->MOB2:", "RAI2") + end + end) + :ValidIf(function(e) + if e.occurences == #exp - 1 and isBCPUReceived == true then + return false, "BC.PolicyUpdate is sent before new PTU sequence" + end + if e.occurences == #exp and isBCPUReceived == false then + return false, "BC.PolicyUpdate is not sent within new PTU sequence" + end + return true + end) +end + +local function ptuViaHMI() + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate"):Times(0) + common.ptuViaHMI() +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.register, { 1 }) +runner.Step("Activate App", common.activateApp, { 1 }) +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) + +runner.Step("Successful PTU via HMI", ptuViaHMI) +runner.Step("Check PTU status UP_TO_DATE", common.checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua b/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua new file mode 100644 index 0000000000..def472d8bc --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua @@ -0,0 +1,114 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- +-- Description: Successful 2nd HMI PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) HMI or App_1 don't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status and send `BC.PolicyUpdate` request to HMI +-- 4) HMI provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } -- in sec +local timeout_after_x_seconds = 4 -- in sec + +--[[ Local Functions ]] +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function unsuccessfulPTUviaMobile() + local timeout = 60000 + common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function() + common.log("SDL->MOB:", "OnSystemRequest") + end) + :Times(2) + :Timeout(timeout) + + local isBCPUReceived = false + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + isBCPUReceived = true + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if e.occurences == 2 then + common.checkPTUStatus("UPDATING") + end + if e.occurences == 3 then + common.registerNoPTU(2) + common.log("SDL->MOB2:", "RAI2") + end + end) + :ValidIf(function(e) + if e.occurences == #exp - 1 and isBCPUReceived == true then + return false, "BC.PolicyUpdate is sent before new PTU sequence" + end + if e.occurences == #exp and isBCPUReceived == false then + return false, "BC.PolicyUpdate is not sent within new PTU sequence" + end + return true + end) +end + +local function ptuViaHMI() + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate"):Times(0) + common.ptuViaHMI() +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.register, { 1 }) +runner.Step("Activate App", common.activateApp, { 1 }) +runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) + +runner.Step("Successful PTU via HMI", ptuViaHMI) +runner.Step("Check PTU status UP_TO_DATE", common.checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua b/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua new file mode 100644 index 0000000000..adefbb5162 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua @@ -0,0 +1,183 @@ +--------------------------------------------------------------------------------------------------- +-- HMI PTU common module +--------------------------------------------------------------------------------------------------- +--[[ General configuration parameters ]] +config.defaultProtocolVersion = 2 +config.checkAllValidations = true + +--[[ Required Shared libraries ]] +local utils = require('user_modules/utils') +local consts = require('user_modules/consts') +local actions = require("user_modules/sequences/actions") +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local atf_logger = require("atf_logger") + +--[[ Common Variables ]] +local m = {} +m.preconditions = actions.preconditions +m.start = actions.start +m.activateApp = actions.app.activate +m.postconditions = actions.postconditions +m.policyTableUpdate = actions.ptu.policyTableUpdate +m.wait = utils.wait +m.mobile = actions.mobile.getSession +m.hmi = actions.hmi.getConnection +m.getAppParams = actions.app.getParams +m.getPTS = actions.sdl.getPTS +m.getSDLIniParameter = actions.sdl.getSDLIniParameter +m.setPreloadedPT = actions.sdl.setPreloadedPT +m.getPreloadedPT = actions.sdl.getPreloadedPT +m.registerNoPTU = actions.app.registerNoPTU +m.register = actions.app.register +m.runAfter = actions.run.runAfter + +--[[ Common Functions ]] +--[[ @getPTUFromPTS: create policy table update table (PTU) using PTS +--! @parameters: none +--! @return: PTU table +--]] +local function getPTUFromPTS() + local pTbl = m.getPTS() + if pTbl == nil then + utils.cprint(consts.color.magenta, "PTS file was not found, PreloadedPT is used instead") + local appConfigFolder = m.getSDLIniParameter("AppConfigFolder") + if appConfigFolder == nil or appConfigFolder == "" then + appConfigFolder = commonPreconditions:GetPathToSDL() + end + local preloadedPT = m.getSDLIniParameter("PreloadedPT") + local ptsFile = appConfigFolder .. preloadedPT + if utils.isFileExist(ptsFile) then + pTbl = utils.jsonFileToTable(ptsFile) + else + utils.cprint(consts.color.magenta, "PreloadedPT was not found, PTS is not created") + end + end + if next(pTbl) ~= nil then + pTbl.policy_table.consumer_friendly_messages = nil + pTbl.policy_table.device_data = nil + pTbl.policy_table.module_meta = nil + pTbl.policy_table.usage_and_error_counts = nil + pTbl.policy_table.functional_groupings["DataConsent-2"].rpcs = utils.json.null + pTbl.policy_table.module_config.preloaded_pt = nil + pTbl.policy_table.module_config.preloaded_date = nil + pTbl.policy_table.vehicle_data = nil + end + return pTbl +end + +--[[ @ptuViaHMI: perform PTU via HMI +--! @parameters: +--! pPTUpdateFunc - function with additional updates (optional) +--! pExpNotificationFunc - function with specific expectations (optional) +--! @return: none +--]] +function m.ptuViaHMI(pPTUpdateFunc, pExpNotificationFunc) + if pExpNotificationFunc then + pExpNotificationFunc() + end + local ptuFileName = os.tmpname() + local requestId = m.hmi():SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + m.hmi():ExpectResponse(requestId) + :Do(function() + local ptuTable = getPTUFromPTS() + for i, _ in pairs(actions.mobile.getApps()) do + ptuTable.policy_table.app_policies[actions.app.getParams(i).fullAppID] = actions.ptu.getAppData(i) + end + if pPTUpdateFunc then + pPTUpdateFunc(ptuTable) + end + utils.tableToJsonFile(ptuTable, ptuFileName) + if not pExpNotificationFunc then + m.hmi():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + m.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) + :Do(function() os.remove(ptuFileName) end) + end + m.hmi():SendNotification("SDL.OnReceivedPolicyUpdate", + { policyfile = ptuFileName }) + for id, _ in pairs(actions.mobile.getApps()) do + m.mobile(id):ExpectNotification("OnPermissionsChange") + end + end) +end + +--[[ @unsuccessfulPTUviaHMI: failed PTU via HMI +--! @parameters: none +--! @return: none +--]] +function m.unsuccessfulPTUviaHMI() + local requestId = m.hmi():SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + m.hmi():ExpectResponse(requestId) + :Do(function() + m.hmi():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) + for id, _ in pairs(actions.mobile.getApps()) do + m.mobile(id):ExpectNotification("OnPermissionsChange") + :Times(0) + end + end) + m.wait(500) +end + +--[[ @registerApp: register mobile application +--! @parameters: +--! pAppId - application number (1, 2, etc.) +--! pMobConnId - mobile connection number(1, 2, etc.) +--! @return: none +--]] +function m.registerApp(pAppId, pMobConnId) + m.register(pAppId, pMobConnId) + m.hmi():ExpectNotification("SDL.OnStatusUpdate", + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }) + :Times(2) +end + +--[[ @PTUfuncWithNewGroup: function for the update of PTU table with new group "VehicleInfo-3" +--! @parameters: +--! pTbl - policy table +--! @return: none +--]] +function m.PTUfuncWithNewGroup(pTbl) + pTbl.policy_table.functional_groupings["VehicleInfo-3"].user_consent_prompt = nil + table.insert(pTbl.policy_table.app_policies[m.getAppParams(1).fullAppID].groups, "VehicleInfo-3") +end + +--[[ @updatePreloaded: function for the updating of the preloaded file +--! @parameters: +--! pUpdFunc - function with update +--! @return: none +--]] +function m.updatePreloaded(pUpdFunc) + local preloadedTable = m.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = utils.json.null + pUpdFunc(preloadedTable) + m.setPreloadedPT(preloadedTable) +end + +--[[ @log: function for loging messages +--! @parameters: +--! @return: none +--]] +function m.log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(consts.color.magenta, str) +end + +--[[ @checkPTUStatus: verify status of PTU +--! @parameters: +--! pExpStatus - expected status, e.g. "UPDATE_NEEDED", "UPDATING" or "UP_TO_DATE" +--! @return: none +--]] +function m.checkPTUStatus(pExpStatus) + local cid = m.hmi():SendRequest("SDL.GetStatusUpdate") + m.hmi():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +return m diff --git a/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua b/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua index 29edaed4f5..86c0bcbd2b 100644 --- a/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua +++ b/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua @@ -15,8 +15,10 @@ -- -- Expected result: -- PTU is requested. PTS is created. --- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) +-- HMI->SDL: SDL.UpdateSDL +-- SDL->HMI: SDL.UpdateSDL(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate +-- SDL->HMI: SDL.OnStatusUpdate(UPDATING) --------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') @@ -63,7 +65,7 @@ function Test:TestStep_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request() EXPECT_HMICALL("BasicCommunication.PolicyUpdate", {file = "/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json"}) :Do(function(_,data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}):Times(0) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) commonTestCases:DelayedExp(10000) end diff --git a/test_scripts/Policies/Policy_Table_Update/139_ATF_PoliciesManager_changes_status_UPDATING.lua b/test_scripts/Policies/Policy_Table_Update/139_ATF_PoliciesManager_changes_status_UPDATING.lua deleted file mode 100644 index 2c8f7f7f69..0000000000 --- a/test_scripts/Policies/Policy_Table_Update/139_ATF_PoliciesManager_changes_status_UPDATING.lua +++ /dev/null @@ -1,78 +0,0 @@ ---------------------------------------------------------------------------------------------- --- Requirements summary: --- [PolicyTableUpdate] PoliciesManager changes status to “UPDATING” --- [HMI API] OnStatusUpdate --- --- Description: --- PoliciesManager must change the status to “UPDATING” and notify HMI with --- OnStatusUpdate("UPDATING") right after SnapshotPT is sent out to to mobile --- app via OnSystemRequest() RPC. --- 1. Used preconditions --- SDL is built with "-DEXTENDED_POLICY: EXTERNAL_PROPRIETARY" flag --- Application is registered. Device is not consented --- PTU is requested. --- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --- SDL->HMI:SDL.PolicyUpdate(file, timeout, retry[]) --- HMI -> SDL: SDL.GetURLs () --- HMI->SDL: BasicCommunication.OnSystemRequest ('url', requestType:PROPRIETARY, appID="default") --- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON", appID) --- 2. Performed steps --- --- Expected result: --- SDL->HMI: SDL.OnStatusUpdate(UPDATING) right after SDL->app: OnSystemRequest ---------------------------------------------------------------------------------------------- ---[[ Required Shared libraries ]] -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') -local utils = require ('user_modules/utils') - ---[[ General Precondition before ATF start ]] -commonSteps:DeleteLogsFileAndPolicyTable() -testCasesForPolicyTable.Delete_Policy_table_snapshot() - ---ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed -config.defaultProtocolVersion = 2 - ---[[ General Settings for configuration ]] -Test = require('connecttest') -require('cardinalities') -require('user_modules/AppTypes') - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -function Test:Precondition_trigger_getting_device_consent() - testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") -function Test:TestStep_PoliciesManager_changes_status_UPDATING() - local SystemFilesPath = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") - - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", - { policyType = "module_config", property = "endpoints" }) - EXPECT_HMIRESPONSE(requestId,{result = {code = 0, method = "SDL.GetPolicyConfigurationData" } } ) - :Do(function() - self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest",{ requestType = "PROPRIETARY", fileName = "PolicyTableUpdate"}) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) - EXPECT_NOTIFICATION("OnSystemRequest", {requestType = "PROPRIETARY"}) - :Do(function() - local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", - {requestType = "PROPRIETARY", fileName = "PolicyTableUpdate", appID = config.application1.registerAppInterfaceParams.fullAppID}, "files/ptu.json") - EXPECT_HMICALL("BasicCommunication.SystemRequest",{ requestType = "PROPRIETARY", fileName = SystemFilesPath.."/PolicyTableUpdate" }) - :Do(function(_,_data1) - self.hmiConnection:SendResponse(_data1.id,"BasicCommunication.SystemRequest", "SUCCESS", {}) - end) - EXPECT_RESPONSE(CorIdSystemRequest, { success = true, resultCode = "SUCCESS"}) - end) - end) -end - ---[[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postconditions") -function Test.Postcondition_Stop() - StopSDL() -end - -return Test diff --git a/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua b/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua index d55bfb7d37..308d86456b 100644 --- a/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua +++ b/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua @@ -95,7 +95,7 @@ function Test:TestStep_Sending_PTS_to_mobile_application() EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY", fileType = "JSON"}) :Do(function(_,_) time_system_request[#time_system_request + 1] = timestamp() end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}, {status = "UPDATE_NEEDED"}):Times(2):Timeout(64000) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}):Times(1):Timeout(64000) :Do(function(exp_pu, data) print(exp_pu.occurences..":"..data.params.status) if(data.params.status == "UPDATE_NEEDED") then diff --git a/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua b/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua index 91065bee17..7c726b9660 100644 --- a/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua +++ b/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua @@ -127,8 +127,7 @@ function Test:TestStep_PTU() end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end function Test:TestStep_StartNewMobileSession() diff --git a/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua b/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua index cda537339e..bd4e837fae 100644 --- a/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua +++ b/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua @@ -85,6 +85,10 @@ function Test:Precondition_Activate_App_Consent_Device() end) end) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data2) + self.hmiConnection:SendResponse(data2.id, data2.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end function Test:Precondition_Update_Policy_With_Exchange_After_X_Days_Value() @@ -107,8 +111,7 @@ function Test:Precondition_Update_Policy_With_Exchange_After_X_Days_Value() end) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end function Test:Precondition_ExitApplication() diff --git a/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua b/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua index aae7ef9045..66f830e280 100644 --- a/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua +++ b/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua @@ -68,6 +68,10 @@ function Test:Precondition_ActivateApp() :Do(function(_, _) self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", { allowed = true, source = "GUI", device = { id = utils.getDeviceMAC(), name = utils.getDeviceName() } }) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_, data2) self.hmiConnection:SendResponse(data2.id,"BasicCommunication.ActivateApp", "SUCCESS", { }) @@ -76,6 +80,7 @@ function Test:Precondition_ActivateApp() end) end end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] @@ -103,8 +108,7 @@ function Test:TestStep_PTU_Up_To_Date() end) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end function Test:StartNewMobileSession() diff --git a/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua b/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua index 4878d0e8fd..6d1d4bcf6d 100644 --- a/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua +++ b/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua @@ -64,6 +64,10 @@ function Test:Precondition_ActivateApp() :Do(function(_, _) self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", { allowed = true, source = "GUI", device = { id = utils.getDeviceMAC(), name = utils.getDeviceName() } }) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_, data2) self.hmiConnection:SendResponse(data2.id,"BasicCommunication.ActivateApp", "SUCCESS", { }) @@ -94,7 +98,7 @@ function Test:TestStep_PTU_Success_PTUfile_removed() EXPECT_RESPONSE(corIdSystemRequest, { success = true, resultCode = "SUCCESS" }) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) :Do(function(_,data) if(data.params.status == "UP_TO_DATE") then local result = check_file_exists(policy_file_path .. "/" .. policy_file_name) diff --git a/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua b/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua index e1ebc3d8ac..1b1777eb00 100644 --- a/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua +++ b/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua @@ -86,7 +86,7 @@ function Test:TestStep_ChangeStatus_Update_Needed() EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY", fileType = "JSON"}):Timeout(12000) :Do(function(_,_) time_system_request[#time_system_request + 1] = timestamp() end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}, {status = "UPDATE_NEEDED"}):Times(2):Timeout(time_wait+2000) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}):Timeout(time_wait+2000) :Do(function(_,data) if(data.params.status == "UPDATE_NEEDED" ) then --first retry sequence diff --git a/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua b/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua index 3a97eb242c..33d1081b34 100644 --- a/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua +++ b/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua @@ -81,8 +81,7 @@ function Test:TestStep_PTU_Success() { policyType = "module_config", property = "endpoints" }) EXPECT_HMIRESPONSE(requestId) :Do(function(_,_) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = policy_file_name}) diff --git a/test_scripts/Policies/Policy_Table_Update/157_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATING.lua b/test_scripts/Policies/Policy_Table_Update/157_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATING.lua deleted file mode 100644 index a9d29a69d7..0000000000 --- a/test_scripts/Policies/Policy_Table_Update/157_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATING.lua +++ /dev/null @@ -1,93 +0,0 @@ ---------------------------------------------------------------------------------------------- --- Requirement summary: --- [PolicyTableUpdate] PoliciesManager changes status to "UPDATING" --- [HMI API] OnStatusUpdate --- --- Description: --- PoliciesManager must change the status to "UPDATING" and notify HMI with OnStatusUpdate("UPDATING") --- right after SnapshotPT is sent out to to mobile app via OnSystemRequest() RPC. --- --- Steps: --- 1. Register new app --- 2. Trigger PTU --- 3. SDL->HMI: Verify step of SDL.OnStatusUpdate(UPDATING) notification in PTU sequence --- --- Expected result: --- SDL.OnStatusUpdate(UPDATING) notification is send right after SDL->MOB: OnSystemRequest ---------------------------------------------------------------------------------------------- ---[[ Required Shared libraries ]] -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonSteps = require("user_modules/shared_testcases/commonSteps") -local testCasesForPolicyTable = require("user_modules/shared_testcases/testCasesForPolicyTable") -local utils = require ('user_modules/utils') - ---[[ General Precondition before ATF start ]] -commonSteps:DeleteLogsFileAndPolicyTable() -testCasesForPolicyTable.Delete_Policy_table_snapshot() - ---[[ General Settings for configuration ]] -Test = require("connecttest") -require("user_modules/AppTypes") - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Precondition") - -function Test:Precondition_trigger_getting_device_consent() - testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") - -function Test:TestStep_CheckMessagesSequence() - local is_test_fail = false - local message_number = 1 - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", - { policyType = "module_config", property = "endpoints" }) - EXPECT_HMIRESPONSE(requestId) - :Do(function(_,_) - self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = "PolicyTableUpdate"}) - - if(message_number ~= 1) then - commonFunctions:printError("Error: SDL.GetPolicyConfigurationData reponse is not received as message 1 after SDL.GetPolicyConfigurationData request. Real: "..message_number) - is_test_fail = true - else - print("SDL.GetPolicyConfigurationData is received as message "..message_number.." after SDL.GetPolicyConfigurationData request") - end - message_number = message_number + 1 - end) - - EXPECT_NOTIFICATION("OnSystemRequest", {requestType = "PROPRIETARY"}) - :Do(function(_,_) - if( (message_number ~= 2) and (message_number ~= 3)) then - commonFunctions:printError("Error: SDL.OnStatusUpdate reponse is not received as message 2/3 after SDL.GetPolicyConfigurationData request. Real: "..message_number) - is_test_fail = true - else - print("OnSystemRequest is received as message "..message_number.." after SDL.GetPolicyConfigurationData request") - end - message_number = message_number + 1 - end) - - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate",{status = "UPDATING"}) - :Do(function(_,data) - if( (message_number ~= 2) and (message_number ~= 3)) then - commonFunctions:printError("Error: SDL.OnStatusUpdate reponse is not received as message 2/3 after SDL.GetPolicyConfigurationData request. Real: "..message_number) - is_test_fail = true - else - print("SDL.OnStatusUpdate("..data.params.status..") is received as message "..message_number.." after SDL.GetPolicyConfigurationData request") - end - message_number = message_number + 1 - end) - - if(is_test_fail == true) then - self:FailTestCase("Test is FAILED. See prints.") - end -end - ---[[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postconditions") -function Test.Postcondition_StopSDL() - StopSDL() -end - -return Test diff --git a/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua b/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua index 69d11c8556..7df59752ea 100644 --- a/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua +++ b/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua @@ -72,18 +72,11 @@ function Test:TestStep_CheckMessagesSequence_UpToDate() EXPECT_RESPONSE(corIdSystemRequest, { success = true, resultCode = "SUCCESS"}) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :Do(function(exp,data) if(exp.occurences == 1) then - if( (message_number ~= 2) and (message_number ~= 3)) then - commonFunctions:printError("Error: SDL.OnStatusUpdate("..data.params.status..") response is not received as message 2/3 after SDL.GetPolicyConfigurationData request. Real: "..message_number) - is_test_fail = true - else - print("SDL.OnStatusUpdate("..data.params.status..") is received as message "..message_number.." after SDL.GetPolicyConfigurationData request") - end - elseif(exp.occurences == 2) then - if(message_number ~= 5) then - commonFunctions:printError("Error: SDL.OnStatusUpdate("..data.params.status..") response is not received as message 5 after SDL.GetPolicyConfigurationData request. Real: "..message_number) + if (message_number ~= 4) then + commonFunctions:printError("Error: SDL.OnStatusUpdate("..data.params.status..") response is not received as message 4 after SDL.GetPolicyConfigurationData request. Real: "..message_number) is_test_fail = true else print("SDL.OnStatusUpdate("..data.params.status..") is received as message "..message_number.." after SDL.GetPolicyConfigurationData request") @@ -96,8 +89,8 @@ function Test:TestStep_CheckMessagesSequence_UpToDate() EXPECT_HMICALL("BasicCommunication.SystemRequest") :Do(function(_, data) - if( (message_number ~= 4)) then - commonFunctions:printError("Error: BasicCommunication.SystemRequest reponse is not received as message 4 after SDL.GetPolicyConfigurationData request. Real: "..message_number) + if( (message_number ~= 3)) then + commonFunctions:printError("Error: BasicCommunication.SystemRequest response is not received as message 3 after SDL.GetPolicyConfigurationData request. Real: "..message_number) is_test_fail = true else print("BasicCommunication.SystemRequest is received as message "..message_number.." after SDL.GetPolicyConfigurationData request") diff --git a/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua b/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua index 083a172a3a..cbc5c7c017 100644 --- a/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua @@ -86,6 +86,14 @@ function Test:Precondition_Register_Activate_App_And_Consent_Device() EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) :Do(function(_,_) self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", + {status = "UPDATE_NEEDED"}, + {status = "UPDATING"}) + :Times(2) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data) self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -135,8 +143,7 @@ function Test:TestStep_Update_Policy_With_New_Permission_In_Default_Section() end) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end function Test:TestStep_Check_Allowed_RPC() diff --git a/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua b/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua index e6c8c05793..845f364e26 100644 --- a/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua @@ -81,7 +81,6 @@ function Test:Precondition_PolicyUpdateStarted() }) end) EXPECT_NOTIFICATION("OnSystemRequest", {requestType = "PROPRIETARY" }) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) end function Test:Precondition_OpenNewSession() diff --git a/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua b/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua index ef9488ba33..d5af91eac8 100644 --- a/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua +++ b/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua @@ -83,7 +83,6 @@ function Test:Precondition_PolicyUpdateStarted() }) end) EXPECT_NOTIFICATION("OnSystemRequest", {requestType = "PROPRIETARY" }) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) end function Test:Precondition_OpenNewSession() @@ -162,12 +161,17 @@ function Test:TestStep_CheckThatAppID_BothApps_Present_In_DataBase() if(is_test_fail == true) then self:FailTestCase("Test is FAILED. See prints.") end + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) end function Test:TestStep_Start_New_PolicyUpdate_For_SecondApplication() local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) EXPECT_HMIRESPONSE(requestId) :Do(function() self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", diff --git a/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua b/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua index 85c76cd974..e70846cd50 100644 --- a/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua @@ -41,6 +41,7 @@ require('user_modules/AppTypes') --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") + function Test:Precondition_trigger_getting_device_consent() testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) end @@ -95,6 +96,7 @@ function Test:TestStep_User_consent_on_activate_app() EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) end + function Test:TestStep_check_LocalPT_for_updates() local RequestId = self.hmiConnection:SendRequest("SDL.UpdateSDL", {} ) EXPECT_HMIRESPONSE(RequestId, { result = { result = "UPDATE_NEEDED" }}) @@ -122,6 +124,7 @@ function Test:TestStep_check_LocalPT_for_updates() end) end + --[[ Postconditions ]] commonFunctions:newTestCasesGroup("Postconditions") function Test.Postcondition_Stop() diff --git a/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua b/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua index 931a4fb46a..decd638fc0 100644 --- a/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua @@ -95,6 +95,8 @@ function Test:TestStep_check_LocalPT_for_updates() local is_test_fail = false self.hmiConnection:SendNotification("SDL.OnPolicyUpdate", {} ) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate",{}) :Do(function(_,data) testCasesForPolicyTableSnapshot:extract_pts({self.applications[config.application1.registerAppInterfaceParams.appName]}) @@ -122,7 +124,6 @@ end --[[ Postconditions ]] commonFunctions:newTestCasesGroup("Postconditions") - function Test.Postcondition_Stop() StopSDL() end diff --git a/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua b/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua index cf4da188eb..bed17852ac 100644 --- a/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua +++ b/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua @@ -79,7 +79,7 @@ end function Test:TestStep_PTU_SUCCESS_StatusPending_StatusUpToDate() local SystemFilesPath = "/tmp/fs/mp/images/ivsu_cache/" - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATING" }, { status = "UP_TO_DATE" }):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) :Do(function(exp,_) if(exp.occurences == 1) then local language_status_pending = testCasesForPolicyTableSnapshot:get_data_from_Preloaded_PT("consumer_friendly_messages.messages.StatusPending.languages.en-us.line1") diff --git a/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua b/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua index 5169b5fea9..0653706df2 100644 --- a/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua +++ b/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua @@ -92,7 +92,8 @@ function Test:Precondtion_Activate_App_Consent_Update() end) EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") - :Do(function(_,_) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) EXPECT_HMIRESPONSE(requestId) diff --git a/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua b/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua index 67fe933563..9727fcfcbf 100644 --- a/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua +++ b/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua @@ -52,7 +52,10 @@ function Test:Test_1_UPDATE_NEEDED() local reqId = self.hmiConnection:SendRequest("SDL.GetStatusUpdate") EXPECT_HMIRESPONSE(reqId, { status = "UPDATE_NEEDED" }) - + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_, data2) self.hmiConnection:SendResponse(data2.id,"BasicCommunication.ActivateApp", "SUCCESS", { }) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua b/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua index 9f9e332ab6..ad215adf34 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua @@ -98,8 +98,7 @@ function Test:updatePolicyInDifferentSessions(_, appName, mobileSession) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UPDATE_NEEDED"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) end --[[ Test ]] @@ -108,6 +107,10 @@ commonFunctions:newTestCasesGroup("Test") function Test:TestStep_ActivateAppInFULL() activateAppInSpecificLevel(self) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end function Test:TestStep_UpdatePolicy_ExpectOnAppPermissionChangedWithAppID() diff --git a/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua b/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua index 5d34eb0999..fb1861c4e9 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua @@ -185,8 +185,7 @@ function Test:updatePolicyInDifferentSessions(_, appName, mobileSession) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UPDATE_NEEDED"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) end local function constructPathToDatabase() @@ -366,6 +365,10 @@ function Test:Precondition_ActivateAppInFULL() activateAppInSpecificLevel(self,HMIAppId,"FULL") TestData:store("Store LocalPT before PTU", constructPathToDatabase(), "beforePTU_policy.sqlite" ) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua b/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua index d6b952c123..8043de9985 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua @@ -73,8 +73,7 @@ function Test:updatePolicyInDifferentSessions(_, appName, mobileSession) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UPDATE_NEEDED"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) end --[[ Preconditions ]] @@ -85,6 +84,10 @@ function Test:ActivateApp() commonSteps:ActivateAppInSpecificLevel(Test, HMIAppId) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua b/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua index e4bebef8e6..60f37df602 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua @@ -202,8 +202,7 @@ function Test:updatePolicyInDifferentSessions(PTName, appName, mobileSession) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UPDATE_NEEDED"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) end local function constructPathToDatabase() @@ -390,6 +389,10 @@ function Test:ActivateAppInFULL() HMIAppId = self.applications[config.application1.registerAppInterfaceParams.appName] activateAppInSpecificLevel(self,HMIAppId,"FULL") EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end function Test:UpdatePolicy_ExpectOnAppPermissionChangedWithAppID() diff --git a/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua index 08f8389405..a520652ca6 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua @@ -43,6 +43,10 @@ function Test:Precondition_Activate_app() :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,_data1) self.hmiConnection:SendResponse(_data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -51,6 +55,7 @@ function Test:Precondition_Activate_app() end end) EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] @@ -82,8 +87,7 @@ function Test:TestStep_Validate_default_hmi_in_default_upon_PTU() self.mobileSession:ExpectResponse(CorIdSystemRequest, {}) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua index bc2f838410..def747c286 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua @@ -42,6 +42,10 @@ function Test:Precondition_Activate_app() :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -50,6 +54,7 @@ function Test:Precondition_Activate_app() end end) EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] @@ -90,8 +95,7 @@ function Test:TestStep_Validate_preconsented_groups_in_default_upon_PTU() end) end) --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua index 6b37da35e9..f16cd28ef3 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua @@ -41,6 +41,10 @@ function Test:Precondition_Activate_app() EXPECT_HMIRESPONSE(RequestIdGetMes) :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -49,6 +53,7 @@ function Test:Precondition_Activate_app() end end) EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] @@ -89,8 +94,7 @@ function Test:TestStep_Validate_groups_in_default_upon_PTU() end) end) --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua index 142aa80dc5..fdd5fef7fd 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua @@ -63,6 +63,10 @@ function Test:Precondition_Activate_app() :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -72,6 +76,7 @@ function Test:Precondition_Activate_app() end) self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) EXPECT_NOTIFICATION("OnHMIStatus"):Times(0) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Test ]] @@ -110,8 +115,7 @@ function Test:TestStep_Validate_default_hmi_upon_PTU() end) end) --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua index 398aa58e11..ec045c0076 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua @@ -48,6 +48,10 @@ function Test:Precondition_Activate_app() :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -56,6 +60,7 @@ function Test:Precondition_Activate_app() end end) EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end function Test:Precondition_PolicyUpdateRAI() @@ -86,8 +91,7 @@ function Test:Precondition_PolicyUpdateRAI() end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end --[[ Test ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua index fef20bab25..797ab6268b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua @@ -62,6 +62,10 @@ function Test:Precondition_Activate_app() :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -109,8 +113,7 @@ function Test:TestStep_Validate_appHMIType_from_appId_upon_PTU() end) end) --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua b/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua index cdcd98dd9d..9ead07f99a 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua @@ -99,8 +99,7 @@ function Test:Precondition_Update_Policy_With_memory_kb_Param() end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end function Test:TestStep_PredataConsent_Send_PutFile_Bigger_Than_AppDirectoryQuota_OUT_OF_MEMORY() diff --git a/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua b/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua index aa7c03edc8..d3cb0e0c84 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua @@ -310,8 +310,7 @@ function Test:updatePolicyInDifferentSessions(PTName, appName, mobileSession) end) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) end @@ -396,6 +395,11 @@ end function Test:ActivateApp() HMIAppId = self.applications[config.application1.registerAppInterfaceParams.appName] activateAppInSpecificLevel(self,HMIAppId,"FULL") + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end function Test:TestStep_Check_app_registration_language_vui_PTS() diff --git a/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua index 6b88fd2c0c..554a74dbac 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua @@ -52,7 +52,7 @@ function Test:Precondition_trigger_getting_device_consent() end function Test:TestStep_PTU_appPermissionsConsentNeeded_true() - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) :Do(function(_,data) if(data.params.status == "UP_TO_DATE") then @@ -111,7 +111,7 @@ function Test:Precondition_trigger_user_request_update_from_HMI() end function Test:Precondition_PTU_revoke_app() - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(Between(2,3)) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :Do(function(_,data) if(data.params.status == "UP_TO_DATE") then EXPECT_HMINOTIFICATION("SDL.OnAppPermissionChanged") diff --git a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua index 9659f800be..4997862742 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua @@ -159,6 +159,12 @@ commonFunctions:newTestCasesGroup("Test") function Test:ActivateAppInFULLLevel() commonSteps:ActivateAppInSpecificLevel(self,HMIAppID,"FULL") + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(AtLeast(1)) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end function Test:InitiatePTUForGetSnapshot() @@ -169,8 +175,7 @@ function Test:InitiatePTUForGetSnapshot() :Do(function(_,_) self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = "PolicyTableUpdate"}) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) EXPECT_NOTIFICATION("OnSystemRequest", {requestType = "PROPRIETARY"}) :Do(function(_,_) local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", {requestType = "PROPRIETARY", fileName = "PolicyTableUpdate", appID = self.applications[application1.registerAppInterfaceParams.appName]}, diff --git a/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua b/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua index 17629daa8d..251d13dc88 100644 --- a/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua +++ b/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua @@ -64,6 +64,9 @@ function Test:RegisterNewApp() self.mobileSession2:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) self.mobileSession2:ExpectNotification("OnHMIStatus", { hmiLevel = "NONE" }) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) end function Test:CheckPermissions() diff --git a/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua b/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua index 54f188a25e..01835955e4 100644 --- a/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua @@ -15,7 +15,7 @@ -- 4. Register new app2 -- -- Expected result: --- Status changes in a wollowing way: +-- Status changes in a following way: -- "UPDATE_NEEDED" -> "UPDATING" -> "UP_TO_DATE" -> "UPDATE_NEEDED" -> "UPDATING" --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] @@ -122,7 +122,7 @@ commonFunctions:SDLForceStop() commonSteps:DeleteLogsFileAndPolicyTable() --[[ General Settings for configuration ]] -Test = require("connecttest") +Test = require("user_modules/connecttest_resumption") require("user_modules/AppTypes") --[[ Specific Notifications ]] @@ -134,15 +134,6 @@ EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :Times(AnyNumber()) :Pin() -EXPECT_HMICALL("BasicCommunication.PolicyUpdate") -:Do(function(_, d) - if not ptu_table then - ptu_table = ptsToTable(d.params.file) - end - end) -:Times(AnyNumber()) -:Pin() - --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") @@ -157,6 +148,31 @@ function Test.DeleteFiles() end end +function Test:Precondition_connectMobile() + self:connectMobile() +end + +function Test:StartNewSession() + self.mobileSession = mobileSession.MobileSession(self, self.mobileConnection) + self.mobileSession:StartService(7) +end + +function Test:RegisterNewApp() + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + self.mobileSession:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_, d) + log("SDL->HMI: RQ: BC.PolicyUpdate") + Test.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) + log("HMI->SDL: RS: BC.PolicyUpdate") + if not ptu_table then + ptu_table = ptsToTable(d.params.file) + end + end) +end + --[[ Test ]] commonFunctions:newTestCasesGroup("Test") @@ -201,16 +217,22 @@ function Test:CheckStatus() log("HMI->SDL: RS: UP_TO_DATE: SDL.GetStatusUpdate") end -function Test:StartNewSession() +function Test:StartNewSession2() self.mobileSession2 = mobileSession.MobileSession(self, self.mobileConnection) self.mobileSession2:StartService(7) end -function Test:RegisterNewApp() +function Test:RegisterNewApp2() local correlationId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") self.mobileSession2:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_, d) + log("SDL->HMI: RQ: BC.PolicyUpdate") + Test.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) + log("HMI->SDL: RS: BC.PolicyUpdate") + end) end for i = 1, 3 do diff --git a/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua b/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua index 3963af9413..2d98c504a7 100644 --- a/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua @@ -117,6 +117,11 @@ function Test:TestStep_PolicyUpdateFinished_ForDefaultApplication() EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}, {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(3) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) + local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) diff --git a/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua b/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua index 2a449a5b4f..7bbcd05bc4 100644 --- a/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua @@ -81,9 +81,10 @@ EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :Pin() EXPECT_HMICALL("BasicCommunication.PolicyUpdate") -:Do(function(_, d) - r_actual_1 = d.params - log("SDL->HMI: BC.PolicyUpdate()") +:Do(function(_,data) + r_actual_1 = data.params + log("SDL->HMI: BC.PolicyUpdate()") + Test.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) :Times(AnyNumber()) :Pin() diff --git a/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua b/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua index 15f43a8064..55d3909012 100644 --- a/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua @@ -82,7 +82,8 @@ function Test:RAI() :Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") :Do( - function() + function(_, d3) + self.hmiConnection:SendResponse(d3.id, d3.method, "SUCCESS", {}) table.insert(r_actual, "BC.PolicyUpdate") end) end) diff --git a/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua b/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua index 4c380166d7..6fc24d93f4 100644 --- a/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua @@ -72,6 +72,10 @@ end function Test:RegisterApp() self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) end --[[ Test ]] diff --git a/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua b/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua index 7fc458346d..0c975640b7 100644 --- a/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua @@ -124,6 +124,9 @@ function Test:TestStep_Register_App_And_Check_That_PTU_Triggered() EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate",{status = "UPDATE_NEEDED"},{status = "UPDATING"}):Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) end --[[ Postcondition ]] diff --git a/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua b/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua index 086d46fad5..46a0838f62 100644 --- a/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua @@ -65,12 +65,33 @@ for _, v in pairs({config.pathToSDL .. sdl_preloaded_pt, ptu_file}) do end --[[ General Settings for configuration ]] -Test = require('connecttest') +Test = require("user_modules/connecttest_resumption") require('user_modules/AppTypes') --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") +function Test:Precondition_connectMobile() + self:connectMobile() +end + +function Test:StartNewSession() + self.mobileSession = mobileSession.MobileSession(self, self.mobileConnection) + self.mobileSession:StartService(7) +end + +function Test:RegisterNewApp() + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") + self.mobileSession:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_, d) + self.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) +end + function Test:Precondition_SUCCEESS_Flow_PROPRIETARY() local policy_file_name = "PolicyTableUpdate" local policy_file_path = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") @@ -134,6 +155,9 @@ for i = 1, exchange_after do if i == exchange_after then EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }):Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data3) + self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) + end) else EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(0) end diff --git a/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua b/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua index 42e7a07b83..06a90005fe 100644 --- a/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua @@ -58,7 +58,7 @@ function Test:TestStep_PTU_appPermissionsConsentNeeded_true() { policyType = "module_config", property = "endpoints" }) EXPECT_HMIRESPONSE(requestId) :Do(function(_,_) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :Do(function(_,data) if(data.params.status == "UP_TO_DATE") then diff --git a/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua b/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua index 3c3c7af2bb..2fd3840a0c 100644 --- a/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua @@ -51,7 +51,7 @@ function Test:TestStep_PTU_appPermissionsConsentNeeded_true() { policyType = "module_config", property = "endpoints" }) EXPECT_HMIRESPONSE(requestId) :Do(function(_,_) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) :Do(function(_,data) if(data.params.status == "UP_TO_DATE") then diff --git a/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua b/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua index 4522f3163f..37274c18a7 100644 --- a/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua +++ b/test_scripts/TheSameApp/Policies/CountersValidation/002_Check_count_of_rejected_rpc_calls_counter_diff_appID_same_appName.lua @@ -132,13 +132,11 @@ local function modificationOfPreloadedPT(pPolicyTable) pt.functional_groupings["AddCommandGroup"] = ptFuncGroup.AddCommandGroup pt.functional_groupings["AddSubMenuGroup"] = ptFuncGroup.AddSubMenuGroup - pt.app_policies[appParams[1].fullAppID] = - common.cloneTable(pt.app_policies["default"]) - pt.app_policies[appParams[1].fullAppID].groups = {"Base-4", "AddSubMenuGroup"} - - pt.app_policies[appParams[2].fullAppID] = - common.cloneTable(pt.app_policies["default"]) - pt.app_policies[appParams[2].fullAppID].groups = {"Base-4", "AddCommandGroup"} + for i in pairs(common.mobile.getApps()) do + pt.app_policies[appParams[i].fullAppID] = common.cloneTable(pt.app_policies["default"]) + if i == 1 then table.insert(pt.app_policies[appParams[i].fullAppID].groups, "AddSubMenuGroup") end + if i == 2 then table.insert(pt.app_policies[appParams[i].fullAppID].groups, "AddCommandGroup") end + end end --[[ Scenario ]] @@ -148,7 +146,8 @@ runner.Step("Start SDL and HMI", common.start) runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) runner.Step("Allow SDL for Device 1", common.mobile.allowSDL, {1}) runner.Step("Allow SDL for Device 2", common.mobile.allowSDL, {2}) -runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, false}) +runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, true}) +runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) runner.Step("Register App2 from device 2", common.registerAppEx, {2, appParams[2], 2, true}) runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) diff --git a/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua b/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua index 0ebb73683f..bd1a5c5cc4 100644 --- a/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua +++ b/test_scripts/TheSameApp/Policies/CountersValidation/004_Check_count_of_rpcs_sent_in_hmi_none_counter_diff_appID_same_appName.lua @@ -119,13 +119,10 @@ local function modificationOfPreloadedPT(pPolicyTable) pt.functional_groupings["AddCommandGroup"] = ptFuncGroup.AddCommandGroup - pt.app_policies[appParams[1].fullAppID] = - common.cloneTable(pt.app_policies["default"]) - pt.app_policies[appParams[1].fullAppID].groups = {"Base-4"} - - pt.app_policies[appParams[2].fullAppID] = - common.cloneTable(pt.app_policies["default"]) - pt.app_policies[appParams[2].fullAppID].groups = {"Base-4", "AddCommandGroup"} + for i in pairs(common.mobile.getApps()) do + pt.app_policies[appParams[i].fullAppID] = common.cloneTable(pt.app_policies["default"]) + if i == 2 then table.insert(pt.app_policies[appParams[i].fullAppID].groups, "AddCommandGroup") end + end end --[[ Scenario ]] @@ -135,7 +132,8 @@ runner.Step("Start SDL and HMI", common.start) runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) runner.Step("Allow SDL for Device 1", common.mobile.allowSDL, {1}) runner.Step("Allow SDL for Device 2", common.mobile.allowSDL, {2}) -runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, false}) +runner.Step("Register App1 from device 1", common.registerAppEx, {1, appParams[1], 1, true}) +runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) runner.Step("Register App2 from device 2", common.registerAppEx, {2, appParams[2], 2, true}) runner.Step("PTU", common.ptu.policyTableUpdate, {modificationOfPreloadedPT}) diff --git a/test_sets/hmi_ptu.txt b/test_sets/hmi_ptu.txt new file mode 100644 index 0000000000..12df968184 --- /dev/null +++ b/test_sets/hmi_ptu.txt @@ -0,0 +1,18 @@ +./test_scripts/Policies/HMI_PTU/001_Success_flow.lua +./test_scripts/Policies/HMI_PTU/002_PTU_is_performed_via_app_if_HMI_receives_unsuccessful_responses_from_the_policy_server.lua +./test_scripts/Policies/HMI_PTU/003_SDL_processes_rpc_from_assigned_group_after_PTU_via_HMI.lua +./test_scripts/Policies/HMI_PTU/004_SDL_rejects_rpc_from_not_assigned_group_after_PTU_via_HMI.lua +./test_scripts/Policies/HMI_PTU/005_perform_second_PTU_via_HMI_after_registering_App2.lua +./test_scripts/Policies/HMI_PTU/006_perform_second_PTU_via_HMI_after_registering_App2_and_first_PTU_via_mobile.lua +./test_scripts/Policies/HMI_PTU/007_perform_second_PTU_via_mobile_for_App2_after_failed_PTU_via_HMI.lua +./test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua +./test_scripts/Policies/HMI_PTU/009_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_ext.lua +./test_scripts/Policies/HMI_PTU/010_PTU_retry_sequence_HMI_has_timeout_more_then_SDL_propr.lua +./test_scripts/Policies/HMI_PTU/011_UPDATING_status_after_PolicyUpdate_response.lua +./test_scripts/Policies/HMI_PTU/012_UPDATING_status_absence_after_erroneous_PolicyUpdate_response.lua +./test_scripts/Policies/HMI_PTU/013_UPDATING_status_absence_after_timeout_expired_for_PolicyUpdate_response.lua +./test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua +./test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua +; Tests 016 and 017 should be omitted until core issue #3136 is fixed +;./test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua https://github.com/smartdevicelink/sdl_core/issues/3136 +;./test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua https://github.com/smartdevicelink/sdl_core/issues/3136 diff --git a/test_sets/policies_happy_paths_EXTERNAL_PROPRIETARY.txt b/test_sets/policies_happy_paths_EXTERNAL_PROPRIETARY.txt index 086333afc2..5d626256b2 100644 --- a/test_sets/policies_happy_paths_EXTERNAL_PROPRIETARY.txt +++ b/test_sets/policies_happy_paths_EXTERNAL_PROPRIETARY.txt @@ -63,7 +63,7 @@ ./test_scripts/Policies/Policy_Table_Update/136_ATF_Define_urls_PTS_will_sent_hmi.lua ./test_scripts/Policies/Policy_Table_Update/137_ATF_Sending_PTS_to_mobile_application.lua ./test_scripts/Policies/Policy_Table_Update/138_ATF_Sending_PTS_to_app_OnSystemRequest_appID_default.lua -./test_scripts/Policies/Policy_Table_Update/139_ATF_PoliciesManager_changes_status_UPDATING.lua +;139 test script became obsolete after the introduction of the HMI PTU feature and was removed ./test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua ./test_scripts/Policies/Policy_Table_Update/141_ATF_Got_PTU_from_mobile_application.lua ./test_scripts/Policies/Policy_Table_Update/142_ATF_PoliciesManager_changes_status_to_UP_TO_DATE.lua @@ -81,7 +81,7 @@ ./test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua ./test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua ./test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua -./test_scripts/Policies/Policy_Table_Update/157_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATING.lua +;157 test script became obsolete after the introduction of the HMI PTU feature and was removed ./test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua ./test_scripts/Policies/Policy_Table_Update/159_ATF_PTU_Requirements_For_HMILevel_Of_The_Application_Taking_Part_In_Policy_Update.lua ./test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua diff --git a/user_modules/shared_testcases/testCasesForExternalUCS.lua b/user_modules/shared_testcases/testCasesForExternalUCS.lua index ee6a7effdd..754b3ca739 100644 --- a/user_modules/shared_testcases/testCasesForExternalUCS.lua +++ b/user_modules/shared_testcases/testCasesForExternalUCS.lua @@ -110,7 +110,7 @@ local m = { } test.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = policy_file_name }) m.createJsonFileFromTable(m.pts, ptu_file_name) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATING" }, { status = status }):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = status }) test.mobileSession1:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function() local corIdSystemRequest = test.mobileSession1:SendRPC("SystemRequest", @@ -190,9 +190,9 @@ local m = { } EXPECT_HMICALL("BasicCommunication.PolicyUpdate") :Do(function(exp, d) if(exp.occurences == 1) then + test.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) m.pts = m.createTableFromJsonFile(d.params.file) if status then - test.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) updatePTU() if updateFunc then updateFunc(m.pts) diff --git a/user_modules/shared_testcases/testCasesForPolicyAppIdManagament.lua b/user_modules/shared_testcases/testCasesForPolicyAppIdManagament.lua index c1f169e53b..b3ddb702d5 100644 --- a/user_modules/shared_testcases/testCasesForPolicyAppIdManagament.lua +++ b/user_modules/shared_testcases/testCasesForPolicyAppIdManagament.lua @@ -18,7 +18,6 @@ local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -- But this should be checked in appropriate scripts --TODO(istoimenova): functions with External_Proprietary should be merged at review of common functions. function common:updatePolicyTable(test, file) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATING" }, { status = "UP_TO_DATE" }):Times(2) local requestId = test.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) EXPECT_HMIRESPONSE(requestId) @@ -34,6 +33,7 @@ function common:updatePolicyTable(test, file) local corIdSystemRequest = test.mobileSession:SendRPC("SystemRequest", { requestType = "PROPRIETARY" }, file) EXPECT_HMICALL("BasicCommunication.SystemRequest",{ requestType = "PROPRIETARY" }, file) :Do(function(_, data) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) test.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) test.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = data.params.fileName } ) end) diff --git a/user_modules/shared_testcases/testCasesForPolicyTable.lua b/user_modules/shared_testcases/testCasesForPolicyTable.lua index e1a3c96bdf..f9527845f3 100644 --- a/user_modules/shared_testcases/testCasesForPolicyTable.lua +++ b/user_modules/shared_testcases/testCasesForPolicyTable.lua @@ -923,12 +923,11 @@ function testCasesForPolicyTable:flow_SUCCEESS_EXTERNAL_PROPRIETARY(self, app_id end EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :ValidIf(function(e, d) - if e.occurences == 1 and d.params.status == "UPDATING" then return true end - if e.occurences == 2 and d.params.status == "UP_TO_DATE" then return true end + if e.occurences == 1 and d.params.status == "UP_TO_DATE" then return true end local msg = table.concat({"Unexpected occurence '", e.occurences, "' of SDL.OnStatusUpdate with status '", d.params.status, "'"}) return false, msg end) - :Times(2) + :Times(1) local RequestId_GetUrls = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) EXPECT_HMIRESPONSE(RequestId_GetUrls,{result = {code = 0, method = "SDL.GetPolicyConfigurationData" } } ) @@ -969,7 +968,7 @@ function testCasesForPolicyTable:trigger_user_request_update_from_HMI(self) testCasesForPolicyTable.time_trigger = timestamp() - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) :Do(function(_,_) testCasesForPolicyTable.time_onstatusupdate = timestamp() end) EXPECT_HMICALL("BasicCommunication.PolicyUpdate", { file = "/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json"}) @@ -1053,6 +1052,7 @@ function testCasesForPolicyTable:trigger_getting_device_consent(self, app_name, testCasesForPolicyTable.time_policyupdate = timestamp() self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATING" }) end) end) EXPECT_HMICALL("BasicCommunication.ActivateApp"):Times(Between(0,1)) diff --git a/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua b/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua index 3bd11f8fca..b777c173cb 100644 --- a/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua +++ b/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua @@ -2,6 +2,14 @@ local testCasesForPolicyTableSnapshot = {} local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local expectations = require('expectations') + +local expOrig = expectations.Expectation +function expectations.Expectation(name, connection) + local e = expOrig(name, connection) + e.timeout = e.timeout + 10000 + return e +end testCasesForPolicyTableSnapshot.preloaded_elements = {} testCasesForPolicyTableSnapshot.pts_elements = {} From efa866a822f043da189a22c0f3ae67c4b21498d6 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Fri, 14 Feb 2020 11:03:10 -0500 Subject: [PATCH 17/64] Add test scripts to check resumption of HMI level (#2294) --- .../001_01_NONE_FULL_no_resumption.lua | 37 +++++++ .../001_02_NONE_LIMITED_no_resumption.lua | 37 +++++++ .../001_03_NONE_BACKGROUND_no_resumption.lua | 37 +++++++ .../001_04_NONE_NONE_no_resumption.lua | 37 +++++++ .../001_05_BACKGROUND_FULL_no_resumption.lua | 37 +++++++ ...01_06_BACKGROUND_LIMITED_no_resumption.lua | 37 +++++++ ...07_BACKGROUND_BACKGROUND_no_resumption.lua | 37 +++++++ .../001_08_BACKGROUND_NONE_no_resumption.lua | 37 +++++++ .../002_01_LIMITED_FULL_no_resumption.lua | 37 +++++++ .../002_02_LIMITED_LIMITED_no_resumption.lua | 37 +++++++ ...02_03_LIMITED_BACKGROUND_no_resumption.lua | 37 +++++++ ...002_04_LIMITED_NONE_resumption_LIMITED.lua | 37 +++++++ .../002_05_FULL_FULL_no_resumption.lua | 37 +++++++ .../002_06_FULL_LIMITED_no_resumption.lua | 37 +++++++ .../002_07_FULL_BACKGROUND_no_resumption.lua | 37 +++++++ .../002_08_FULL_NONE_resumption_FULL.lua | 37 +++++++ ..._01_NONE_FULL_same_types_no_resumption.lua | 40 ++++++++ ...ONE_FULL_different_types_no_resumption.lua | 40 ++++++++ ..._NONE_LIMITED_same_types_no_resumption.lua | 40 ++++++++ ..._LIMITED_different_types_no_resumption.lua | 40 ++++++++ ...NE_BACKGROUND_same_types_no_resumption.lua | 40 ++++++++ ...CKGROUND_different_types_no_resumption.lua | 40 ++++++++ ..._07_NONE_NONE_same_types_no_resumption.lua | 40 ++++++++ ...ONE_NONE_different_types_no_resumption.lua | 40 ++++++++ ...CKGROUND_FULL_same_types_no_resumption.lua | 40 ++++++++ ...UND_FULL_different_types_no_resumption.lua | 40 ++++++++ ...ROUND_LIMITED_same_types_no_resumption.lua | 40 ++++++++ ..._LIMITED_different_types_no_resumption.lua | 40 ++++++++ ...ND_BACKGROUND_same_types_no_resumption.lua | 40 ++++++++ ...CKGROUND_different_types_no_resumption.lua | 40 ++++++++ ...CKGROUND_NONE_same_types_no_resumption.lua | 40 ++++++++ ...UND_NONE_different_types_no_resumption.lua | 40 ++++++++ ..._LIMITED_FULL_same_types_no_resumption.lua | 40 ++++++++ ...ULL_different_types_resumption_LIMITED.lua | 40 ++++++++ ...MITED_LIMITED_same_types_no_resumption.lua | 40 ++++++++ ..._LIMITED_different_types_no_resumption.lua | 40 ++++++++ ...CKGROUND_same_types_resumption_LIMITED.lua | 45 +++++++++ ...UND_different_types_resumption_LIMITED.lua | 40 ++++++++ ...TED_NONE_same_types_resumption_LIMITED.lua | 40 ++++++++ ...ONE_different_types_resumption_LIMITED.lua | 40 ++++++++ ..._09_FULL_FULL_same_types_no_resumption.lua | 40 ++++++++ ...ULL_FULL_different_types_no_resumption.lua | 40 ++++++++ ..._FULL_LIMITED_same_types_no_resumption.lua | 40 ++++++++ ...IMITED_different_types_resumption_FULL.lua | 40 ++++++++ ..._BACKGROUND_same_types_resumption_FULL.lua | 40 ++++++++ ...GROUND_different_types_resumption_FULL.lua | 40 ++++++++ ...5_FULL_NONE_same_types_resumption_FULL.lua | 40 ++++++++ ...L_NONE_different_types_resumption_FULL.lua | 40 ++++++++ test_scripts/Resumption/HMI_Level/common.lua | 99 +++++++++++++++++++ test_sets/hmi_level_resumption.txt | 48 +++++++++ 50 files changed, 2024 insertions(+) create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_01_NONE_FULL_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_02_NONE_LIMITED_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_03_NONE_BACKGROUND_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_04_NONE_NONE_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_05_BACKGROUND_FULL_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_06_BACKGROUND_LIMITED_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_07_BACKGROUND_BACKGROUND_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_08_BACKGROUND_NONE_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_01_LIMITED_FULL_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_02_LIMITED_LIMITED_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_03_LIMITED_BACKGROUND_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_04_LIMITED_NONE_resumption_LIMITED.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_05_FULL_FULL_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_06_FULL_LIMITED_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_07_FULL_BACKGROUND_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_08_FULL_NONE_resumption_FULL.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_01_NONE_FULL_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_02_NONE_FULL_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_03_NONE_LIMITED_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_04_NONE_LIMITED_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_05_NONE_BACKGROUND_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_06_NONE_BACKGROUND_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_07_NONE_NONE_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_08_NONE_NONE_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_09_BACKGROUND_FULL_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_10_BACKGROUND_FULL_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_11_BACKGROUND_LIMITED_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_12_BACKGROUND_LIMITED_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_13_BACKGROUND_BACKGROUND_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_14_BACKGROUND_BACKGROUND_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_15_BACKGROUND_NONE_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_16_BACKGROUND_NONE_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_01_LIMITED_FULL_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_02_LIMITED_FULL_different_types_resumption_LIMITED.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_03_LIMITED_LIMITED_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_04_LIMITED_LIMITED_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_05_LIMITED_BACKGROUND_same_types_resumption_LIMITED.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_06_LIMITED_BACKGROUND_different_types_resumption_LIMITED.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_07_LIMITED_NONE_same_types_resumption_LIMITED.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_08_LIMITED_NONE_different_types_resumption_LIMITED.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_09_FULL_FULL_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_10_FULL_FULL_different_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_11_FULL_LIMITED_same_types_no_resumption.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_12_FULL_LIMITED_different_types_resumption_FULL.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_13_FULL_BACKGROUND_same_types_resumption_FULL.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_14_FULL_BACKGROUND_different_types_resumption_FULL.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_15_FULL_NONE_same_types_resumption_FULL.lua create mode 100644 test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_16_FULL_NONE_different_types_resumption_FULL.lua create mode 100644 test_scripts/Resumption/HMI_Level/common.lua create mode 100644 test_sets/hmi_level_resumption.txt diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_01_NONE_FULL_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_01_NONE_FULL_no_resumption.lua new file mode 100644 index 0000000000..eec5cad93c --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_01_NONE_FULL_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - app has been registered and switched to FULL just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and got NONE HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to FULL within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_02_NONE_LIMITED_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_02_NONE_LIMITED_no_resumption.lua new file mode 100644 index 0000000000..c5c6f5c735 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_02_NONE_LIMITED_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - app has been registered and switched to LIMITED just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and got NONE HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to LIMITED within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_03_NONE_BACKGROUND_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_03_NONE_BACKGROUND_no_resumption.lua new file mode 100644 index 0000000000..41d7cdaa28 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_03_NONE_BACKGROUND_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - app has been registered and switched to BACKGROUND just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and got NONE HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to BACKGROUND within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_04_NONE_NONE_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_04_NONE_NONE_no_resumption.lua new file mode 100644 index 0000000000..5b1c26b4e4 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_04_NONE_NONE_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - app has been registered and remained in NONE just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and got NONE HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App remains in NONE within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_05_BACKGROUND_FULL_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_05_BACKGROUND_FULL_no_resumption.lua new file mode 100644 index 0000000000..0f364c7ed1 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_05_BACKGROUND_FULL_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - app has been registered and switched to FULL just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to FULL within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_06_BACKGROUND_LIMITED_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_06_BACKGROUND_LIMITED_no_resumption.lua new file mode 100644 index 0000000000..a7207cb404 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_06_BACKGROUND_LIMITED_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - app has been registered and switched to LIMITED just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to LIMITED within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_07_BACKGROUND_BACKGROUND_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_07_BACKGROUND_BACKGROUND_no_resumption.lua new file mode 100644 index 0000000000..aac2ceabbd --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_07_BACKGROUND_BACKGROUND_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - app has been registered and switched to BACKGROUND just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to BACKGROUND within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_08_BACKGROUND_NONE_no_resumption.lua b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_08_BACKGROUND_NONE_no_resumption.lua new file mode 100644 index 0000000000..a02568352f --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_08_BACKGROUND_NONE_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - app has been registered and remained in NONE just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App remains in NONE within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_01_LIMITED_FULL_no_resumption.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_01_LIMITED_FULL_no_resumption.lua new file mode 100644 index 0000000000..09ca20f968 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_01_LIMITED_FULL_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - app has been registered and switched to FULL just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to FULL within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_02_LIMITED_LIMITED_no_resumption.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_02_LIMITED_LIMITED_no_resumption.lua new file mode 100644 index 0000000000..d8e260c8e6 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_02_LIMITED_LIMITED_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - app has been registered and switched to LIMITED just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to LIMITED within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_03_LIMITED_BACKGROUND_no_resumption.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_03_LIMITED_BACKGROUND_no_resumption.lua new file mode 100644 index 0000000000..91e539533b --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_03_LIMITED_BACKGROUND_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - app has been registered and switched to LIMITED just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to LIMITED within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_04_LIMITED_NONE_resumption_LIMITED.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_04_LIMITED_NONE_resumption_LIMITED.lua new file mode 100644 index 0000000000..e4d8b97d09 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_04_LIMITED_NONE_resumption_LIMITED.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - app has been registered and remained in NONE just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App remains in NONE within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does resume app's HMI level to LIMITED +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "LIMITED" }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_05_FULL_FULL_no_resumption.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_05_FULL_FULL_no_resumption.lua new file mode 100644 index 0000000000..3660a2781b --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_05_FULL_FULL_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - app has been registered and switched to FULL just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to FULL within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_06_FULL_LIMITED_no_resumption.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_06_FULL_LIMITED_no_resumption.lua new file mode 100644 index 0000000000..8571a3a484 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_06_FULL_LIMITED_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - app has been registered and switched to LIMITED just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to LIMITED within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_07_FULL_BACKGROUND_no_resumption.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_07_FULL_BACKGROUND_no_resumption.lua new file mode 100644 index 0000000000..880109975a --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_07_FULL_BACKGROUND_no_resumption.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - app has been registered and switched to BACKGROUND just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App switched to BACKGROUND within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does not resume app's HMI level +-- 4) App switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "DEFAULT" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_08_FULL_NONE_resumption_FULL.lua b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_08_FULL_NONE_resumption_FULL.lua new file mode 100644 index 0000000000..6cf5fbaeab --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_08_FULL_NONE_resumption_FULL.lua @@ -0,0 +1,37 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - app has been registered and remained in NONE just after unexpected disconnect +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App is disconnected unexpectedly and re-registered again +-- 2) App remains in NONE within default 3 sec. timeout +-- 3) Timeout expires and SDL starts HMI level resumption process +-- SDL does resume app's HMI level to FULL +-- 4) App switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL" }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 1", common.registerApp, { "NAVIGATION" }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE" }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "FULL" }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_01_NONE_FULL_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_01_NONE_FULL_same_types_no_resumption.lua new file mode 100644 index 0000000000..a3adfc6e77 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_01_NONE_FULL_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_02_NONE_FULL_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_02_NONE_FULL_different_types_no_resumption.lua new file mode 100644 index 0000000000..fa6a534b8b --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_02_NONE_FULL_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of different HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_03_NONE_LIMITED_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_03_NONE_LIMITED_same_types_no_resumption.lua new file mode 100644 index 0000000000..f8f679a82a --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_03_NONE_LIMITED_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_04_NONE_LIMITED_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_04_NONE_LIMITED_different_types_no_resumption.lua new file mode 100644 index 0000000000..4b6af99c33 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_04_NONE_LIMITED_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of different HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_05_NONE_BACKGROUND_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_05_NONE_BACKGROUND_same_types_no_resumption.lua new file mode 100644 index 0000000000..4e96f3b422 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_05_NONE_BACKGROUND_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_06_NONE_BACKGROUND_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_06_NONE_BACKGROUND_different_types_no_resumption.lua new file mode 100644 index 0000000000..422121c4ce --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_06_NONE_BACKGROUND_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of different HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_07_NONE_NONE_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_07_NONE_NONE_same_types_no_resumption.lua new file mode 100644 index 0000000000..7f7a767f61 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_07_NONE_NONE_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of the same HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_08_NONE_NONE_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_08_NONE_NONE_different_types_no_resumption.lua new file mode 100644 index 0000000000..7bba60bacd --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_08_NONE_NONE_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has NONE level before unexpected disconnect +-- - another app of different HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and got NONE HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "NONE", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_09_BACKGROUND_FULL_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_09_BACKGROUND_FULL_same_types_no_resumption.lua new file mode 100644 index 0000000000..cd6520508c --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_09_BACKGROUND_FULL_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_10_BACKGROUND_FULL_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_10_BACKGROUND_FULL_different_types_no_resumption.lua new file mode 100644 index 0000000000..cfdd1ca606 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_10_BACKGROUND_FULL_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of different HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_11_BACKGROUND_LIMITED_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_11_BACKGROUND_LIMITED_same_types_no_resumption.lua new file mode 100644 index 0000000000..a408e3028c --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_11_BACKGROUND_LIMITED_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_12_BACKGROUND_LIMITED_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_12_BACKGROUND_LIMITED_different_types_no_resumption.lua new file mode 100644 index 0000000000..7d7c244295 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_12_BACKGROUND_LIMITED_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of different HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_13_BACKGROUND_BACKGROUND_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_13_BACKGROUND_BACKGROUND_same_types_no_resumption.lua new file mode 100644 index 0000000000..aadee87c2b --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_13_BACKGROUND_BACKGROUND_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_14_BACKGROUND_BACKGROUND_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_14_BACKGROUND_BACKGROUND_different_types_no_resumption.lua new file mode 100644 index 0000000000..a043dce44f --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_14_BACKGROUND_BACKGROUND_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of different HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_15_BACKGROUND_NONE_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_15_BACKGROUND_NONE_same_types_no_resumption.lua new file mode 100644 index 0000000000..15b29f9f94 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_15_BACKGROUND_NONE_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of the same HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_16_BACKGROUND_NONE_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_16_BACKGROUND_NONE_different_types_no_resumption.lua new file mode 100644 index 0000000000..238fe72ea0 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_16_BACKGROUND_NONE_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has BACKGROUND level before unexpected disconnect +-- - another app of different HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to BACKGROUND HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "BACKGROUND", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_01_LIMITED_FULL_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_01_LIMITED_FULL_same_types_no_resumption.lua new file mode 100644 index 0000000000..3bf6f87287 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_01_LIMITED_FULL_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_02_LIMITED_FULL_different_types_resumption_LIMITED.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_02_LIMITED_FULL_different_types_resumption_LIMITED.lua new file mode 100644 index 0000000000..16d160fd77 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_02_LIMITED_FULL_different_types_resumption_LIMITED.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of different HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to LIMITED +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "LIMITED" }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_03_LIMITED_LIMITED_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_03_LIMITED_LIMITED_same_types_no_resumption.lua new file mode 100644 index 0000000000..0a9ccf4223 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_03_LIMITED_LIMITED_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_04_LIMITED_LIMITED_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_04_LIMITED_LIMITED_different_types_no_resumption.lua new file mode 100644 index 0000000000..fe464cb7ab --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_04_LIMITED_LIMITED_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of different HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "MEDIA", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_05_LIMITED_BACKGROUND_same_types_resumption_LIMITED.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_05_LIMITED_BACKGROUND_same_types_resumption_LIMITED.lua new file mode 100644 index 0000000000..73dafed68e --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_05_LIMITED_BACKGROUND_same_types_resumption_LIMITED.lua @@ -0,0 +1,45 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to LIMITED +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "MEDIA", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "MEDIA", 2 }) +-- set App 2 to BACKGROUND by registering and activating App 3 with the same HMI type +common.Step("Activate App 2", common.app.activate, { 2 }) +common.Step("Register App 3", common.registerApp, { "MEDIA", 3 }) +common.Step("Activate App 3", common.app.activate, { 3 }) +common.Step("Unregister App 3", common.app.unRegister, { 3 }) + +common.Step("Register App 1", common.registerApp, { "MEDIA", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "LIMITED" }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_06_LIMITED_BACKGROUND_different_types_resumption_LIMITED.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_06_LIMITED_BACKGROUND_different_types_resumption_LIMITED.lua new file mode 100644 index 0000000000..bbca4eb615 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_06_LIMITED_BACKGROUND_different_types_resumption_LIMITED.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of different HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to LIMITED +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "LIMITED" }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_07_LIMITED_NONE_same_types_resumption_LIMITED.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_07_LIMITED_NONE_same_types_resumption_LIMITED.lua new file mode 100644 index 0000000000..9708750a22 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_07_LIMITED_NONE_same_types_resumption_LIMITED.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of the same HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to LIMITED +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "LIMITED" }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_08_LIMITED_NONE_different_types_resumption_LIMITED.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_08_LIMITED_NONE_different_types_resumption_LIMITED.lua new file mode 100644 index 0000000000..5e740c78a2 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_08_LIMITED_NONE_different_types_resumption_LIMITED.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has LIMITED level before unexpected disconnect +-- - another app of different HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to LIMITED HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to LIMITED +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "LIMITED", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "LIMITED" }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_09_FULL_FULL_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_09_FULL_FULL_same_types_no_resumption.lua new file mode 100644 index 0000000000..3dc44ffd73 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_09_FULL_FULL_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_10_FULL_FULL_different_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_10_FULL_FULL_different_types_no_resumption.lua new file mode 100644 index 0000000000..68b2f1ce0c --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_10_FULL_FULL_different_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of different HMI type is registered and switched to FULL just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to FULL HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "FULL", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_11_FULL_LIMITED_same_types_no_resumption.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_11_FULL_LIMITED_same_types_no_resumption.lua new file mode 100644 index 0000000000..eb7b3f44bd --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_11_FULL_LIMITED_same_types_no_resumption.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does not resume app's HMI level +-- 4) App_1 is switched to FULL +-- SDL does change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { nil }) +common.Step("Activate App 1", common.activateApp, { "FULL" }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_12_FULL_LIMITED_different_types_resumption_FULL.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_12_FULL_LIMITED_different_types_resumption_FULL.lua new file mode 100644 index 0000000000..1fb99694c7 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_12_FULL_LIMITED_different_types_resumption_FULL.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check presence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of different HMI type is registered and switched to LIMITED just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to LIMITED HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to FULL +-- 4) App_1 is switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "LIMITED", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "FULL" }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_13_FULL_BACKGROUND_same_types_resumption_FULL.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_13_FULL_BACKGROUND_same_types_resumption_FULL.lua new file mode 100644 index 0000000000..b850602c8e --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_13_FULL_BACKGROUND_same_types_resumption_FULL.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of the same HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to FULL +-- 4) App_1 is switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "DEFAULT", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "FULL" }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_14_FULL_BACKGROUND_different_types_resumption_FULL.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_14_FULL_BACKGROUND_different_types_resumption_FULL.lua new file mode 100644 index 0000000000..5e7fdefbb8 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_14_FULL_BACKGROUND_different_types_resumption_FULL.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of different HMI type is registered and switched to BACKGROUND just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and switched to BACKGROUND HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to FULL +-- 4) App_1 is switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "BACKGROUND", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "FULL" }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_15_FULL_NONE_same_types_resumption_FULL.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_15_FULL_NONE_same_types_resumption_FULL.lua new file mode 100644 index 0000000000..b83fdf60d8 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_15_FULL_NONE_same_types_resumption_FULL.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of the same HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of the same HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to FULL +-- 4) App_1 is switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "NAVIGATION", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "FULL" }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_16_FULL_NONE_different_types_resumption_FULL.lua b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_16_FULL_NONE_different_types_resumption_FULL.lua new file mode 100644 index 0000000000..66f0e76d84 --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_16_FULL_NONE_different_types_resumption_FULL.lua @@ -0,0 +1,40 @@ +--------------------------------------------------------------------------------------------------- +-- Description: +-- Check absence of HMI level resumption in case if: +-- - app has FULL level before unexpected disconnect +-- - another app of different HMI type is registered and got NONE HMI level just after unexpected disconnect +-- - app has been re-registered +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered and switched to FULL HMI level +-- +-- Steps: +-- 1) App_1 is disconnected unexpectedly +-- 2) App_2 of different HMI type is registered and got NONE HMI level +-- 2) App_1 is re-registered and got NONE HMI level +-- 3) Timeout expires and SDL starts HMI level resumption process for App_1 +-- SDL does resume app's HMI level to FULL +-- 4) App_1 is switched to FULL +-- SDL does not change app's HMI level +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require("test_scripts/Resumption/HMI_Level/common") + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Set HMI level App 1", common.setAppHMILevel, { "FULL", 1 }) + +common.Title("Test") +common.Step("Unexpected disconnect", common.unexpectedDisconnect) +common.Step("Register App 2", common.registerApp, { "DEFAULT", 2 }) +common.Step("Set HMI level App 2", common.setAppHMILevel, { "NONE", 2 }) +common.Step("Register App 1", common.registerApp, { "NAVIGATION", 1 }) +common.Step("Check HMI level resumption App 1", common.checkHMILevelResumption, { "FULL" }) +common.Step("Activate App 1", common.activateApp, { nil }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Resumption/HMI_Level/common.lua b/test_scripts/Resumption/HMI_Level/common.lua new file mode 100644 index 0000000000..e64669a65e --- /dev/null +++ b/test_scripts/Resumption/HMI_Level/common.lua @@ -0,0 +1,99 @@ +--------------------------------------------------------------------------------------------------- +-- Common module +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local actions = require("user_modules/sequences/actions") +local runner = require('user_modules/script_runner') +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 2 + +--[[ Local Variables ]] +local m = {} + +m.appType = { + MEDIA = { hmiType = "MEDIA", isMedia = true }, + NAVIGATION = { hmiType = "NAVIGATION", isMedia = true }, + DEFAULT = { hmiType = "DEFAULT", isMedia = false } +} + +--[[ Shared Functions ]] +m.Title = runner.Title +m.Step = runner.Step + +m.start = actions.start +m.mobile = actions.mobile +m.hmi = actions.hmi +m.app = actions.app + +m.preconditions = actions.preconditions +m.postconditions = actions.postconditions + +m.wait = actions.run.wait +m.runAfter = actions.run.runAfter + +--[[ Common Functions ]] +function m.unexpectedDisconnect() + m.mobile.deleteSession() + m.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) +end + +function m.setAppHMILevel(pHMILevel, pAppId) + if pHMILevel == "NONE" then return end + if not pHMILevel then pHMILevel = "FULL" end + if not pAppId then pAppId = 1 end + if pHMILevel ~= "FULL" then + m.mobile.getSession(pAppId):ExpectNotification("OnHMIStatus", { hmiLevel = "FULL" }, { hmiLevel = pHMILevel }) + :Times(2) + else + m.mobile.getSession(pAppId):ExpectNotification("OnHMIStatus", { hmiLevel = "FULL" }) + end + local cid = m.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = m.app.getHMIId(pAppId) }) + m.hmi.getConnection():ExpectResponse(cid) + :Do(function() + if pHMILevel ~= "FULL" then + m.hmi.getConnection():SendNotification("BasicCommunication.OnAppDeactivated", { appID = m.app.getHMIId(pAppId) }) + end + end) + m.wait(500) +end + +function m.checkHMILevelResumption(pHMILevel) + if pHMILevel == nil then + m.mobile.getSession():ExpectNotification("OnHMIStatus"):Times(0) + m.hmi.getConnection():ExpectRequest("BasicCommunication.ActivateApp"):Times(Between(0,1)) + elseif pHMILevel == "LIMITED" then + m.mobile.getSession():ExpectNotification("OnHMIStatus", { hmiLevel = "LIMITED" }) + m.hmi.getConnection():ExpectRequest("BasicCommunication.ActivateApp"):Times(0) + elseif pHMILevel == "FULL" then + m.mobile.getSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL" }) + m.hmi.getConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Do(function(_, data) + m.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + else + utils.cprint(35, "Unexpected HMI level defined") + end + m.wait(3500) +end + +function m.registerApp(pAppType, pAppId) + if not pAppId then pAppId = 1 end + m.app.getParams(pAppId).appHMIType = { m.appType[pAppType].hmiType } + m.app.getParams(pAppId).isMediaApplication = m.appType[pAppType].isMedia + m.app.registerNoPTU(pAppId) +end + +function m.activateApp(pExpLevel, pAppId) + if not pAppId then pAppId = 1 end + local requestId = m.hmi.getConnection():SendRequest("SDL.ActivateApp", { appID = m.app.getHMIId(pAppId) }) + m.hmi.getConnection():ExpectResponse(requestId) + local expOccurence = 1 + if pExpLevel == nil then expOccurence = 0 end + m.mobile.getSession(pAppId):ExpectNotification("OnHMIStatus", { hmiLevel = pExpLevel }):Times(expOccurence) + m.wait(500) +end + +return m diff --git a/test_sets/hmi_level_resumption.txt b/test_sets/hmi_level_resumption.txt new file mode 100644 index 0000000000..b60505b157 --- /dev/null +++ b/test_sets/hmi_level_resumption.txt @@ -0,0 +1,48 @@ +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_01_NONE_FULL_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_02_NONE_LIMITED_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_03_NONE_BACKGROUND_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_04_NONE_NONE_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_05_BACKGROUND_FULL_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_06_BACKGROUND_LIMITED_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_07_BACKGROUND_BACKGROUND_no_resumption.lua +./test_scripts/Resumption/HMI_Level/01_single_app_NONE_BACKGROUND/001_08_BACKGROUND_NONE_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_01_LIMITED_FULL_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_02_LIMITED_LIMITED_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_03_LIMITED_BACKGROUND_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_04_LIMITED_NONE_resumption_LIMITED.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_05_FULL_FULL_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_06_FULL_LIMITED_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_07_FULL_BACKGROUND_no_resumption.lua +./test_scripts/Resumption/HMI_Level/02_single_app_LIMITED_FULL/002_08_FULL_NONE_resumption_FULL.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_01_NONE_FULL_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_02_NONE_FULL_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_03_NONE_LIMITED_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_04_NONE_LIMITED_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_05_NONE_BACKGROUND_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_06_NONE_BACKGROUND_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_07_NONE_NONE_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_08_NONE_NONE_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_09_BACKGROUND_FULL_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_10_BACKGROUND_FULL_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_11_BACKGROUND_LIMITED_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_12_BACKGROUND_LIMITED_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_13_BACKGROUND_BACKGROUND_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_14_BACKGROUND_BACKGROUND_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_15_BACKGROUND_NONE_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/03_two_apps_NONE_BACKGROUND/003_16_BACKGROUND_NONE_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_01_LIMITED_FULL_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_02_LIMITED_FULL_different_types_resumption_LIMITED.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_03_LIMITED_LIMITED_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_04_LIMITED_LIMITED_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_05_LIMITED_BACKGROUND_same_types_resumption_LIMITED.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_06_LIMITED_BACKGROUND_different_types_resumption_LIMITED.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_07_LIMITED_NONE_same_types_resumption_LIMITED.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_08_LIMITED_NONE_different_types_resumption_LIMITED.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_09_FULL_FULL_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_10_FULL_FULL_different_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_11_FULL_LIMITED_same_types_no_resumption.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_12_FULL_LIMITED_different_types_resumption_FULL.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_13_FULL_BACKGROUND_same_types_resumption_FULL.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_14_FULL_BACKGROUND_different_types_resumption_FULL.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_15_FULL_NONE_same_types_resumption_FULL.lua +./test_scripts/Resumption/HMI_Level/04_two_apps_LIMITED_FULL/004_16_FULL_NONE_different_types_resumption_FULL.lua From f59942006bb5233a7f81e0fefc8270687efdcfe8 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Mon, 17 Feb 2020 11:06:08 -0500 Subject: [PATCH 18/64] Align scripts for 3142 with fix for 3217 (#2346) --- ...ence_of_misplaced_OnVideoDataStreaming.lua | 23 ++++++++++++++----- ...ence_of_misplaced_OnAudioDataStreaming.lua | 23 ++++++++++++++----- 2 files changed, 34 insertions(+), 12 deletions(-) diff --git a/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua b/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua index 01adce9641..2cfd72aff7 100644 --- a/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua +++ b/test_scripts/Defects/6_1/3142_01_Absence_of_misplaced_OnVideoDataStreaming.lua @@ -11,6 +11,10 @@ -- 7. App_1 and App_2 continue streaming data within 'StopStreamingTimeout' timeout -- SDL does: -- - switch streaming between apps and provides HMI with streaming data from App_2 +-- - sends 'Navi.StopStream' for App_1 +-- - sends Navi.OnVideoDataStreaming(false) +-- - sends 'Navi.StartStream' for App_2 +-- - sends Navi.OnVideoDataStreaming(true) -- - not unregister App_1 since timeout is not yet expired -- 8. App_1 stops streaming within 'StopStreamingTimeout' timeout -- SDL does: @@ -29,11 +33,12 @@ common.app.getParams(1).appHMIType = { "NAVIGATION" } common.app.getParams(2).appHMIType = { "NAVIGATION" } --[[ Local Functions ]] -local function stopStreaming(pAppId, pServiceId) +local function stopStreaming(pAppId) common.hmi.getConnection():ExpectRequest("Navigation.StopStream", { appID = common.app.getHMIId(pAppId)}) - :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - common.mobile.getSession(pAppId):ExpectEndService(pServiceId) - :Do(function() common.mobile.getSession(pAppId):SendEndServiceAck(pServiceId) end) + :Do(function(_, data) + common.log("Navigation.StopStream for App " .. pAppId) + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) end local function startStreaming(pAppId, pServiceId) @@ -44,7 +49,10 @@ local function startStreaming(pAppId, pServiceId) common.streamingStatus[pAppId] = true end) common.hmi.getConnection():ExpectRequest("Navigation.StartStream", { appID = common.app.getHMIId(pAppId) }) - :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) + :Do(function(_, data) + common.log("Navigation.StartStream for App " .. pAppId) + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) end local function activateApp2() @@ -53,9 +61,12 @@ local function activateApp2() common.mobile.getSession(2):ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", videoStreamingState = "STREAMABLE" }) :Do(function() + stopStreaming(1, 11) startStreaming(2, 11) end) - common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming"):Times(0) + common.hmi.getConnection():ExpectNotification("Navigation.OnVideoDataStreaming", + { available = false }, { available = true }) + :Times(2) end local function stopStreamingWONotification() diff --git a/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua b/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua index aba239f768..aa0788eeb1 100644 --- a/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua +++ b/test_scripts/Defects/6_1/3142_02_Absence_of_misplaced_OnAudioDataStreaming.lua @@ -11,6 +11,10 @@ -- 7. App_1 and App_2 continue streaming data within 'StopStreamingTimeout' timeout -- SDL does: -- - switch streaming between apps and provides HMI with streaming data from App_2 +-- - sends 'Navi.StopAudioStream' for App_1 +-- - sends Navi.OnAudioDataStreaming(false) +-- - sends 'Navi.StartAudioStream' for App_2 +-- - sends Navi.OnAudioDataStreaming(true) -- - not unregister App_1 since timeout is not yet expired -- 8. App_1 stops streaming within 'StopStreamingTimeout' timeout -- SDL does: @@ -29,11 +33,12 @@ common.app.getParams(1).appHMIType = { "NAVIGATION" } common.app.getParams(2).appHMIType = { "NAVIGATION" } --[[ Local Functions ]] -local function stopStreaming(pAppId, pServiceId) +local function stopStreaming(pAppId) common.hmi.getConnection():ExpectRequest("Navigation.StopAudioStream", { appID = common.app.getHMIId(pAppId)}) - :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - common.mobile.getSession(pAppId):ExpectEndService(pServiceId) - :Do(function() common.mobile.getSession(pAppId):SendEndServiceAck(pServiceId) end) + :Do(function(_, data) + common.log("Navigation.StopAudioStream for App " .. pAppId) + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) end local function startStreaming(pAppId, pServiceId) @@ -44,7 +49,10 @@ local function startStreaming(pAppId, pServiceId) common.streamingStatus[pAppId] = true end) common.hmi.getConnection():ExpectRequest("Navigation.StartAudioStream", { appID = common.app.getHMIId(pAppId) }) - :Do(function(_, data) common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) + :Do(function(_, data) + common.log("Navigation.StartAudioStream for App " .. pAppId) + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) end local function activateApp2() @@ -53,9 +61,12 @@ local function activateApp2() common.mobile.getSession(2):ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Do(function() + stopStreaming(1, 10) startStreaming(2, 10) end) - common.hmi.getConnection():ExpectNotification("Navigation.OnAudioDataStreaming"):Times(0) + common.hmi.getConnection():ExpectNotification("Navigation.OnAudioDataStreaming", + { available = false }, { available = true }) + :Times(2) end local function stopStreamingWONotification() From 4d275ddc8e4390ae6112dc8ab87264d5106591ef Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 18 Feb 2020 10:07:48 -0500 Subject: [PATCH 19/64] Feature/Remote ATF connection (#2304) * Adapt user modules for Remote connection * Adapt Smoke/Registration scripts for Remote connection * Adapt Smoke/API scripts for Remote connection * Adapt Smoke/ShutDown scripts for Remote connection * Adapt Smoke/HeartBeat scripts for Remote connection * Adapt Smoke/Resumption scripts for Remote connection * Adapt Smoke/Policies scripts for Remote connection * Adapt RC scripts for Remote connection * Adapt GetSystemTime scripts for Remote connection * Adapt SDL_Passenger_Mode scripts for Remote connection * Adapt ServiceStatusUpdateToHMI scripts for Remote connection * Adapt SSLHandshakeFlow scripts for Remote connection * Adapt GpsShiftSupport scripts for Remote connection * Add Update Preloaded step Co-Authored-By: Jacob Keeler * Use WaitForSDLStart from SDL module * Use HMI adapter controller * Improve stability of 077 policy script * Add Update Preloaded step for the rest of Smoke API tests * Added supported configurations into existing test sets Co-authored-by: Oleksandr Deriabin (GitHub) Co-authored-by: Jacob Keeler --- files/OnAppregistered/connecttest.lua | 1 - test_scripts/API/ATC_RequestType.lua | 1 - .../API/ATF_All_RPCs_and_Notifications.lua | 3 +- test_scripts/API/ATF_EndAudioPassThru.lua | 1 - test_scripts/API/ATF_GenericResponse.lua | 3 +- test_scripts/API/ATF_GetWayPoints.lua | 1 - ...tonSubscription_if_subscription_failed.lua | 4 +- ...nSubscription_if_unsubscription_failed.lua | 4 +- .../API/ATF_OnScreenPresetsAvailable.lua | 3 +- test_scripts/API/ATF_OnTouchEvent.lua | 1 - test_scripts/API/ATF_PerformInteraction.lua | 3 +- test_scripts/API/ATF_ScrollableMessage.lua | 1 - test_scripts/API/ATF_ShowConstantTBT.lua | 1 - .../API/ATF_StopStream_StopAudioStream.lua | 1 - test_scripts/API/ATF_UTF-8.lua | 1 - .../ATF_UnregisterAppInterface_nonMedia.lua | 1 - test_scripts/API/ATF_UnsubscribeButton.lua | 1 - .../commonPassengerMode.lua | 13 +- ...failed_success_2rd_try_failed_external.lua | 3 +- .../API/ServiceStatusUpdateToHMI/common.lua | 5 +- ...eriorVehicleData_stationLocation_shift.lua | 7 +- ...icleData_stationLocation_without_shift.lua | 5 +- ...eriorVehicleData_stationLocation_shift.lua | 5 +- ...icleData_stationLocation_without_shift.lua | 5 +- ...ationLocation_shift_after_subscription.lua | 9 +- .../GpsShiftSupport/commonGpsShift.lua | 8 +- .../017_H2M_MediaImage_success.lua | 2 +- .../012_H2M_media_image_success.lua | 2 +- .../ATF_Buttons_GetCapabilities.lua | 3 +- ...ATF_Buttons_GetCapabilities_ButtonName.lua | 3 +- .../Policies/ATF_Preloaded_PT_validation.lua | 1 - ...into_local_pt_launch_on_each_sdl_start.lua | 1 - ...ation_rules_request_type_array_omitted.lua | 1 - ...quest_type_array_has_one_invalid_value.lua | 1 - ...pe_array_has_only_one_value_is_invalid.lua | 1 - ...counts_update_count_sync_out_of_memory.lua | 1 - ...or_counts_update_count_of_sync_reboots.lua | 1 - ...rror_counts_update_minutes_in_hmi_none.lua | 1 - ...r_counts_update_minutes_in_hmi_limited.lua | 1 - ...rror_counts_update_minutes_in_hmi_full.lua | 1 - ...ounts_update_minutes_in_hmi_background.lua | 1 - ...loaded_pt_exists_with_read_permissions.lua | 1 - ...oaded_pt_parameter_trigger_in_local_pt.lua | 1 - ...al_pt_consumer_frendly_messages_exists.lua | 1 - ...onsumer_frendly_messages_do_not_exists.lua | 1 - ...nsumer_frendly_messages_exists_in_both.lua | 1 - ...reloaded_pt_into_local_pt_app_policies.lua | 1 - ...o_local_pt_functional_groupings_exists.lua | 1 - ...pt_functional_groupings_does_not_exist.lua | 1 - ...preloaded_pt_into_local_pt_device_data.lua | 1 - ...erge_preloaded_pt_into_local_pt_launch.lua | 1 - ..._into_local_pt_launch_does_not_changed.lua | 1 - ...eloaded_pt_into_local_pt_module_config.lua | 1 - .../259_ATF_pt_snapshot_path_is_incorrect.lua | 1 - ...ocal_pt_from_preloaded_pt_master_reset.lua | 1 - .../264_ATF_pt_snapshot_creation_rule.lua | 1 - ...ATF_pt_snapshot_storage_on_file_system.lua | 1 - ...idation_rules_optional_parameters_type.lua | 1 - ...idation_rules_required_parameters_type.lua | 1 - ...ATF_pt_update_validation_rules_general.lua | 1 - ...dation_rules_consumer_friendly_message.lua | 1 - ...s_update_app_registration_language_vui.lua | 1 - ...PermissionChange_Notification_HMI_HTTP.lua | 22 +- ...se_moduleType_is_an_empty_array_in_LPT.lua | 3 +- .../017_Success_audio_source_values.lua | 3 +- ...CE_in_case_RC_interface_is_unavailable.lua | 3 +- ...se_moduleType_is_an_empty_array_in_LPT.lua | 3 +- ...EAD_ONLY_in_case_statusAvailable_false.lua | 3 +- ...SOURCE_in_case_statusAvailable_omitted.lua | 3 +- ...ED_RESOURCE_in_case_light_name_omitted.lua | 3 +- ...n_press_allowed_if_moduleType_is_empty.lua | 3 +- ..._generic_error_if_no_response_from_hmi.lua | 4 +- ..._supported_parameter_and_reject_others.lua | 5 +- .../005_Resend_only_supported_parameters.lua | 9 +- ...f_HMI_respond_to_RC_IsReady_with_false.lua | 3 +- ...nt_respond_to_RC_GetCapabilities_RADIO.lua | 3 +- ..._respond_to_RC_GetCapabilities_CLIMATE.lua | 3 +- ...nt_respond_to_RC_GetCapabilities_RADIO.lua | 3 +- ..._respond_to_RC_GetCapabilities_CLIMATE.lua | 3 +- ...d_responds_to_RC_GetCapabilities_RADIO.lua | 7 +- ...responds_to_RC_GetCapabilities_CLIMATE.lua | 7 +- ...d_doesnt_respond_to_RC_GetCapabilities.lua | 21 +- .../006_RPC_parameters_values.lua | 10 +- ...ERIC_ERROR_in_case_HMI_did_not_respond.lua | 4 +- ...se_moduleType_is_an_empty_array_in_LPT.lua | 3 +- .../005_TIMED_OUT_from_HMI_SIVD.lua | 3 +- .../006_TIMED_OUT_from_HMI_BP.lua | 3 +- .../007_HMI_no_response_SIVD.lua | 3 +- .../008_HMI_no_response_BP.lua | 3 +- .../009_HMI_invalid_response_SIVD.lua | 3 +- .../010_HMI_invalid_response_BP.lua | 3 +- .../011_TIMED_OUT_after_default_timeout.lua | 3 +- .../GetSystemCapability/001_Success_flow.lua | 3 +- ..._subscribing_with_no_response_from_HMI.lua | 4 +- .../016_RPC_parameters_values.lua | 10 +- .../008_Allowed_false.lua | 4 +- ...lease_resource_on_PTU_with_app_revoked.lua | 3 +- .../024_Allowed_false_no_PTU.lua | 3 +- ...rams_does_not_correspond_to_moduleType.lua | 16 +- .../006_RPC_parameters_values.lua | 10 +- ...se_moduleType_is_an_empty_array_in_LPT.lua | 3 +- ...cle_data_if_read_only_params_requested.lua | 3 +- ...read-only_and_not_read-only_parameters.lua | 3 +- ...ERIC_ERROR_in_case_HMI_did_not_respond.lua | 4 +- ..._RESOURCE_hdRadioEnableAvailable_false.lua | 3 +- ...ESOURCE_hdRadioEnableAvailable_omitted.lua | 3 +- ..._RESOURCE_siriusxmRadioAvailable_false.lua | 3 +- ...ESOURCE_siriusxmRadioAvailable_omitted.lua | 3 +- ..._false_by_app_unregistration_2_modules.lua | 8 +- ...D_subscribe_false_by_app_disallowed_RC.lua | 10 +- ...D_subscribe_false_without_subscribtion.lua | 7 +- ...GetInteriorVD_limitation_time_interval.lua | 3 +- .../common_interiorVDcache.lua | 3 + ...ity_allowed_on_hmi_with_registered_app.lua | 4 +- ..._by_revoking_several_modules_by_policy.lua | 3 +- .../RC/OnRCStatus/commonOnRCStatus.lua | 5 +- ...snt_respond_to_RC_GetCapabilities_SEAT.lua | 3 +- ...snt_respond_to_RC_GetCapabilities_SEAT.lua | 3 +- ...se_moduleType_is_an_empty_array_in_LPT.lua | 3 +- ...ERIC_ERROR_in_case_HMI_did_not_respond.lua | 3 +- test_scripts/RC/commonRC.lua | 78 +-- ...001_DuplicateCorrelationIDs_INVALID_ID.lua | 29 +- .../001_play_pause_v5_allowed.lua | 13 +- .../002_play_pause_v4_invalid_data.lua | 20 +- .../001_register_legacy_app.lua | 19 +- .../002_register_app_on_legacy_module.lua | 19 +- ..._interaction_choice_success_legacy_app.lua | 12 +- ...raction_choice_invalid_data_legacy_app.lua | 10 +- ...perform_interaction_success_legacy_app.lua | 96 ++-- ...etDisplayWithColorsAndNewLayoutSuccess.lua | 19 +- ...orSchemes_setDisplayWithColorsRejected.lua | 17 +- ...chemes_setDisplayWithSameColorsSuccess.lua | 19 +- ...te_interaction_choice_set_invalid_data.lua | 8 +- .../002_perform_interaction_invalid_data.lua | 40 +- .../Security/GetSystemTime/common.lua | 4 +- .../018_V5_happy_path_SUCCESS.lua | 2 +- .../Security/SSLHandshakeFlow/common.lua | 64 +-- ...tGlobalProperties_PositiveCase_SUCCESS.lua | 92 +-- ...tGlobalProperties_PositiveCase_SUCCESS.lua | 130 +++-- .../003_AddCommand_PositiveCase_SUCCESS.lua | 130 ++--- ...004_DeleteCommand_PositiveCase_SUCCESS.lua | 172 +++--- .../005_AddSubMenu_PositiveCase_SUCCESS.lua | 56 +- ...006_DeleteSubMenu_PositiveCase_SUCCESS.lua | 78 +-- .../API/007_Alert_PositiveCase_SUCCESS.lua | 275 ++++----- ...eractionChoiceSet_PositiveCase_SUCCESS.lua | 137 ++--- ...eractionChoiceSet_PositiveCase_SUCCESS.lua | 140 ++--- .../010_DeleteFile_PositiveCase_SUCCESS.lua | 57 +- .../011_ListFiles_PositiveCase_SUCCESS.lua | 70 +-- ...PerfomInteraction_PositiveCase_SUCCESS.lua | 487 ++++++++-------- ...ScrollableMessage_PositiveCase_SUCCESS.lua | 63 ++- ...etMediaClockTimer_PositiveCase_SUCCESS.lua | 48 +- .../API/015_Show_PositiveCase_SUCCESS.lua | 38 +- ...6_ShowConstantTBT_PositiveCase_SUCCESS.lua | 40 +- .../API/017_Slider_PositiveCase_SUCCESS.lua | 46 +- .../018_SendLocation_PositiveCase_SUCCESS.lua | 34 +- .../019_SetAppIcon_PositiveCase_SUCCESS.lua | 32 +- ..._SetDisplayLayout_PositiveCase_SUCCESS.lua | 350 ++++++------ .../API/021_Speak_PositiveCase_SUCCESS.lua | 80 +-- ...2_SubscribeButton_PositiveCase_SUCCESS.lua | 29 +- ...UnsubscribeButton_PositiveCase_SUCCESS.lua | 41 +- ...scribeVehicleData_PositiveCase_SUCCESS.lua | 34 +- ...scribeVehicleData_PositiveCase_SUCCESS.lua | 50 +- ...26_GetVehicleData_PositiveCase_SUCCESS.lua | 34 +- ...27_UpdateTurnList_PositiveCase_SUCCESS.lua | 39 +- ...028_AlertManeuver_PositiveCase_SUCCESS.lua | 59 +- ...DriverDistraction_PositiveCase_SUCCESS.lua | 22 +- .../030_DialNumber_PositiveCase_SUCCESS.lua | 28 +- ...formAudioPassThru_PositiveCase_SUCCESS.lua | 96 ++-- ..._EndAudioPassThru_PositiveCase_SUCCESS.lua | 89 ++- .../API/033_ReadDID_PositiveCase_SUCCESS.lua | 41 +- .../API/034_GetDTCs_PositiveCase_SUCCESS.lua | 28 +- ...hangeRegistration_PositiveCase_SUCCESS.lua | 40 +- ...isterAppInterface_PositiveCase_SUCCESS.lua | 26 +- ...isterAppInterface_PositiveCase_SUCCESS.lua | 142 ++--- ...8_Alert_Non_Media_PositiveCase_SUCCESS.lua | 275 +++++---- ...raction_Non_Media_PositiveCase_SUCCESS.lua | 445 +++++++-------- ...ckTimer_Non_Media_PositiveCase_SUCCESS.lua | 41 +- ...1_Speak_Non_Media_PositiveCase_SUCCESS.lua | 73 +-- ...eButton_Non_Media_PositiveCase_SUCCESS.lua | 38 +- ...eButton_Non_Media_PositiveCase_SUCCESS.lua | 50 +- ...aneuver_Non_Media_PositiveCase_SUCCESS.lua | 46 +- ...assThru_Non_Media_PositiveCase_SUCCESS.lua | 87 ++- ..._NavApp_SubscribeButtonRequest_SUCCESS.lua | 30 +- ...NavApp_SubscribeButtonRequest_REJECTED.lua | 29 +- ...048_GetSystemCapabilityRequest_SUCCESS.lua | 24 +- .../Smoke/API/049_SetMenuLayout_SUCCESS.lua | 52 +- ...050_SetMenuLayout_unsupported_WARNINGS.lua | 56 +- ...051_GetPolicyConfigurationData_SUCCESS.lua | 31 +- ...teriorVehicleData_PositiveCase_SUCCESS.lua | 31 +- ...ehicleDataConsent_PositiveCase_SUCCESS.lua | 26 +- ...VehicleDataModule_PositiveCase_SUCCESS.lua | 35 +- ...teriorVehicleData_PositiveCase_SUCCESS.lua | 29 +- ..._does_not_send_HB_and_does_not_respond.lua | 126 ++--- ...tBeat_App_does_not_send_HB_but_respond.lua | 103 ++-- .../HeartBeat/003_HeartBeat_App_send_HB.lua | 98 ++-- ...004_HeartBeat_no_heartbeat_v2_protocol.lua | 114 ++-- .../Smoke/Policies/001_PTU_all_flows.lua | 245 +++----- .../001_Register_5_connection.lua | 184 +++--- .../Registration/002_Register_5_session.lua | 84 +-- .../Smoke/Registration/003_Register_App.lua | 66 +-- .../Smoke/Registration/004_Reregister_App.lua | 75 +-- .../005_Reregister_App_after_disconnect.lua | 79 +-- ...egister_App_if_two_apps_are_registered.lua | 82 +-- .../001_Resumption_3rd_ignition_cycle.lua | 164 ++---- ...ed_in_more_than_30sec_after_BC.OnReady.lua | 125 ++--- .../003_Resumption_App_Unregister_itself.lua | 118 ++-- .../004_Resumption_BACKGROUND_level.lua | 127 ++--- .../005_Resumption_big_amount_of_data.lua | 225 +++----- ...isconnect_more_than_30s_before_SUSPEND.lua | 136 ++--- .../007_Resumption_FULL_IGNITION_OFF.lua | 124 ++--- .../008_Resumption_heartbeat_disconnect.lua | 138 ++--- .../009_Resumption_LIMITED_IGNITION_OFF.lua | 126 ++--- .../010_Resumption_LIMITED_level.lua | 111 ++-- .../011_Resumption_unexpected_disconnect.lua | 108 ++-- .../ShutDown/001_ShutDown_IGNITION_OFF.lua | 73 +-- .../ShutDown/002_ShutDown_MASTER_RESET.lua | 188 ++----- test_scripts/Smoke/commonSmoke.lua | 522 +++++++++--------- ...osticMessage_TOO_MANY_PENDING_REQUESTS.lua | 1 - .../SDL5_0/rc_AUDIO_LIGHT_HMI_SETTINGS.txt | 1 + test_sets/SDL5_0/rc_CLIMATE_RADIO.txt | 1 + test_sets/SDL5_0/rc_OnRCStatus.txt | 1 + test_sets/SDL5_0/rc_SEAT.txt | 1 + .../rc_interior_vehicle_data_management.txt | 1 + test_sets/gps_shift_support.txt | 1 + test_sets/rpc_message_protection.txt | 1 + test_sets/sdl_passenger_mode.txt | 1 + test_sets/security.txt | 2 + test_sets/service_status_update_to_hmi.txt | 1 + test_sets/smoke_tests.txt | 1 + user_modules/AppTypes.lua | 1 - user_modules/all_common_modules.lua | 1 - user_modules/connecttest_TTS_Isready.lua | 5 +- user_modules/connecttest_VR_Isready.lua | 5 +- user_modules/connecttest_initHMI.lua | 5 +- user_modules/connecttest_resumption.lua | 5 +- user_modules/dummy_connecttest.lua | 9 +- user_modules/sequences/actions.lua | 212 ++++--- user_modules/sequences/security.lua | 12 +- .../shared_testcases/HMICommonSteps.lua | 1 - .../SmartDeviceLinkConfigurations.lua | 16 +- .../shared_testcases/commonFunctions.lua | 24 +- user_modules/shared_testcases/commonSteps.lua | 1 - .../shared_testcases_custom/commonSteps.lua | 1 - user_modules/utils.lua | 15 +- 244 files changed, 4145 insertions(+), 5360 deletions(-) diff --git a/files/OnAppregistered/connecttest.lua b/files/OnAppregistered/connecttest.lua index 29b897d0b9..db88c4cf82 100644 --- a/files/OnAppregistered/connecttest.lua +++ b/files/OnAppregistered/connecttest.lua @@ -8,7 +8,6 @@ local websocket = require('websocket_connection') local hmi_connection = require('hmi_connection') local events = require("events") local expectations = require('expectations') -local config = require('config') local functionId = require('function_id') local Event = events.Event diff --git a/test_scripts/API/ATC_RequestType.lua b/test_scripts/API/ATC_RequestType.lua index a46ab64bcd..e90d128cc9 100644 --- a/test_scripts/API/ATC_RequestType.lua +++ b/test_scripts/API/ATC_RequestType.lua @@ -74,7 +74,6 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" config.SDLStoragePath = config.pathToSDL .."storage/" diff --git a/test_scripts/API/ATF_All_RPCs_and_Notifications.lua b/test_scripts/API/ATF_All_RPCs_and_Notifications.lua index 05db115a64..899a7eb154 100644 --- a/test_scripts/API/ATF_All_RPCs_and_Notifications.lua +++ b/test_scripts/API/ATF_All_RPCs_and_Notifications.lua @@ -98,7 +98,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local RPC_ResponseTimeout = 10000 local iTimeout = 5000 @@ -2902,4 +2901,4 @@ function Test:RemoveConfigurationFiles() end commonPreconditions:RestoreFile("sdl_preloaded_pt.json") -end \ No newline at end of file +end diff --git a/test_scripts/API/ATF_EndAudioPassThru.lua b/test_scripts/API/ATF_EndAudioPassThru.lua index 07c0354502..4df1a70011 100644 --- a/test_scripts/API/ATF_EndAudioPassThru.lua +++ b/test_scripts/API/ATF_EndAudioPassThru.lua @@ -4,7 +4,6 @@ local events = require('events') local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') -local config = require('config') local file_connection = require('file_connection') local module = require('testbase') diff --git a/test_scripts/API/ATF_GenericResponse.lua b/test_scripts/API/ATF_GenericResponse.lua index 088427caa2..e98423d4e6 100644 --- a/test_scripts/API/ATF_GenericResponse.lua +++ b/test_scripts/API/ATF_GenericResponse.lua @@ -11,7 +11,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') --------------------------------------------------------------------------------------------- -----------------------------Required Shared Libraries--------------------------------------- @@ -513,4 +512,4 @@ end return Test - \ No newline at end of file + diff --git a/test_scripts/API/ATF_GetWayPoints.lua b/test_scripts/API/ATF_GetWayPoints.lua index f79e2de194..68ff993cfb 100644 --- a/test_scripts/API/ATF_GetWayPoints.lua +++ b/test_scripts/API/ATF_GetWayPoints.lua @@ -13,7 +13,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local json = require('json') local module = require('testbase') diff --git a/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua b/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua index 0923acf1dd..f8f9bee4cc 100644 --- a/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua +++ b/test_scripts/API/ATF_No_OnButtonSubscription_if_subscription_failed.lua @@ -5,7 +5,6 @@ --local mobile = require('mobile_connection') --local tcp = require('tcp_connection') --local file_connection = require('file_connection') ---local config = require('config') --function Test:ActivationApp() @@ -114,7 +113,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" @@ -511,4 +509,4 @@ end function Test:RemoveConfigurationFiles() commonPreconditions:RestoreFile("hmi_capabilities.json") -end \ No newline at end of file +end diff --git a/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua b/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua index b47a704430..c6b7937a46 100644 --- a/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua +++ b/test_scripts/API/ATF_No_OnButtonSubscription_if_unsubscription_failed.lua @@ -5,7 +5,6 @@ --local mobile = require('mobile_connection') --local tcp = require('tcp_connection') --local file_connection = require('file_connection') ---local config = require('config') --function Test:ActivationApp() @@ -109,7 +108,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local iTimeout = 5000 local buttonName = {"OK","PLAY_PAUSE","SEEKLEFT","SEEKRIGHT","TUNEUP","TUNEDOWN", "PRESET_0","PRESET_1","PRESET_2","PRESET_3","PRESET_4","PRESET_5","PRESET_6","PRESET_7","PRESET_8"} @@ -292,4 +290,4 @@ end function Test:RemoveConfigurationFiles() commonPreconditions:RestoreFile("hmi_capabilities.json") -end \ No newline at end of file +end diff --git a/test_scripts/API/ATF_OnScreenPresetsAvailable.lua b/test_scripts/API/ATF_OnScreenPresetsAvailable.lua index a86d7af1c9..940ecb04a5 100644 --- a/test_scripts/API/ATF_OnScreenPresetsAvailable.lua +++ b/test_scripts/API/ATF_OnScreenPresetsAvailable.lua @@ -16,7 +16,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') require('user_modules/AppTypes') @@ -1053,4 +1052,4 @@ end StopSDL() end --End Test case 03 ---End Test case suite \ No newline at end of file +--End Test case suite diff --git a/test_scripts/API/ATF_OnTouchEvent.lua b/test_scripts/API/ATF_OnTouchEvent.lua index ceff6c5d2a..9d0a21bfde 100644 --- a/test_scripts/API/ATF_OnTouchEvent.lua +++ b/test_scripts/API/ATF_OnTouchEvent.lua @@ -7,7 +7,6 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') --ToDo: Remove below line when heartbeat function work well on protocol 3. config.defaultProtocolVersion = 2 -- to avoid error with heartbeat function diff --git a/test_scripts/API/ATF_PerformInteraction.lua b/test_scripts/API/ATF_PerformInteraction.lua index 0b09618d6d..f6b543e8bb 100644 --- a/test_scripts/API/ATF_PerformInteraction.lua +++ b/test_scripts/API/ATF_PerformInteraction.lua @@ -3,7 +3,6 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') require('user_modules/AppTypes') local SmartDeviceLinkConfigurations = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') @@ -10092,4 +10091,4 @@ SequenceChecksManualTCs() function Test:Postcondition_RestorePreloadedPt() local function RestorePreloadedPt () end -end \ No newline at end of file +end diff --git a/test_scripts/API/ATF_ScrollableMessage.lua b/test_scripts/API/ATF_ScrollableMessage.lua index 8cff8f9647..e5f5114fb8 100644 --- a/test_scripts/API/ATF_ScrollableMessage.lua +++ b/test_scripts/API/ATF_ScrollableMessage.lua @@ -3,7 +3,6 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') local json = require('json4lua/json/json') --------------------------------------------------------------------------------------------- diff --git a/test_scripts/API/ATF_ShowConstantTBT.lua b/test_scripts/API/ATF_ShowConstantTBT.lua index a40a936d05..b93aaa57ab 100644 --- a/test_scripts/API/ATF_ShowConstantTBT.lua +++ b/test_scripts/API/ATF_ShowConstantTBT.lua @@ -6,7 +6,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local json = require('json') local module = require('testbase') diff --git a/test_scripts/API/ATF_StopStream_StopAudioStream.lua b/test_scripts/API/ATF_StopStream_StopAudioStream.lua index f20cf37372..28bf18964a 100644 --- a/test_scripts/API/ATF_StopStream_StopAudioStream.lua +++ b/test_scripts/API/ATF_StopStream_StopAudioStream.lua @@ -2,7 +2,6 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') diff --git a/test_scripts/API/ATF_UTF-8.lua b/test_scripts/API/ATF_UTF-8.lua index 43b7fdf389..6c3e392983 100644 --- a/test_scripts/API/ATF_UTF-8.lua +++ b/test_scripts/API/ATF_UTF-8.lua @@ -6,7 +6,6 @@ require('cardinalities') require('user_modules/AppTypes') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') local commonPreconditions = require ('/user_modules/shared_testcases/commonPreconditions') local commonFunctions = require ('/user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/API/ATF_UnregisterAppInterface_nonMedia.lua b/test_scripts/API/ATF_UnregisterAppInterface_nonMedia.lua index e204b103e2..f1972abce7 100644 --- a/test_scripts/API/ATF_UnregisterAppInterface_nonMedia.lua +++ b/test_scripts/API/ATF_UnregisterAppInterface_nonMedia.lua @@ -34,7 +34,6 @@ Test = require('connecttest') require('cardinalities') local events = require('events') local mobile_session = require('mobile_session') -local config = require('config') config.deviceMAC = "12ca17b49af2289436f303e0166030a21e525d266e209267433801a8fd4071a0" --ToDo: shall be removed when APPLINK-16610 is fixed diff --git a/test_scripts/API/ATF_UnsubscribeButton.lua b/test_scripts/API/ATF_UnsubscribeButton.lua index 3088c837fe..87bcaaa63c 100644 --- a/test_scripts/API/ATF_UnsubscribeButton.lua +++ b/test_scripts/API/ATF_UnsubscribeButton.lua @@ -10,7 +10,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') require('user_modules/AppTypes') diff --git a/test_scripts/API/SDL_Passenger_Mode/commonPassengerMode.lua b/test_scripts/API/SDL_Passenger_Mode/commonPassengerMode.lua index 60bb6694b1..e962fb7382 100644 --- a/test_scripts/API/SDL_Passenger_Mode/commonPassengerMode.lua +++ b/test_scripts/API/SDL_Passenger_Mode/commonPassengerMode.lua @@ -7,17 +7,15 @@ config.checkAllValidations = true --[[ Required Shared libraries ]] local actions = require("user_modules/sequences/actions") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local utils = require("user_modules/utils") local json = require("modules/json") local test = require("user_modules/dummy_connecttest") +local SDL = require("SDL") --[[ Module ]] local c = actions --[[ Variables ]] -local preloadedPT = commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") local wrnMsg c.language = "EN-US" @@ -69,13 +67,13 @@ end local preconditionsOrig = c.preconditions function c.preconditions() preconditionsOrig() - commonPreconditions:BackupFile(preloadedPT) + SDL.PreloadedPT.backup() end local postconditionsOrig = c.postconditions function c.postconditions() postconditionsOrig() - commonPreconditions:RestoreFile(preloadedPT) + SDL.PreloadedPT.restore() end local function setLockScreenWrnMsg(pMessages) @@ -99,15 +97,14 @@ local function setLockScreenWrnMsg(pMessages) end function c.updatePreloadedPT(pLockScreenDismissalEnabled, pUpdateFunc) - local preloadedFile = commonPreconditions:GetPathToSDL() .. preloadedPT - local pt = utils.jsonFileToTable(preloadedFile) + local pt = SDL.PreloadedPT.get() pt.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null pt.policy_table.module_config.lock_screen_dismissal_enabled = pLockScreenDismissalEnabled if pUpdateFunc then pUpdateFunc(pt) end setLockScreenWrnMsg(pt.policy_table.consumer_friendly_messages.messages) - utils.tableToJsonFile(pt, preloadedFile) + SDL.PreloadedPT.set(pt) end local function deactivateAppToLimited() diff --git a/test_scripts/API/ServiceStatusUpdateToHMI/022_Video_service_protected_PTU_FAILED_TimeOut_failed_success_2rd_try_failed_external.lua b/test_scripts/API/ServiceStatusUpdateToHMI/022_Video_service_protected_PTU_FAILED_TimeOut_failed_success_2rd_try_failed_external.lua index 0c41876e24..295a41dca1 100644 --- a/test_scripts/API/ServiceStatusUpdateToHMI/022_Video_service_protected_PTU_FAILED_TimeOut_failed_success_2rd_try_failed_external.lua +++ b/test_scripts/API/ServiceStatusUpdateToHMI/022_Video_service_protected_PTU_FAILED_TimeOut_failed_success_2rd_try_failed_external.lua @@ -61,8 +61,7 @@ function common.serviceResponseFunc(pServiceId) end local function startServiceWithOnServiceUpdate_INVALID_CERT_2nd_try(pServiceId, pHandShakeExpeTimes, pGSTExpTimes) - local ptsFileName = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") .. "/" - .. commonFunctions:read_parameter_from_smart_device_link_ini("PathToSnapshot") + local ptsFileName = common.SDL.PTS.file() local function getPTUFromPTS(pPTS) local pTbl = json.decode(pPTS) if next(pTbl) ~= nil then diff --git a/test_scripts/API/ServiceStatusUpdateToHMI/common.lua b/test_scripts/API/ServiceStatusUpdateToHMI/common.lua index a0ce2f9f1f..39be9f3229 100644 --- a/test_scripts/API/ServiceStatusUpdateToHMI/common.lua +++ b/test_scripts/API/ServiceStatusUpdateToHMI/common.lua @@ -5,7 +5,7 @@ local common = require("test_scripts/Security/SSLHandshakeFlow/common") local utils = require("user_modules/utils") local test = require("user_modules/dummy_connecttest") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") +local SDL = require("SDL") local constants = require("protocol_handler/ford_protocol_constants") local atf_logger = require("atf_logger") @@ -27,6 +27,7 @@ m.const = constants m.pt = utils.printTable m.cprint = utils.cprint m.readFile = utils.readFile +m.SDL = { PTS = SDL.PTS } --[[ Common Functions ]] function m.failTestCase(pReason) @@ -50,7 +51,7 @@ end function m.start() test:runSDL() - commonFunctions:waitForSDLStart(test) + SDL.WaitForSDLStart(test) :Do(function() utils.cprint(35, "SDL started") test:initHMI() diff --git a/test_scripts/API/VehicleData/GpsShiftSupport/005_GetInteriorVehicleData_stationLocation_shift.lua b/test_scripts/API/VehicleData/GpsShiftSupport/005_GetInteriorVehicleData_stationLocation_shift.lua index 8066886f17..3602d045e3 100644 --- a/test_scripts/API/VehicleData/GpsShiftSupport/005_GetInteriorVehicleData_stationLocation_shift.lua +++ b/test_scripts/API/VehicleData/GpsShiftSupport/005_GetInteriorVehicleData_stationLocation_shift.lua @@ -15,7 +15,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift') -local commonRC = require("test_scripts/RC/commonRC") -- [[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,7 +26,7 @@ local function getInteriorVehicleData(pShiftValue) moduleType = "RADIO", subscribe = false }) - EXPECT_HMICALL("RC.GetInteriorVehicleData", { + common.getHMIConnection():ExpectRequest("RC.GetInteriorVehicleData", { moduleType = "RADIO" }) :Do(function(_, data) @@ -50,7 +49,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonRC.preconditions) +runner.Step("Clean environment", common.preconditionsRC) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register App", common.registerAppWOPTU) runner.Step("Activate App", common.activateApp) @@ -61,4 +60,4 @@ for _, v in pairs(common.shiftValue) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonRC.postconditions) +runner.Step("Stop SDL", common.postconditionsRC) diff --git a/test_scripts/API/VehicleData/GpsShiftSupport/006_GetInteriorVehicleData_stationLocation_without_shift.lua b/test_scripts/API/VehicleData/GpsShiftSupport/006_GetInteriorVehicleData_stationLocation_without_shift.lua index 209a7b6fc3..a043a0bd93 100644 --- a/test_scripts/API/VehicleData/GpsShiftSupport/006_GetInteriorVehicleData_stationLocation_without_shift.lua +++ b/test_scripts/API/VehicleData/GpsShiftSupport/006_GetInteriorVehicleData_stationLocation_without_shift.lua @@ -14,14 +14,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift') -local commonRC = require("test_scripts/RC/commonRC") -- [[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonRC.preconditions) +runner.Step("Clean environment", common.preconditionsRC) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register App", common.registerAppWOPTU) runner.Step("Activate App", common.activateApp) @@ -30,4 +29,4 @@ runner.Title("Test") runner.Step("GetInteriorVehicleData RADIO module, without shifted", common.getInteriorVehicleData, { nil }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonRC.postconditions) +runner.Step("Stop SDL", common.postconditionsRC) diff --git a/test_scripts/API/VehicleData/GpsShiftSupport/007_OnInteriorVehicleData_stationLocation_shift.lua b/test_scripts/API/VehicleData/GpsShiftSupport/007_OnInteriorVehicleData_stationLocation_shift.lua index 46b8cf033f..4d4d02bb08 100644 --- a/test_scripts/API/VehicleData/GpsShiftSupport/007_OnInteriorVehicleData_stationLocation_shift.lua +++ b/test_scripts/API/VehicleData/GpsShiftSupport/007_OnInteriorVehicleData_stationLocation_shift.lua @@ -14,7 +14,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift') -local commonRC = require("test_scripts/RC/commonRC") -- [[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -33,7 +32,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonRC.preconditions) +runner.Step("Clean environment", common.preconditionsRC) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register App", common.registerAppWOPTU) runner.Step("Activate App", common.activateApp) @@ -45,4 +44,4 @@ for _, v in pairs(common.shiftValue) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonRC.postconditions) +runner.Step("Stop SDL", common.postconditionsRC) diff --git a/test_scripts/API/VehicleData/GpsShiftSupport/008_OnInteriorVehicleData_stationLocation_without_shift.lua b/test_scripts/API/VehicleData/GpsShiftSupport/008_OnInteriorVehicleData_stationLocation_without_shift.lua index a81b9f7f84..144c0006ab 100644 --- a/test_scripts/API/VehicleData/GpsShiftSupport/008_OnInteriorVehicleData_stationLocation_without_shift.lua +++ b/test_scripts/API/VehicleData/GpsShiftSupport/008_OnInteriorVehicleData_stationLocation_without_shift.lua @@ -13,14 +13,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift') -local commonRC = require("test_scripts/RC/commonRC") -- [[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonRC.preconditions) +runner.Step("Clean environment", common.preconditionsRC) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register App", common.registerAppWOPTU) runner.Step("Activate App", common.activateApp) @@ -30,4 +29,4 @@ runner.Title("Test") runner.Step("OnInteriorVehicleData, RADIO module, without shifted ", common.onInteriorVehicleData, { nil }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonRC.postconditions) +runner.Step("Stop SDL", common.postconditionsRC) diff --git a/test_scripts/API/VehicleData/GpsShiftSupport/009_GetInteriorVehicleData_stationLocation_shift_after_subscription.lua b/test_scripts/API/VehicleData/GpsShiftSupport/009_GetInteriorVehicleData_stationLocation_shift_after_subscription.lua index d5eddc0f65..27c68a4efd 100644 --- a/test_scripts/API/VehicleData/GpsShiftSupport/009_GetInteriorVehicleData_stationLocation_shift_after_subscription.lua +++ b/test_scripts/API/VehicleData/GpsShiftSupport/009_GetInteriorVehicleData_stationLocation_shift_after_subscription.lua @@ -17,7 +17,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift') -local commonRC = require("test_scripts/RC/commonRC") -- [[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local function getInteriorVehicleData(pShiftValue) moduleType = "RADIO", subscribe = true }) - EXPECT_HMICALL("RC.GetInteriorVehicleData", { + common.getHMIConnection():ExpectRequest("RC.GetInteriorVehicleData", { moduleType = "RADIO" }) :Do(function(_, data) @@ -54,7 +53,7 @@ local function getInteriorVehicleDataSubscribed() local cid = common.getMobileSession():SendRPC("GetInteriorVehicleData", { moduleType = "RADIO" }) - EXPECT_HMICALL("RC.GetInteriorVehicleData", { + common.getHMIConnection():ExpectRequest("RC.GetInteriorVehicleData", { moduleType = "RADIO" }) :Times(0) @@ -71,7 +70,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonRC.preconditions) +runner.Step("Clean environment", common.preconditionsRC) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register App", common.registerAppWOPTU) runner.Step("Activate App", common.activateApp) @@ -81,4 +80,4 @@ runner.Step("GetInteriorVehicleData subscription RADIO module, shifted true", ge runner.Step("GetInteriorVehicleData RADIO module subscribed, without shifted", getInteriorVehicleDataSubscribed) runner.Title("Postconditions") -runner.Step("Stop SDL", commonRC.postconditions) +runner.Step("Stop SDL", common.postconditionsRC) diff --git a/test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift.lua b/test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift.lua index 58f27ed00f..72518e15e8 100644 --- a/test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift.lua +++ b/test_scripts/API/VehicleData/GpsShiftSupport/commonGpsShift.lua @@ -12,6 +12,8 @@ local commonRC = require("test_scripts/RC/commonRC") --[[ Variables ]] local m = actions m.cloneTable = utils.cloneTable +m.preconditionsRC = commonRC.preconditions +m.postconditionsRC = commonRC.postconditions m.radioData = commonRC.getModuleControlData("RADIO") m.shiftValue = { true, @@ -55,7 +57,7 @@ end function m.getVehicleData(pShiftValue) m.gpsParams.shifted = pShiftValue local cid = m.getMobileSession():SendRPC("GetVehicleData", { gps = true }) - EXPECT_HMICALL("VehicleInfo.GetVehicleData", { gps = true }) + m.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", { gps = true }) :Do(function(_, data) m.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { gps = m.gpsParams }) end) @@ -71,7 +73,7 @@ function m.subscribeVehicleData() resultCode = "SUCCESS" } local cid = m.getMobileSession():SendRPC("SubscribeVehicleData", { gps = true }) - EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData", { gps = true }) + m.getHMIConnection():ExpectRequest("VehicleInfo.SubscribeVehicleData", { gps = true }) :Do(function(_, data) m.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { gps = gpsResponseData }) end) @@ -94,7 +96,7 @@ function m.getInteriorVehicleData(pShiftValue, pIsSubscribed) moduleType = "RADIO", subscribe = true }) - EXPECT_HMICALL("RC.GetInteriorVehicleData", { + m.getHMIConnection():ExpectRequest("RC.GetInteriorVehicleData", { moduleType = "RADIO", subscribe = true }) diff --git a/test_scripts/AppServices/GetAppServiceData/017_H2M_MediaImage_success.lua b/test_scripts/AppServices/GetAppServiceData/017_H2M_MediaImage_success.lua index 96446079b9..4856c90419 100644 --- a/test_scripts/AppServices/GetAppServiceData/017_H2M_MediaImage_success.lua +++ b/test_scripts/AppServices/GetAppServiceData/017_H2M_MediaImage_success.lua @@ -25,7 +25,7 @@ runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local deviceMAC = utils.getDeviceMAC() -local storagePath = config.pathToSDL .. "/" .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.fullAppID .. "_" .. deviceMAC .. "/") +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.fullAppID .. "_" .. deviceMAC .. "/") local manifest = { diff --git a/test_scripts/AppServices/OnAppServiceData/012_H2M_media_image_success.lua b/test_scripts/AppServices/OnAppServiceData/012_H2M_media_image_success.lua index d118b18c76..46c6ef6bea 100644 --- a/test_scripts/AppServices/OnAppServiceData/012_H2M_media_image_success.lua +++ b/test_scripts/AppServices/OnAppServiceData/012_H2M_media_image_success.lua @@ -24,7 +24,7 @@ runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local deviceMAC = utils.getDeviceMAC() -local storagePath = config.pathToSDL .. "/" .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.fullAppID .. "_" .. deviceMAC .. "/") +local storagePath = config.pathToSDL .. SDLConfig:GetValue("AppStorageFolder") .. "/" .. tostring(config.application1.registerAppInterfaceParams.fullAppID .. "_" .. deviceMAC .. "/") local putFileParams = { diff --git a/test_scripts/Capabilities/ATF_Buttons_GetCapabilities.lua b/test_scripts/Capabilities/ATF_Buttons_GetCapabilities.lua index 69dc6139b7..8114312d3a 100644 --- a/test_scripts/Capabilities/ATF_Buttons_GetCapabilities.lua +++ b/test_scripts/Capabilities/ATF_Buttons_GetCapabilities.lua @@ -5,7 +5,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local module = require('testbase') --------------------------------------------------------------------------------------------- @@ -1486,4 +1485,4 @@ end --End Test case Negative buttonCapabilities.02 -------------------------------------------------------------------------------------------- ---End Test suit buttonCapabilities Negative \ No newline at end of file +--End Test suit buttonCapabilities Negative diff --git a/test_scripts/Capabilities/ATF_Buttons_GetCapabilities_ButtonName.lua b/test_scripts/Capabilities/ATF_Buttons_GetCapabilities_ButtonName.lua index f3efc4ce43..e1e69177a4 100644 --- a/test_scripts/Capabilities/ATF_Buttons_GetCapabilities_ButtonName.lua +++ b/test_scripts/Capabilities/ATF_Buttons_GetCapabilities_ButtonName.lua @@ -5,7 +5,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') local module = require('testbase') --ToDo: shall be removed when APPLINK-16610 is fixed @@ -529,4 +528,4 @@ stopSDL() --The case when SDL does not receive buttons capabilities from HMI or receives just partial values -- -> is covered by the requirement of SDLAQ-CRS-2678: The order of capabilities processing - \ No newline at end of file + diff --git a/test_scripts/Policies/ATF_Preloaded_PT_validation.lua b/test_scripts/Policies/ATF_Preloaded_PT_validation.lua index 762c5a4918..97d162d30e 100644 --- a/test_scripts/Policies/ATF_Preloaded_PT_validation.lua +++ b/test_scripts/Policies/ATF_Preloaded_PT_validation.lua @@ -10,7 +10,6 @@ local mobile_session = require('mobile_session') local tcp = require('tcp_connection') local file_connection = require('file_connection') local mobile = require('mobile_connection') -local config = require('config') local json = require("modules/json") local SDL = require('SDL') --------------------------------------------------------------------------------------------- diff --git a/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua b/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua index 7645639519..69b289d211 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua @@ -17,7 +17,6 @@ --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua b/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua index 09cb6159b2..3556763458 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua @@ -26,7 +26,6 @@ local json = require("modules/json") local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') local mobile_session = require('mobile_session') -local config = require('config') local utils = require ('user_modules/utils') --[[ General Precondition before ATF start ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua b/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua index 4d95dddb7a..c1626bf471 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua @@ -18,7 +18,6 @@ --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua b/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua index fda52356b0..cfdc5206e6 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua @@ -20,7 +20,6 @@ --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua b/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua index fcde61b599..dd1c655fa8 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua @@ -26,7 +26,6 @@ commonSteps:DeletePolicyTable() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') --[[ Local Variables ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua b/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua index 9f8f54970e..8d70da5a3c 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua @@ -20,7 +20,6 @@ local commonSteps = require('user_modules/shared_testcases/commonSteps') --[[ General configuration parameters ]] Test = require('user_modules/dummy_connecttest') -local config = require('config') config.defaultProtocolVersion = 2 require('user_modules/AppTypes') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua b/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua index da1c0a78aa..01a9736d18 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua @@ -27,7 +27,6 @@ --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua b/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua index 4e9b7bbfa3..c9653b1aaa 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua @@ -40,7 +40,6 @@ commonSteps:DeletePolicyTable() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('cardinalities') require('user_modules/AppTypes') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua b/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua index 8d67e6b8dd..dddafca461 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua @@ -28,7 +28,6 @@ --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua b/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua index 1c03110709..016505bf73 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua @@ -27,7 +27,6 @@ --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua b/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua index 0c9b67ff3d..7f1892583f 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua @@ -32,7 +32,6 @@ commonPreconditions:BackupFile(preloaded_pt_file_name) --[[ General Settings for configuration ]] Test = require('connecttest') -local config = require('config') require("user_modules/AppTypes") --[[ Local functions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua b/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua index f78a495551..e24560c654 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua @@ -30,7 +30,6 @@ testCasesForPolicyTable.Delete_Policy_table_snapshot() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua index e5e8049f2a..2e7fa03fd5 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua @@ -216,7 +216,6 @@ prepareInitialPreloadedPT() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') function Test.checkLocalPT(checkTable) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua index 9b02478b9b..049ba09ff9 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua @@ -222,7 +222,6 @@ prepareInitialPreloadedPT() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') function Test.checkLocalPT(checkTable) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua b/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua index 1695f3494a..f46746407b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua @@ -224,7 +224,6 @@ prepareInitialPreloadedPT() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') function Test.checkLocalPT(checkTable) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua index 4e9abb6428..3ae4037cf7 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua @@ -234,7 +234,6 @@ commonPreconditions:Connecttest_without_ExitBySDLDisconnect_WithoutOpenConnectio --[[ General configuration parameters ]] Test = require('user_modules/connecttest_ConnectMobile') -local config = require('config') require('user_modules/AppTypes') local TestData = { diff --git a/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua index 4d64aaf64e..15fccbda51 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua @@ -191,7 +191,6 @@ end --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') function Test.checkLocalPT(checkTable) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua b/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua index 664b310f11..77a6071db1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua @@ -265,7 +265,6 @@ prepareInitialPreloadedPT() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') function Test.checkLocalPT(checkTable) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua b/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua index aa8a657062..f84c1721fe 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua @@ -25,7 +25,6 @@ local utils = require ('user_modules/utils') --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.deviceInfo.hardware = "Nexus" diff --git a/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua b/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua index 1eb01ae608..487cfe3967 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua @@ -223,7 +223,6 @@ prepareInitialPreloadedPT() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') function Test.checkLocalPT(checkTable) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua b/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua index 8d970d67b7..4a769ef8bb 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua @@ -23,7 +23,6 @@ local json = require("modules/json") --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') --[[ Local Variables ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua b/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua index 2e1634b819..0bdcdfb664 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua @@ -29,7 +29,6 @@ local json = require("modules/json") --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua b/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua index 1fc9a7527b..92c9f7bd95 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua @@ -41,7 +41,6 @@ testCasesForPolicyTable.Delete_Policy_table_snapshot() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') --[[ Local Variables ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua b/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua index eca07dea23..7566b0acb1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua @@ -203,7 +203,6 @@ prepareNewPreloadedPT() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua b/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua index 9423b2be6a..76a7ac4a8a 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua @@ -27,7 +27,6 @@ testCasesForPolicyTable.Delete_Policy_table_snapshot() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') require('cardinalities') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua b/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua index fe2b4fadf7..d05dac6083 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua @@ -15,7 +15,6 @@ --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua b/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua index ad215adf34..246f530255 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua @@ -27,7 +27,6 @@ commonSteps:DeleteLogsFileAndPolicyTable() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua b/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua index fb1861c4e9..1de7d4b824 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua @@ -28,7 +28,6 @@ commonSteps:DeleteLogsFileAndPolicyTable() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('cardinalities') require('user_modules/AppTypes') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua b/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua index 8043de9985..9b3f9ae03c 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua @@ -29,7 +29,6 @@ commonSteps:DeleteLogsFileAndPolicyTable() --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 require('cardinalities') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua b/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua index 60f37df602..cef9d9ab0b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua @@ -29,7 +29,6 @@ config.defaultProtocolVersion = 2 --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') require('cardinalities') require('user_modules/AppTypes') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua b/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua index d3cb0e0c84..3bb4f6b6e8 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua @@ -18,7 +18,6 @@ --------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] Test = require('connecttest') -local config = require('config') config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua b/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua index 0b7ed53d67..b77f805616 100644 --- a/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua +++ b/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua @@ -95,19 +95,19 @@ function Test:RAI_PTU() self.applications[config.application1.registerAppInterfaceParams.fullAppID] = d1.params.application.appID EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }, {status = "UP_TO_DATE" }) :Times(3) + end) - local onSystemRequestRecieved = false - self.mobileSession:ExpectNotification("OnSystemRequest") - :Do( - function(_, d2) - if (not onSystemRequestRecieved) and (d2.payload.requestType == "HTTP") then - onSystemRequestRecieved = true - ptu_table = json.decode(d2.binaryData) - ptu(self) - end - end) - :Times(2) + local onSystemRequestRecieved = false + self.mobileSession:ExpectNotification("OnSystemRequest") + :Do( + function(_, d2) + if (not onSystemRequestRecieved) and (d2.payload.requestType == "HTTP") then + onSystemRequestRecieved = true + ptu_table = json.decode(d2.binaryData) + ptu(self) + end end) + :Times(2) self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) :Do( function() diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua index b1c2f9cc90..d78d840304 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua @@ -16,7 +16,6 @@ --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local json = require('modules/json') local common = require("test_scripts/RC/commonRC") --[[ Test Configuration ]] @@ -25,7 +24,7 @@ runner.testSettings.isSelfIncluded = false local function PTUfunc(tbl) local appId = config.application1.registerAppInterfaceParams.fullAppID tbl.policy_table.app_policies[appId] = common.getRCAppConfig() - tbl.policy_table.app_policies[appId].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[appId].moduleType = common.json.EMPTY_ARRAY end --[[ Scenario ]] diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/017_Success_audio_source_values.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/017_Success_audio_source_values.lua index 1dcd91b912..098f7d58f4 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/017_Success_audio_source_values.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/017_Success_audio_source_values.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require("test_scripts/RC/commonRC") -local utils = require("user_modules/utils") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -44,7 +43,7 @@ local function subscribeToModule(pAudioSources) end return true end) - utils.wait(500) + common.wait(500) end --[[ Scenario ]] diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetSystemCapability/003_UNSUPPORTED_RESOURCE_in_case_RC_interface_is_unavailable.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetSystemCapability/003_UNSUPPORTED_RESOURCE_in_case_RC_interface_is_unavailable.lua index 21c9239096..36b068ab6d 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetSystemCapability/003_UNSUPPORTED_RESOURCE_in_case_RC_interface_is_unavailable.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetSystemCapability/003_UNSUPPORTED_RESOURCE_in_case_RC_interface_is_unavailable.lua @@ -17,7 +17,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require("test_scripts/RC/commonRC") -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,7 +26,7 @@ config.checkAllValidations = true --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = common.getDefaultHMITable() params.RC.IsReady.params.available = false -- RC interface is unavailable params.RC.GetCapabilities.params = { } params.RC.GetCapabilities.occurrence = 0 diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua index c99da448a9..0c32671f24 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua @@ -16,7 +16,6 @@ --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local json = require('modules/json') local common = require("test_scripts/RC/commonRC") --[[ Test Configuration ]] @@ -29,7 +28,7 @@ local modules = { "CLIMATE", "AUDIO", "LIGHT", "HMI_SETTINGS" } --[[ Local Functions ]] local function PTUfunc(tbl) tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID] = common.getRCAppConfig() - tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = common.json.EMPTY_ARRAY end --[[ Scenario ]] diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/019_Light_more_values_READ_ONLY_in_case_statusAvailable_false.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/019_Light_more_values_READ_ONLY_in_case_statusAvailable_false.lua index acb61ece78..ddf959e20e 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/019_Light_more_values_READ_ONLY_in_case_statusAvailable_false.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/019_Light_more_values_READ_ONLY_in_case_statusAvailable_false.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require("test_scripts/RC/commonRC") -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -28,7 +27,7 @@ local Module = "LIGHT" local function setStatusAvailableFalse() local lightParams = common.getModuleControlData(Module) local lightName = lightParams.lightControlData.lightState[1].id - local hmiValues = hmi_values.getDefaultHMITable() + local hmiValues = common.getDefaultHMITable() for _, value in pairs (hmiValues.RC.GetCapabilities.params.remoteControlCapability.lightControlCapabilities.supportedLights) do if value.name == lightName then value.statusAvailable = false diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/020_Light_more_values_UNSUPPORTED_RESOURCE_in_case_statusAvailable_omitted.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/020_Light_more_values_UNSUPPORTED_RESOURCE_in_case_statusAvailable_omitted.lua index 413eeeb765..7d09580f62 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/020_Light_more_values_UNSUPPORTED_RESOURCE_in_case_statusAvailable_omitted.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/020_Light_more_values_UNSUPPORTED_RESOURCE_in_case_statusAvailable_omitted.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require("test_scripts/RC/commonRC") -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -28,7 +27,7 @@ local Module = "LIGHT" local function removeLightValueFromCapabilities() local lightParams = common.getModuleControlData(Module) local lightName = lightParams.lightControlData.lightState[1].id - local hmiValues = hmi_values.getDefaultHMITable() + local hmiValues = common.getDefaultHMITable() for key, value in pairs (hmiValues.RC.GetCapabilities.params.remoteControlCapability.lightControlCapabilities.supportedLights) do if value.name == lightName then hmiValues.RC.GetCapabilities.params.remoteControlCapability.lightControlCapabilities.supportedLights[key].statusAvailable = nil diff --git a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/022_Light_more_values_UNSUPPORTED_RESOURCE_in_case_light_name_omitted.lua b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/022_Light_more_values_UNSUPPORTED_RESOURCE_in_case_light_name_omitted.lua index 32ce37b637..736c12029e 100644 --- a/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/022_Light_more_values_UNSUPPORTED_RESOURCE_in_case_light_name_omitted.lua +++ b/test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/SetInteriorVehicleData/022_Light_more_values_UNSUPPORTED_RESOURCE_in_case_light_name_omitted.lua @@ -17,7 +17,6 @@ local runner = require('user_modules/script_runner') local common = require("test_scripts/RC/commonRC") -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local Module = "LIGHT" local function removeLightValueFromCapabilities() local lightParams = common.getModuleControlData(Module) local lightName = lightParams.lightControlData.lightState[1].id - local hmiValues = hmi_values.getDefaultHMITable() + local hmiValues = common.getDefaultHMITable() for key, value in pairs (hmiValues.RC.GetCapabilities.params.remoteControlCapability.lightControlCapabilities.supportedLights) do if value.name == lightName then table.remove(hmiValues.RC.GetCapabilities.params.remoteControlCapability.lightControlCapabilities.supportedLights, diff --git a/test_scripts/RC/CLIMATE_RADIO/ButtonPress/007_button_press_allowed_if_moduleType_is_empty.lua b/test_scripts/RC/CLIMATE_RADIO/ButtonPress/007_button_press_allowed_if_moduleType_is_empty.lua index 6945ae8b0d..c410b55f1e 100644 --- a/test_scripts/RC/CLIMATE_RADIO/ButtonPress/007_button_press_allowed_if_moduleType_is_empty.lua +++ b/test_scripts/RC/CLIMATE_RADIO/ButtonPress/007_button_press_allowed_if_moduleType_is_empty.lua @@ -17,14 +17,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local json = require('modules/json') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function PTUfunc(tbl) - tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = commonRC.json.EMPTY_ARRAY end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/ButtonPress/010_generic_error_if_no_response_from_hmi.lua b/test_scripts/RC/CLIMATE_RADIO/ButtonPress/010_generic_error_if_no_response_from_hmi.lua index 42747b0d0b..9e684e525a 100644 --- a/test_scripts/RC/CLIMATE_RADIO/ButtonPress/010_generic_error_if_no_response_from_hmi.lua +++ b/test_scripts/RC/CLIMATE_RADIO/ButtonPress/010_generic_error_if_no_response_from_hmi.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -40,8 +39,7 @@ local function getDataForModule(pModuleType) end) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR"}) - - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/004_Resend_only_supported_parameter_and_reject_others.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/004_Resend_only_supported_parameter_and_reject_others.lua index 1bc40c5d2b..08793b3b02 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/004_Resend_only_supported_parameter_and_reject_others.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/004_Resend_only_supported_parameter_and_reject_others.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local common_functions = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -45,7 +44,7 @@ local function setVehicleData(pParams) local cid = commonRC.getMobileSession():SendRPC("SetInteriorVehicleData", {moduleData = pParams}) if pParams.climateControlData.fanSpeed then - EXPECT_HMICALL("RC.SetInteriorVehicleData", { + EXPECT_HMICALL("RC.SetInteriorVehicleData", { appID = commonRC.getHMIAppId(1), moduleData = pParams}) :Do(function(_, data) @@ -56,7 +55,7 @@ local function setVehicleData(pParams) else EXPECT_HMICALL("RC.SetInteriorVehicleData"):Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "UNSUPPORTED_RESOURCE" }) - common_functions:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end end diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/005_Resend_only_supported_parameters.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/005_Resend_only_supported_parameters.lua index 25ddfcc71f..7d0d142767 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/005_Resend_only_supported_parameters.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/005_Resend_only_supported_parameters.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local common_functions = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -50,11 +49,11 @@ local absent_params = { --[[ Local Functions ]] local function setVehicleData(params) - local cid = commonRC.getMobileSession():SendRPC("SetInteriorVehicleData", {moduleData = params}) + local cid = commonRC.getMobileSession():SendRPC("SetInteriorVehicleData", {moduleData = params}) if params.radioControlData.frequencyInteger then - EXPECT_HMICALL("RC.SetInteriorVehicleData", { - appID = commonRC.getHMIAppId(1), + EXPECT_HMICALL("RC.SetInteriorVehicleData", { + appID = commonRC.getHMIAppId(1), moduleData = params}) :Do(function(_, data) commonRC.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { @@ -64,7 +63,7 @@ local function setVehicleData(params) else EXPECT_HMICALL("RC.SetInteriorVehicleData"):Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "UNSUPPORTED_RESOURCE" }) - common_functions.DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end end diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/007_Reject_GIVD_SIVD_BP_if_HMI_respond_to_RC_IsReady_with_false.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/007_Reject_GIVD_SIVD_BP_if_HMI_respond_to_RC_IsReady_with_false.lua index 9aa2be83d8..c31accff14 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/007_Reject_GIVD_SIVD_BP_if_HMI_respond_to_RC_IsReady_with_false.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/007_Reject_GIVD_SIVD_BP_if_HMI_respond_to_RC_IsReady_with_false.lua @@ -17,14 +17,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady.params.available = false params.RC.GetCapabilities.params = { } params.RC.GetCapabilities.occurrence = 0 diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/008_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/008_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua index f899485bd7..5ba8738ec1 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/008_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/008_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local enabledModule = "RADIO" --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady = nil params.RC.GetCapabilities = nil return params diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/009_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/009_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua index 8cea3b4dc6..4e9ef58eae 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/009_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/009_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local enabledModule = "CLIMATE" --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady = nil params.RC.GetCapabilities = nil return params diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/010_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/010_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua index 67c763343a..1b14085b59 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/010_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/010_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_RADIO.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local enabledModule = "RADIO" --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady.params.available = true params.RC.GetCapabilities = nil return params diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/011_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/011_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua index c237454554..4b25754cd9 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/011_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/011_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_CLIMATE.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local enabledModule = "CLIMATE" --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady.params.available = true params.RC.GetCapabilities = nil return params diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/012_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_RADIO.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/012_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_RADIO.lua index 210dffd846..214b7bd8c7 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/012_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_RADIO.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/012_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_RADIO.lua @@ -52,12 +52,17 @@ local function getHMIParams() return hmiCaps end +local function start() + commonRC.start(getHMIParams()) + :Timeout(20000) +end + --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Backup HMI capabilities file", commonRC.backupHMICapabilities) runner.Step("Update HMI capabilities file", commonRC.updateDefaultCapabilities, { { enabledModule }, true }) runner.Step("Clean environment", commonRC.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start, { getHMIParams() }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", start) runner.Step("RAI", commonRC.registerAppWOPTU) runner.Step("Activate App", commonRC.activateApp) diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/013_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_CLIMATE.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/013_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_CLIMATE.lua index a4512998e4..8a873f647b 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/013_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_CLIMATE.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/013_Sent_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_responds_to_RC_GetCapabilities_CLIMATE.lua @@ -52,12 +52,17 @@ local function getHMIParams() return hmiCaps end +local function start() + commonRC.start(getHMIParams()) + :Timeout(20000) +end + --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Backup HMI capabilities file", commonRC.backupHMICapabilities) runner.Step("Update HMI capabilities file", commonRC.updateDefaultCapabilities, { { enabledModule }, true }) runner.Step("Clean environment", commonRC.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start, { getHMIParams() }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", start) runner.Step("RAI", commonRC.registerAppWOPTU) runner.Step("Activate App", commonRC.activateApp) diff --git a/test_scripts/RC/CLIMATE_RADIO/Capabilities/014_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities.lua b/test_scripts/RC/CLIMATE_RADIO/Capabilities/014_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities.lua index 31555d1ab7..b660c3f492 100644 --- a/test_scripts/RC/CLIMATE_RADIO/Capabilities/014_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities.lua +++ b/test_scripts/RC/CLIMATE_RADIO/Capabilities/014_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities.lua @@ -14,10 +14,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') -local utils = require("user_modules/utils") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,21 +23,18 @@ local defaultHMIcapabilitiesRC --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() - params.RC.IsReady.params.available = true - params.RC.GetCapabilities = nil - return params + local hmiCaps = commonRC.buildHmiRcCapabilities({}) + hmiCaps.RC.IsReady.params.available = true + hmiCaps.RC.GetCapabilities = nil + return hmiCaps end local function updateDefaultHMIcapabilities() - local hmiCapabilitiesFile = commonPreconditions:GetPathToSDL() - .. commonFunctions:read_parameter_from_smart_device_link_ini("HMICapabilities") - local defaultHMIcapabilities = utils.jsonFileToTable(hmiCapabilitiesFile) + local defaultHMIcapabilities = commonRC.HMICap.get() defaultHMIcapabilitiesRC = defaultHMIcapabilities.UI.systemCapabilities.remoteControlCapability defaultHMIcapabilitiesRC.climateControlCapabilities[1].climateEnableAvailable = false defaultHMIcapabilitiesRC.radioControlCapabilities[1].availableHdChannelsAvailable = false - utils.tableToJsonFile(defaultHMIcapabilities, hmiCapabilitiesFile) - + commonRC.HMICap.set(defaultHMIcapabilities) end local function rpcSuccess() @@ -61,8 +54,8 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Backup HMI capabilities file", commonRC.backupHMICapabilities) -runner.Step("Clean environment", commonRC.preconditions) runner.Step("Update default hmi capabilities", updateDefaultHMIcapabilities) +runner.Step("Clean environment", commonRC.preconditions) runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start, { getHMIParams() }) runner.Step("RAI", commonRC.registerAppWOPTU) runner.Step("Activate App", commonRC.activateApp) diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/006_RPC_parameters_values.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/006_RPC_parameters_values.lua index 999ea56a04..3d67dc329f 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/006_RPC_parameters_values.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/006_RPC_parameters_values.lua @@ -19,7 +19,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -35,8 +34,7 @@ local function invalidParamName(pModuleType) :Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function invalidParamType(pModuleType) @@ -49,8 +47,7 @@ local function invalidParamType(pModuleType) :Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function missingMandatoryParam() @@ -63,8 +60,7 @@ local function missingMandatoryParam() :Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function fakeParam(pModuleType) diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/007_GENERIC_ERROR_in_case_HMI_did_not_respond.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/007_GENERIC_ERROR_in_case_HMI_did_not_respond.lua index 85c4f25f40..c97587f551 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/007_GENERIC_ERROR_in_case_HMI_did_not_respond.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/007_GENERIC_ERROR_in_case_HMI_did_not_respond.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -37,8 +36,7 @@ local function getDataForModule(pModuleType) end) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR"}) - - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua index a5431322e5..a6030e18bc 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleData/009_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua @@ -17,14 +17,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local json = require('modules/json') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function PTUfunc(tbl) - tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = commonRC.json.EMPTY_ARRAY end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/005_TIMED_OUT_from_HMI_SIVD.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/005_TIMED_OUT_from_HMI_SIVD.lua index fe82b4fc91..d5be4b7ef1 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/005_TIMED_OUT_from_HMI_SIVD.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/005_TIMED_OUT_from_HMI_SIVD.lua @@ -24,7 +24,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -41,7 +40,7 @@ local function rpcTimedOutHMIResponse(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT", info = info }) - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/006_TIMED_OUT_from_HMI_BP.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/006_TIMED_OUT_from_HMI_BP.lua index 15d824bae3..8a0b436599 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/006_TIMED_OUT_from_HMI_BP.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/006_TIMED_OUT_from_HMI_BP.lua @@ -24,7 +24,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -41,7 +40,7 @@ local function rpcTimedOutHMIResponse(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT", info = info }) - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/007_HMI_no_response_SIVD.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/007_HMI_no_response_SIVD.lua index 8103413821..417940cfc3 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/007_HMI_no_response_SIVD.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/007_HMI_no_response_SIVD.lua @@ -22,7 +22,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -38,7 +37,7 @@ local function rpcNoHMIResponse(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/008_HMI_no_response_BP.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/008_HMI_no_response_BP.lua index 7d996cefb2..3a5088f5ee 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/008_HMI_no_response_BP.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/008_HMI_no_response_BP.lua @@ -22,7 +22,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -38,7 +37,7 @@ local function rpcNoHMIResponse(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/009_HMI_invalid_response_SIVD.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/009_HMI_invalid_response_SIVD.lua index bb62073931..180b69b34f 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/009_HMI_invalid_response_SIVD.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/009_HMI_invalid_response_SIVD.lua @@ -22,7 +22,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -40,7 +39,7 @@ local function rpcInvalidHMIResponse(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/010_HMI_invalid_response_BP.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/010_HMI_invalid_response_BP.lua index 6e251d517a..9a51fedaa0 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/010_HMI_invalid_response_BP.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/010_HMI_invalid_response_BP.lua @@ -22,7 +22,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -40,7 +39,7 @@ local function rpcInvalidHMIResponse(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/011_TIMED_OUT_after_default_timeout.lua b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/011_TIMED_OUT_after_default_timeout.lua index 78b76438ab..cedd22388c 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/011_TIMED_OUT_after_default_timeout.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetInteriorVehicleDataConsent/011_TIMED_OUT_after_default_timeout.lua @@ -21,7 +21,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -44,7 +43,7 @@ local function rpcHMIRespondAfterDefaultTimeout() end) commonRC.getMobileSession(2):ExpectResponse(cid1, { success = false, resultCode = "GENERIC_ERROR" }) - commonTestCases:DelayedExp(12000) + commonRC.wait(12000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/GetSystemCapability/001_Success_flow.lua b/test_scripts/RC/CLIMATE_RADIO/GetSystemCapability/001_Success_flow.lua index b2f0119703..9b01fca30a 100644 --- a/test_scripts/RC/CLIMATE_RADIO/GetSystemCapability/001_Success_flow.lua +++ b/test_scripts/RC/CLIMATE_RADIO/GetSystemCapability/001_Success_flow.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,7 +26,7 @@ for _, v in pairs(commonRC.modules) do capabParams[v] = commonRC.DEFAULT end -- --[[ Local Functions ]] local function buildHmiRcCapabilities(pCapabilities) - local hmiParams = hmi_values.getDefaultHMITable() + local hmiParams = commonRC.getDefaultHMITable() hmiParams.RC.IsReady.params.available = true local capParams = hmiParams.RC.GetCapabilities.params.remoteControlCapability for k, v in pairs(commonRC.capMap) do diff --git a/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/007_Absence_of_OnIVD_in_case_of_subscribing_with_no_response_from_HMI.lua b/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/007_Absence_of_OnIVD_in_case_of_subscribing_with_no_response_from_HMI.lua index 0e39b69808..5a41fb5f56 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/007_Absence_of_OnIVD_in_case_of_subscribing_with_no_response_from_HMI.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/007_Absence_of_OnIVD_in_case_of_subscribing_with_no_response_from_HMI.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -39,8 +38,7 @@ local function subscriptionToModule(pModuleType) end) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) - - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/016_RPC_parameters_values.lua b/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/016_RPC_parameters_values.lua index 7d5f48386c..1c396d55b2 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/016_RPC_parameters_values.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnInteriorVehicleData/016_RPC_parameters_values.lua @@ -20,7 +20,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -33,8 +32,7 @@ local function invalidParamName(pModuleType) commonRC.getMobileSession():ExpectNotification("OnInteriorVehicleData") :Times(0) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function invalidParamType(pModuleType) @@ -47,8 +45,7 @@ local function invalidParamType(pModuleType) commonRC.getMobileSession():ExpectNotification("OnInteriorVehicleData") :Times(0) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function missingMandatoryParam(pModuleType) @@ -61,8 +58,7 @@ local function missingMandatoryParam(pModuleType) commonRC.getMobileSession():ExpectNotification("OnInteriorVehicleData") :Times(0) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/008_Allowed_false.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/008_Allowed_false.lua index be48cef37a..6feb3b0c4c 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/008_Allowed_false.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/008_Allowed_false.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -52,8 +51,7 @@ local function disableRcFromHmi() mobileSession1:ExpectNotification("OnHMIStatus"):Times(0) mobileSession2:ExpectNotification("OnHMIStatus"):Times(0) mobileSession3:ExpectNotification("OnHMIStatus"):Times(0) -- NAVIGATION app - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua index 0429e924d4..e259ce50bb 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua @@ -16,14 +16,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local json = require("modules/json") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function PTUfunc(tbl) - tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID] = json.null + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID] = commonRC.json.null tbl.policy_table.app_policies[config.application2.registerAppInterfaceParams.fullAppID] = commonRC.getRCAppConfig() end diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/024_Allowed_false_no_PTU.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/024_Allowed_false_no_PTU.lua index f87585e865..3ca33247a4 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/024_Allowed_false_no_PTU.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/024_Allowed_false_no_PTU.lua @@ -17,7 +17,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -40,7 +39,7 @@ local function disableRCFromHMI() EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered") :Times(0) - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/005_INVALID_DATA_in_case_params_does_not_correspond_to_moduleType.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/005_INVALID_DATA_in_case_params_does_not_correspond_to_moduleType.lua index 62c97b71d1..dc98841171 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/005_INVALID_DATA_in_case_params_does_not_correspond_to_moduleType.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/005_INVALID_DATA_in_case_params_does_not_correspond_to_moduleType.lua @@ -19,7 +19,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -36,16 +35,15 @@ local function setVehicleData(pModuleType) local moduleData = commonRC.getSettableModuleControlData(moduleType2) moduleData.moduleType = pModuleType - local cid = commonRC.getMobileSession():SendRPC("SetInteriorVehicleData", { - moduleData = moduleData - }) + local cid = commonRC.getMobileSession():SendRPC("SetInteriorVehicleData", { + moduleData = moduleData + }) - EXPECT_HMICALL("RC.SetInteriorVehicleData") - :Times(0) + EXPECT_HMICALL("RC.SetInteriorVehicleData") + :Times(0) - commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA" }) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA" }) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/006_RPC_parameters_values.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/006_RPC_parameters_values.lua index 15c5c64698..1dfddb850f 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/006_RPC_parameters_values.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/006_RPC_parameters_values.lua @@ -19,7 +19,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -34,8 +33,7 @@ local function invalidParamName(pModuleType) :Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function invalidParamType(pModuleType) @@ -50,8 +48,7 @@ local function invalidParamType(pModuleType) :Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function missingMandatoryParam(pModuleType) @@ -66,8 +63,7 @@ local function missingMandatoryParam(pModuleType) :Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) - - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end local function fakeParam(pModuleType) diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/007_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/007_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua index 2bb0c0248b..66cc1e6fb3 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/007_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/007_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua @@ -17,14 +17,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local json = require('modules/json') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function PTUfunc(tbl) - tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = commonRC.json.EMPTY_ARRAY end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/010_Read_only_response_for_set_interior_vehicle_data_if_read_only_params_requested.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/010_Read_only_response_for_set_interior_vehicle_data_if_read_only_params_requested.lua index 9ce54bf2a7..32b2e3a549 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/010_Read_only_response_for_set_interior_vehicle_data_if_read_only_params_requested.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/010_Read_only_response_for_set_interior_vehicle_data_if_read_only_params_requested.lua @@ -17,7 +17,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -33,7 +32,7 @@ local function setVehicleData(module_data) EXPECT_HMICALL("RC.SetInteriorVehicleData"):Times(0) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "READ_ONLY" }) - commonTestCases:DelayedExp(commonRC.timeout) + commonRC.wait(commonRC.timeout) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/011_Cut-off_read-only_parameters_in_case_request_with_read-only_and_not_read-only_parameters.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/011_Cut-off_read-only_parameters_in_case_request_with_read-only_and_not_read-only_parameters.lua index d304cd9a5e..bc1a7c0f7b 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/011_Cut-off_read-only_parameters_in_case_request_with_read-only_and_not_read-only_parameters.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/011_Cut-off_read-only_parameters_in_case_request_with_read-only_and_not_read-only_parameters.lua @@ -17,7 +17,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -29,7 +28,7 @@ local function isModuleDataCorrect(pModuleType, actualModuleData) for param_actual, _ in pairs(commonRC.getModuleParams(actualModuleData)) do if param_readonly == param_actual then isFalse = true - commonFunctions:userPrint(36, "Unexpected read-only parameter: " .. param_readonly) + commonRC.cprint(36, "Unexpected read-only parameter: " .. param_readonly) end end end diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/013_GENERIC_ERROR_in_case_HMI_did_not_respond.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/013_GENERIC_ERROR_in_case_HMI_did_not_respond.lua index 1214163e59..9bb1e3e9c8 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/013_GENERIC_ERROR_in_case_HMI_did_not_respond.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/013_GENERIC_ERROR_in_case_HMI_did_not_respond.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -36,8 +35,7 @@ local function setVehicleData(pModuleType) end) commonRC.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR"}) - - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/016_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_false.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/016_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_false.lua index 6f706b8049..f89e73189f 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/016_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_false.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/016_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_false.lua @@ -16,14 +16,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local Module = "RADIO" -local hmiValues = hmi_values.getDefaultHMITable() +local hmiValues = commonRC.getDefaultHMITable() hmiValues.RC.GetCapabilities.params.remoteControlCapability.radioControlCapabilities[1].hdRadioEnableAvailable = false --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/017_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_omitted.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/017_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_omitted.lua index f4481ddd10..40ea281b86 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/017_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_omitted.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/017_UNSUPPORTED_RESOURCE_hdRadioEnableAvailable_omitted.lua @@ -16,14 +16,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local Module = "RADIO" -local hmiValues = hmi_values.getDefaultHMITable() +local hmiValues = commonRC.getDefaultHMITable() hmiValues.RC.GetCapabilities.params.remoteControlCapability.radioControlCapabilities[1].hdRadioEnableAvailable = nil --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/019_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_false.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/019_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_false.lua index fa9a847276..672740c0cc 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/019_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_false.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/019_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_false.lua @@ -16,14 +16,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local Module = "RADIO" -local hmiValues = hmi_values.getDefaultHMITable() +local hmiValues = commonRC.getDefaultHMITable() hmiValues.RC.GetCapabilities.params.remoteControlCapability.radioControlCapabilities[1].siriusxmRadioAvailable = false --[[ Local Functions ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/020_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_omitted.lua b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/020_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_omitted.lua index f738d6a4d5..6da8e51444 100644 --- a/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/020_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_omitted.lua +++ b/test_scripts/RC/CLIMATE_RADIO/SetInteriorVehicleData/020_UNSUPPORTED_RESOURCE_siriusxmRadioAvailable_omitted.lua @@ -16,14 +16,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require("user_modules/hmi_values") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local Module = "RADIO" -local hmiValues = hmi_values.getDefaultHMITable() +local hmiValues = commonRC.getDefaultHMITable() hmiValues.RC.GetCapabilities.params.remoteControlCapability.radioControlCapabilities[1].siriusxmRadioAvailable = nil --[[ Local Functions ]] diff --git a/test_scripts/RC/InteriorVehicleData_cache/033_GetInteriorVD_subscribe_false_by_app_unregistration_2_modules.lua b/test_scripts/RC/InteriorVehicleData_cache/033_GetInteriorVD_subscribe_false_by_app_unregistration_2_modules.lua index 78066f3a48..eb1d6dc7b1 100644 --- a/test_scripts/RC/InteriorVehicleData_cache/033_GetInteriorVD_subscribe_false_by_app_unregistration_2_modules.lua +++ b/test_scripts/RC/InteriorVehicleData_cache/033_GetInteriorVD_subscribe_false_by_app_unregistration_2_modules.lua @@ -17,8 +17,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache') -local commonRC = require('test_scripts/RC/commonRC') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -26,7 +24,7 @@ runner.testSettings.isSelfIncluded = false -- [[ Local Function ]] local function unregistrationApp() local rpc = "GetInteriorVehicleData" - EXPECT_HMICALL(commonRC.getHMIEventName(rpc)) + EXPECT_HMICALL(common.getHMIEventName(rpc)) :Do(function(_, data) if data.params.moduleType == "CLIMATE" then common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", @@ -43,7 +41,7 @@ local function unregistrationApp() else ExpectedResult = common.getHMIRequestParams(rpc, "RADIO", 1, false) end - if false == commonFunctions:is_table_equal(data.params, ExpectedResult) then + if false == common.isTableEqual(data.params, ExpectedResult) then return false, "Parameters in RC.GetInteriorVehicleData are not match to expected result.\n" .. "Actual result:" .. common.tableToString(data.params) .. "\n" .. "Expected result:" ..common.tableToString(ExpectedResult) .."\n" @@ -52,7 +50,7 @@ local function unregistrationApp() end) :Times(2) local mobSession = common.getMobileSession(1) - local hmiAppId = commonRC.getHMIAppId(1) + local hmiAppId = common.getHMIAppId(1) local cid = mobSession:SendRPC("UnregisterAppInterface",{}) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { appID = hmiAppId, unexpectedDisconnect = false }) mobSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) diff --git a/test_scripts/RC/InteriorVehicleData_cache/035_GetInteriorVD_subscribe_false_by_app_disallowed_RC.lua b/test_scripts/RC/InteriorVehicleData_cache/035_GetInteriorVD_subscribe_false_by_app_disallowed_RC.lua index ea2ace7cd6..21190f6aef 100644 --- a/test_scripts/RC/InteriorVehicleData_cache/035_GetInteriorVD_subscribe_false_by_app_disallowed_RC.lua +++ b/test_scripts/RC/InteriorVehicleData_cache/035_GetInteriorVD_subscribe_false_by_app_disallowed_RC.lua @@ -16,10 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache') -local commonRC = require('test_scripts/RC/commonRC') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local test = require("user_modules/dummy_connecttest") - --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,21 +23,21 @@ runner.testSettings.isSelfIncluded = false -- [[ Local Functions ]] local function dissalowRCFunctionality() local rpc = "GetInteriorVehicleData" - EXPECT_HMICALL(commonRC.getHMIEventName(rpc)) + EXPECT_HMICALL(common.getHMIEventName(rpc)) :Do(function(_, data) common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", common.getHMIResponseParams(rpc, common.modules[1], false)) end) :ValidIf(function(_, data) local ExpectedResult = common.getHMIRequestParams(rpc, common.modules[1], 1, false) - if false == commonFunctions:is_table_equal(data.params, ExpectedResult) then + if false == common.isTableEqual(data.params, ExpectedResult) then return false, "Parameters in RC.GetInteriorVehicleData are not match to expected result.\n" .. "Actual result:" .. common.tableToString(data.params) .. "\n" .. "Expected result:" ..common.tableToString(ExpectedResult) .."\n" end return true end) - commonRC.defineRAMode(false, nil, test) + common.defineRAMode(false, nil) end --[[ Scenario ]] diff --git a/test_scripts/RC/InteriorVehicleData_cache/037_GetInteriorVD_subscribe_false_without_subscribtion.lua b/test_scripts/RC/InteriorVehicleData_cache/037_GetInteriorVD_subscribe_false_without_subscribtion.lua index f79d55256f..574c61a803 100644 --- a/test_scripts/RC/InteriorVehicleData_cache/037_GetInteriorVD_subscribe_false_without_subscribtion.lua +++ b/test_scripts/RC/InteriorVehicleData_cache/037_GetInteriorVD_subscribe_false_without_subscribtion.lua @@ -20,7 +20,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache') -local commonRC = require('test_scripts/RC/commonRC') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -30,11 +29,11 @@ local function GetInteriorVehicleData(pModuleType, isSubscribe) local rpc = "GetInteriorVehicleData" local subscribe = isSubscribe local mobSession = common.getMobileSession(1) - local cid = mobSession:SendRPC(commonRC.getAppEventName(rpc), - commonRC.getAppRequestParams(rpc, pModuleType, subscribe)) + local cid = mobSession:SendRPC(common.getAppEventName(rpc), + common.getAppRequestParams(rpc, pModuleType, subscribe)) local hmiRequestParams = common.getHMIRequestParams(rpc, pModuleType, 1, subscribe) hmiRequestParams.subscribe = nil - EXPECT_HMICALL(commonRC.getHMIEventName(rpc), hmiRequestParams) + EXPECT_HMICALL(common.getHMIEventName(rpc), hmiRequestParams) :Do(function(_, data) local hmiResponseParams = common.getHMIResponseParams(rpc, pModuleType, subscribe) hmiResponseParams.subscribe = nil diff --git a/test_scripts/RC/InteriorVehicleData_cache/039_GetInteriorVD_limitation_time_interval.lua b/test_scripts/RC/InteriorVehicleData_cache/039_GetInteriorVD_limitation_time_interval.lua index a4156b4bb4..09ecde4ef8 100644 --- a/test_scripts/RC/InteriorVehicleData_cache/039_GetInteriorVD_limitation_time_interval.lua +++ b/test_scripts/RC/InteriorVehicleData_cache/039_GetInteriorVD_limitation_time_interval.lua @@ -18,7 +18,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache') -local functionId = require('function_id') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -76,7 +75,7 @@ local function GetInteriorVehicleDataRejectedSuccess(pModuleType, pCompareReques mobSession:ExpectAny() :ValidIf(function(_, data) - if data.rpcFunctionId == functionId[rpc] then + if data.rpcFunctionId == common.functionId[rpc] then if data.payload.resultCode == "SUCCESS" then local timeToRequest = { [1] = timestampArray[4] - timestampArray[1], diff --git a/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua b/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua index eb959002f9..c46c6e52b8 100644 --- a/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua +++ b/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua @@ -5,15 +5,18 @@ local actions = require("user_modules/sequences/actions") local commonRC = require('test_scripts/RC/commonRC') local utils = require("user_modules/utils") +local functionId = require('function_id') --[[ Module ]] commonRC.tableToString = utils.tableToString +commonRC.isTableEqual = utils.isTableEqual commonRC.wait = utils.wait config.application1.registerAppInterfaceParams.isMediaApplication = true config.application2.registerAppInterfaceParams.isMediaApplication = false commonRC.modules = { "RADIO", "CLIMATE", "SEAT", "AUDIO", "LIGHT", "HMI_SETTINGS" } +commonRC.functionId = functionId function commonRC.GetInteriorVehicleData(pModuleType, isSubscribe, isHMIreqExpect, pAppId) if not pAppId then pAppId = 1 end diff --git a/test_scripts/RC/OnRCStatus/023_notification_by_rc_functionality_allowed_on_hmi_with_registered_app.lua b/test_scripts/RC/OnRCStatus/023_notification_by_rc_functionality_allowed_on_hmi_with_registered_app.lua index 435d73d155..1cf610c724 100644 --- a/test_scripts/RC/OnRCStatus/023_notification_by_rc_functionality_allowed_on_hmi_with_registered_app.lua +++ b/test_scripts/RC/OnRCStatus/023_notification_by_rc_functionality_allowed_on_hmi_with_registered_app.lua @@ -19,8 +19,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/RC/OnRCStatus/commonOnRCStatus') -local commonRC = require('test_scripts/RC/commonRC') -local test = require("user_modules/dummy_connecttest") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -40,7 +38,7 @@ local function registerRCAppRCDisallowed() allowed = false } - commonRC.registerAppWOPTU(1, test) + common.registerAppWOPTU(1) common.validateOnRCStatusForApp(1, pModuleStatusForApp, false) EXPECT_HMINOTIFICATION("RC.OnRCStatus") :Times(0) diff --git a/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua b/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua index 45c0c37297..e93a668f95 100644 --- a/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua +++ b/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local common = require('test_scripts/RC/OnRCStatus/commonOnRCStatus') -local json = require('modules/json') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -28,7 +27,7 @@ config.application2.registerAppInterfaceParams.appHMIType = { "DEFAULT" } local function pTUfunc(tbl) local appId1 = config.application1.registerAppInterfaceParams.fullAppID tbl.policy_table.app_policies[appId1] = common.getRCAppConfig(tbl) - tbl.policy_table.app_policies[appId1].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[appId1].moduleType = common.json.EMPTY_ARRAY local appId2 = config.application2.registerAppInterfaceParams.fullAppID tbl.policy_table.app_policies[appId2] = common.getRCAppConfig(tbl) end diff --git a/test_scripts/RC/OnRCStatus/commonOnRCStatus.lua b/test_scripts/RC/OnRCStatus/commonOnRCStatus.lua index 2ac1f45709..e5182cd652 100644 --- a/test_scripts/RC/OnRCStatus/commonOnRCStatus.lua +++ b/test_scripts/RC/OnRCStatus/commonOnRCStatus.lua @@ -3,7 +3,6 @@ --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local commonRC = require('test_scripts/RC/commonRC') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local utils = require("user_modules/utils") local rc = require('user_modules/sequences/remote_control') @@ -61,11 +60,11 @@ function commonRC.disableRCFromHMI(pAppId) end function commonRC.getModules() - return commonFunctions:cloneTable({ "RADIO", "CLIMATE" }) + return { "RADIO", "CLIMATE" } end function commonRC.getAllModules() - return commonFunctions:cloneTable({ "RADIO", "CLIMATE", "SEAT", "AUDIO", "LIGHT", "HMI_SETTINGS" }) + return { "RADIO", "CLIMATE", "SEAT", "AUDIO", "LIGHT", "HMI_SETTINGS" } end function commonRC.getHMIAppIdsRC() diff --git a/test_scripts/RC/SEAT/Capabilities/005_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua b/test_scripts/RC/SEAT/Capabilities/005_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua index eaa1e28a13..a2753b52b7 100644 --- a/test_scripts/RC/SEAT/Capabilities/005_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua +++ b/test_scripts/RC/SEAT/Capabilities/005_Default_capabilities_if_HMI_doesnt_respond_to_RC_IsReady_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,7 +26,7 @@ local enabledModule = "SEAT" --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady = nil params.RC.GetCapabilities = nil return params diff --git a/test_scripts/RC/SEAT/Capabilities/006_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua b/test_scripts/RC/SEAT/Capabilities/006_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua index 7fdd448673..f55774c3a4 100644 --- a/test_scripts/RC/SEAT/Capabilities/006_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua +++ b/test_scripts/RC/SEAT/Capabilities/006_Default_capabilities_if_HMI_responds_to_RC_IsReady_with_true_and_doesnt_respond_to_RC_GetCapabilities_SEAT.lua @@ -16,7 +16,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local hmi_values = require('user_modules/hmi_values') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -27,7 +26,7 @@ local enabledModule = "SEAT" --[[ Local Functions ]] local function getHMIParams() - local params = hmi_values.getDefaultHMITable() + local params = commonRC.getDefaultHMITable() params.RC.IsReady.params.available = true params.RC.GetCapabilities = nil return params diff --git a/test_scripts/RC/SEAT/GetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua b/test_scripts/RC/SEAT/GetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua index 8320449e0f..c9c2e28e08 100644 --- a/test_scripts/RC/SEAT/GetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua +++ b/test_scripts/RC/SEAT/GetInteriorVehicleData/006_Success_flow_in_case_moduleType_is_an_empty_array_in_LPT.lua @@ -14,7 +14,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local json = require('modules/json') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -45,7 +44,7 @@ local function getDataForModule(pModuleType) end local function PTUfunc(tbl) - tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = json.EMPTY_ARRAY + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].moduleType = commonRC.json.EMPTY_ARRAY end --[[ Scenario ]] diff --git a/test_scripts/RC/SEAT/SetInteriorVehicleData/006_GENERIC_ERROR_in_case_HMI_did_not_respond.lua b/test_scripts/RC/SEAT/SetInteriorVehicleData/006_GENERIC_ERROR_in_case_HMI_did_not_respond.lua index bb7d661c39..aa75ec33d9 100644 --- a/test_scripts/RC/SEAT/SetInteriorVehicleData/006_GENERIC_ERROR_in_case_HMI_did_not_respond.lua +++ b/test_scripts/RC/SEAT/SetInteriorVehicleData/006_GENERIC_ERROR_in_case_HMI_did_not_respond.lua @@ -14,7 +14,6 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -35,7 +34,7 @@ local function setVehicleData(pModuleType) end) mobileSession:ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR"}) - commonTestCases:DelayedExp(11000) + commonRC.wait(11000) end --[[ Scenario ]] diff --git a/test_scripts/RC/commonRC.lua b/test_scripts/RC/commonRC.lua index 2405440a4b..9a7ffe5d0c 100644 --- a/test_scripts/RC/commonRC.lua +++ b/test_scripts/RC/commonRC.lua @@ -2,7 +2,6 @@ -- RC common module --------------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] -config.mobileHost = "127.0.0.1" config.defaultProtocolVersion = 2 config.ValidateSchema = false config.checkAllValidations = true @@ -11,14 +10,12 @@ config.application2.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" } --[[ Required Shared libraries ]] local test = require("user_modules/dummy_connecttest") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local json = require("modules/json") local hmi_values = require("user_modules/hmi_values") local utils = require('user_modules/utils') local actions = require("user_modules/sequences/actions") local apiLoader = require("modules/api_loader") +local SDL = require('modules/SDL') --[[ Common Variables ]] @@ -41,6 +38,10 @@ commonRC.wait = actions.run.wait commonRC.isTableEqual = utils.isTableEqual commonRC.getPreloadedPT = actions.sdl.getPreloadedPT commonRC.getDefaultHMITable = hmi_values.getDefaultHMITable +commonRC.cprint = utils.cprint +commonRC.start = actions.start +commonRC.json = json +commonRC.HMICap = SDL.HMICap commonRC.modules = { "RADIO", "CLIMATE" } commonRC.allModules = { "RADIO", "CLIMATE", "SEAT", "AUDIO", "LIGHT", "HMI_SETTINGS" } @@ -135,36 +136,9 @@ local function allowSDL() actions.run.wait(500) -- stabilization delay end -function commonRC.start(pHMIParams) - test:runSDL() - commonFunctions:waitForSDLStart(test) - :Do(function() - test:initHMI(test) - :Do(function() - commonFunctions:userPrint(35, "HMI initialized") - test:initHMI_onReady(pHMIParams) - :Do(function() - commonFunctions:userPrint(35, "HMI is ready") - test:connectMobile() - :Do(function() - commonFunctions:userPrint(35, "Mobile connected") - allowSDL() - end) - end) - end) - end) -end - -local function backupPreloadedPT() - local preloadedFile = commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") - commonPreconditions:BackupFile(preloadedFile) -end - local function updatePreloadedPT(pCountOfRCApps) if not pCountOfRCApps then pCountOfRCApps = 2 end - local preloadedFile = commonPreconditions:GetPathToSDL() - .. commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") - local preloadedTable = commonRC.jsonFileToTable(preloadedFile) + local preloadedTable = SDL.PreloadedPT.get() preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null preloadedTable.policy_table.functional_groupings["RemoteControl"].rpcs.OnRCStatus = { hmi_levels = { "FULL", "BACKGROUND", "LIMITED", "NONE" } @@ -174,26 +148,21 @@ local function updatePreloadedPT(pCountOfRCApps) preloadedTable.policy_table.app_policies[appId] = commonRC.getRCAppConfig(preloadedTable) preloadedTable.policy_table.app_policies[appId].AppHMIType = nil end - commonRC.tableToJsonFile(preloadedTable, preloadedFile) + SDL.PreloadedPT.set(preloadedTable) end function commonRC.preconditions(isPreloadedUpdate, pCountOfRCApps) if isPreloadedUpdate == nil then isPreloadedUpdate = true end actions.preconditions() if isPreloadedUpdate == true then - backupPreloadedPT() + SDL.PreloadedPT.backup() updatePreloadedPT(pCountOfRCApps) end end -local function restorePreloadedPT() - local preloadedFile = commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") - commonPreconditions:RestoreFile(preloadedFile) -end - function commonRC.postconditions() actions.postconditions() - restorePreloadedPT() + SDL.PreloadedPT.restore() end function commonRC.unregisterApp(pAppId) @@ -829,13 +798,13 @@ function commonRC.isUnsubscribed(pModuleType, pAppId) commonRC.getHMIConnection():SendNotification(commonRC.getHMIEventName(rpc), commonRC.getHMIResponseParams(rpc, pModuleType)) commonRC.setActualInteriorVD(pModuleType, commonRC.getHMIResponseParams(rpc, pModuleType).moduleData) mobSession:ExpectNotification(commonRC.getAppEventName(rpc), {}):Times(0) - commonTestCases:DelayedExp(commonRC.timeout) + utils.wait(commonRC.timeout) end function commonRC.defineRAMode(pAllowed, pAccessMode) local rpc = "OnRemoteControlSettings" commonRC.getHMIConnection():SendNotification(commonRC.getHMIEventName(rpc), commonRC.getHMIResponseParams(rpc, pAllowed, pAccessMode)) - commonTestCases:DelayedExp(commonRC.minTimeout) -- workaround due to issue with SDL -> redundant OnHMIStatus notification is sent + utils.wait(commonRC.minTimeout) -- workaround due to issue with SDL -> redundant OnHMIStatus notification is sent end function commonRC.rpcDenied(pModuleType, pAppId, pRPC, pResultCode) @@ -843,7 +812,7 @@ function commonRC.rpcDenied(pModuleType, pAppId, pRPC, pResultCode) local cid = mobSession:SendRPC(commonRC.getAppEventName(pRPC), commonRC.getAppRequestParams(pRPC, pModuleType)) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC), {}):Times(0) mobSession:ExpectResponse(cid, { success = false, resultCode = pResultCode }) - commonTestCases:DelayedExp(commonRC.timeout) + utils.wait(commonRC.timeout) end function commonRC.rpcDeniedWithCustomParams(pParams, pAppId, pRPC, pResultCode) @@ -851,7 +820,7 @@ function commonRC.rpcDeniedWithCustomParams(pParams, pAppId, pRPC, pResultCode) local cid = mobSession:SendRPC(commonRC.getAppEventName(pRPC), pParams) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC), {}):Times(0) mobSession:ExpectResponse(cid, { success = false, resultCode = pResultCode }) - commonTestCases:DelayedExp(commonRC.timeout) + utils.wait(commonRC.timeout) end function commonRC.rpcAllowed(pModuleType, pAppId, pRPC) @@ -892,7 +861,7 @@ function commonRC.rpcRejectWithConsent(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) end) mobSession:ExpectResponse(cid, { success = false, resultCode = "REJECTED", info = info }) - commonTestCases:DelayedExp(commonRC.timeout) + utils.wait(commonRC.timeout) end function commonRC.rpcRejectWithoutConsent(pModuleType, pAppId, pRPC) @@ -901,7 +870,7 @@ function commonRC.rpcRejectWithoutConsent(pModuleType, pAppId, pRPC) EXPECT_HMICALL(commonRC.getHMIEventName("GetInteriorVehicleDataConsent")):Times(0) EXPECT_HMICALL(commonRC.getHMIEventName(pRPC)):Times(0) mobSession:ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) - commonTestCases:DelayedExp(commonRC.timeout) + utils.wait(commonRC.timeout) end function commonRC.rpcButtonPress(pParams, pAppId) @@ -918,6 +887,8 @@ function commonRC.buildButtonCapability(name, shortPressAvailable, longPressAvai return hmi_values.createButtonCapability(name, shortPressAvailable, longPressAvailable, upDownAvailable) end +commonRC.getDefaultHMITable = hmi_values.getDefaultHMITable + function commonRC.buildHmiRcCapabilities(pCapabilities) local hmiParams = hmi_values.getDefaultHMITable() hmiParams.RC.IsReady.params.available = true @@ -935,13 +906,11 @@ function commonRC.buildHmiRcCapabilities(pCapabilities) end function commonRC.backupHMICapabilities() - local hmiCapabilitiesFile = commonFunctions:read_parameter_from_smart_device_link_ini("HMICapabilities") - commonPreconditions:BackupFile(hmiCapabilitiesFile) + SDL.HMICap.backup() end function commonRC.restoreHMICapabilities() - local hmiCapabilitiesFile = commonFunctions:read_parameter_from_smart_device_link_ini("HMICapabilities") - commonPreconditions:RestoreFile(hmiCapabilitiesFile) + SDL.HMICap.restore() end function commonRC.getButtonIdByName(pArray, pButtonName) @@ -997,9 +966,7 @@ local function updateModuleId(pRcCapTbl) end function commonRC.updateDefaultCapabilities(pDisabledModuleTypes, pIsHmiCapCorrect) - local hmiCapabilitiesFile = commonPreconditions:GetPathToSDL() - .. commonFunctions:read_parameter_from_smart_device_link_ini("HMICapabilities") - local hmiCapTbl = commonRC.jsonFileToTable(hmiCapabilitiesFile) + local hmiCapTbl = SDL.HMICap.get() local rcCapTbl = hmiCapTbl.UI.systemCapabilities.remoteControlCapability if not pIsHmiCapCorrect then updateModuleId(rcCapTbl) @@ -1010,8 +977,7 @@ function commonRC.updateDefaultCapabilities(pDisabledModuleTypes, pIsHmiCapCorre table.remove(rcCapTbl.buttonCapabilities, buttonId) rcCapTbl[string.lower(pDisabledModuleType) .. "ControlCapabilities"] = nil end - commonRC.tableToJsonFile(hmiCapTbl.UI.systemCapabilities.remoteControlCapability, "actualState001.json") - commonRC.tableToJsonFile(hmiCapTbl, hmiCapabilitiesFile) + SDL.HMICap.set(hmiCapTbl) end commonRC.getHMIAppIds = actions.getHMIAppIds @@ -1049,7 +1015,7 @@ function commonRC.setActualInteriorVD(pModuleType, pParams) commonRC.actualInteriorDataStateOnHMI[pModuleType][moduleParams][key] = value end else - if false == commonFunctions:is_table_equal(value, commonRC.actualInteriorDataStateOnHMI[pModuleType][moduleParams][key]) then + if false == utils.isTableEqual(value, commonRC.actualInteriorDataStateOnHMI[pModuleType][moduleParams][key]) then commonRC.actualInteriorDataStateOnHMI[pModuleType][moduleParams][key] = value end end diff --git a/test_scripts/SDL5_0/DuplicateCorrIDs/001_DuplicateCorrelationIDs_INVALID_ID.lua b/test_scripts/SDL5_0/DuplicateCorrIDs/001_DuplicateCorrelationIDs_INVALID_ID.lua index 24ca4ecbbb..c41182ae89 100644 --- a/test_scripts/SDL5_0/DuplicateCorrIDs/001_DuplicateCorrelationIDs_INVALID_ID.lua +++ b/test_scripts/SDL5_0/DuplicateCorrIDs/001_DuplicateCorrelationIDs_INVALID_ID.lua @@ -2,7 +2,7 @@ -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0147-template-color-scheme.md -- -- Description: --- SDL Core should track the number of attempted SetDisplayLayout requests with the current template and REJECT +-- SDL Core should track the number of attempted SetDisplayLayout requests with the current template and REJECT -- any beyond the first with the reason "Using SetDisplayLayout to change the color scheme may only be done once. -- However, The color scheme can be changed if the layout is also changed. -- @@ -10,7 +10,7 @@ -- -- Steps: Send additional SetDisplayLayout with a different layout and a different color scheme. -- --- Expected result: +-- Expected result: -- SDL Core returns SUCCESS --------------------------------------------------------------------------------------------------- @@ -20,15 +20,18 @@ local commonSmoke = require('test_scripts/Smoke/commonSmoke') local functionId = require('function_id') local json = require('json') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + local hmiRequestData = {} local cid = 0 -local requestParams = { +local requestParams = { menuID = 100, menuName = "Menu1" } -local requestParams2 = { +local requestParams2 = { menuID = 101, menuName = "Menu2" } @@ -40,15 +43,15 @@ local hmiResponseParams = { } } -local function addSubMenuWithoutResponse(self) - cid = self.mobileSession1:SendRPC("AddSubMenu", requestParams) +local function addSubMenuWithoutResponse() + cid = commonSmoke.getMobileSession():SendRPC("AddSubMenu", requestParams) EXPECT_HMICALL("UI.AddSubMenu", hmiResponseParams) :Do(function(_, data) hmiRequestData = data end) end -local function addSubMenuWithDuplicateCorrelationIDInvalidID(self) +local function addSubMenuWithDuplicateCorrelationIDInvalidID() local msg = { serviceType = 7, frameInfo = 0, @@ -57,16 +60,16 @@ local function addSubMenuWithDuplicateCorrelationIDInvalidID(self) rpcCorrelationId = cid, payload = json.encode(requestParams2) } - self.mobileSession1:Send(msg) - self.mobileSession1:ExpectResponse(cid, { + commonSmoke.getMobileSession():Send(msg) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_ID" }) end -local function addSubMenuRespondToOriginal(self) - self.hmiConnection:SendResponse(hmiRequestData.id, hmiRequestData.method, "SUCCESS", {}) - self.mobileSession1:ExpectResponse(cid, { +local function addSubMenuRespondToOriginal() + commonSmoke.getHMIConnection():SendResponse(hmiRequestData.id, hmiRequestData.method, "SUCCESS", {}) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) @@ -85,4 +88,4 @@ runner.Step("Send AddSubMenu with Duplicate Correlation ID", addSubMenuWithDupli runner.Step("Send AddSubMenu response to original message", addSubMenuRespondToOriginal) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) \ No newline at end of file +runner.Step("Stop SDL", commonSmoke.postconditions) diff --git a/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/001_play_pause_v5_allowed.lua b/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/001_play_pause_v5_allowed.lua index 75ea47c74b..f300233353 100644 --- a/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/001_play_pause_v5_allowed.lua +++ b/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/001_play_pause_v5_allowed.lua @@ -30,7 +30,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') - +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion = { majorVersion = 5, minorVersion = 0 @@ -56,12 +57,12 @@ local buttonName = { } --[[ Local Functions ]] -local function subscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) +local function subscribeButton(pButName) + local cid = commonSmoke.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) local appIDvalue = commonSmoke.getHMIAppId() EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + commonSmoke.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] @@ -77,4 +78,4 @@ for _, v in pairs(buttonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) \ No newline at end of file +runner.Step("Stop SDL", commonSmoke.postconditions) diff --git a/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/002_play_pause_v4_invalid_data.lua b/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/002_play_pause_v4_invalid_data.lua index 1ad2e8b0c4..88fcbe4236 100644 --- a/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/002_play_pause_v4_invalid_data.lua +++ b/test_scripts/SDL5_0/MobileVersioning/PlayPauseButton/002_play_pause_v4_invalid_data.lua @@ -30,6 +30,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion = { majorVersion = 4, minorVersion = 5, @@ -37,20 +39,20 @@ config.application1.registerAppInterfaceParams.syncMsgVersion = { } --[[ Local Functions ]] -local function subscribeButtonSuccess(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) +local function subscribeButtonSuccess(pButName) + local cid = commonSmoke.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) local appIDvalue = commonSmoke.getHMIAppId() EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = "PLAY_PAUSE", isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + commonSmoke.getMobileSession():ExpectNotification("OnHashChange") end -local function subscribeButtonInvalidData(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) +local function subscribeButtonInvalidData(pButName) + local cid = commonSmoke.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") :Times(0) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA" }) - self.mobileSession1:ExpectNotification("OnHashChange") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA" }) + commonSmoke.getMobileSession():ExpectNotification("OnHashChange") :Times(0) end @@ -68,4 +70,4 @@ runner.Step("SubscribeButton " .. "OK" .. " Positive Case", subscribeButtonSucce runner.Step("SubscribeButton " .. "PLAY_PAUSE" .. " Invalid Data Case", subscribeButtonInvalidData, { "PLAY_PAUSE" }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) \ No newline at end of file +runner.Step("Stop SDL", commonSmoke.postconditions) diff --git a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua index 4ed1308253..680daca63a 100644 --- a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua +++ b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua @@ -30,6 +30,9 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + --[[ Local Variables ]] local requestParams = { syncMsgVersion = { @@ -86,25 +89,25 @@ local function GetNotificationParams() end --[[ Local Functions ]] -local function UnregisterAppInterface(self) - local cid = self.mobileSession1:SendRPC("UnregisterAppInterface", { }) +local function UnregisterAppInterface() + local cid = commonSmoke.getMobileSession():SendRPC("UnregisterAppInterface", { }) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { appID = commonSmoke.getHMIAppId(), unexpectedDisconnect = false }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end -local function RegisterAppInterface(self) - local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", requestParams) +local function RegisterAppInterface() + local CorIdRAI = commonSmoke.getMobileSession():SendRPC("RegisterAppInterface", requestParams) local notificationParams = GetNotificationParams() EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", notificationParams) - self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS", syncMsgVersion = { + commonSmoke.getMobileSession():ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS", syncMsgVersion = { majorVersion = 4, minorVersion = 5, patchVersion = 1 }}) - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) - self.mobileSession1:ExpectNotification("OnPermissionsChange") + commonSmoke.getMobileSession():ExpectNotification("OnPermissionsChange") end --[[ Scenario ]] diff --git a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua index 3628536f40..d5c634b4f9 100644 --- a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua +++ b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua @@ -32,6 +32,9 @@ local commonSmoke = require('test_scripts/Smoke/commonSmoke') local load_schema = require('load_schema') local mob_api_version = load_schema.mob_api_version +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + --[[ Local Variables ]] local requestParams = { syncMsgVersion = { @@ -90,21 +93,21 @@ local function GetNotificationParams() end --[[ Local Functions ]] -local function UnregisterAppInterface(self) - local cid = self.mobileSession1:SendRPC("UnregisterAppInterface", { }) +local function UnregisterAppInterface() + local cid = commonSmoke.getMobileSession():SendRPC("UnregisterAppInterface", { }) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { appID = commonSmoke.getHMIAppId(), unexpectedDisconnect = false }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end -local function RegisterAppInterface(self) - local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", requestParams) +local function RegisterAppInterface() + local CorIdRAI = commonSmoke.getMobileSession():SendRPC("RegisterAppInterface", requestParams) local notificationParams = GetNotificationParams() EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", notificationParams) - self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS", syncMsgVersion = responseSyncMsgVersion}) - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS", syncMsgVersion = responseSyncMsgVersion}) + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) - self.mobileSession1:ExpectNotification("OnPermissionsChange") + commonSmoke.getMobileSession():ExpectNotification("OnPermissionsChange") end --[[ Scenario ]] diff --git a/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/001_create_interaction_choice_success_legacy_app.lua b/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/001_create_interaction_choice_success_legacy_app.lua index d78d906ce6..70d31424c0 100644 --- a/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/001_create_interaction_choice_success_legacy_app.lua +++ b/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/001_create_interaction_choice_success_legacy_app.lua @@ -35,6 +35,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 3 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 @@ -79,13 +81,13 @@ local allParams = { --[[ Local Functions ]] -local function createInteractionChoiceSet(params, self) - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params.requestParams) +local function createInteractionChoiceSet(params) + local cid = commonSmoke.getMobileSession():SendRPC("CreateInteractionChoiceSet", params.requestParams) params.responseVrParams.appID = commonSmoke.getHMIAppId() EXPECT_HMICALL("VR.AddCommand", params.responseVrParams) :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) :ValidIf(function(_,data) if data.params.grammarID ~= nil then @@ -95,8 +97,8 @@ local function createInteractionChoiceSet(params, self) end end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + commonSmoke.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] diff --git a/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/002_create_interaction_choice_invalid_data_legacy_app.lua b/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/002_create_interaction_choice_invalid_data_legacy_app.lua index 6f78c02424..81682dfd43 100644 --- a/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/002_create_interaction_choice_invalid_data_legacy_app.lua +++ b/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/002_create_interaction_choice_invalid_data_legacy_app.lua @@ -8,7 +8,7 @@ -- -- Description: -- Mobile application sends valid CreateInteractionChoiceSet request with --- no vrCommands, which is a mandatory parameter for legacy apps. +-- no vrCommands, which is a mandatory parameter for legacy apps. -- Pre-conditions: -- a. HMI and SDL are started @@ -27,6 +27,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 3 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 @@ -56,9 +58,9 @@ local requestParams_noVR = { } --[[ Local Functions ]] -local function createInteractionChoiceSet_noVR(params, self) - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) +local function createInteractionChoiceSet_noVR(params) + local cid = commonSmoke.getMobileSession():SendRPC("CreateInteractionChoiceSet", params) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) end --[[ Scenario ]] diff --git a/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/003_perform_interaction_success_legacy_app.lua b/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/003_perform_interaction_success_legacy_app.lua index 52f5159f26..e97987eefc 100644 --- a/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/003_perform_interaction_success_legacy_app.lua +++ b/test_scripts/SDL5_0/MobileVersioning/vrCommandOptional/003_perform_interaction_success_legacy_app.lua @@ -34,6 +34,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 3 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 @@ -122,8 +124,8 @@ end --! self - test object, --! ctx - systemContext value --! @return: none -local function SendOnSystemContext(self, ctx) - self.hmiConnection:SendNotification("UI.OnSystemContext", +local function SendOnSystemContext(ctx) + commonSmoke.getHMIConnection():SendNotification("UI.OnSystemContext", { appID = commonSmoke.getHMIAppId(), systemContext = ctx }) end @@ -152,9 +154,9 @@ end --! self - test object, --! request - interaction mode, --! @return: none -local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) +local function ExpectOnHMIStatusWithAudioStateChanged_PI(request) if "BOTH" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION" }, { hmiLevel = "FULL", audioStreamingState = "ATTENUATED", systemContext = "VRSESSION" }, @@ -163,7 +165,7 @@ local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) :Times(6) elseif "VR" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, @@ -171,7 +173,7 @@ local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Times(5) elseif "MANUAL" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, @@ -185,9 +187,9 @@ end --! choiceSetID - id for choice set --! self - test object --! @return: none -local function CreateInteractionChoiceSet(choiceSetID, self) +local function CreateInteractionChoiceSet(choiceSetID) local choiceID = choiceSetID - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { + local cid = commonSmoke.getMobileSession():SendRPC("CreateInteractionChoiceSet", { interactionChoiceSetID = choiceSetID, choiceSet = setChoiceSet(choiceID), }) @@ -197,9 +199,9 @@ local function CreateInteractionChoiceSet(choiceSetID, self) vrCommands = { "VrChoice" .. tostring(choiceID) } }) :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + commonSmoke.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) end --! @PI_PerformViaVR_ONLY: Processing PI with interaction mode VR_ONLY with performing selection @@ -207,9 +209,9 @@ end --! paramsSend - parameters for PI request --! self - test object --! @return: none -local function PI_PerformViaVR_ONLY(paramsSend, self) +local function PI_PerformViaVR_ONLY(paramsSend) paramsSend.interactionMode = "VR_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) + local cid = commonSmoke.getMobileSession():SendRPC("PerformInteraction",paramsSend) EXPECT_HMICALL("VR.PerformInteraction", { helpPrompt = paramsSend.helpPrompt, initialPrompt = paramsSend.initialPrompt, @@ -218,14 +220,14 @@ local function PI_PerformViaVR_ONLY(paramsSend, self) }) :Do(function(_,data) local function vrResponse() - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendNotification("VR.Started") - SendOnSystemContext(self, "VRSESSION") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", + commonSmoke.getHMIConnection():SendNotification("TTS.Started") + commonSmoke.getHMIConnection():SendNotification("VR.Started") + SendOnSystemContext("VRSESSION") + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("VR.Stopped") - SendOnSystemContext(self, "MAIN") + commonSmoke.getHMIConnection():SendNotification("TTS.Stopped") + commonSmoke.getHMIConnection():SendNotification("VR.Stopped") + SendOnSystemContext("MAIN") end RUN_AFTER(vrResponse, 1000) end) @@ -236,10 +238,10 @@ local function PI_PerformViaVR_ONLY(paramsSend, self) vrHelpTitle = paramsSend.initialText, }) :Do(function(_,data) - self.hmiConnection:SendResponse( data.id, data.method, "SUCCESS", { } ) + commonSmoke.getHMIConnection():SendResponse( data.id, data.method, "SUCCESS", { } ) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") - self.mobileSession1:ExpectResponse(cid, + ExpectOnHMIStatusWithAudioStateChanged_PI("VR") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", choiceID = paramsSend.interactionChoiceSetIDList[1] }) end @@ -248,9 +250,9 @@ end --! paramsSend - parameters for PI request --! self - test object --! @return: none -local function PI_PerformViaMANUAL_ONLY(paramsSend, self) +local function PI_PerformViaMANUAL_ONLY(paramsSend) paramsSend.interactionMode = "MANUAL_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction", paramsSend) + local cid = commonSmoke.getMobileSession():SendRPC("PerformInteraction", paramsSend) EXPECT_HMICALL("VR.PerformInteraction", { helpPrompt = paramsSend.helpPrompt, initialPrompt = paramsSend.initialPrompt, @@ -258,8 +260,8 @@ local function PI_PerformViaMANUAL_ONLY(paramsSend, self) timeoutPrompt = paramsSend.timeoutPrompt }) :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + commonSmoke.getHMIConnection():SendNotification("TTS.Started") + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) EXPECT_HMICALL("UI.PerformInteraction", { timeout = paramsSend.timeout, @@ -270,17 +272,17 @@ local function PI_PerformViaMANUAL_ONLY(paramsSend, self) } }) :Do(function(_,data) - SendOnSystemContext(self,"HMI_OBSCURED") + SendOnSystemContext("HMI_OBSCURED") local function uiResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("TTS.Stopped") - SendOnSystemContext(self,"MAIN") + commonSmoke.getHMIConnection():SendNotification("TTS.Stopped") + SendOnSystemContext("MAIN") end RUN_AFTER(uiResponse, 1000) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "MANUAL") - self.mobileSession1:ExpectResponse(cid, + ExpectOnHMIStatusWithAudioStateChanged_PI("MANUAL") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", choiceID = paramsSend.interactionChoiceSetIDList[1] }) end @@ -289,9 +291,9 @@ end --! paramsSend - parameters for PI request --! self - test object --! @return: none -local function PI_PerformViaBOTH(paramsSend, self) +local function PI_PerformViaBOTH(paramsSend) paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) + local cid = commonSmoke.getMobileSession():SendRPC("PerformInteraction",paramsSend) EXPECT_HMICALL("VR.PerformInteraction", { helpPrompt = paramsSend.helpPrompt, initialPrompt = paramsSend.initialPrompt, @@ -299,17 +301,17 @@ local function PI_PerformViaBOTH(paramsSend, self) timeoutPrompt = paramsSend.timeoutPrompt }) :Do(function(_,data) - self.hmiConnection:SendNotification("VR.Started") - self.hmiConnection:SendNotification("TTS.Started") - SendOnSystemContext(self,"VRSESSION") + commonSmoke.getHMIConnection():SendNotification("VR.Started") + commonSmoke.getHMIConnection():SendNotification("TTS.Started") + SendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("TTS.Started") + commonSmoke.getHMIConnection():SendNotification("TTS.Stopped") + commonSmoke.getHMIConnection():SendNotification("TTS.Started") end RUN_AFTER(firstSpeakTimeOut, 5) local function vrResponse() - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - self.hmiConnection:SendNotification("VR.Stopped") + commonSmoke.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + commonSmoke.getHMIConnection():SendNotification("VR.Stopped") end RUN_AFTER(vrResponse, 20) end) @@ -325,18 +327,18 @@ local function PI_PerformViaBOTH(paramsSend, self) }) :Do(function(_,data) local function choiceIconDisplayed() - SendOnSystemContext(self,"HMI_OBSCURED") + SendOnSystemContext("HMI_OBSCURED") end RUN_AFTER(choiceIconDisplayed, 25) local function uiResponse() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - SendOnSystemContext(self,"MAIN") + commonSmoke.getHMIConnection():SendNotification("TTS.Stopped") + commonSmoke.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + SendOnSystemContext("MAIN") end RUN_AFTER(uiResponse, 30) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) + ExpectOnHMIStatusWithAudioStateChanged_PI("BOTH") + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) end --[[ Scenario ]] diff --git a/test_scripts/SDL5_0/TemplateColorSchemes/001_TemplateColorSchemes_setDisplayWithColorsAndNewLayoutSuccess.lua b/test_scripts/SDL5_0/TemplateColorSchemes/001_TemplateColorSchemes_setDisplayWithColorsAndNewLayoutSuccess.lua index e132dd978f..26bdfeffc5 100644 --- a/test_scripts/SDL5_0/TemplateColorSchemes/001_TemplateColorSchemes_setDisplayWithColorsAndNewLayoutSuccess.lua +++ b/test_scripts/SDL5_0/TemplateColorSchemes/001_TemplateColorSchemes_setDisplayWithColorsAndNewLayoutSuccess.lua @@ -19,6 +19,9 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + local function getRequestParams() return { displayLayout = "ONSCREEN_PRESETS", @@ -45,27 +48,27 @@ local function getRequestParams2() } end -local function setDisplayWithColorsSuccess(self) +local function setDisplayWithColorsSuccess() local responseParams = {} - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams()) + local cid = commonSmoke.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams()) EXPECT_HMICALL("UI.SetDisplayLayout", getRequestParams()) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) end) - self.mobileSession1:ExpectResponse(cid, { + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "WARNINGS" }) end -local function setDisplayWithColorsAndNewLayoutSuccess(self) +local function setDisplayWithColorsAndNewLayoutSuccess() local responseParams = {} - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams2()) + local cid = commonSmoke.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams2()) EXPECT_HMICALL("UI.SetDisplayLayout", getRequestParams2()) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) end) - self.mobileSession1:ExpectResponse(cid, { + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "WARNINGS" }) diff --git a/test_scripts/SDL5_0/TemplateColorSchemes/002_TemplateColorSchemes_setDisplayWithColorsRejected.lua b/test_scripts/SDL5_0/TemplateColorSchemes/002_TemplateColorSchemes_setDisplayWithColorsRejected.lua index 7db6fe0f68..476162afc8 100644 --- a/test_scripts/SDL5_0/TemplateColorSchemes/002_TemplateColorSchemes_setDisplayWithColorsRejected.lua +++ b/test_scripts/SDL5_0/TemplateColorSchemes/002_TemplateColorSchemes_setDisplayWithColorsRejected.lua @@ -19,6 +19,9 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + local function getRequestParams() return { displayLayout = "ONSCREEN_PRESETS", @@ -45,23 +48,23 @@ local function getRequestParams2() } end -local function setDisplayWithColorsSuccess(self) +local function setDisplayWithColorsSuccess() local responseParams = {} - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams()) + local cid = commonSmoke.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams()) EXPECT_HMICALL("UI.SetDisplayLayout", getRequestParams()) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) end) - self.mobileSession1:ExpectResponse(cid, { + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "WARNINGS" }) end -local function setDisplayWithColorsRejected(self) +local function setDisplayWithColorsRejected() local responseParams = {} - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams2()) - self.mobileSession1:ExpectResponse(cid, { + local cid = commonSmoke.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams2()) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) diff --git a/test_scripts/SDL5_0/TemplateColorSchemes/003_TemplateColorSchemes_setDisplayWithSameColorsSuccess.lua b/test_scripts/SDL5_0/TemplateColorSchemes/003_TemplateColorSchemes_setDisplayWithSameColorsSuccess.lua index 342ffe7ec6..96ef91eab8 100644 --- a/test_scripts/SDL5_0/TemplateColorSchemes/003_TemplateColorSchemes_setDisplayWithSameColorsSuccess.lua +++ b/test_scripts/SDL5_0/TemplateColorSchemes/003_TemplateColorSchemes_setDisplayWithSameColorsSuccess.lua @@ -19,6 +19,9 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + local function getRequestParams() return { displayLayout = "ONSCREEN_PRESETS", @@ -32,27 +35,27 @@ local function getRequestParams() } end -local function setDisplayWithColorsSuccess(self) +local function setDisplayWithColorsSuccess() local responseParams = {} - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams()) + local cid = commonSmoke.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams()) EXPECT_HMICALL("UI.SetDisplayLayout", getRequestParams()) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) end) - self.mobileSession1:ExpectResponse(cid, { + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "WARNINGS" }) end -local function setDisplayWithSameColorsSuccess(self) +local function setDisplayWithSameColorsSuccess() local responseParams = {} - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams()) + local cid = commonSmoke.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams()) EXPECT_HMICALL("UI.SetDisplayLayout", getRequestParams()) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) end) - self.mobileSession1:ExpectResponse(cid, { + commonSmoke.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "WARNINGS" }) diff --git a/test_scripts/SDL5_0/vrCommandOptional/001_create_interaction_choice_set_invalid_data.lua b/test_scripts/SDL5_0/vrCommandOptional/001_create_interaction_choice_set_invalid_data.lua index b65dabef3b..54e8201eb0 100644 --- a/test_scripts/SDL5_0/vrCommandOptional/001_create_interaction_choice_set_invalid_data.lua +++ b/test_scripts/SDL5_0/vrCommandOptional/001_create_interaction_choice_set_invalid_data.lua @@ -27,6 +27,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 @@ -67,9 +69,9 @@ local requestParams = { } --[[ Local Functions ]] -local function createInteractionChoiceSet_mixedVR(params, self) - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) +local function createInteractionChoiceSet_mixedVR(params) + local cid = commonSmoke.getMobileSession():SendRPC("CreateInteractionChoiceSet", params) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) end --[[ Scenario ]] diff --git a/test_scripts/SDL5_0/vrCommandOptional/002_perform_interaction_invalid_data.lua b/test_scripts/SDL5_0/vrCommandOptional/002_perform_interaction_invalid_data.lua index 64bcb0fbeb..27b9dd553f 100644 --- a/test_scripts/SDL5_0/vrCommandOptional/002_perform_interaction_invalid_data.lua +++ b/test_scripts/SDL5_0/vrCommandOptional/002_perform_interaction_invalid_data.lua @@ -30,6 +30,8 @@ local runner = require('user_modules/script_runner') local commonSmoke = require('test_scripts/Smoke/commonSmoke') local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 @@ -150,8 +152,8 @@ end --! self - test object, --! ctx - systemContext value --! @return: none -local function SendOnSystemContext(self, ctx) - self.hmiConnection:SendNotification("UI.OnSystemContext", +local function SendOnSystemContext(ctx) + commonSmoke.getHMIConnection():SendNotification("UI.OnSystemContext", { appID = commonSmoke.getHMIAppId(), systemContext = ctx }) end @@ -180,9 +182,9 @@ end --! self - test object, --! request - interaction mode, --! @return: none -local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) +local function ExpectOnHMIStatusWithAudioStateChanged_PI(request) if "BOTH" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION" }, { hmiLevel = "FULL", audioStreamingState = "ATTENUATED", systemContext = "VRSESSION" }, @@ -191,7 +193,7 @@ local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) :Times(6) elseif "VR" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, @@ -199,7 +201,7 @@ local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Times(5) elseif "MANUAL" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + commonSmoke.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, @@ -213,9 +215,9 @@ end --! choiceSetID - id for choice set --! self - test object --! @return: none -local function CreateInteractionChoiceSet(choiceSetID, self) +local function CreateInteractionChoiceSet(choiceSetID) local choiceID = choiceSetID - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { + local cid = commonSmoke.getMobileSession():SendRPC("CreateInteractionChoiceSet", { interactionChoiceSetID = choiceSetID, choiceSet = setChoiceSet(choiceID), }) @@ -225,9 +227,9 @@ local function CreateInteractionChoiceSet(choiceSetID, self) vrCommands = { "VrChoice" .. tostring(choiceID) } }) :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + commonSmoke.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + commonSmoke.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) end --! @CreateInteractionChoiceSet_noVR: Creation of Choice Set with no vrCommands @@ -235,13 +237,13 @@ end --! choiceSetID - id for choice set --! self - test object --! @return: none -local function CreateInteractionChoiceSet_noVR(choiceSetID, self) +local function CreateInteractionChoiceSet_noVR(choiceSetID) local choiceID = choiceSetID - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { + local cid = commonSmoke.getMobileSession():SendRPC("CreateInteractionChoiceSet", { interactionChoiceSetID = choiceSetID, choiceSet = setChoiceSet_noVR(choiceID), }) - self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + commonSmoke.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) end --! @PI_PerformViaVR_ONLY: Processing PI with interaction mode VR_ONLY with performing selection @@ -249,10 +251,10 @@ end --! paramsSend - parameters for PI request --! self - test object --! @return: none -local function PI_PerformViaVR_ONLY(paramsSend, self) +local function PI_PerformViaVR_ONLY(paramsSend) paramsSend.interactionMode = "VR_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) + local cid = commonSmoke.getMobileSession():SendRPC("PerformInteraction",paramsSend) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) end --! @PI_PerformViaBOTH: Processing PI with interaction mode BOTH with timeout on VR and IU @@ -260,10 +262,10 @@ end --! paramsSend - parameters for PI request --! self - test object --! @return: none -local function PI_PerformViaBOTH(paramsSend, self) +local function PI_PerformViaBOTH(paramsSend) paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) + local cid = commonSmoke.getMobileSession():SendRPC("PerformInteraction",paramsSend) + commonSmoke.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "INVALID_DATA"}) end --[[ Scenario ]] diff --git a/test_scripts/Security/GetSystemTime/common.lua b/test_scripts/Security/GetSystemTime/common.lua index bb5b3aa846..b9ec846458 100644 --- a/test_scripts/Security/GetSystemTime/common.lua +++ b/test_scripts/Security/GetSystemTime/common.lua @@ -6,8 +6,8 @@ local actions = require("user_modules/sequences/actions") local security = require("user_modules/sequences/security") local utils = require("user_modules/utils") local test = require("user_modules/dummy_connecttest") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local common = require("test_scripts/Security/SSLHandshakeFlow/common") +local SDL = require("SDL") --[[ General configuration parameters ]] config.serverCertificatePath = "./files/Security/GetSystemTime_certificates/spt_credential.pem" @@ -51,7 +51,7 @@ end function m.start(pOnSystemTime, pHMIParams) test:runSDL() - commonFunctions:waitForSDLStart(test) + SDL.WaitForSDLStart(test) :Do(function() test:initHMI() :Do(function() diff --git a/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua b/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua index 4c8c4a7b23..867080e39f 100644 --- a/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua +++ b/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua @@ -8,7 +8,7 @@ local constants = require("protocol_handler/ford_protocol_constants") local utils = require("user_modules/utils") local bson -if utils.isFileExist("modules/libbson4lua.so") then +if utils.isFileExist("lib/libbson4lua.so") then bson = require('bson4lua') else runner.skipTest("'bson4lua' library is not available in ATF") diff --git a/test_scripts/Security/SSLHandshakeFlow/common.lua b/test_scripts/Security/SSLHandshakeFlow/common.lua index 7977470263..f55b6b88f6 100644 --- a/test_scripts/Security/SSLHandshakeFlow/common.lua +++ b/test_scripts/Security/SSLHandshakeFlow/common.lua @@ -6,8 +6,7 @@ local actions = require("user_modules/sequences/actions") local security = require("user_modules/sequences/security") local utils = require("user_modules/utils") local test = require("user_modules/dummy_connecttest") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local SDL = require("SDL") local constants = require("protocol_handler/ford_protocol_constants") local events = require("events") local json = require("modules/json") @@ -23,9 +22,6 @@ local m = actions m.frameInfo = security.frameInfo m.readFile = utils.readFile ---[[ Variables ]] -local preloadedPT = commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") - --[[ Functions ]] local function getSystemTimeValue() local dd = os.date("*t") @@ -68,7 +64,7 @@ end function m.start() test:runSDL() - commonFunctions:waitForSDLStart(test) + SDL.WaitForSDLStart(test) :Do(function() test:initHMI() :Do(function() @@ -117,73 +113,28 @@ function m.activateAppProtected() hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) end -local function saveFile(pContent, pFileName) - local f = io.open(pFileName, "w") - f:write(pContent) - f:close() -end - -local function getAllCrtsFromPEM(pCrtsFileName) - local crts = utils.readFile(pCrtsFileName) - local o = {} - local i = 1 - local s = crts:find("-----BEGIN RSA PRIVATE KEY-----", i, true) - local _, e = crts:find("-----END RSA PRIVATE KEY-----", i, true) - o.key = crts:sub(s, e) .. "\n" - for _, v in pairs({ "crt", "rootCA", "issuingCA" }) do - i = e - s = crts:find("-----BEGIN CERTIFICATE-----", i, true) - _, e = crts:find("-----END CERTIFICATE-----", i, true) - o[v] = crts:sub(s, e) .. "\n" - end - return o -end - -local function createCrtHashes() - local sdlBin = commonPreconditions:GetPathToSDL() - os.execute("cd " .. sdlBin .. " && c_rehash .") -end - -local function updateSDLIniFile() - m.setSDLIniParameter("KeyPath", "module_key.pem") - m.setSDLIniParameter("CertificatePath", "module_crt.pem") -end - function m.initSDLCertificates(pCrtsFileName, pIsModuleCrtDefined) - if pIsModuleCrtDefined == nil then pIsModuleCrtDefined = true end - local allCrts = getAllCrtsFromPEM(pCrtsFileName) - local sdlBin = commonPreconditions:GetPathToSDL() - saveFile(allCrts.rootCA, sdlBin .. "rootCA.pem") - saveFile(allCrts.issuingCA, sdlBin .. "issuingCA.pem") - createCrtHashes() - if pIsModuleCrtDefined then - saveFile(allCrts.key, sdlBin .. "module_key.pem") - saveFile(allCrts.crt, sdlBin .. "module_crt.pem") - end - updateSDLIniFile() + SDL.CRT.set(pCrtsFileName, pIsModuleCrtDefined) end function m.cleanUpCertificates() - local sdlBin = commonPreconditions:GetPathToSDL() - os.execute("cd " .. sdlBin .. " && find . -type l -not -name 'lib*' -exec rm -f {} \\;") - os.execute("cd " .. sdlBin .. " && rm -rf *.pem") + SDL.CRT.clean() end local preconditionsOrig = m.preconditions local postconditionsOrig = m.postconditions function m.preloadedPTUpdate(pPTUpdateFunc) - local preloadedFile = commonPreconditions:GetPathToSDL() .. preloadedPT - local pt = utils.jsonFileToTable(preloadedFile) + local pt = actions.sdl.getPreloadedPT() pt.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null if pPTUpdateFunc then pPTUpdateFunc(pt) end - utils.tableToJsonFile(pt, preloadedFile) + actions.sdl.setPreloadedPT(pt) end function m.preconditions(pPTUpdateFunc) preconditionsOrig() + m.setSDLIniParameter("Protocol", "DTLSv1.0") m.cleanUpCertificates() - commonPreconditions:BackupFile(preloadedPT) if pPTUpdateFunc == nil then pPTUpdateFunc = function(pPT) pPT.policy_table.app_policies["default"].encryption_required = true @@ -196,7 +147,6 @@ end function m.postconditions() postconditionsOrig() m.cleanUpCertificates() - commonPreconditions:RestoreFile(preloadedPT) end function m.defaultExpNotificationFunc() diff --git a/test_scripts/Smoke/API/001_SetGlobalProperties_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/001_SetGlobalProperties_PositiveCase_SUCCESS.lua index 7900ef4eae..c7539fcf3b 100644 --- a/test_scripts/Smoke/API/001_SetGlobalProperties_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/001_SetGlobalProperties_PositiveCase_SUCCESS.lua @@ -36,17 +36,20 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local requestParams = { @@ -88,56 +91,57 @@ local requestParams = { } local responseUiParams = { - vrHelpTitle = requestParams.vrHelpTitle, - vrHelp = requestParams.vrHelp, - menuTitle = requestParams.menuTitle, - menuIcon = requestParams.menuIcon, - keyboardProperties = requestParams.keyboardProperties + vrHelpTitle = requestParams.vrHelpTitle, + vrHelp = requestParams.vrHelp, + menuTitle = requestParams.menuTitle, + menuIcon = requestParams.menuIcon, + keyboardProperties = requestParams.keyboardProperties } local responseTtsParams = { - timeoutPrompt = requestParams.timeoutPrompt, - helpPrompt = requestParams.helpPrompt + timeoutPrompt = requestParams.timeoutPrompt, + helpPrompt = requestParams.helpPrompt } local allParams = { - requestParams = requestParams, - responseUiParams = responseUiParams, - responseTtsParams = responseTtsParams + requestParams = requestParams, + responseUiParams = responseUiParams, + responseTtsParams = responseTtsParams } --[[ Local Functions ]] -local function setGlobalProperties(params, self) - local cid = self.mobileSession1:SendRPC("SetGlobalProperties", params.requestParams) - - params.responseUiParams.appID = commonSmoke.getHMIAppId() - params.responseUiParams.vrHelp[1].image.value = commonSmoke.getPathToFileInStorage("icon.png") - params.responseUiParams.menuIcon.value = commonSmoke.getPathToFileInStorage("icon.png") - EXPECT_HMICALL("UI.SetGlobalProperties", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - params.responseTtsParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("TTS.SetGlobalProperties", params.responseTtsParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function setGlobalProperties(pParams) + local cid = common.getMobileSession():SendRPC("SetGlobalProperties", pParams.requestParams) + + pParams.responseUiParams.appID = common.getHMIAppId() + pParams.responseUiParams.vrHelp[1].image.value = common.getPathToFileInAppStorage("icon.png") + pParams.responseUiParams.menuIcon.value = common.getPathToFileInAppStorage("icon.png") + common.getHMIConnection():ExpectRequest("UI.SetGlobalProperties", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + pParams.responseTtsParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("TTS.SetGlobalProperties", pParams.responseTtsParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("SetGlobalProperties Positive Case", setGlobalProperties, {allParams}) +runner.Step("SetGlobalProperties Positive Case", setGlobalProperties, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/002_ResetGlobalProperties_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/002_ResetGlobalProperties_PositiveCase_SUCCESS.lua index 8fd6a2a443..41c2cf61fc 100644 --- a/test_scripts/Smoke/API/002_ResetGlobalProperties_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/002_ResetGlobalProperties_PositiveCase_SUCCESS.lua @@ -35,19 +35,22 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { - properties = { - "VRHELPTITLE", - "MENUNAME", - "MENUICON", - "KEYBOARDPROPERTIES", - "VRHELPITEMS", - "HELPPROMPT", - "TIMEOUTPROMPT" - } + properties = { + "VRHELPTITLE", + "MENUNAME", + "MENUICON", + "KEYBOARDPROPERTIES", + "VRHELPITEMS", + "HELPPROMPT", + "TIMEOUTPROMPT" + } } local responseUiParams = { @@ -61,64 +64,77 @@ local responseUiParams = { } local responseTtsParams = { - helpPrompt = {}, - timeoutPrompt = {} + helpPrompt = {}, + timeoutPrompt = {} } local allParams = { - requestParams = requestParams, - responseUiParams = responseUiParams, - responseTtsParams = responseTtsParams + requestParams = requestParams, + responseUiParams = responseUiParams, + responseTtsParams = responseTtsParams } --[[ Local Functions ]] -local function resetGlobalProperties(params, self) - local cid = self.mobileSession1:SendRPC("ResetGlobalProperties", params.requestParams) - - params.responseUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.SetGlobalProperties", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :ValidIf(function(_,data) - if data.params.vrHelp == nil then - return true - else - return false, "vrHelp array in UI.SetGlobalProperties request is not empty." .. - " Expected array size 0, actual " .. tostring(#data.params.vrHelp) - end - end) - - local ttsDelimiter = commonSmoke.readParameterFromSmartDeviceLinkIni("TTSDelimiter") - local helpPromptString = commonSmoke.readParameterFromSmartDeviceLinkIni("HelpPromt") - local helpPromptList = commonSmoke.splitString(helpPromptString, ttsDelimiter); - - for key,value in pairs(helpPromptList) do - params.responseTtsParams.timeoutPrompt[key] = { - type = "TEXT", - text = value .. ttsDelimiter - } - end - - params.responseTtsParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("TTS.SetGlobalProperties", params.responseTtsParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function splitString(pInputStr, pSep) + if pSep == nil then + pSep = "%s" + end + local out, i = {}, 1 + for str in string.gmatch(pInputStr, "([^" .. pSep .. "]+)") do + out[i] = str + i = i + 1 + end + return out +end + +local function resetGlobalProperties(pParams) + local cid = common.getMobileSession():SendRPC("ResetGlobalProperties", pParams.requestParams) + + pParams.responseUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.SetGlobalProperties", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_, data) + if data.params.vrHelp == nil then + return true + else + return false, "vrHelp array in UI.SetGlobalProperties request is not empty." + .. " Expected array size 0, actual " .. tostring(#data.params.vrHelp) + end + end) + + local ttsDelimiter = common.readParameterFromSDLINI("TTSDelimiter") + local helpPromptString = common.readParameterFromSDLINI("HelpPromt") + local helpPromptList = splitString(helpPromptString, ttsDelimiter) + + for key, value in pairs(helpPromptList) do + pParams.responseTtsParams.timeoutPrompt[key] = { + type = "TEXT", + text = value .. ttsDelimiter + } + end + + pParams.responseTtsParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("TTS.SetGlobalProperties", pParams.responseTtsParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") -runner.Step("ResetGlobalProperties Positive Case", resetGlobalProperties, {allParams}) +runner.Step("ResetGlobalProperties Positive Case", resetGlobalProperties, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/003_AddCommand_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/003_AddCommand_PositiveCase_SUCCESS.lua index d60952b4e4..c73d110c7e 100644 --- a/test_scripts/Smoke/API/003_AddCommand_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/003_AddCommand_PositiveCase_SUCCESS.lua @@ -33,92 +33,96 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local requestParams = { - cmdID = 11, - menuParams = { - position = 0, - menuName ="Commandpositive" - }, - vrCommands = { - "VRCommandonepositive", - "VRCommandonepositivedouble" - }, - grammarID = 1, - cmdIcon = { - value ="icon.png", - imageType ="DYNAMIC" - } + cmdID = 11, + menuParams = { + position = 0, + menuName ="Commandpositive" + }, + vrCommands = { + "VRCommandonepositive", + "VRCommandonepositivedouble" + }, + grammarID = 1, + cmdIcon = { + value ="icon.png", + imageType ="DYNAMIC" + } } local responseUiParams = { - cmdID = requestParams.cmdID, - cmdIcon = requestParams.cmdIcon, - menuParams = requestParams.menuParams + cmdID = requestParams.cmdID, + cmdIcon = requestParams.cmdIcon, + menuParams = requestParams.menuParams } local responseVrParams = { - cmdID = requestParams.cmdID, - type = "Command", - vrCommands = requestParams.vrCommands + cmdID = requestParams.cmdID, + type = "Command", + vrCommands = requestParams.vrCommands } local allParams = { - requestParams = requestParams, - responseUiParams = responseUiParams, - responseVrParams = responseVrParams + requestParams = requestParams, + responseUiParams = responseUiParams, + responseVrParams = responseVrParams } --[[ Local Functions ]] -local function addCommand(params, self) - local cid = self.mobileSession1:SendRPC("AddCommand", params.requestParams) - - params.responseUiParams.appID = commonSmoke.getHMIAppId() - params.responseUiParams.cmdIcon.value = commonSmoke.getPathToFileInStorage("icon.png") - EXPECT_HMICALL("UI.AddCommand", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - params.responseVrParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VR.AddCommand", params.responseVrParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :ValidIf(function(_,data) - if data.params.grammarID ~= nil then - return true - else - return false, "grammarID should not be empty" - end - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function addCommand(pParams) + local cid = common.getMobileSession():SendRPC("AddCommand", pParams.requestParams) + + pParams.responseUiParams.appID = common.getHMIAppId() + pParams.responseUiParams.cmdIcon.value = common.getPathToFileInAppStorage("icon.png") + common.getHMIConnection():ExpectRequest("UI.AddCommand", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + pParams.responseVrParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VR.AddCommand", pParams.responseVrParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_, data) + if data.params.grammarID ~= nil then + return true + else + return false, "grammarID should not be empty" + end + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("AddCommand Positive Case", addCommand, {allParams}) +runner.Step("AddCommand Positive Case", addCommand, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/004_DeleteCommand_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/004_DeleteCommand_PositiveCase_SUCCESS.lua index d209b54b0e..7bb3f86e3c 100644 --- a/test_scripts/Smoke/API/004_DeleteCommand_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/004_DeleteCommand_PositiveCase_SUCCESS.lua @@ -33,120 +33,124 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local addCommandRequestParams = { - cmdID = 11, - menuParams = { - position = 0, - menuName ="Commandpositive" - }, - vrCommands = { - "VRCommandonepositive", - "VRCommandonepositivedouble" - }, - cmdIcon = { - value ="icon.png", - imageType ="DYNAMIC" - } + cmdID = 11, + menuParams = { + position = 0, + menuName ="Commandpositive" + }, + vrCommands = { + "VRCommandonepositive", + "VRCommandonepositivedouble" + }, + cmdIcon = { + value ="icon.png", + imageType ="DYNAMIC" + } } local addCommandGrammarID = 0 local addCommandResponseUiParams = { - cmdID = addCommandRequestParams.cmdID, - cmdIcon = addCommandRequestParams.cmdIcon, - menuParams = addCommandRequestParams.menuParams + cmdID = addCommandRequestParams.cmdID, + cmdIcon = addCommandRequestParams.cmdIcon, + menuParams = addCommandRequestParams.menuParams } local addCommandResponseVrParams = { - cmdID = addCommandRequestParams.cmdID, - type = "Command", - vrCommands = addCommandRequestParams.vrCommands + cmdID = addCommandRequestParams.cmdID, + type = "Command", + vrCommands = addCommandRequestParams.vrCommands } local addCommandAllParams = { - requestParams = addCommandRequestParams, - responseUiParams = addCommandResponseUiParams, - responseVrParams = addCommandResponseVrParams + requestParams = addCommandRequestParams, + responseUiParams = addCommandResponseUiParams, + responseVrParams = addCommandResponseVrParams } local deleteCommandRequestParams = { - cmdID = addCommandRequestParams.cmdID + cmdID = addCommandRequestParams.cmdID } --[[ Local Functions ]] -local function addCommand(params, self) - local cid = self.mobileSession1:SendRPC("AddCommand", params.requestParams) - - params.responseUiParams.appID = commonSmoke.getHMIAppId() - params.responseUiParams.cmdIcon.value = commonSmoke.getPathToFileInStorage("icon.png") - EXPECT_HMICALL("UI.AddCommand", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - params.responseVrParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VR.AddCommand", params.responseVrParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :ValidIf(function(_,data) - if data.params.grammarID == nil then - return false, "grammarID should not be empty" - end - addCommandGrammarID = data.params.grammarID - return true - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function addCommand(pParams) + local cid = common.getMobileSession():SendRPC("AddCommand", pParams.requestParams) + + pParams.responseUiParams.appID = common.getHMIAppId() + pParams.responseUiParams.cmdIcon.value = common.getPathToFileInAppStorage("icon.png") + common.getHMIConnection():ExpectRequest("UI.AddCommand", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + pParams.responseVrParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VR.AddCommand", pParams.responseVrParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_, data) + if data.params.grammarID == nil then + return false, "grammarID should not be empty" + end + addCommandGrammarID = data.params.grammarID + return true + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function deleteCommand(params, self) - local cid = self.mobileSession1:SendRPC("DeleteCommand", params) - - params.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.DeleteCommand", params) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - local responseVrParams = { - cmdID = params.cmdID, - grammarID = addCommandGrammarID - } - EXPECT_HMICALL("VR.DeleteCommand", responseVrParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function deleteCommand(pParams) + local cid = common.getMobileSession():SendRPC("DeleteCommand", pParams) + + pParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.DeleteCommand", pParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + local responseVrParams = { + cmdID = pParams.cmdID, + grammarID = addCommandGrammarID + } + common.getHMIConnection():ExpectRequest("VR.DeleteCommand", responseVrParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) -runner.Step("AddCommand", addCommand, {addCommandAllParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) +runner.Step("AddCommand", addCommand, { addCommandAllParams }) runner.Title("Test") -runner.Step("DeleteCommand Positive Case", deleteCommand, {deleteCommandRequestParams}) +runner.Step("DeleteCommand Positive Case", deleteCommand, { deleteCommandRequestParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/005_AddSubMenu_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/005_AddSubMenu_PositiveCase_SUCCESS.lua index 36b97c3448..a01ebe44fe 100644 --- a/test_scripts/Smoke/API/005_AddSubMenu_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/005_AddSubMenu_PositiveCase_SUCCESS.lua @@ -29,51 +29,55 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { - menuID = 1000, - position = 500, - menuName ="SubMenupositive" + menuID = 1000, + position = 500, + menuName ="SubMenupositive" } local responseUiParams = { - menuID = requestParams.menuID, - menuParams = { - position = requestParams.position, - menuName = requestParams.menuName - } + menuID = requestParams.menuID, + menuParams = { + position = requestParams.position, + menuName = requestParams.menuName + } } local allParams = { - requestParams = requestParams, - responseUiParams = responseUiParams + requestParams = requestParams, + responseUiParams = responseUiParams } --[[ Local Functions ]] -local function addSubMenu(params, self) - local cid = self.mobileSession1:SendRPC("AddSubMenu", params.requestParams) +local function addSubMenu(pParams) + local cid = common.getMobileSession():SendRPC("AddSubMenu", pParams.requestParams) - params.responseUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.AddSubMenu", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + pParams.responseUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") -runner.Step("AddSubMenu Positive Case", addSubMenu, {allParams}) +runner.Step("AddSubMenu Positive Case", addSubMenu, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/006_DeleteSubMenu_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/006_DeleteSubMenu_PositiveCase_SUCCESS.lua index 50ff4cebab..57ac0a9ff1 100644 --- a/test_scripts/Smoke/API/006_DeleteSubMenu_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/006_DeleteSubMenu_PositiveCase_SUCCESS.lua @@ -30,69 +30,73 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local addSubMenuRequestParams = { - menuID = 1000, - position = 500, - menuName ="SubMenupositive" + menuID = 1000, + position = 500, + menuName ="SubMenupositive" } local addSubMenuResponseUiParams = { - menuID = addSubMenuRequestParams.menuID, - menuParams = { - position = addSubMenuRequestParams.position, - menuName = addSubMenuRequestParams.menuName - } + menuID = addSubMenuRequestParams.menuID, + menuParams = { + position = addSubMenuRequestParams.position, + menuName = addSubMenuRequestParams.menuName + } } local addSubMenuAllParams = { - requestParams = addSubMenuRequestParams, - responseUiParams = addSubMenuResponseUiParams + requestParams = addSubMenuRequestParams, + responseUiParams = addSubMenuResponseUiParams } local deleteSubMenuRequestParams = { - menuID = addSubMenuRequestParams.menuID + menuID = addSubMenuRequestParams.menuID } --[[ Local Functions ]] -local function addSubMenu(params, self) - local cid = self.mobileSession1:SendRPC("AddSubMenu", params.requestParams) +local function addSubMenu(pParams) + local cid = common.getMobileSession():SendRPC("AddSubMenu", pParams.requestParams) - params.responseUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.AddSubMenu", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + pParams.responseUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function deleteSubMenu(params, self) - local cid = self.mobileSession1:SendRPC("DeleteSubMenu", params) +local function deleteSubMenu(pParams) + local cid = common.getMobileSession():SendRPC("DeleteSubMenu", pParams) - params.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.DeleteSubMenu", params) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + pParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.DeleteSubMenu", pParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("AddSubMenu", addSubMenu, {addSubMenuAllParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("AddSubMenu", addSubMenu, { addSubMenuAllParams }) runner.Title("Test") -runner.Step("DeleteSubMenu Positive Case", deleteSubMenu, {deleteSubMenuRequestParams}) +runner.Step("DeleteSubMenu Positive Case", deleteSubMenu, { deleteSubMenuRequestParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/007_Alert_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/007_Alert_PositiveCase_SUCCESS.lua index 29d365ffb6..2a2ac73e94 100644 --- a/test_scripts/Smoke/API/007_Alert_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/007_Alert_PositiveCase_SUCCESS.lua @@ -33,53 +33,56 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local step1SpecificParams = { - softButtons = { - { - type = "BOTH", - text = "Close", - image = { - value = "icon.png", - imageType = "DYNAMIC", - }, - isHighlighted = true, - softButtonID = 3, - systemAction = "DEFAULT_ACTION", - }, - { - type = "TEXT", - text = "Keep", - isHighlighted = true, - softButtonID = 4, - systemAction = "KEEP_CONTEXT", - }, - { - type = "IMAGE", - image = { - value = "icon.png", - imageType = "DYNAMIC", - }, - softButtonID = 5, - systemAction = "STEAL_FOCUS", - } - } + softButtons = { + { + type = "BOTH", + text = "Close", + image = { + value = "icon.png", + imageType = "DYNAMIC", + }, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION", + }, + { + type = "TEXT", + text = "Keep", + isHighlighted = true, + softButtonID = 4, + systemAction = "KEEP_CONTEXT", + }, + { + type = "IMAGE", + image = { + value = "icon.png", + imageType = "DYNAMIC", + }, + softButtonID = 5, + systemAction = "STEAL_FOCUS", + } + } } local step2SpecificParams = { - duration = 5000 + duration = 5000 } local requestParams = { @@ -101,122 +104,122 @@ local requestParams = { } local responseUiParams = { - alertStrings = { - { - fieldName = requestParams.alertText1, - fieldText = requestParams.alertText1 - }, - { - fieldName = requestParams.alertText2, - fieldText = requestParams.alertText2 - }, - { - fieldName = requestParams.alertText3, - fieldText = requestParams.alertText3 - } - }, - alertType = "BOTH", - progressIndicator = requestParams.progressIndicator, + alertStrings = { + { + fieldName = requestParams.alertText1, + fieldText = requestParams.alertText1 + }, + { + fieldName = requestParams.alertText2, + fieldText = requestParams.alertText2 + }, + { + fieldName = requestParams.alertText3, + fieldText = requestParams.alertText3 + } + }, + alertType = "BOTH", + progressIndicator = requestParams.progressIndicator, } local ttsSpeakRequestParams = { - ttsChunks = requestParams.ttsChunks, - speakType = "ALERT", - playTone = requestParams.playTone + ttsChunks = requestParams.ttsChunks, + speakType = "ALERT", + playTone = requestParams.playTone } local allParams = { - requestParams = requestParams, - responseUiParams = responseUiParams, - ttsSpeakRequestParams = ttsSpeakRequestParams + requestParams = requestParams, + responseUiParams = responseUiParams, + ttsSpeakRequestParams = ttsSpeakRequestParams } --[[ Local Functions ]] -local function sendOnSystemContext(self, ctx) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { - appID = commonSmoke.getHMIAppId(), - systemContext = ctx - }) +local function sendOnSystemContext(pCtx) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = common.getHMIAppId(), + systemContext = pCtx + }) end -local function prepareAlertParams(params, additionalParams) - params.responseUiParams.appID = commonSmoke.getHMIAppId() - - if additionalParams.softButtons ~= nil then - params.requestParams.duration = nil - params.requestParams.softButtons = additionalParams.softButtons - params.responseUiParams.duration = nil; - params.responseUiParams.softButtons = additionalParams.softButtons - params.responseUiParams.softButtons[1].image.value = - commonSmoke.getPathToFileInStorage(putFileParams.requestParams.syncFileName) - params.responseUiParams.softButtons[3].image.value = - commonSmoke.getPathToFileInStorage(putFileParams.requestParams.syncFileName) - elseif additionalParams.duration ~= nil then - params.requestParams.softButtons = nil - params.requestParams.duration = additionalParams.duration - params.responseUiParams.softButtons = nil - params.responseUiParams.duration = additionalParams.duration - end +local function prepareAlertParams(pParams, pAdditionalParams) + local params = common.cloneTable(pParams) + params.responseUiParams.appID = common.getHMIAppId() + + if pAdditionalParams.softButtons ~= nil then + params.requestParams.duration = nil + params.requestParams.softButtons = pAdditionalParams.softButtons + params.responseUiParams.duration = nil + params.responseUiParams.softButtons = pAdditionalParams.softButtons + params.responseUiParams.softButtons[1].image.value = + common.getPathToFileInAppStorage(putFileParams.requestParams.syncFileName) + params.responseUiParams.softButtons[3].image.value = + common.getPathToFileInAppStorage(putFileParams.requestParams.syncFileName) + elseif pAdditionalParams.duration ~= nil then + params.requestParams.softButtons = nil + params.requestParams.duration = pAdditionalParams.duration + params.responseUiParams.softButtons = nil + params.responseUiParams.duration = pAdditionalParams.duration + end + return params end -local function alert(params, additionalParams, self) - prepareAlertParams(params, additionalParams) - - local responseDelay = 3000 - local cid = self.mobileSession1:SendRPC("Alert", params.requestParams) - - EXPECT_HMICALL("UI.Alert", params.responseUiParams) - :Do(function(_,data) - sendOnSystemContext(self, "ALERT") - - local alertId = data.id - local function alertResponse() - self.hmiConnection:SendResponse(alertId, "UI.Alert", "SUCCESS", { }) - sendOnSystemContext(self, "MAIN") - end - - RUN_AFTER(alertResponse, responseDelay) - end) - - params.ttsSpeakRequestParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("TTS.Speak", params.ttsSpeakRequestParams) - :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - - local speakId = data.id - local function speakResponse() - self.hmiConnection:SendResponse(speakId, "TTS.Speak", "SUCCESS", { }) - self.hmiConnection:SendNotification("TTS.Stopped") - end - - RUN_AFTER(speakResponse, responseDelay - 1000) - end) - :ValidIf(function(_,data) - if #data.params.ttsChunks == 1 then - return true - else - return false, "ttsChunks array in TTS.Speak request has wrong element number." .. - " Expected 1, actual " .. tostring(#data.params.ttsChunks) - end - end) - - commonSmoke.expectOnHMIStatusWithAudioStateChanged(self) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) +local function alert(pParams, pAdditionalParams) + local params = prepareAlertParams(pParams, pAdditionalParams) + + local cid = common.getMobileSession():SendRPC("Alert", params.requestParams) + + common.getHMIConnection():ExpectRequest("UI.Alert", params.responseUiParams) + :Do(function(_, data) + sendOnSystemContext("ALERT") + local function alertResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + sendOnSystemContext("MAIN") + end + common.runAfter(alertResponse, 3000) + end) + + params.ttsSpeakRequestParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("TTS.Speak", params.ttsSpeakRequestParams) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + local function speakResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + common.runAfter(speakResponse, 2000) + end) + :ValidIf(function(_, data) + if #data.params.ttsChunks == 1 then + return true + else + return false, "ttsChunks array in TTS.Speak request has wrong element number." + .. " Expected 1, actual " .. tostring(#data.params.ttsChunks) + end + end) + + common.getMobileSession():ExpectNotification("OnHMIStatus", + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(4) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("Alert with soft buttons Positive Case", alert, {allParams, step1SpecificParams}) -runner.Step("Alert with duration Positive Case", alert, {allParams, step2SpecificParams}) +runner.Step("Alert with soft buttons Positive Case", alert, { allParams, step1SpecificParams }) +runner.Step("Alert with duration Positive Case", alert, { allParams, step2SpecificParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/008_CreateInteractionChoiceSet_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/008_CreateInteractionChoiceSet_PositiveCase_SUCCESS.lua index 6aabbc28cd..960854ac76 100644 --- a/test_scripts/Smoke/API/008_CreateInteractionChoiceSet_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/008_CreateInteractionChoiceSet_PositiveCase_SUCCESS.lua @@ -33,101 +33,104 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local requestParams = { - interactionChoiceSetID = 1001, - choiceSet = { - { - choiceID = 1001, - menuName ="Choice1001", - vrCommands = { - "Choice1001" - }, - image = { - value ="icon.png", - imageType ="DYNAMIC" - } - } - } + interactionChoiceSetID = 1001, + choiceSet = { + { + choiceID = 1001, + menuName ="Choice1001", + vrCommands = { + "Choice1001" + }, + image = { + value ="icon.png", + imageType ="DYNAMIC" + } + } + } } local requestParams_noVR = { - interactionChoiceSetID = 1002, - choiceSet = { - { - choiceID = 1002, - menuName ="Choice1002", - image = { - value ="icon.png", - imageType ="DYNAMIC" - } - } - } + interactionChoiceSetID = 1002, + choiceSet = { + { + choiceID = 1002, + menuName ="Choice1002", + image = { + value ="icon.png", + imageType ="DYNAMIC" + } + } + } } local responseVrParams = { - cmdID = requestParams.interactionChoiceSetID, - type = "Choice", - vrCommands = requestParams.vrCommands + cmdID = requestParams.interactionChoiceSetID, + type = "Choice", + vrCommands = requestParams.vrCommands } local allParams = { - requestParams = requestParams, - responseVrParams = responseVrParams + requestParams = requestParams, + responseVrParams = responseVrParams } --[[ Local Functions ]] -local function createInteractionChoiceSet(params, self) - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params.requestParams) - - params.responseVrParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VR.AddCommand", params.responseVrParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :ValidIf(function(_,data) - if data.params.grammarID ~= nil then - return true - else - return false, "grammarID should not be empty" - end - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function createInteractionChoiceSet(pParams) + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", pParams.requestParams) + + pParams.responseVrParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VR.AddCommand", pParams.responseVrParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_, data) + if data.params.grammarID ~= nil then + return true + else + return false, "grammarID should not be empty" + end + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function createInteractionChoiceSet_noVR(params, self) - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) +local function createInteractionChoiceSet_noVR(pParams) + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", pParams) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("CreateInteractionChoiceSet Positive Case", createInteractionChoiceSet, {allParams}) -runner.Step("CreateInteractionChoiceSet No VR Commands Positive Case", createInteractionChoiceSet_noVR, {requestParams_noVR}) +runner.Step("CreateInteractionChoiceSet Positive Case", createInteractionChoiceSet, { allParams }) +runner.Step("CreateInteractionChoiceSet No VR Commands Positive Case", createInteractionChoiceSet_noVR, { requestParams_noVR }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/009_DeleteInteractionChoiceSet_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/009_DeleteInteractionChoiceSet_PositiveCase_SUCCESS.lua index 0aeeee6005..d67bbe2018 100644 --- a/test_scripts/Smoke/API/009_DeleteInteractionChoiceSet_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/009_DeleteInteractionChoiceSet_PositiveCase_SUCCESS.lua @@ -32,107 +32,111 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local createRequestParams = { - interactionChoiceSetID = 1001, - choiceSet = { - { - choiceID = 1001, - menuName ="Choice1001", - vrCommands = { - "Choice1001" - }, - image = { - value ="icon.png", - imageType ="DYNAMIC" - } - } - } + interactionChoiceSetID = 1001, + choiceSet = { + { + choiceID = 1001, + menuName ="Choice1001", + vrCommands = { + "Choice1001" + }, + image = { + value ="icon.png", + imageType ="DYNAMIC" + } + } + } } local createResponseVrParams = { - cmdID = createRequestParams.interactionChoiceSetID, - type = "Choice", - vrCommands = createRequestParams.vrCommands + cmdID = createRequestParams.interactionChoiceSetID, + type = "Choice", + vrCommands = createRequestParams.vrCommands } local createAllParams = { - requestParams = createRequestParams, - responseVrParams = createResponseVrParams + requestParams = createRequestParams, + responseVrParams = createResponseVrParams } local deleteRequestParams = { - interactionChoiceSetID = createRequestParams.interactionChoiceSetID + interactionChoiceSetID = createRequestParams.interactionChoiceSetID } local deleteResponseVrParams = { - cmdID = createRequestParams.interactionChoiceSetID, - type = "Choice" + cmdID = createRequestParams.interactionChoiceSetID, + type = "Choice" } local deleteAllParams = { - requestParams = deleteRequestParams, - responseVrParams = deleteResponseVrParams + requestParams = deleteRequestParams, + responseVrParams = deleteResponseVrParams } --[[ Local Functions ]] -local function createInteractionChoiceSet(params, self) - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", params.requestParams) - - params.responseVrParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VR.AddCommand", params.responseVrParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :ValidIf(function(_,data) - if data.params.grammarID ~= nil then - deleteResponseVrParams.grammarID = data.params.grammarID - return true - else - return false, "grammarID should not be empty" - end - end) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") +local function createInteractionChoiceSet(pParams) + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", pParams.requestParams) + + pParams.responseVrParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VR.AddCommand", pParams.responseVrParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_, data) + if data.params.grammarID ~= nil then + deleteResponseVrParams.grammarID = data.params.grammarID + return true + else + return false, "grammarID should not be empty" + end + end) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function deleteInteractionChoiceSet(params, self) - local cid = self.mobileSession1:SendRPC("DeleteInteractionChoiceSet", params.requestParams) +local function deleteInteractionChoiceSet(pParams) + local cid = common.getMobileSession():SendRPC("DeleteInteractionChoiceSet", pParams.requestParams) - params.responseVrParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VR.DeleteCommand", params.responseVrParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + pParams.responseVrParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VR.DeleteCommand", pParams.responseVrParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) -runner.Step("CreateInteractionChoiceSet", createInteractionChoiceSet, {createAllParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) +runner.Step("CreateInteractionChoiceSet", createInteractionChoiceSet, { createAllParams }) runner.Title("Test") -runner.Step("DeleteInteractionChoiceSet Positive Case", deleteInteractionChoiceSet, {deleteAllParams}) +runner.Step("DeleteInteractionChoiceSet Positive Case", deleteInteractionChoiceSet, { deleteAllParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/010_DeleteFile_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/010_DeleteFile_PositiveCase_SUCCESS.lua index ba2fa25926..0217fa3c22 100644 --- a/test_scripts/Smoke/API/010_DeleteFile_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/010_DeleteFile_PositiveCase_SUCCESS.lua @@ -29,55 +29,58 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local requestParams = { - syncFileName = putFileParams.requestParams.syncFileName + syncFileName = putFileParams.requestParams.syncFileName } local responseBcParams = { - fileName = putFileParams.requestParams.syncFileName, - fileType = putFileParams.requestParams.fileType + fileName = putFileParams.requestParams.syncFileName, + fileType = putFileParams.requestParams.fileType } local createAllParams = { - requestParams = requestParams, - responseBcParams = responseBcParams + requestParams = requestParams, + responseBcParams = responseBcParams } --[[ Local Functions ]] -local function deleteFile(params, self) - local cid = self.mobileSession1:SendRPC("DeleteFile", params.requestParams) +local function deleteFile(pParams) + local cid = common.getMobileSession():SendRPC("DeleteFile", pParams.requestParams) - params.responseBcParams.appID = commonSmoke.getHMIAppId() - params.responseBcParams.fileName = - commonSmoke.getPathToFileInStorage(params.responseBcParams.fileName) - EXPECT_HMINOTIFICATION("BasicCommunication.OnFileRemoved", params.responseBcParams) + pParams.responseBcParams.appID = common.getHMIAppId() + pParams.responseBcParams.fileName = common.getPathToFileInAppStorage(pParams.responseBcParams.fileName) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnFileRemoved", pParams.responseBcParams) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("DeleteFile Positive Case", deleteFile, {createAllParams}) +runner.Step("DeleteFile Positive Case", deleteFile, { createAllParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/011_ListFiles_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/011_ListFiles_PositiveCase_SUCCESS.lua index 40a89d4128..7258e68daf 100644 --- a/test_scripts/Smoke/API/011_ListFiles_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/011_ListFiles_PositiveCase_SUCCESS.lua @@ -27,24 +27,27 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') local commonFunctions = require("user_modules/shared_testcases/commonFunctions") +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + --[[ Local Variables ]] local testFileNamesList = { - string.rep("a", 251) .. ".png", - " SpaceBefore", - "icon.png" + string.rep("a", 251) .. ".png", + " SpaceBefore", + "icon.png" } local putFileParams = { - requestParams = { - syncFileName = "", - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = "", + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local requestParams = {} @@ -55,28 +58,28 @@ local responseParams = { } local allParams = { - requestParams = requestParams, - responseParams = responseParams + requestParams = requestParams, + responseParams = responseParams } --[[ Local Functions ]] -local function putFile(fileName, self) - putFileParams.requestParams.syncFileName = fileName - commonSmoke.putFile(putFileParams, 1, self) +local function putFile(pFileName) + putFileParams.requestParams.syncFileName = pFileName + common.putFile(putFileParams, 1) end -local function listFiles(params, self) - local cid = self.mobileSession1:SendRPC("ListFiles", params.requestParams) +local function listFiles(params) + local cid = common.getMobileSession():SendRPC("ListFiles", params.requestParams) - self.mobileSession1:ExpectResponse(cid, params.responseParams) - :ValidIf(function(_, data) - if not commonFunctions:is_table_equal(data.payload.filenames, testFileNamesList) then - return false, "\nExpected files:\n" .. commonFunctions:convertTableToString(testFileNamesList, 1) - .. "\nActual files:\n" .. commonFunctions:convertTableToString(data.payload.filenames, 1) - end - return true + common.getMobileSession():ExpectResponse(cid, params.responseParams) + :ValidIf(function(_, data) + if not commonFunctions:is_table_equal(data.payload.filenames, testFileNamesList) then + return false, "\nExpected files:\n" .. commonFunctions:convertTableToString(testFileNamesList, 1) + .. "\nActual files:\n" .. commonFunctions:convertTableToString(data.payload.filenames, 1) + end + return true end) - :ValidIf(function(_, data) + :ValidIf(function(_, data) if not data.payload.spaceAvailable or data.payload.spaceAvailable == 0 then return false, "'spaceAvailable' is not provided or zero" end @@ -86,16 +89,17 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) for i, fileName in ipairs(testFileNamesList) do - runner.Step("Upload test file #" .. i, putFile, {fileName}) + runner.Step("Upload test file #" .. i, putFile, { fileName }) end runner.Title("Test") -runner.Step("ListFiles Positive Case", listFiles, {allParams}) +runner.Step("ListFiles Positive Case", listFiles, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua index 0333f6dfb6..3ce3bbef09 100644 --- a/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/012_PerfomInteraction_PositiveCase_SUCCESS.lua @@ -31,9 +31,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0 @@ -48,29 +49,25 @@ local putFileParams = { filePath = "files/icon.png" } -local storagePath = commonPreconditions:GetPathToSDL() .. "storage/" .. -config.application1.registerAppInterfaceParams.fullAppID .. "_" .. commonSmoke.getDeviceMAC() .. "/" - local ImageValue = { - value = storagePath .. "icon.png", + value = common.getPathToFileInAppStorage("icon.png"), imageType = "DYNAMIC", } -local function PromptValue(text) - local tmp = { +local function getPromptValue(pText) + return { { - text = text, + text = pText, type = "TEXT" } } - return tmp end -local initialPromptValue = PromptValue(" Make your choice ") +local initialPromptValue = getPromptValue(" Make your choice ") -local helpPromptValue = PromptValue(" Help Prompt ") +local helpPromptValue = getPromptValue(" Help Prompt ") -local timeoutPromptValue = PromptValue(" Time out ") +local timeoutPromptValue = getPromptValue(" Time out ") local vrHelpvalue = { { @@ -109,18 +106,13 @@ local requestParams_noVR = { } --[[ Local Functions ]] - ---! @setChoiceSet: Creates Choice structure ---! @parameters: ---! choiceIDValue - Id for created choice ---! @return: table of created choice structure -local function setChoiceSet(choiceIDValue) +local function setChoiceSet(pChoiceIDValue) local temp = { { - choiceID = choiceIDValue, - menuName ="Choice" .. tostring(choiceIDValue), + choiceID = pChoiceIDValue, + menuName ="Choice" .. tostring(pChoiceIDValue), vrCommands = { - "VrChoice" .. tostring(choiceIDValue), + "VrChoice" .. tostring(pChoiceIDValue), }, image = { value ="icon.png", @@ -131,62 +123,44 @@ local function setChoiceSet(choiceIDValue) return temp end ---! @setChoiceSet_noVR: Creates Choice structure without VRcommands ---! @parameters: ---! choiceIDValue - Id for created choice ---! @return: table of created choice structure -local function setChoiceSet_noVR(choiceIDValue) - local temp = { +local function setChoiceSet_noVR(pChoiceIDValue) + return { { - choiceID = choiceIDValue, - menuName ="Choice" .. tostring(choiceIDValue), + choiceID = pChoiceIDValue, + menuName ="Choice" .. tostring(pChoiceIDValue), image = { value ="icon.png", imageType ="STATIC", } } } - return temp end ---! @SendOnSystemContext: OnSystemContext notification ---! @parameters: ---! self - test object, ---! ctx - systemContext value ---! @return: none -local function SendOnSystemContext(self, ctx) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { appID = commonSmoke.getHMIAppId(), systemContext = ctx }) +local function sendOnSystemContext(pCtx) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = common.getHMIAppId(), + systemContext = pCtx + }) end ---! @setExChoiceSet: ChoiceSet structure for UI.PerformInteraction request ---! @parameters: ---! choiceIDValues - value of choice id ---! @return: none -local function setExChoiceSet(choiceIDValues) +local function setExChoiceSet(pChoiceIDValues) local exChoiceSet = { } - for i = 1, #choiceIDValues do + for i = 1, #pChoiceIDValues do exChoiceSet[i] = { - choiceID = choiceIDValues[i], + choiceID = pChoiceIDValues[i], image = { value = "icon.png", imageType = "STATIC", }, - menuName = "Choice" .. choiceIDValues[i] + menuName = "Choice" .. pChoiceIDValues[i] } end return exChoiceSet end ---! @ExpectOnHMIStatusWithAudioStateChanged_PI: Expectations of OnHMIStatus notification depending on the application ---! type, HMI level and interaction mode ---! @parameters: ---! self - test object, ---! request - interaction mode, ---! @return: none -local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) - if "BOTH" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", +local function expectOnHMIStatusWithAudioStateChanged_PI(pRequest) + if pRequest == "BOTH" then + common.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION" }, { hmiLevel = "FULL", audioStreamingState = "ATTENUATED", systemContext = "VRSESSION" }, @@ -194,16 +168,16 @@ local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED" }, { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) :Times(6) - elseif "VR" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + elseif pRequest == "VR" then + common.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Times(5) - elseif "MANUAL" == request then - self.mobileSession1:ExpectNotification("OnHMIStatus", + elseif pRequest == "MANUAL" then + common.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, @@ -212,311 +186,280 @@ local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) end end ---! @CreateInteractionChoiceSet: Creation of Choice Set ---! @parameters: ---! choiceSetID - id for choice set ---! self - test object ---! @return: none -local function CreateInteractionChoiceSet(choiceSetID, self) - local choiceID = choiceSetID - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { - interactionChoiceSetID = choiceSetID, +local function createInteractionChoiceSet(pChoiceSetID) + local choiceID = pChoiceSetID + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", { + interactionChoiceSetID = pChoiceSetID, choiceSet = setChoiceSet(choiceID), }) - EXPECT_HMICALL("VR.AddCommand", { + common.getHMIConnection():ExpectRequest("VR.AddCommand", { cmdID = choiceID, type = "Choice", vrCommands = { "VrChoice" .. tostring(choiceID) } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + common.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) end ---! @CreateInteractionChoiceSet_noVR: Creation of Choice Set with no vrCommands ---! @parameters: ---! choiceSetID - id for choice set ---! self - test object ---! @return: none -local function CreateInteractionChoiceSet_noVR(choiceSetID, self) - local choiceID = choiceSetID - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { - interactionChoiceSetID = choiceSetID, +local function createInteractionChoiceSet_noVR(pChoiceSetID) + local choiceID = pChoiceSetID + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", { + interactionChoiceSetID = pChoiceSetID, choiceSet = setChoiceSet_noVR(choiceID), }) - self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + common.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) end ---! @PI_PerformViaVR_ONLY: Processing PI with interaction mode VR_ONLY with performing selection ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaVR_ONLY(paramsSend, self) - paramsSend.interactionMode = "VR_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaVR_ONLY(pParams) + pParams.interactionMode = "VR_ONLY" + local cid = common.getMobileSession():SendRPC("PerformInteraction", pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) - :Do(function(_,data) + :Do(function(_, data) local function vrResponse() - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendNotification("VR.Started") - SendOnSystemContext(self, "VRSESSION") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("VR.Stopped") - SendOnSystemContext(self, "MAIN") + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("VR.Started") + sendOnSystemContext("VRSESSION") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("VR.Stopped") + sendOnSystemContext("MAIN") end - RUN_AFTER(vrResponse, 1000) + common.runAfter(vrResponse, 1000) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText, + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText, }) :Do(function(_,data) - EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + common.getHMIConnection():ExpectRequest("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) :Do(function() - self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + common.getHMIConnection():SendError(data.id, data.method, "ABORTED", "Error message") end) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") - self.mobileSession1:ExpectResponse(cid, - { success = true, resultCode = "SUCCESS", choiceID = paramsSend.interactionChoiceSetIDList[1] }) + expectOnHMIStatusWithAudioStateChanged_PI("VR") + common.getMobileSession():ExpectResponse(cid, { + success = true, resultCode = "SUCCESS", choiceID = pParams.interactionChoiceSetIDList[1] + }) end ---! @PI_PerformViaMANUAL_ONLY: Processing PI with interaction mode MANUAL_ONLY with performing selection ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaMANUAL_ONLY(paramsSend, self) - paramsSend.interactionMode = "MANUAL_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction", paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaMANUAL_ONLY(pParams) + pParams.interactionMode = "MANUAL_ONLY" + local cid = common.getMobileSession():SendRPC("PerformInteraction", pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) - :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText } }) - :Do(function(_,data) - SendOnSystemContext(self,"HMI_OBSCURED") + :Do(function(_, data) + sendOnSystemContext("HMI_OBSCURED") local function uiResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("TTS.Stopped") - SendOnSystemContext(self,"MAIN") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { + choiceID = pParams.interactionChoiceSetIDList[1] + }) + common.getHMIConnection():SendNotification("TTS.Stopped") + sendOnSystemContext("MAIN") end - RUN_AFTER(uiResponse, 1000) + common.runAfter(uiResponse, 1000) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "MANUAL") - self.mobileSession1:ExpectResponse(cid, - { success = true, resultCode = "SUCCESS", choiceID = paramsSend.interactionChoiceSetIDList[1] }) + expectOnHMIStatusWithAudioStateChanged_PI("MANUAL") + common.getMobileSession():ExpectResponse(cid, { + success = true, resultCode = "SUCCESS", choiceID = pParams.interactionChoiceSetIDList[1] + }) end ---! @PI_PerformViaBOTH: Processing PI with interaction mode BOTH with timeout on VR and IU ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaBOTH(paramsSend, self) - paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaBOTH(pParams) + pParams.interactionMode = "BOTH" + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) - :Do(function(_,data) - self.hmiConnection:SendNotification("VR.Started") - self.hmiConnection:SendNotification("TTS.Started") - SendOnSystemContext(self,"VRSESSION") + :Do(function(_, data) + common.getHMIConnection():SendNotification("VR.Started") + common.getHMIConnection():SendNotification("TTS.Started") + sendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("TTS.Started") end - RUN_AFTER(firstSpeakTimeOut, 5) + common.runAfter(firstSpeakTimeOut, 5) local function vrResponse() - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - self.hmiConnection:SendNotification("VR.Stopped") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + common.getHMIConnection():SendNotification("VR.Stopped") end - RUN_AFTER(vrResponse, 20) + common.runAfter(vrResponse, 20) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText }, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText }) - :Do(function(_,data) + :Do(function(_, data) local function choiceIconDisplayed() - SendOnSystemContext(self,"HMI_OBSCURED") + sendOnSystemContext("HMI_OBSCURED") end - RUN_AFTER(choiceIconDisplayed, 25) + common.runAfter(choiceIconDisplayed, 25) local function uiResponse() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - SendOnSystemContext(self,"MAIN") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + sendOnSystemContext("MAIN") end - RUN_AFTER(uiResponse, 30) + common.runAfter(uiResponse, 30) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) + expectOnHMIStatusWithAudioStateChanged_PI("BOTH") + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) end ---! @PI_PerformViaBOTHuiChoice: Processing PI with interaction mode BOTH with user choice on UI part ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaBOTHuiChoice(paramsSend, self) - paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaBOTHuiChoice(pParams) + pParams.interactionMode = "BOTH" + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) :Do(function(_,data) - self.hmiConnection:SendNotification("VR.Started") - self.hmiConnection:SendNotification("TTS.Started") - SendOnSystemContext(self,"VRSESSION") + common.getHMIConnection():SendNotification("VR.Started") + common.getHMIConnection():SendNotification("TTS.Started") + sendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("TTS.Started") end - RUN_AFTER(firstSpeakTimeOut, 1000) + common.runAfter(firstSpeakTimeOut, 1000) local function vrResponse() - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - self.hmiConnection:SendNotification("VR.Stopped") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + common.getHMIConnection():SendNotification("VR.Stopped") end - RUN_AFTER(vrResponse, 2000) + common.runAfter(vrResponse, 2000) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText }, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText }) :Do(function(_,data) local function choiceIconDisplayed() - SendOnSystemContext(self,"HMI_OBSCURED") + sendOnSystemContext("HMI_OBSCURED") end - RUN_AFTER(choiceIconDisplayed, 2050) + common.runAfter(choiceIconDisplayed, 2050) local function uiResponse() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - SendOnSystemContext(self,"MAIN") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + sendOnSystemContext("MAIN") end - RUN_AFTER(uiResponse, 3000) + common.runAfter(uiResponse, 3000) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", - choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "MENU" }) + expectOnHMIStatusWithAudioStateChanged_PI("BOTH") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = pParams.interactionChoiceSetIDList[1], triggerSource = "MENU" }) end ---! @PI_PerformViaBOTHvrChoice: Processing PI with interaction mode BOTH with user choice on VR part ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaBOTHvrChoice(paramsSend, self) - paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaBOTHvrChoice(pParams) + pParams.interactionMode = "BOTH" + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendNotification("VR.Started") - SendOnSystemContext(self,"VRSESSION") + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("VR.Started") + sendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("TTS.Stopped") end - RUN_AFTER(firstSpeakTimeOut, 1000) + common.runAfter(firstSpeakTimeOut, 1000) local function vrResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("VR.Stopped") - SendOnSystemContext(self, "MAIN") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + common.getHMIConnection():SendNotification("VR.Stopped") + sendOnSystemContext("MAIN") end - RUN_AFTER(vrResponse, 2000) + common.runAfter(vrResponse, 2000) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText }, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText }) :Do(function(_,data) - EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + common.getHMIConnection():ExpectRequest("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) :Do(function() - self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + common.getHMIConnection():SendError(data.id, data.method, "ABORTED", "Error message") end) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", - choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "VR" }) + expectOnHMIStatusWithAudioStateChanged_PI("VR") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = pParams.interactionChoiceSetIDList[1], triggerSource = "VR" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) -runner.Step("CreateInteractionChoiceSet with id 100", CreateInteractionChoiceSet, {100}) -runner.Step("CreateInteractionChoiceSet with id 200", CreateInteractionChoiceSet, {200}) -runner.Step("CreateInteractionChoiceSet with id 300", CreateInteractionChoiceSet, {300}) -runner.Step("CreateInteractionChoiceSet no VR commands with id 400", CreateInteractionChoiceSet_noVR, {400}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) +runner.Step("CreateInteractionChoiceSet with id 100", createInteractionChoiceSet, { 100 }) +runner.Step("CreateInteractionChoiceSet with id 200", createInteractionChoiceSet, { 200 }) +runner.Step("CreateInteractionChoiceSet with id 300", createInteractionChoiceSet, { 300 }) +runner.Step("CreateInteractionChoiceSet no VR commands with id 400", createInteractionChoiceSet_noVR, { 400 }) runner.Title("Test") -runner.Step("PerformInteraction with VR_ONLY interaction mode", PI_PerformViaVR_ONLY, {requestParams}) -runner.Step("PerformInteraction with MANUAL_ONLY interaction mode", PI_PerformViaMANUAL_ONLY, {requestParams}) -runner.Step("PerformInteraction with MANUAL_ONLY interaction mode no VR commands", PI_PerformViaMANUAL_ONLY, - {requestParams_noVR}) -runner.Step("PerformInteraction with BOTH interaction mode TIMED_OUT", PI_PerformViaBOTH, {requestParams}) -runner.Step("PerformInteraction with BOTH interaction mode choice via UI", PI_PerformViaBOTHuiChoice, {requestParams}) -runner.Step("PerformInteraction with BOTH interaction mode choice via VR", PI_PerformViaBOTHvrChoice, {requestParams}) +runner.Step("PerformInteraction with VR_ONLY interaction mode", PI_ViaVR_ONLY, { requestParams }) +runner.Step("PerformInteraction with MANUAL_ONLY interaction mode", PI_ViaMANUAL_ONLY, { requestParams }) +runner.Step("PerformInteraction with MANUAL_ONLY interaction mode no VR commands", PI_ViaMANUAL_ONLY, + { requestParams_noVR }) +runner.Step("PerformInteraction with BOTH interaction mode", PI_ViaBOTH, { requestParams }) +runner.Step("PerformInteraction with BOTH interaction mode choice via UI", PI_ViaBOTHuiChoice, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode choice via VR", PI_ViaBOTHvrChoice, {requestParams}) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/013_ScrollableMessage_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/013_ScrollableMessage_PositiveCase_SUCCESS.lua index affb12043a..b2c1790dff 100644 --- a/test_scripts/Smoke/API/013_ScrollableMessage_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/013_ScrollableMessage_PositiveCase_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { @@ -81,43 +84,45 @@ local allParams = { } --[[ Local Functions ]] -local function ScrollableMessage(params, self) - local cid = self.mobileSession1:SendRPC("ScrollableMessage", params.requestParams) - params.responseUiParams.appID = commonSmoke.getHMIAppId() - for _, v in pairs(params.responseUiParams.softButtons) do +local function scrollableMessage(pParams) + local cid = common.getMobileSession():SendRPC("ScrollableMessage", pParams.requestParams) + pParams.responseUiParams.appID = common.getHMIAppId() + for _, v in pairs(pParams.responseUiParams.softButtons) do if v.image then - v.image.value = commonSmoke.getPathToFileInStorage("icon.png") + v.image.value = common.getPathToFileInAppStorage("icon.png") end end - EXPECT_HMICALL("UI.ScrollableMessage", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { appID = params.responseUiParams.appID, systemContext = "HMI_OBSCURED" }) - local function uiResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { appID = params.responseUiParams.appID, systemContext = "MAIN" }) - end - RUN_AFTER(uiResponse, 1000) - end) - local AudibleState = commonSmoke.GetAudibleState() - self.mobileSession1:ExpectNotification("OnHMIStatus", - { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = AudibleState }, - { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = AudibleState }) + common.getHMIConnection():ExpectRequest("UI.ScrollableMessage", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = pParams.responseUiParams.appID, systemContext = "HMI_OBSCURED" + }) + local function uiResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = pParams.responseUiParams.appID, systemContext = "MAIN" + }) + end + common.runAfter(uiResponse, 1000) + end) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Times(2) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("ScrollableMessage Positive Case", ScrollableMessage, {allParams}) +runner.Step("ScrollableMessage Positive Case", scrollableMessage, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/014_SetMediaClockTimer_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/014_SetMediaClockTimer_PositiveCase_SUCCESS.lua index 73c753774d..2e797207d1 100644 --- a/test_scripts/Smoke/API/014_SetMediaClockTimer_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/014_SetMediaClockTimer_PositiveCase_SUCCESS.lua @@ -29,11 +29,15 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] -local updateMode = {"COUNTUP", "COUNTDOWN", "PAUSE", "RESUME", "CLEAR"} +local updateMode = { "COUNTUP", "COUNTDOWN", "PAUSE", "RESUME", "CLEAR" } + +local indicator = { "PLAY_PAUSE", "PLAY", "PAUSE", "STOP" } local requestParams = { startTime = { @@ -48,38 +52,38 @@ local requestParams = { } } -local indicator = {"PLAY_PAUSE", "PLAY", "PAUSE", "STOP"} - --[[ Local Functions ]] -local function SetMediaClockTimer(pParams, pMode, pIndicator, self) - local Parameters = commonFunctions:cloneTable(pParams) - Parameters.updateMode = pMode - Parameters.audioStreamingIndicator = pIndicator +local function setMediaClockTimer(pParams, pMode, pIndicator) + local params = common.cloneTable(pParams) + params.updateMode = pMode + params.audioStreamingIndicator = pIndicator if pMode == "COUNTDOWN" then - Parameters.endTime.minutes = Parameters.startTime.minutes - 1 + params.endTime.minutes = params.startTime.minutes - 1 end - local cid = self.mobileSession1:SendRPC("SetMediaClockTimer", Parameters) - Parameters.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.SetMediaClockTimer", Parameters) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + local cid = common.getMobileSession():SendRPC("SetMediaClockTimer", params) + params.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.SetMediaClockTimer", params) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, value in pairs (updateMode) do for _, value2 in pairs (indicator) do - runner.Step("SetMediaClockTimer Positive Case with udate mode " .. value .. " " .. value2 , SetMediaClockTimer, { requestParams,value,value2 }) + runner.Step("SetMediaClockTimer Positive Case with udate mode " .. value + .. " " .. value2, setMediaClockTimer, { requestParams,value,value2 }) end end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/015_Show_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/015_Show_PositiveCase_SUCCESS.lua index 0f344fcdac..fe859a47ba 100644 --- a/test_scripts/Smoke/API/015_Show_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/015_Show_PositiveCase_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { @@ -110,11 +113,11 @@ local responseUiParams = { alignment = requestParams.alignment, graphic = { imageType = requestParams.graphic.imageType, - value = commonSmoke.getPathToFileInStorage(requestParams.graphic.value) + value = common.getPathToFileInAppStorage(requestParams.graphic.value) }, secondaryGraphic = { imageType = requestParams.secondaryGraphic.imageType, - value = commonSmoke.getPathToFileInStorage(requestParams.secondaryGraphic.value) + value = common.getPathToFileInAppStorage(requestParams.secondaryGraphic.value) } } @@ -124,26 +127,27 @@ local allParams = { } --[[ Local Functions ]] -local function Show(pParams, self) - local cid = self.mobileSession1:SendRPC("Show", pParams.requestParams) - pParams.responseUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.Show", pParams.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) +local function show(pParams) + local cid = common.getMobileSession():SendRPC("Show", pParams.requestParams) + pParams.responseUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.Show", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, { putFileParams }) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("Show Positive Case", Show, { allParams }) +runner.Step("Show Positive Case", show, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/016_ShowConstantTBT_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/016_ShowConstantTBT_PositiveCase_SUCCESS.lua index 21a7fd06bb..c5f83e78c1 100644 --- a/test_scripts/Smoke/API/016_ShowConstantTBT_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/016_ShowConstantTBT_PositiveCase_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { @@ -111,29 +114,30 @@ local allParams = { } --[[ Local Functions ]] -local function showConstantTBT(params, self) - local cid = self.mobileSession1:SendRPC("ShowConstantTBT", params.requestParams) - params.responseUiParams.appID = commonSmoke.getHMIAppId() - params.responseUiParams.turnIcon.value = commonSmoke.getPathToFileInStorage(params.requestParams.turnIcon.value) - params.responseUiParams.nextTurnIcon.value = commonSmoke.getPathToFileInStorage(params.requestParams.nextTurnIcon.value) - params.responseUiParams.softButtons[1].image.value = commonSmoke.getPathToFileInStorage(params.requestParams.softButtons[1].image.value) - EXPECT_HMICALL("Navigation.ShowConstantTBT", params.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) +local function showConstantTBT(pParams) + local cid = common.getMobileSession():SendRPC("ShowConstantTBT", pParams.requestParams) + pParams.responseUiParams.appID = common.getHMIAppId() + pParams.responseUiParams.turnIcon.value = common.getPathToFileInAppStorage(pParams.requestParams.turnIcon.value) + pParams.responseUiParams.nextTurnIcon.value = common.getPathToFileInAppStorage(pParams.requestParams.nextTurnIcon.value) + pParams.responseUiParams.softButtons[1].image.value = common.getPathToFileInAppStorage(pParams.requestParams.softButtons[1].image.value) + common.getHMIConnection():ExpectRequest("Navigation.ShowConstantTBT", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, {putFileParams}) runner.Title("Test") -runner.Step("ShowConstantTBT Positive Case", showConstantTBT, {allParams}) +runner.Step("ShowConstantTBT Positive Case", showConstantTBT, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/017_Slider_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/017_Slider_PositiveCase_SUCCESS.lua index 73323feedb..035e6cf881 100644 --- a/test_scripts/Smoke/API/017_Slider_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/017_Slider_PositiveCase_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { @@ -41,34 +44,37 @@ local requestParams = { } --[[ Local Functions ]] -local function slider(params, self) - local cid = self.mobileSession1:SendRPC("Slider", params) - params.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.Slider", params) - :Do(function(_,data) - self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = params.appID, systemContext = "HMI_OBSCURED" }) +local function slider(pParams) + local cid = common.getMobileSession():SendRPC("Slider", pParams) + pParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.Slider", pParams) + :Do(function(_, data) + common.getHMIConnection():SendNotification("UI.OnSystemContext", + { appID = pParams.appID, systemContext = "HMI_OBSCURED" }) local function sendReponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {sliderPosition = 1}) - self.hmiConnection:SendNotification("UI.OnSystemContext",{ appID = params.appID, systemContext = "MAIN" }) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { sliderPosition = 1 }) + common.getHMIConnection():SendNotification("UI.OnSystemContext", + { appID = pParams.appID, systemContext = "MAIN" }) end - RUN_AFTER(sendReponse, 1000) + common.runAfter(sendReponse, 1000) end) - self.mobileSession1:ExpectNotification("OnHMIStatus", - { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = commonSmoke.GetAudibleState() }, - { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = commonSmoke.GetAudibleState() }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { systemContext = "HMI_OBSCURED", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Times(2) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1 }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", sliderPosition = 1 }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") -runner.Step("Slider Positive Case", slider, {requestParams}) +runner.Step("Slider Positive Case", slider, { requestParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/018_SendLocation_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/018_SendLocation_PositiveCase_SUCCESS.lua index 1e5f4d905f..1083d4fab1 100644 --- a/test_scripts/Smoke/API/018_SendLocation_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/018_SendLocation_PositiveCase_SUCCESS.lua @@ -29,9 +29,12 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Local Variables ]] +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local pParams ]] local putFileParams = { requestParams = { syncFileName = 'icon.png', @@ -59,27 +62,28 @@ local requestParams = { } --[[ Local Functions ]] -local function sendLocation(params, self) - local cid = self.mobileSession1:SendRPC("SendLocation", params) - params.appID = commonSmoke.getHMIAppId() - params.locationImage.value = commonSmoke.getPathToFileInStorage(params.locationImage.value) - EXPECT_HMICALL("Navigation.SendLocation", params) +local function sendLocation(pParams) + local cid = common.getMobileSession():SendRPC("SendLocation", pParams) + pParams.appID = common.getHMIAppId() + pParams.locationImage.value = common.getPathToFileInAppStorage(pParams.locationImage.value) + common.getHMIConnection():ExpectRequest("Navigation.SendLocation", pParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, { putFileParams }) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") runner.Step("SendLocation Positive Case", sendLocation, { requestParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/019_SetAppIcon_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/019_SetAppIcon_PositiveCase_SUCCESS.lua index d5784d76f4..c38b2d8b0e 100644 --- a/test_scripts/Smoke/API/019_SetAppIcon_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/019_SetAppIcon_PositiveCase_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { @@ -49,7 +52,7 @@ local requestParams = { local requestUiParams = { syncFileName = { imageType = "DYNAMIC", - value = commonSmoke.getPathToFileInStorage(requestParams.syncFileName) + value = common.getPathToFileInAppStorage(requestParams.syncFileName) } } @@ -59,26 +62,27 @@ local allParams = { } --[[ Local Functions ]] -local function setAppIcon(params, self) - local cid = self.mobileSession1:SendRPC("SetAppIcon", params.requestParams) - params.requestUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.SetAppIcon", params.requestUiParams) +local function setAppIcon(pParams) + local cid = common.getMobileSession():SendRPC("SetAppIcon", pParams.requestParams) + pParams.requestUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.SetAppIcon", pParams.requestUiParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, { putFileParams }) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") runner.Step("SetAppIcon Positive Case", setAppIcon, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/020_SetDisplayLayout_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/020_SetDisplayLayout_PositiveCase_SUCCESS.lua index c652a6d501..c8a6254523 100644 --- a/test_scripts/Smoke/API/020_SetDisplayLayout_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/020_SetDisplayLayout_PositiveCase_SUCCESS.lua @@ -29,215 +29,219 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function getSoftButCapValues() - return { - { - shortPressAvailable = true, - longPressAvailable = true, - upDownAvailable = true, - imageSupported = true - } - } + return { + { + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true, + imageSupported = true + } + } end local function getPresetBankCapValues() - return { onScreenPresetsAvailable = true } + return { onScreenPresetsAvailable = true } end local function getButCapValues() - local names = { - "PRESET_0", - "PRESET_1", - "PRESET_2", - "PRESET_3", - "PRESET_4", - "PRESET_5", - "PRESET_6", - "PRESET_7", - "PRESET_8", - "PRESET_9", - "OK", - "SEEKLEFT", - "SEEKRIGHT", - "TUNEUP", - "TUNEDOWN" - } - local values = { } - for _, v in pairs(names) do - local item = { - name = v, - shortPressAvailable = true, - longPressAvailable = true, - upDownAvailable = true - } - table.insert(values, item) - end + local names = { + "PRESET_0", + "PRESET_1", + "PRESET_2", + "PRESET_3", + "PRESET_4", + "PRESET_5", + "PRESET_6", + "PRESET_7", + "PRESET_8", + "PRESET_9", + "OK", + "SEEKLEFT", + "SEEKRIGHT", + "TUNEUP", + "TUNEDOWN" + } + local values = { } + for _, v in pairs(names) do + local item = { + name = v, + shortPressAvailable = true, + longPressAvailable = true, + upDownAvailable = true + } + table.insert(values, item) + end return values end local function getDisplayCapImageFieldsValues() - local names = { - "softButtonImage", - "choiceImage", - "choiceSecondaryImage", - "vrHelpItem", - "turnIcon", - "menuIcon", - "cmdIcon", - "graphic", - "secondaryGraphic", - "showConstantTBTIcon", - "showConstantTBTNextTurnIcon" - } - local values = { } - for _, v in pairs(names) do - local item = { - imageResolution = { - resolutionHeight = 64, - resolutionWidth = 64 - }, - imageTypeSupported = { - "GRAPHIC_BMP", - "GRAPHIC_JPEG", - "GRAPHIC_PNG" - }, - name = v - } - table.insert(values, item) - end + local names = { + "softButtonImage", + "choiceImage", + "choiceSecondaryImage", + "vrHelpItem", + "turnIcon", + "menuIcon", + "cmdIcon", + "graphic", + "secondaryGraphic", + "showConstantTBTIcon", + "showConstantTBTNextTurnIcon" + } + local values = { } + for _, v in pairs(names) do + local item = { + imageResolution = { + resolutionHeight = 64, + resolutionWidth = 64 + }, + imageTypeSupported = { + "GRAPHIC_BMP", + "GRAPHIC_JPEG", + "GRAPHIC_PNG" + }, + name = v + } + table.insert(values, item) + end return values end local function getDisplayCapTextFieldsValues() - -- some text fields are excluded due to SDL issue + -- some text fields are excluded due to SDL issue local names = { - "alertText1", - "alertText2", - "alertText3", - "audioPassThruDisplayText1", - "audioPassThruDisplayText2", - "ETA", - "initialInteractionText", - -- "phoneNumber", - "mainField1", - "mainField2", - "mainField3", - "mainField4", - "mediaClock", - "mediaTrack", - "menuName", - "menuTitle", - -- "addressLines", - -- "locationName", - "navigationText1", - "navigationText2", - -- "locationDescription", - "scrollableMessageBody", - "secondaryText", - "sliderFooter", - "sliderHeader", - "statusBar", - "tertiaryText", - "totalDistance", - -- "notificationText", - -- "navigationText", - -- "timeToDestination", - -- "turnText" - } - local values = { } - for _, v in pairs(names) do - local item = { - characterSet = "TYPE2SET", - name = v, - rows = 1, - width = 500 - } - table.insert(values, item) - end + "alertText1", + "alertText2", + "alertText3", + "audioPassThruDisplayText1", + "audioPassThruDisplayText2", + "ETA", + "initialInteractionText", + -- "phoneNumber", + "mainField1", + "mainField2", + "mainField3", + "mainField4", + "mediaClock", + "mediaTrack", + "menuName", + "menuTitle", + -- "addressLines", + -- "locationName", + "navigationText1", + "navigationText2", + -- "locationDescription", + "scrollableMessageBody", + "secondaryText", + "sliderFooter", + "sliderHeader", + "statusBar", + "tertiaryText", + "totalDistance", + -- "notificationText", + -- "navigationText", + -- "timeToDestination", + -- "turnText" + } + local values = { } + for _, v in pairs(names) do + local item = { + characterSet = "TYPE2SET", + name = v, + rows = 1, + width = 500 + } + table.insert(values, item) + end return values end local function getDisplayCapValues() - -- some capabilities are excluded due to SDL issue - return { - displayType = "GEN2_8_DMA", - displayName = "GENERIC_DISPLAY", - graphicSupported = true, - -- imageCapabilities = { - -- "DYNAMIC", - -- "STATIC" - -- }, - imageFields = getDisplayCapImageFieldsValues(), - mediaClockFormats = { - "CLOCK1", - "CLOCK2", - "CLOCK3", - "CLOCKTEXT1", - "CLOCKTEXT2", - "CLOCKTEXT3", - "CLOCKTEXT4" - }, - numCustomPresetsAvailable = 10, - screenParams = { - resolution = { - resolutionHeight = 480, - resolutionWidth = 800 - }, - touchEventAvailable = { - doublePressAvailable = false, - multiTouchAvailable = true, - pressAvailable = true - } - }, - templatesAvailable = { - "ONSCREEN_PRESETS" - }, - textFields = getDisplayCapTextFieldsValues() - } + -- some capabilities are excluded due to SDL issue + return { + displayType = "GEN2_8_DMA", + displayName = "GENERIC_DISPLAY", + graphicSupported = true, + -- imageCapabilities = { + -- "DYNAMIC", + -- "STATIC" + -- }, + imageFields = getDisplayCapImageFieldsValues(), + mediaClockFormats = { + "CLOCK1", + "CLOCK2", + "CLOCK3", + "CLOCKTEXT1", + "CLOCKTEXT2", + "CLOCKTEXT3", + "CLOCKTEXT4" + }, + numCustomPresetsAvailable = 10, + screenParams = { + resolution = { + resolutionHeight = 480, + resolutionWidth = 800 + }, + touchEventAvailable = { + doublePressAvailable = false, + multiTouchAvailable = true, + pressAvailable = true + } + }, + templatesAvailable = { + "ONSCREEN_PRESETS" + }, + textFields = getDisplayCapTextFieldsValues() + } end local function getRequestParams() - return { displayLayout = "ONSCREEN_PRESETS" } + return { displayLayout = "ONSCREEN_PRESETS" } end local function getResponseParams() - return { - displayCapabilities = getDisplayCapValues(), - buttonCapabilities = getButCapValues(), - softButtonCapabilities = getSoftButCapValues(), - presetBankCapabilities = getPresetBankCapValues() - } + return { + displayCapabilities = getDisplayCapValues(), + buttonCapabilities = getButCapValues(), + softButtonCapabilities = getSoftButCapValues(), + presetBankCapabilities = getPresetBankCapValues() + } end -local function setDisplaySuccess(self) - local responseParams = getResponseParams() - local cid = self.mobileSession1:SendRPC("SetDisplayLayout", getRequestParams()) - EXPECT_HMICALL("UI.SetDisplayLayout", getRequestParams()) - :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) - end) - self.mobileSession1:ExpectResponse(cid, { - success = true, - resultCode = "WARNINGS", - displayCapabilities = responseParams.displayCapabilities, - buttonCapabilities = responseParams.buttonCapabilities, - softButtonCapabilities = responseParams.softButtonCapabilities, - presetBankCapabilities = responseParams.presetBankCapabilities - }) +local function setDisplaySuccess() + local responseParams = getResponseParams() + local cid = common.getMobileSession():SendRPC("SetDisplayLayout", getRequestParams()) + common.getHMIConnection():ExpectRequest("UI.SetDisplayLayout", getRequestParams()) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) + end) + common.getMobileSession():ExpectResponse(cid, { + success = true, + resultCode = "WARNINGS", + displayCapabilities = responseParams.displayCapabilities, + buttonCapabilities = responseParams.buttonCapabilities, + softButtonCapabilities = responseParams.softButtonCapabilities, + presetBankCapabilities = responseParams.presetBankCapabilities + }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("SetDisplay Positive Case", setDisplaySuccess) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/021_Speak_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/021_Speak_PositiveCase_SUCCESS.lua index 2d60fadd12..bedb28689e 100644 --- a/test_scripts/Smoke/API/021_Speak_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/021_Speak_PositiveCase_SUCCESS.lua @@ -28,57 +28,61 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function getRequestParams() - return { - ttsChunks = { - { - text ="a", - type ="TEXT" - } - } - } + return { + ttsChunks = { + { + text ="a", + type ="TEXT" + } + } + } end -local function speakSuccess(self) - print("Waiting 20s ...") - local cid = self.mobileSession1:SendRPC("Speak", getRequestParams()) - EXPECT_HMICALL("TTS.Speak", getRequestParams()) - :Do(function(_, data) - self.hmiConnection:SendNotification("TTS.Started") - local function sendSpeakResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - self.hmiConnection:SendNotification("TTS.Stopped") - end - local function sendOnResetTimeout() - self.hmiConnection:SendNotification("TTS.OnResetTimeout", - { appID = commonSmoke.getHMIAppId(), methodName = "TTS.Speak" }) - end - RUN_AFTER(sendOnResetTimeout, 9000) - RUN_AFTER(sendSpeakResponse, 18000) - end) +local function speakSuccess() + print("Waiting 20s ...") + local cid = common.getMobileSession():SendRPC("Speak", getRequestParams()) + common.getHMIConnection():ExpectRequest("TTS.Speak", getRequestParams()) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + local function sendSpeakResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + local function sendOnResetTimeout() + common.getHMIConnection():SendNotification("TTS.OnResetTimeout", + { appID = common.getHMIAppId(), methodName = "TTS.Speak" }) + end + common.runAfter(sendOnResetTimeout, 9000) + common.runAfter(sendSpeakResponse, 18000) + end) - self.mobileSession1:ExpectNotification("OnHMIStatus", - { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, - { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) - :Times(2) - :Timeout(20000) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) + :Times(2) + :Timeout(20000) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - :Timeout(20000) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :Timeout(20000) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("Speak Positive Case", speakSuccess) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/022_SubscribeButton_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/022_SubscribeButton_PositiveCase_SUCCESS.lua index 1dfc139554..30539f38e6 100644 --- a/test_scripts/Smoke/API/022_SubscribeButton_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/022_SubscribeButton_PositiveCase_SUCCESS.lua @@ -28,7 +28,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local buttonName = { @@ -50,20 +53,22 @@ local buttonName = { } --[[ Local Functions ]] -local function subscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") +local function subscribeButton(pButName) + local cid = common.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", + { appID = appIDvalue, name = pButName, isSubscribed = true }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, v in pairs(buttonName) do @@ -71,4 +76,4 @@ for _, v in pairs(buttonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/023_UnsubscribeButton_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/023_UnsubscribeButton_PositiveCase_SUCCESS.lua index f8babcd204..6a8acb1ce2 100644 --- a/test_scripts/Smoke/API/023_UnsubscribeButton_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/023_UnsubscribeButton_PositiveCase_SUCCESS.lua @@ -28,7 +28,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local buttonName = { @@ -50,29 +53,31 @@ local buttonName = { } --[[ Local Functions ]] -local function subscribeButtons(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") +local function subscribeButtons(pButName) + local cid = common.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", + { appID = appIDvalue, name = pButName, isSubscribed = true }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function unsubscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("UnsubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", +local function unsubscribeButton(pButName) + local cid = common.getMobileSession():SendRPC("UnsubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = false }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) for _, v in pairs(buttonName) do runner.Step("SubscribeButton " .. v .. " Positive Case", subscribeButtons, { v }) end @@ -83,4 +88,4 @@ for _, v in pairs(buttonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/024_SubscribeVehicleData_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/024_SubscribeVehicleData_PositiveCase_SUCCESS.lua index 9deebd5716..5574c39f83 100644 --- a/test_scripts/Smoke/API/024_SubscribeVehicleData_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/024_SubscribeVehicleData_PositiveCase_SUCCESS.lua @@ -30,7 +30,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local VDValues = { @@ -93,30 +96,31 @@ local function setVDResponse() return temp end -local function subscribeVD(pParams, self) +local function subscribeVD(pParams) pParams.requestParams = setVDRequest() - local cid = self.mobileSession1:SendRPC("SubscribeVehicleData", pParams.requestParams) + local cid = common.getMobileSession():SendRPC("SubscribeVehicleData", pParams.requestParams) pParams.responseUiParams = setVDResponse() - EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData", pParams.requestParams) + common.getHMIConnection():ExpectRequest("VehicleInfo.SubscribeVehicleData", pParams.requestParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) end) - local MobResp = commonSmoke.cloneTable(pParams.responseUiParams) - MobResp.success = true - MobResp.resultCode = "SUCCESS" - self.mobileSession1:ExpectResponse(cid, MobResp) - self.mobileSession1:ExpectNotification("OnHashChange") + local mobResp = pParams.responseUiParams + mobResp.success = true + mobResp.resultCode = "SUCCESS" + common.getMobileSession():ExpectResponse(cid, mobResp) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("SubscribeVehicleData Positive Case", subscribeVD, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/025_UnsubscribeVehicleData_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/025_UnsubscribeVehicleData_PositiveCase_SUCCESS.lua index 8014f50af6..d66006541a 100644 --- a/test_scripts/Smoke/API/025_UnsubscribeVehicleData_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/025_UnsubscribeVehicleData_PositiveCase_SUCCESS.lua @@ -30,7 +30,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local VDValues = { @@ -93,41 +96,42 @@ local function setVDResponse() return temp end -local function subscribeVD(pParams, self) +local function subscribeVD(pParams) pParams.requestParams = setVDRequest() - local cid = self.mobileSession1:SendRPC("SubscribeVehicleData", pParams.requestParams) + local cid = common.getMobileSession():SendRPC("SubscribeVehicleData", pParams.requestParams) pParams.responseUiParams = setVDResponse() - EXPECT_HMICALL("VehicleInfo.SubscribeVehicleData", pParams.requestParams) + common.getHMIConnection():ExpectRequest("VehicleInfo.SubscribeVehicleData", pParams.requestParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) - end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function unsubscribeVD(pParams, self) - local cid = self.mobileSession1:SendRPC("UnsubscribeVehicleData", pParams.requestParams) - EXPECT_HMICALL("VehicleInfo.UnsubscribeVehicleData", pParams.requestParams) +local function unsubscribeVD(pParams) + local cid = common.getMobileSession():SendRPC("UnsubscribeVehicleData", pParams.requestParams) + common.getHMIConnection():ExpectRequest("VehicleInfo.UnsubscribeVehicleData", pParams.requestParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) - end) - local MobResp = commonSmoke.cloneTable(pParams.responseUiParams) - MobResp.success = true - MobResp.resultCode = "SUCCESS" - self.mobileSession1:ExpectResponse(cid, MobResp) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) + end) + local mobResp = pParams.responseUiParams + mobResp.success = true + mobResp.resultCode = "SUCCESS" + common.getMobileSession():ExpectResponse(cid, mobResp) + common.getMobileSession():ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Step("SubscribeVehicleData", subscribeVD, { allParams }) runner.Title("Test") runner.Step("UnsubscribeVehicleData Positive Case", unsubscribeVD, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/026_GetVehicleData_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/026_GetVehicleData_PositiveCase_SUCCESS.lua index 66c1c57584..7fda4d9064 100644 --- a/test_scripts/Smoke/API/026_GetVehicleData_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/026_GetVehicleData_PositiveCase_SUCCESS.lua @@ -30,7 +30,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local vehicleDataValues = { @@ -173,27 +176,28 @@ local allParams = { } --[[ Local Functions ]] -local function getVD(pParams, self) - local cid = self.mobileSession1:SendRPC("GetVehicleData", pParams.requestParams) - EXPECT_HMICALL("VehicleInfo.GetVehicleData", pParams.requestParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) +local function getVD(pParams) + local cid = common.getMobileSession():SendRPC("GetVehicleData", pParams.requestParams) + common.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", pParams.requestParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", pParams.responseUiParams) end) - local MobResp = pParams.responseUiParams - MobResp.success = true - MobResp.resultCode = "SUCCESS" - self.mobileSession1:ExpectResponse(cid, MobResp) + local mobResp = pParams.responseUiParams + mobResp.success = true + mobResp.resultCode = "SUCCESS" + common.getMobileSession():ExpectResponse(cid, mobResp) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("GetVehicleData Positive Case", getVD, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/027_UpdateTurnList_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/027_UpdateTurnList_PositiveCase_SUCCESS.lua index 7a2e80c5da..144ad059ab 100644 --- a/test_scripts/Smoke/API/027_UpdateTurnList_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/027_UpdateTurnList_PositiveCase_SUCCESS.lua @@ -30,8 +30,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { @@ -69,13 +71,13 @@ local requestParams = { } } -local responseUiParams = commonFunctions:cloneTable(requestParams) +local responseUiParams = common.cloneTable(requestParams) responseUiParams.turnList[1].navigationText = { fieldText = requestParams.turnList[1].navigationText, fieldName = "turnText" } -responseUiParams.turnList[1].turnIcon.value = commonSmoke.getPathToFileInStorage(requestParams.turnList[1].turnIcon.value) -responseUiParams.softButtons[1].image.value = commonSmoke.getPathToFileInStorage(requestParams.softButtons[1].image.value) +responseUiParams.turnList[1].turnIcon.value = common.getPathToFileInAppStorage(requestParams.turnList[1].turnIcon.value) +responseUiParams.softButtons[1].image.value = common.getPathToFileInAppStorage(requestParams.softButtons[1].image.value) local allParams = { requestParams = requestParams, @@ -83,25 +85,26 @@ local allParams = { } --[[ Local Functions ]] -local function updateTurnList(pParams, self) - local cid = self.mobileSession1:SendRPC("UpdateTurnList", pParams.requestParams) - EXPECT_HMICALL("Navigation.UpdateTurnList", pParams.responseUiParams) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS") - end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +local function updateTurnList(pParams) + local cid = common.getMobileSession():SendRPC("UpdateTurnList", pParams.requestParams) + common.getHMIConnection():ExpectRequest("Navigation.UpdateTurnList", pParams.responseUiParams) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, { putFileParams }) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") runner.Step("UpdateTurnList Positive Case", updateTurnList, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/028_AlertManeuver_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/028_AlertManeuver_PositiveCase_SUCCESS.lua index a6bb821cb1..9d5f5138f1 100644 --- a/test_scripts/Smoke/API/028_AlertManeuver_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/028_AlertManeuver_PositiveCase_SUCCESS.lua @@ -31,8 +31,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local putFileParams = { @@ -83,10 +85,10 @@ local requestParams = { } local function naviParamsSet(tbl) - local Params = commonFunctions:cloneTable(tbl) + local Params = common.cloneTable(tbl) for k, _ in pairs(Params) do if Params[k].image then - Params[k].image.value = commonSmoke.getPathToFileInStorage(Params[k].image.value) + Params[k].image.value = common.getPathToFileInAppStorage(Params[k].image.value) end end return Params @@ -107,41 +109,42 @@ local allParams = { } --[[ Local Functions ]] -local function alertManeuver(pParams, self) - local cid = self.mobileSession1:SendRPC("AlertManeuver", pParams.requestParams) - EXPECT_HMICALL("Navigation.AlertManeuver", pParams.responseNaviParams) +local function alertManeuver(pParams) + local cid = common.getMobileSession():SendRPC("AlertManeuver", pParams.requestParams) + common.getHMIConnection():ExpectRequest("Navigation.AlertManeuver", pParams.responseNaviParams) :Do(function(_, data) - local function alertResp() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - end - RUN_AFTER(alertResp, 2000) - end) - EXPECT_HMICALL("TTS.Speak", pParams.responseTtsParams) + local function alertResp() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end + common.runAfter(alertResp, 2000) + end) + common.getHMIConnection():ExpectRequest("TTS.Speak", pParams.responseTtsParams) :Do(function(_, data) - self.hmiConnection:SendNotification("TTS.Started") - local function SpeakResp() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - self.hmiConnection:SendNotification("TTS.Stopped") - end - RUN_AFTER(SpeakResp, 1000) - end) - self.mobileSession1:ExpectNotification("OnHMIStatus", + common.getHMIConnection():SendNotification("TTS.Started") + local function SpeakResp() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + common.runAfter(SpeakResp, 1000) + end) + common.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "ATTENUATED" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "AUDIBLE" }) :Times(2) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, { putFileParams }) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") runner.Step("AlertManeuver Positive Case", alertManeuver, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/029_OnDriverDistraction_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/029_OnDriverDistraction_PositiveCase_SUCCESS.lua index e15b6a64de..b15706f762 100644 --- a/test_scripts/Smoke/API/029_OnDriverDistraction_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/029_OnDriverDistraction_PositiveCase_SUCCESS.lua @@ -27,24 +27,28 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local OnDDValue = { "DD_ON", "DD_OFF" } --[[ Local Functions ]] -local function onDriverDistraction(pOnDDValue, self) +local function onDriverDistraction(pOnDDValue) local request = { state = pOnDDValue } - self.hmiConnection:SendNotification("UI.OnDriverDistraction", request) - self.mobileSession1:ExpectNotification("OnDriverDistraction", request) + common.getHMIConnection():SendNotification("UI.OnDriverDistraction", request) + common.getMobileSession():ExpectNotification("OnDriverDistraction", request) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, v in pairs(OnDDValue) do @@ -52,4 +56,4 @@ for _, v in pairs(OnDDValue) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/030_DialNumber_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/030_DialNumber_PositiveCase_SUCCESS.lua index 8512fd748e..294ae361a0 100644 --- a/test_scripts/Smoke/API/030_DialNumber_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/030_DialNumber_PositiveCase_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { @@ -37,25 +40,26 @@ local requestParams = { } --[[ Local Functions ]] -local function dialNumber(pParams, self) - local cid = self.mobileSession1:SendRPC("DialNumber", pParams) - pParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("BasicCommunication.DialNumber", pParams) +local function dialNumber(pParams) + local cid = common.getMobileSession():SendRPC("DialNumber", pParams) + pParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("BasicCommunication.DialNumber", pParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("DialNumber Positive Case", dialNumber, { requestParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/031_PerformAudioPassThru_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/031_PerformAudioPassThru_PositiveCase_SUCCESS.lua index 3d04a95baa..d34b8dd547 100644 --- a/test_scripts/Smoke/API/031_PerformAudioPassThru_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/031_PerformAudioPassThru_PositiveCase_SUCCESS.lua @@ -33,9 +33,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { @@ -71,7 +72,7 @@ requestUiParams.audioPassThruDisplayTexts[2] = { } local requestTtsParams = {} -requestTtsParams.ttsChunks = commonFunctions:cloneTable(requestParams.initialPrompt) +requestTtsParams.ttsChunks = common.cloneTable(requestParams.initialPrompt) requestTtsParams.speakType = "AUDIO_PASS_THRU" local allParams = { @@ -81,67 +82,58 @@ local allParams = { } --[[ Local Functions ]] -local function file_check(file_name) - local file_found = io.open(file_name, "r") - if nil == file_found then - return false - end - return true -end - -local function sendOnSystemContext(self, pCtx, pAppID) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { appID = pAppID, systemContext = pCtx }) +local function sendOnSystemContext(pCtx, pAppID) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { appID = pAppID, systemContext = pCtx }) end -local function performAudioPassThru(pParams, self) - local cid = self.mobileSession1:SendRPC("PerformAudioPassThru", pParams.requestParams) - pParams.requestUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("TTS.Speak", pParams.requestTtsParams) - :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - local function ttsSpeakResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.hmiConnection:SendNotification("TTS.Stopped") - end - RUN_AFTER(ttsSpeakResponse, 50) - end) - EXPECT_HMICALL("UI.PerformAudioPassThru", pParams.requestUiParams) - :Do(function(_,data) - sendOnSystemContext(self, "HMI_OBSCURED", pParams.requestUiParams.appID) - local function uiResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - sendOnSystemContext(self, "MAIN", pParams.requestUiParams.appID) - end - RUN_AFTER(uiResponse, 1500) - end) - EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = pParams.requestUiParams.appID}) - self.mobileSession1:ExpectNotification("OnHMIStatus", +local function performAudioPassThru(pParams) + local cid = common.getMobileSession():SendRPC("PerformAudioPassThru", pParams.requestParams) + pParams.requestUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("TTS.Speak", pParams.requestTtsParams) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + local function ttsSpeakResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + common.runAfter(ttsSpeakResponse, 100) + end) + common.getHMIConnection():ExpectRequest("UI.PerformAudioPassThru", pParams.requestUiParams) + :Do(function(_, data) + sendOnSystemContext("HMI_OBSCURED", pParams.requestUiParams.appID) + local function uiResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + sendOnSystemContext("MAIN", pParams.requestUiParams.appID) + end + common.runAfter(uiResponse, 1500) + end) + common.getHMIConnection():ExpectNotification("UI.OnRecordStart", { appID = pParams.requestUiParams.appID }) + common.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "ATTENUATED", systemContext = "MAIN" }, { hmiLevel = "FULL", audioStreamingState = "ATTENUATED", systemContext = "HMI_OBSCURED" }, { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED" }, { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) :Times(4) - self.mobileSession1:ExpectNotification("OnAudioPassThru") - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - :ValidIf (function() - local file = commonPreconditions:GetPathToSDL() .. "storage/" .. "audio.wav" - if true ~= file_check(file) then - return false, "Can not found file: audio.wav" - end - return true - end) + common.getMobileSession():ExpectNotification("OnAudioPassThru") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf(function() + if common.isFileExistInAppStorage("audio.wav") ~= true then + return false, "Can not found file: audio.wav" + end + return true + end) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("PerformAudioPassThru Positive Case", performAudioPassThru, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/032_EndAudioPassThru_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/032_EndAudioPassThru_PositiveCase_SUCCESS.lua index 6d3183cd80..3c5805864b 100644 --- a/test_scripts/Smoke/API/032_EndAudioPassThru_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/032_EndAudioPassThru_PositiveCase_SUCCESS.lua @@ -30,8 +30,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { @@ -66,64 +68,55 @@ local allParams = { } --[[ Local Functions ]] -local function file_check(file_name) - local file_found = io.open(file_name, "r") - if nil == file_found then - return false - end - return true -end - -local function sendOnSystemContext(self, pCtx, pAppID) - self.hmiConnection:SendNotification("UI.OnSystemContext", +local function sendOnSystemContext(pCtx, pAppID) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { appID = pAppID, systemContext = pCtx }) end -local function EndAudioPassThru(pParams, self) +local function endAudioPassThru(pParams) local uiPerformID - local AudibleState = commonSmoke.GetAudibleState() - local cid = self.mobileSession1:SendRPC("PerformAudioPassThru", pParams.requestParams) - pParams.requestUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("UI.PerformAudioPassThru", pParams.requestUiParams) - :Do(function(_,data) - sendOnSystemContext(self, "HMI_OBSCURED", pParams.requestUiParams.appID) - uiPerformID = data.id - end) - EXPECT_HMINOTIFICATION("UI.OnRecordStart", { appID = pParams.requestUiParams.appID }) - self.mobileSession1:ExpectNotification("OnAudioPassThru") + local cid = common.getMobileSession():SendRPC("PerformAudioPassThru", pParams.requestParams) + pParams.requestUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("UI.PerformAudioPassThru", pParams.requestUiParams) + :Do(function(_, data) + sendOnSystemContext("HMI_OBSCURED", pParams.requestUiParams.appID) + uiPerformID = data.id + end) + common.getHMIConnection():ExpectNotification("UI.OnRecordStart", { appID = pParams.requestUiParams.appID }) + common.getMobileSession():ExpectNotification("OnAudioPassThru") :Do(function() - local cidEndAudioPassThru = self.mobileSession1:SendRPC("EndAudioPassThru", { }) - EXPECT_HMICALL("UI.EndAudioPassThru") - :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - self.hmiConnection:SendResponse(uiPerformID, "UI.PerformAudioPassThru", "SUCCESS", { }) - sendOnSystemContext(self, "MAIN", pParams.requestUiParams.appID) + local cidEndAudioPassThru = common.getMobileSession():SendRPC("EndAudioPassThru", { }) + common.getHMIConnection():ExpectRequest("UI.EndAudioPassThru") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendResponse(uiPerformID, "UI.PerformAudioPassThru", "SUCCESS", { }) + sendOnSystemContext("MAIN", pParams.requestUiParams.appID) + end) + common.getMobileSession():ExpectResponse(cidEndAudioPassThru, { success = true, resultCode = "SUCCESS" }) end) - self.mobileSession1:ExpectResponse(cidEndAudioPassThru, { success = true, resultCode = "SUCCESS" }) - end) - self.mobileSession1:ExpectNotification("OnHMIStatus", - { hmiLevel = "FULL", audioStreamingState = AudibleState, systemContext = "HMI_OBSCURED" }, - { hmiLevel = "FULL", audioStreamingState = AudibleState, systemContext = "MAIN" }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "HMI_OBSCURED" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) :Times(2) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - :ValidIf (function() - local file = commonPreconditions:GetPathToSDL() .. "storage/" .. "audio.wav" - if true ~= file_check(file) then - return false, "Can not found file: audio.wav" - end - return true - end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf(function() + if common.isFileExistInAppStorage("audio.wav") ~= true then + return false, "Can not found file: audio.wav" + end + return true + end) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") -runner.Step("EndAudioPassThru Positive Case", EndAudioPassThru, { allParams }) +runner.Step("EndAudioPassThru Positive Case", endAudioPassThru, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/033_ReadDID_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/033_ReadDID_PositiveCase_SUCCESS.lua index 39465a0d7e..8807a4e286 100644 --- a/test_scripts/Smoke/API/033_ReadDID_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/033_ReadDID_PositiveCase_SUCCESS.lua @@ -29,57 +29,60 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] local function setReadDIDRequest() - local temp = { + return { ecuName = 2000, didLocation = { 56832 } } - return temp end -local function setReadDIDSuccessResponse(didLocationValues) +local function setReadDIDSuccessResponse(pDIdLocationValues) local temp = { didResult = {} } - for i = 1, #didLocationValues do + for i = 1, #pDIdLocationValues do temp.didResult[i] = { resultCode = "SUCCESS", - didLocation = didLocationValues[i], + didLocation = pDIdLocationValues[i], data = "123" } end return temp end -local function readDID(self) +local function readDID() local paramsSend = setReadDIDRequest() local response = setReadDIDSuccessResponse(paramsSend.didLocation) - local cid = self.mobileSession1:SendRPC("ReadDID",paramsSend) - paramsSend.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VehicleInfo.ReadDID",paramsSend) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", response) - end) + local cid = common.getMobileSession():SendRPC("ReadDID",paramsSend) + paramsSend.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VehicleInfo.ReadDID",paramsSend) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", response) + end) local expectedResult = response expectedResult.success = true expectedResult.resultCode = "SUCCESS" - self.mobileSession1:ExpectResponse(cid, expectedResult) + common.getMobileSession():ExpectResponse(cid, expectedResult) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("ReadDID Positive Case", readDID) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/034_GetDTCs_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/034_GetDTCs_PositiveCase_SUCCESS.lua index beb81bd8d7..406045a72d 100644 --- a/test_scripts/Smoke/API/034_GetDTCs_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/034_GetDTCs_PositiveCase_SUCCESS.lua @@ -28,10 +28,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] -local function getDTCsSuccess(self) +local function getDTCsSuccess() local requestParams = { ecuName = 2, dtcMask = 3 @@ -41,15 +44,15 @@ local function getDTCsSuccess(self) dtc = { "line 0", "line 1", "line 2" } } - local cid = self.mobileSession1:SendRPC("GetDTCs", requestParams) + local cid = common.getMobileSession():SendRPC("GetDTCs", requestParams) - requestParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("VehicleInfo.GetDTCs", requestParams) + requestParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("VehicleInfo.GetDTCs", requestParams) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", responseParams) end) - self.mobileSession1:ExpectResponse(cid, { + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", ecuHeader = responseParams.ecuHeader, @@ -59,13 +62,14 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("GetDTCs Positive Case", getDTCsSuccess) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/035_ChangeRegistration_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/035_ChangeRegistration_PositiveCase_SUCCESS.lua index c7e3928b6f..54e6269e46 100644 --- a/test_scripts/Smoke/API/035_ChangeRegistration_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/035_ChangeRegistration_PositiveCase_SUCCESS.lua @@ -28,10 +28,13 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] -local function changeRegistrationSuccess(self) +local function changeRegistrationSuccess() local requestParams = { language ="EN-US", hmiDisplayLanguage ="EN-US", @@ -48,48 +51,49 @@ local function changeRegistrationSuccess(self) } } - local cid = self.mobileSession1:SendRPC("ChangeRegistration", requestParams) + local cid = common.getMobileSession():SendRPC("ChangeRegistration", requestParams) - EXPECT_HMICALL("UI.ChangeRegistration", { + common.getHMIConnection():ExpectRequest("UI.ChangeRegistration", { appName = requestParams.appName, language = requestParams.hmiDisplayLanguage, ngnMediaScreenAppName = requestParams.ngnMediaScreenAppName, - appID = commonSmoke.getHMIAppId() + appID = common.getHMIAppId() }) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - EXPECT_HMICALL("VR.ChangeRegistration", { + common.getHMIConnection():ExpectRequest("VR.ChangeRegistration", { language = requestParams.language, vrSynonyms = requestParams.vrSynonyms, - appID = commonSmoke.getHMIAppId() + appID = common.getHMIAppId() }) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - EXPECT_HMICALL("TTS.ChangeRegistration", { + common.getHMIConnection():ExpectRequest("TTS.ChangeRegistration", { language = requestParams.language, ttsName = requestParams.ttsName, - appID = commonSmoke.getHMIAppId() + appID = common.getHMIAppId() }) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) end) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("ChangeRegistration Positive Case", changeRegistrationSuccess) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/036_UnregisterAppInterface_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/036_UnregisterAppInterface_PositiveCase_SUCCESS.lua index 3d5dd8273b..591e073eee 100644 --- a/test_scripts/Smoke/API/036_UnregisterAppInterface_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/036_UnregisterAppInterface_PositiveCase_SUCCESS.lua @@ -26,25 +26,29 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] -local function unregisterAppInterface(self) - local cid = self.mobileSession1:SendRPC("UnregisterAppInterface", { }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", - { appID = commonSmoke.getHMIAppId(), unexpectedDisconnect = false }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +local function unregisterAppInterface() + local cid = common.getMobileSession():SendRPC("UnregisterAppInterface", { }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(), unexpectedDisconnect = false }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("UnregisterAppInterface Positive Case", unregisterAppInterface) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua index cb92c03537..5efeeea723 100644 --- a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua @@ -26,92 +26,96 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local requestParams = { - syncMsgVersion = { - majorVersion = 5, - minorVersion = 0, - }, - appName = "SyncProxyTester", - ttsName = { - { - text ="SyncProxyTester", - type ="TEXT", - }, - }, - ngnMediaScreenAppName = "SPT", - vrSynonyms = { - "VRSyncProxyTester", - }, - isMediaApplication = true, - languageDesired = "EN-US", - hmiDisplayLanguageDesired = "EN-US", - appHMIType = { - "DEFAULT", - }, - appID = "123", - fullAppID = "123456", - deviceInfo = { - hardware = "hardware", - firmwareRev = "firmwareRev", - os = "os", - osVersion = "osVersion", - carrier = "carrier", - maxNumberRFCOMMPorts = 5 - } + syncMsgVersion = { + majorVersion = 5, + minorVersion = 0, + }, + appName = "SyncProxyTester", + ttsName = { + { + text ="SyncProxyTester", + type ="TEXT", + }, + }, + ngnMediaScreenAppName = "SPT", + vrSynonyms = { + "VRSyncProxyTester", + }, + isMediaApplication = true, + languageDesired = "EN-US", + hmiDisplayLanguageDesired = "EN-US", + appHMIType = { + "DEFAULT", + }, + appID = "123", + fullAppID = "123456", + deviceInfo = { + hardware = "hardware", + firmwareRev = "firmwareRev", + os = "os", + osVersion = "osVersion", + carrier = "carrier", + maxNumberRFCOMMPorts = 5 + } } local function SetNotificationParams() - local notificationParams = { - application = {} - } - notificationParams.application.appName = requestParams.appName - notificationParams.application.ngnMediaScreenAppName = requestParams.ngnMediaScreenAppName - notificationParams.application.isMediaApplication = requestParams.isMediaApplication - notificationParams.application.hmiDisplayLanguageDesired = requestParams.hmiDisplayLanguageDesired - notificationParams.application.appType = requestParams.appHMIType - notificationParams.application.deviceInfo = { - name = commonSmoke.getDeviceName(), - id = commonSmoke.getDeviceMAC(), - transportType = "WIFI", - isSDLAllowed = true - } - notificationParams.application.policyAppID = requestParams.fullAppID - notificationParams.ttsName = requestParams.ttsName - notificationParams.vrSynonyms = requestParams.vrSynonyms - return notificationParams + local notificationParams = { + application = {} + } + notificationParams.application.appName = requestParams.appName + notificationParams.application.ngnMediaScreenAppName = requestParams.ngnMediaScreenAppName + notificationParams.application.isMediaApplication = requestParams.isMediaApplication + notificationParams.application.hmiDisplayLanguageDesired = requestParams.hmiDisplayLanguageDesired + notificationParams.application.appType = requestParams.appHMIType + notificationParams.application.deviceInfo = { + name = common.getDeviceName(), + id = common.getDeviceMAC(), + transportType = "WIFI", + isSDLAllowed = true + } + notificationParams.application.policyAppID = requestParams.fullAppID + notificationParams.ttsName = requestParams.ttsName + notificationParams.vrSynonyms = requestParams.vrSynonyms + return notificationParams end --[[ Local Functions ]] -local function unregisterAppInterface(self) - local cid = self.mobileSession1:SendRPC("UnregisterAppInterface", { }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", - { appID = commonSmoke.getHMIAppId(), unexpectedDisconnect = false }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +local function unregisterAppInterface() + local cid = common.getMobileSession():SendRPC("UnregisterAppInterface", { }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(), unexpectedDisconnect = false }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end -local function RegisterAppInterface(self) - local CorIdRAI = self.mobileSession1:SendRPC("RegisterAppInterface", requestParams) - local notificationParams = SetNotificationParams() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", notificationParams) - self.mobileSession1:ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHMIStatus", - { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) - self.mobileSession1:ExpectNotification("OnPermissionsChange") +local function registerAppInterface() + local CorIdRAI = common.getMobileSession():SendRPC("RegisterAppInterface", requestParams) + local notificationParams = SetNotificationParams() + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppRegistered", notificationParams) + common.getMobileSession():ExpectResponse(CorIdRAI, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + common.getMobileSession():ExpectNotification("OnPermissionsChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Step("UnregisterAppInterface Positive Case", unregisterAppInterface) runner.Title("Test") -runner.Step("RegisterAppInterface Positive Case", RegisterAppInterface) +runner.Step("RegisterAppInterface Positive Case", registerAppInterface) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/038_Alert_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/038_Alert_Non_Media_PositiveCase_SUCCESS.lua index 297a2b489b..9df57c53ad 100644 --- a/test_scripts/Smoke/API/038_Alert_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/038_Alert_Non_Media_PositiveCase_SUCCESS.lua @@ -33,56 +33,58 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } --[[ Local Variables ]] local putFileParams = { - requestParams = { - syncFileName = 'icon.png', - fileType = "GRAPHIC_PNG", - persistentFile = false, - systemFile = false - }, - filePath = "files/icon.png" + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" } local step1SpecificParams = { - softButtons = { - { - type = "BOTH", - text = "Close", - image = { - value = "icon.png", - imageType = "DYNAMIC", - }, - isHighlighted = true, - softButtonID = 3, - systemAction = "DEFAULT_ACTION", - }, - { - type = "TEXT", - text = "Keep", - isHighlighted = true, - softButtonID = 4, - systemAction = "KEEP_CONTEXT", - }, - { - type = "IMAGE", - image = { - value = "icon.png", - imageType = "DYNAMIC", - }, - softButtonID = 5, - systemAction = "STEAL_FOCUS", - } - } + softButtons = { + { + type = "BOTH", + text = "Close", + image = { + value = "icon.png", + imageType = "DYNAMIC", + }, + isHighlighted = true, + softButtonID = 3, + systemAction = "DEFAULT_ACTION", + }, + { + type = "TEXT", + text = "Keep", + isHighlighted = true, + softButtonID = 4, + systemAction = "KEEP_CONTEXT", + }, + { + type = "IMAGE", + image = { + value = "icon.png", + imageType = "DYNAMIC", + }, + softButtonID = 5, + systemAction = "STEAL_FOCUS", + } + } } local step2SpecificParams = { - duration = 5000 + duration = 5000 } local requestParams = { @@ -104,125 +106,120 @@ local requestParams = { } local responseUiParams = { - alertStrings = { - { - fieldName = requestParams.alertText1, - fieldText = requestParams.alertText1 - }, - { - fieldName = requestParams.alertText2, - fieldText = requestParams.alertText2 - }, - { - fieldName = requestParams.alertText3, - fieldText = requestParams.alertText3 - } - }, - alertType = "BOTH", - progressIndicator = requestParams.progressIndicator, + alertStrings = { + { + fieldName = requestParams.alertText1, + fieldText = requestParams.alertText1 + }, + { + fieldName = requestParams.alertText2, + fieldText = requestParams.alertText2 + }, + { + fieldName = requestParams.alertText3, + fieldText = requestParams.alertText3 + } + }, + alertType = "BOTH", + progressIndicator = requestParams.progressIndicator, } local ttsSpeakRequestParams = { - ttsChunks = requestParams.ttsChunks, - speakType = "ALERT", - playTone = requestParams.playTone + ttsChunks = requestParams.ttsChunks, + speakType = "ALERT", + playTone = requestParams.playTone } local allParams = { - requestParams = requestParams, - responseUiParams = responseUiParams, - ttsSpeakRequestParams = ttsSpeakRequestParams + requestParams = requestParams, + responseUiParams = responseUiParams, + ttsSpeakRequestParams = ttsSpeakRequestParams } --[[ Local Functions ]] -local function sendOnSystemContext(self, ctx) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { - appID = commonSmoke.getHMIAppId(), - systemContext = ctx - }) +local function sendOnSystemContext(pCtx) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = common.getHMIAppId(), + systemContext = pCtx + }) end -local function prepareAlertParams(params, additionalParams) - params.responseUiParams.appID = commonSmoke.getHMIAppId() - - if additionalParams.softButtons ~= nil then - params.requestParams.duration = nil - params.requestParams.softButtons = additionalParams.softButtons - params.responseUiParams.duration = nil; - params.responseUiParams.softButtons = additionalParams.softButtons - params.responseUiParams.softButtons[1].image.value = - commonSmoke.getPathToFileInStorage(putFileParams.requestParams.syncFileName) - params.responseUiParams.softButtons[3].image.value = - commonSmoke.getPathToFileInStorage(putFileParams.requestParams.syncFileName) - elseif additionalParams.duration ~= nil then - params.requestParams.softButtons = nil - params.requestParams.duration = additionalParams.duration - params.responseUiParams.softButtons = nil - params.responseUiParams.duration = additionalParams.duration - end +local function prepareAlertParams(pParams, pAdditionalParams) + local params = common.cloneTable(pParams) + params.responseUiParams.appID = common.getHMIAppId() + + if pAdditionalParams.softButtons ~= nil then + params.requestParams.duration = nil + params.requestParams.softButtons = pAdditionalParams.softButtons + params.responseUiParams.duration = nil + params.responseUiParams.softButtons = pAdditionalParams.softButtons + params.responseUiParams.softButtons[1].image.value = + common.getPathToFileInAppStorage(putFileParams.requestParams.syncFileName) + params.responseUiParams.softButtons[3].image.value = + common.getPathToFileInAppStorage(putFileParams.requestParams.syncFileName) + elseif pAdditionalParams.duration ~= nil then + params.requestParams.softButtons = nil + params.requestParams.duration = pAdditionalParams.duration + params.responseUiParams.softButtons = nil + params.responseUiParams.duration = pAdditionalParams.duration + end + return params end -local function alert(params, additionalParams, self) - prepareAlertParams(params, additionalParams) - - local responseDelay = 3000 - local cid = self.mobileSession1:SendRPC("Alert", params.requestParams) - - EXPECT_HMICALL("UI.Alert", params.responseUiParams) - :Do(function(_,data) - sendOnSystemContext(self, "ALERT") - - local alertId = data.id - local function alertResponse() - self.hmiConnection:SendResponse(alertId, "UI.Alert", "SUCCESS", { }) - sendOnSystemContext(self, "MAIN") - end - - RUN_AFTER(alertResponse, responseDelay) - end) - - params.ttsSpeakRequestParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("TTS.Speak", params.ttsSpeakRequestParams) - :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - - local speakId = data.id - local function speakResponse() - self.hmiConnection:SendResponse(speakId, "TTS.Speak", "SUCCESS", { }) - self.hmiConnection:SendNotification("TTS.Stopped") - end - - RUN_AFTER(speakResponse, responseDelay - 1000) - end) - :ValidIf(function(_,data) - if #data.params.ttsChunks == 1 then - return true - else - return false, "ttsChunks array in TTS.Speak request has wrong element number." .. - " Expected 1, actual " .. tostring(#data.params.ttsChunks) - end - end) - - self.mobileSession1:ExpectNotification("OnHMIStatus", - { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, - { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) - :Times(2) - - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) +local function alert(pParams, pAdditionalParams) + local params = prepareAlertParams(pParams, pAdditionalParams) + + local cid = common.getMobileSession():SendRPC("Alert", params.requestParams) + + common.getHMIConnection():ExpectRequest("UI.Alert", params.responseUiParams) + :Do(function(_, data) + sendOnSystemContext("ALERT") + local function alertResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + sendOnSystemContext("MAIN") + end + common.runAfter(alertResponse, 3000) + end) + + params.ttsSpeakRequestParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("TTS.Speak", params.ttsSpeakRequestParams) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + local function speakResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + common.runAfter(speakResponse, 2000) + end) + :ValidIf(function(_, data) + if #data.params.ttsChunks == 1 then + return true + else + return false, "ttsChunks array in TTS.Speak request has wrong element number." + .. " Expected 1, actual " .. tostring(#data.params.ttsChunks) + end + end) + + common.getMobileSession():ExpectNotification("OnHMIStatus", + { systemContext = "ALERT", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, + { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) + :Times(2) + + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") -runner.Step("Alert with soft buttons Positive Case", alert, {allParams, step1SpecificParams}) -runner.Step("Alert with duration Positive Case", alert, {allParams, step2SpecificParams}) +runner.Step("Alert with soft buttons Positive Case", alert, { allParams, step1SpecificParams }) +runner.Step("Alert with duration Positive Case", alert, { allParams, step2SpecificParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua index 3fe0c7caef..63da4bb837 100644 --- a/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/039_PerfomInteraction_Non_Media_PositiveCase_SUCCESS.lua @@ -31,9 +31,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } @@ -48,29 +49,25 @@ local putFileParams = { filePath = "files/icon.png" } -local storagePath = commonPreconditions:GetPathToSDL() .. "storage/" .. -config.application1.registerAppInterfaceParams.fullAppID .. "_" .. commonSmoke.getDeviceMAC() .. "/" - local ImageValue = { - value = storagePath .. "icon.png", + value = common.getPathToFileInAppStorage("icon.png"), imageType = "DYNAMIC", } -local function PromptValue(text) - local tmp = { +local function getPromptValue(pText) + return { { - text = text, + text = pText, type = "TEXT" } } - return tmp end -local initialPromptValue = PromptValue(" Make your choice ") +local initialPromptValue = getPromptValue(" Make your choice ") -local helpPromptValue = PromptValue(" Help Prompt ") +local helpPromptValue = getPromptValue(" Help Prompt ") -local timeoutPromptValue = PromptValue(" Time out ") +local timeoutPromptValue = getPromptValue(" Time out ") local vrHelpvalue = { { @@ -95,18 +92,13 @@ local requestParams = { } --[[ Local Functions ]] - ---! @setChoiceSet: Creates Choice structure ---! @parameters: ---! choiceIDValue - Id for created choice ---! @return: table of created choice structure -local function setChoiceSet(choiceIDValue) +local function setChoiceSet(pChoiceIDValue) local temp = { { - choiceID = choiceIDValue, - menuName ="Choice" .. tostring(choiceIDValue), + choiceID = pChoiceIDValue, + menuName ="Choice" .. tostring(pChoiceIDValue), vrCommands = { - "VrChoice" .. tostring(choiceIDValue), + "VrChoice" .. tostring(pChoiceIDValue), }, image = { value ="icon.png", @@ -117,347 +109,306 @@ local function setChoiceSet(choiceIDValue) return temp end ---! @SendOnSystemContext: OnSystemContext notification ---! @parameters: ---! self - test object, ---! ctx - systemContext value ---! @return: none -local function SendOnSystemContext(self, ctx) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { appID = commonSmoke.getHMIAppId(), systemContext = ctx }) +local function sendOnSystemContext(pCtx) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = common.getHMIAppId(), + systemContext = pCtx + }) end ---! @setExChoiceSet: ChoiceSet structure for UI.PerformInteraction request ---! @parameters: ---! choiceIDValues - value of choice id ---! @return: none -local function setExChoiceSet(choiceIDValues) +local function setExChoiceSet(pChoiceIDValues) local exChoiceSet = { } - for i = 1, #choiceIDValues do + for i = 1, #pChoiceIDValues do exChoiceSet[i] = { - choiceID = choiceIDValues[i], + choiceID = pChoiceIDValues[i], image = { value = "icon.png", imageType = "STATIC", }, - menuName = "Choice" .. choiceIDValues[i] + menuName = "Choice" .. pChoiceIDValues[i] } end return exChoiceSet end ---! @ExpectOnHMIStatusWithAudioStateChanged_PI: Expectations of OnHMIStatus notification depending on interaction mode ---! @parameters: ---! self - test object, ---! request - interaction mode, ---! @return: none -local function ExpectOnHMIStatusWithAudioStateChanged_PI(self, request) - if request == "BOTH" then - self.mobileSession1:ExpectNotification("OnHMIStatus", +local function expectOnHMIStatusWithAudioStateChanged_PI(pRequest) + if pRequest == "BOTH" then + common.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "VRSESSION" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "HMI_OBSCURED" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Times(3) - elseif request == "VR" then - self.mobileSession1:ExpectNotification("OnHMIStatus", + elseif pRequest == "VR" then + common.getMobileSession():ExpectNotification("OnHMIStatus", { systemContext = "VRSESSION", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }, { systemContext = "MAIN", hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE" }) :Times(2) - elseif request == "MANUAL" then - self.mobileSession1:ExpectNotification("OnHMIStatus", + elseif pRequest == "MANUAL" then + common.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "HMI_OBSCURED" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Times(2) end end ---! @CreateInteractionChoiceSet: Creation of Choice Set ---! @parameters: ---! choiceSetID - id for choice set ---! self - test object ---! @return: none -local function CreateInteractionChoiceSet(choiceSetID, self) +local function createInteractionChoiceSet(choiceSetID) local choiceID = choiceSetID - local cid = self.mobileSession1:SendRPC("CreateInteractionChoiceSet", { + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", { interactionChoiceSetID = choiceSetID, choiceSet = setChoiceSet(choiceID), }) - EXPECT_HMICALL("VR.AddCommand", { + common.getHMIConnection():ExpectRequest("VR.AddCommand", { cmdID = choiceID, type = "Choice", vrCommands = { "VrChoice" .. tostring(choiceID) } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - self.mobileSession1:ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) + common.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) end ---! @PI_PerformViaVR_ONLY: Processing PI with interaction mode VR_ONLY with performing selection ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaVR_ONLY(paramsSend, self) - paramsSend.interactionMode = "VR_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaVR_ONLY(pParams) + pParams.interactionMode = "VR_ONLY" + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) - :Do(function(_,data) + :Do(function(_, data) local function vrResponse() - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendNotification("VR.Started") - SendOnSystemContext(self, "VRSESSION") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("VR.Stopped") - SendOnSystemContext(self, "MAIN") + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("VR.Started") + sendOnSystemContext("VRSESSION") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("VR.Stopped") + sendOnSystemContext("MAIN") end - RUN_AFTER(vrResponse, 1000) + common.runAfter(vrResponse, 1000) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText, + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText, }) :Do(function(_,data) - EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + common.getHMIConnection():ExpectRequest("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) :Do(function() - self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + common.getHMIConnection():SendError(data.id, data.method, "ABORTED", "Error message") end) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") - self.mobileSession1:ExpectResponse(cid, - { success = true, resultCode = "SUCCESS", choiceID = paramsSend.interactionChoiceSetIDList[1] }) + expectOnHMIStatusWithAudioStateChanged_PI("VR") + common.getMobileSession():ExpectResponse(cid, + { success = true, resultCode = "SUCCESS", choiceID = pParams.interactionChoiceSetIDList[1] }) end ---! @PI_PerformViaMANUAL_ONLY: Processing PI with interaction mode MANUAL_ONLY with performing selection ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaMANUAL_ONLY(paramsSend, self) - paramsSend.interactionMode = "MANUAL_ONLY" - local cid = self.mobileSession1:SendRPC("PerformInteraction", paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaMANUAL_ONLY(pParams) + pParams.interactionMode = "MANUAL_ONLY" + local cid = common.getMobileSession():SendRPC("PerformInteraction", pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) - :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText } }) - :Do(function(_,data) - SendOnSystemContext(self,"HMI_OBSCURED") + :Do(function(_, data) + sendOnSystemContext("HMI_OBSCURED") local function uiResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("TTS.Stopped") - SendOnSystemContext(self,"MAIN") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + common.getHMIConnection():SendNotification("TTS.Stopped") + sendOnSystemContext("MAIN") end - RUN_AFTER(uiResponse, 1000) + common.runAfter(uiResponse, 1000) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "MANUAL") - self.mobileSession1:ExpectResponse(cid, - { success = true, resultCode = "SUCCESS", choiceID = paramsSend.interactionChoiceSetIDList[1] }) + expectOnHMIStatusWithAudioStateChanged_PI("MANUAL") + common.getMobileSession():ExpectResponse(cid, + { success = true, resultCode = "SUCCESS", choiceID = pParams.interactionChoiceSetIDList[1] }) end ---! @PI_PerformViaBOTH: Processing PI with interaction mode BOTH with timeout on VR and IU ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaBOTH(paramsSend, self) - paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaBOTH(pParams) + pParams.interactionMode = "BOTH" + local cid = common.getMobileSession():SendRPC("PerformInteraction", pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) - :Do(function(_,data) - self.hmiConnection:SendNotification("VR.Started") - self.hmiConnection:SendNotification("TTS.Started") - SendOnSystemContext(self,"VRSESSION") + :Do(function(_, data) + common.getHMIConnection():SendNotification("VR.Started") + common.getHMIConnection():SendNotification("TTS.Started") + sendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("TTS.Started") end - RUN_AFTER(firstSpeakTimeOut, 5) + common.runAfter(firstSpeakTimeOut, 5) local function vrResponse() - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - self.hmiConnection:SendNotification("VR.Stopped") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + common.getHMIConnection():SendNotification("VR.Stopped") end - RUN_AFTER(vrResponse, 20) + common.runAfter(vrResponse, 20) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText }, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText }) - :Do(function(_,data) + :Do(function(_, data) local function choiceIconDisplayed() - SendOnSystemContext(self,"HMI_OBSCURED") + sendOnSystemContext("HMI_OBSCURED") end - RUN_AFTER(choiceIconDisplayed, 25) + common.runAfter(choiceIconDisplayed, 25) local function uiResponse() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - SendOnSystemContext(self,"MAIN") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + sendOnSystemContext("MAIN") end - RUN_AFTER(uiResponse, 30) + common.runAfter(uiResponse, 30) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) + expectOnHMIStatusWithAudioStateChanged_PI("BOTH") + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "TIMED_OUT" }) end ---! @PI_PerformViaBOTHuiChoice: Processing PI with interaction mode BOTH with user choice on UI part ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaBOTHuiChoice(paramsSend, self) - paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaBOTHuiChoice(pParams) + pParams.interactionMode = "BOTH" + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) :Do(function(_,data) - self.hmiConnection:SendNotification("VR.Started") - self.hmiConnection:SendNotification("TTS.Started") - SendOnSystemContext(self,"VRSESSION") + common.getHMIConnection():SendNotification("VR.Started") + common.getHMIConnection():SendNotification("TTS.Started") + sendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("TTS.Started") end - RUN_AFTER(firstSpeakTimeOut, 1000) + common.runAfter(firstSpeakTimeOut, 1000) local function vrResponse() - self.hmiConnection:SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") - self.hmiConnection:SendNotification("VR.Stopped") + common.getHMIConnection():SendError(data.id, data.method, "TIMED_OUT", "Perform Interaction error response.") + common.getHMIConnection():SendNotification("VR.Stopped") end - RUN_AFTER(vrResponse, 2000) + common.runAfter(vrResponse, 2000) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText }, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText }) :Do(function(_,data) local function choiceIconDisplayed() - SendOnSystemContext(self,"HMI_OBSCURED") + sendOnSystemContext("HMI_OBSCURED") end - RUN_AFTER(choiceIconDisplayed, 2050) + common.runAfter(choiceIconDisplayed, 2050) local function uiResponse() - self.hmiConnection:SendNotification("TTS.Stopped") - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - SendOnSystemContext(self,"MAIN") + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + sendOnSystemContext("MAIN") end - RUN_AFTER(uiResponse, 3000) + common.runAfter(uiResponse, 3000) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "BOTH") - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", - choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "MENU" }) + expectOnHMIStatusWithAudioStateChanged_PI("BOTH") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = pParams.interactionChoiceSetIDList[1], triggerSource = "MENU" }) end ---! @PI_PerformViaBOTHvrChoice: Processing PI with interaction mode BOTH with user choice on VR part ---! @parameters: ---! paramsSend - parameters for PI request ---! self - test object ---! @return: none -local function PI_PerformViaBOTHvrChoice(paramsSend, self) - paramsSend.interactionMode = "BOTH" - local cid = self.mobileSession1:SendRPC("PerformInteraction",paramsSend) - EXPECT_HMICALL("VR.PerformInteraction", { - helpPrompt = paramsSend.helpPrompt, - initialPrompt = paramsSend.initialPrompt, - timeout = paramsSend.timeout, - timeoutPrompt = paramsSend.timeoutPrompt +local function PI_ViaBOTHvrChoice(pParams) + pParams.interactionMode = "BOTH" + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt }) :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - self.hmiConnection:SendNotification("VR.Started") - SendOnSystemContext(self,"VRSESSION") + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("VR.Started") + sendOnSystemContext("VRSESSION") local function firstSpeakTimeOut() - self.hmiConnection:SendNotification("TTS.Stopped") + common.getHMIConnection():SendNotification("TTS.Stopped") end - RUN_AFTER(firstSpeakTimeOut, 1000) + common.runAfter(firstSpeakTimeOut, 1000) local function vrResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", - { choiceID = paramsSend.interactionChoiceSetIDList[1] }) - self.hmiConnection:SendNotification("VR.Stopped") - SendOnSystemContext(self, "MAIN") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", + { choiceID = pParams.interactionChoiceSetIDList[1] }) + common.getHMIConnection():SendNotification("VR.Stopped") + sendOnSystemContext("MAIN") end - RUN_AFTER(vrResponse, 2000) + common.runAfter(vrResponse, 2000) end) - EXPECT_HMICALL("UI.PerformInteraction", { - timeout = paramsSend.timeout, - choiceSet = setExChoiceSet(paramsSend.interactionChoiceSetIDList), + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), initialText = { fieldName = "initialInteractionText", - fieldText = paramsSend.initialText + fieldText = pParams.initialText }, - vrHelp = paramsSend.vrHelp, - vrHelpTitle = paramsSend.initialText + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText }) :Do(function(_,data) - EXPECT_HMICALL("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) + common.getHMIConnection():ExpectRequest("UI.ClosePopUp", { methodName = "UI.PerformInteraction" }) :Do(function() - self.hmiConnection:SendError(data.id, data.method, "ABORTED", "Error message") + common.getHMIConnection():SendError(data.id, data.method, "ABORTED", "Error message") end) end) - ExpectOnHMIStatusWithAudioStateChanged_PI(self, "VR") - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS", - choiceID = paramsSend.interactionChoiceSetIDList[1], triggerSource = "VR" }) + expectOnHMIStatusWithAudioStateChanged_PI("VR") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + choiceID = pParams.interactionChoiceSetIDList[1], triggerSource = "VR" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, {putFileParams}) -runner.Step("CreateInteractionChoiceSet with id 100", CreateInteractionChoiceSet, {100}) -runner.Step("CreateInteractionChoiceSet with id 200", CreateInteractionChoiceSet, {200}) -runner.Step("CreateInteractionChoiceSet with id 300", CreateInteractionChoiceSet, {300}) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) +runner.Step("CreateInteractionChoiceSet with id 100", createInteractionChoiceSet, { 100 }) +runner.Step("CreateInteractionChoiceSet with id 200", createInteractionChoiceSet, { 200 }) +runner.Step("CreateInteractionChoiceSet with id 300", createInteractionChoiceSet, { 300 }) runner.Title("Test") -runner.Step("PerformInteraction with VR_ONLY interaction mode", PI_PerformViaVR_ONLY, {requestParams}) -runner.Step("PerformInteraction with MANUAL_ONLY interaction mode", PI_PerformViaMANUAL_ONLY, {requestParams}) -runner.Step("PerformInteraction with BOTH interaction mode TIMED_OUT", PI_PerformViaBOTH, {requestParams}) -runner.Step("PerformInteraction with BOTH interaction mode choice via UI", PI_PerformViaBOTHuiChoice, {requestParams}) -runner.Step("PerformInteraction with BOTH interaction mode choice via VR", PI_PerformViaBOTHvrChoice, {requestParams}) +runner.Step("PerformInteraction with VR_ONLY interaction mode", PI_ViaVR_ONLY, { requestParams }) +runner.Step("PerformInteraction with MANUAL_ONLY interaction mode", PI_ViaMANUAL_ONLY, { requestParams }) +runner.Step("PerformInteraction with BOTH interaction mode TIMED_OUT", PI_ViaBOTH, { requestParams }) +runner.Step("PerformInteraction with BOTH interaction mode choice via UI", PI_ViaBOTHuiChoice, {requestParams}) +runner.Step("PerformInteraction with BOTH interaction mode choice via VR", PI_ViaBOTHvrChoice, {requestParams}) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/040_SetMediaClockTimer_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/040_SetMediaClockTimer_Non_Media_PositiveCase_SUCCESS.lua index 8e5b056124..791830db55 100644 --- a/test_scripts/Smoke/API/040_SetMediaClockTimer_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/040_SetMediaClockTimer_Non_Media_PositiveCase_SUCCESS.lua @@ -29,14 +29,17 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } --[[ Local Variables ]] -local updateMode = {"COUNTUP", "COUNTDOWN", "PAUSE", "RESUME", "CLEAR"} +local updateMode = { "COUNTUP", "COUNTDOWN", "PAUSE", "RESUME", "CLEAR" } + +local indicator = { "PLAY_PAUSE", "PLAY", "PAUSE", "STOP" } local requestParams = { startTime = { @@ -51,35 +54,35 @@ local requestParams = { } } -local indicator = {"PLAY_PAUSE", "PLAY", "PAUSE", "STOP"} - --[[ Local Functions ]] -local function SetMediaClockTimer(pParams, pMode, pIndicator, self) - local Parameters = commonFunctions:cloneTable(pParams) - Parameters.updateMode = pMode - Parameters.audioStreamingIndicator = pIndicator +local function SetMediaClockTimer(pParams, pMode, pIndicator) + local params = common.cloneTable(pParams) + params.updateMode = pMode + params.audioStreamingIndicator = pIndicator if pMode == "COUNTDOWN" then - Parameters.endTime.minutes = Parameters.startTime.minutes - 1 + params.endTime.minutes = params.startTime.minutes - 1 end - local cid = self.mobileSession1:SendRPC("SetMediaClockTimer", Parameters) - EXPECT_HMICALL("UI.SetMediaClockTimer") + local cid = common.getMobileSession():SendRPC("SetMediaClockTimer", params) + common.getHMIConnection():ExpectRequest("UI.SetMediaClockTimer") :Times(0) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, value in pairs (updateMode) do for _, value2 in pairs (indicator) do - runner.Step("SetMediaClockTimer Non Media Positive Case with udate mode " .. value .. " " .. value2, SetMediaClockTimer, { requestParams,value,value2 }) + runner.Step("SetMediaClockTimer Non Media Positive Case with udate mode " .. value + .. " " .. value2, SetMediaClockTimer, { requestParams,value,value2 }) end end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/041_Speak_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/041_Speak_Non_Media_PositiveCase_SUCCESS.lua index 6046cf152f..4c35a1a787 100644 --- a/test_scripts/Smoke/API/041_Speak_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/041_Speak_Non_Media_PositiveCase_SUCCESS.lua @@ -28,57 +28,60 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } --[[ Local Functions ]] local function getRequestParams() - return { - ttsChunks = { - { - text ="a", - type ="TEXT" - } - } - } + return { + ttsChunks = { + { + text ="a", + type ="TEXT" + } + } + } end -local function speakSuccess(self) - print("Waiting 20s ...") - local cid = self.mobileSession1:SendRPC("Speak", getRequestParams()) - EXPECT_HMICALL("TTS.Speak", getRequestParams()) - :Do(function(_, data) - self.hmiConnection:SendNotification("TTS.Started") - local function sendSpeakResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - self.hmiConnection:SendNotification("TTS.Stopped") - end - local function sendOnResetTimeout() - self.hmiConnection:SendNotification("TTS.OnResetTimeout", - { appID = commonSmoke.getHMIAppId(), methodName = "TTS.Speak" }) - end - RUN_AFTER(sendOnResetTimeout, 9000) - RUN_AFTER(sendSpeakResponse, 18000) - end) +local function speakSuccess() + print("Waiting 20s ...") + local cid = common.getMobileSession():SendRPC("Speak", getRequestParams()) + common.getHMIConnection():ExpectRequest("TTS.Speak", getRequestParams()) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + local function sendSpeakResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + local function sendOnResetTimeout() + common.getHMIConnection():SendNotification("TTS.OnResetTimeout", + { appID = common.getHMIAppId(), methodName = "TTS.Speak" }) + end + common.runAfter(sendOnResetTimeout, 9000) + common.runAfter(sendSpeakResponse, 18000) + end) - self.mobileSession1:ExpectNotification("OnHMIStatus") - :Times(0) + common.getMobileSession():ExpectNotification("OnHMIStatus") + :Times(0) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - :Timeout(20000) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :Timeout(20000) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("Speak Positive Case", speakSuccess) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/042_SubscribeButton_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/042_SubscribeButton_Non_Media_PositiveCase_SUCCESS.lua index 850a2ee4c0..e4e4471dc8 100644 --- a/test_scripts/Smoke/API/042_SubscribeButton_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/042_SubscribeButton_Non_Media_PositiveCase_SUCCESS.lua @@ -28,8 +28,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } @@ -56,29 +58,31 @@ local mediaButtonName = { } --[[ Local Functions ]] -local function subscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") +local function subscribeButton(pButName) + local cid = common.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", + { appID = appIDvalue, name = pButName, isSubscribed = true }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function subscribeMediaButton(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") +local function subscribeMediaButton(pButName) + local cid = common.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription") :Times(0) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) + common.getMobileSession():ExpectNotification("OnHashChange") :Times(0) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, v in pairs(buttonName) do @@ -90,4 +94,4 @@ for _, v in pairs(mediaButtonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/043_UnsubscribeButton_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/043_UnsubscribeButton_Non_Media_PositiveCase_SUCCESS.lua index fba825717a..5c0e2396af 100644 --- a/test_scripts/Smoke/API/043_UnsubscribeButton_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/043_UnsubscribeButton_Non_Media_PositiveCase_SUCCESS.lua @@ -28,8 +28,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } @@ -56,38 +58,40 @@ local mediaButtonName = { } --[[ Local Functions ]] -local function subscribeButtons(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") +local function subscribeButtons(pButName) + local cid = common.getMobileSession():SendRPC("SubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", + { appID = appIDvalue, name = pButName, isSubscribed = true }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function unsubscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("UnsubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", +local function unsubscribeButton(pButName) + local cid = common.getMobileSession():SendRPC("UnsubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = false }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") end -local function unsubscribeMediaButton(pButName, self) - local cid = self.mobileSession1:SendRPC("UnsubscribeButton", { buttonName = pButName }) - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription") +local function unsubscribeMediaButton(pButName) + local cid = common.getMobileSession():SendRPC("UnsubscribeButton", { buttonName = pButName }) + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription") :Times(0) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "IGNORED" }) - self.mobileSession1:ExpectNotification("OnHashChange") + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "IGNORED" }) + common.getMobileSession():ExpectNotification("OnHashChange") :Times(0) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) for _, v in pairs(buttonName) do runner.Step("SubscribeButton " .. v .. " Positive Case", subscribeButtons, { v }) end @@ -102,4 +106,4 @@ for _, v in pairs(mediaButtonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/044_AlertManeuver_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/044_AlertManeuver_Non_Media_PositiveCase_SUCCESS.lua index 0b5f88155d..1d5387cc7d 100644 --- a/test_scripts/Smoke/API/044_AlertManeuver_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/044_AlertManeuver_Non_Media_PositiveCase_SUCCESS.lua @@ -31,9 +31,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } @@ -86,10 +87,10 @@ local requestParams = { } local function naviParamsSet(tbl) - local Params = commonFunctions:cloneTable(tbl) + local Params = common.cloneTable(tbl) for k, _ in pairs(Params) do if Params[k].image then - Params[k].image.value = commonSmoke.getPathToFileInStorage(Params[k].image.value) + Params[k].image.value = common.getPathToFileInAppStorage(Params[k].image.value) end end return Params @@ -110,39 +111,40 @@ local allParams = { } --[[ Local Functions ]] -local function alertManeuver(pParams, self) - local cid = self.mobileSession1:SendRPC("AlertManeuver", pParams.requestParams) - EXPECT_HMICALL("Navigation.AlertManeuver", pParams.responseNaviParams) +local function alertManeuver(pParams) + local cid = common.getMobileSession():SendRPC("AlertManeuver", pParams.requestParams) + common.getHMIConnection():ExpectRequest("Navigation.AlertManeuver", pParams.responseNaviParams) :Do(function(_, data) local function alertResp() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) end - RUN_AFTER(alertResp, 2000) + common.runAfter(alertResp, 2000) end) - EXPECT_HMICALL("TTS.Speak", pParams.responseTtsParams) + common.getHMIConnection():ExpectRequest("TTS.Speak", pParams.responseTtsParams) :Do(function(_, data) - self.hmiConnection:SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("TTS.Started") local function SpeakResp() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) - self.hmiConnection:SendNotification("TTS.Stopped") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + common.getHMIConnection():SendNotification("TTS.Stopped") end - RUN_AFTER(SpeakResp, 1000) + common.runAfter(SpeakResp, 1000) end) - self.mobileSession1:ExpectNotification("OnHMIStatus") + common.getMobileSession():ExpectNotification("OnHMIStatus") :Times(0) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) -runner.Step("Upload icon file", commonSmoke.putFile, { putFileParams }) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) runner.Title("Test") runner.Step("AlertManeuver Positive Case", alertManeuver, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/045_PerformAudioPassThru_Non_Media_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/045_PerformAudioPassThru_Non_Media_PositiveCase_SUCCESS.lua index c6085b7b51..9902145ba9 100644 --- a/test_scripts/Smoke/API/045_PerformAudioPassThru_Non_Media_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/045_PerformAudioPassThru_Non_Media_PositiveCase_SUCCESS.lua @@ -33,10 +33,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false config.application1.registerAppInterfaceParams.isMediaApplication = false config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } @@ -74,7 +74,7 @@ requestUiParams.audioPassThruDisplayTexts[2] = { } local requestTtsParams = {} -requestTtsParams.ttsChunks = commonFunctions:cloneTable(requestParams.initialPrompt) +requestTtsParams.ttsChunks = common.cloneTable(requestParams.initialPrompt) requestTtsParams.speakType = "AUDIO_PASS_THRU" local allParams = { @@ -84,50 +84,40 @@ local allParams = { } --[[ Local Functions ]] -local function file_check(file_name) - local file_found = io.open(file_name, "r") - if nil == file_found then - return false - end - return true +local function sendOnSystemContext(pCtx, pAppID) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { appID = pAppID, systemContext = pCtx }) end -local function sendOnSystemContext(self, pCtx, pAppID) - self.hmiConnection:SendNotification("UI.OnSystemContext", - { appID = pAppID, systemContext = pCtx }) -end - -local function performAudioPassThru(pParams, self) - local cid = self.mobileSession1:SendRPC("PerformAudioPassThru", pParams.requestParams) - pParams.requestUiParams.appID = commonSmoke.getHMIAppId() - EXPECT_HMICALL("TTS.Speak", pParams.requestTtsParams) - :Do(function(_,data) - self.hmiConnection:SendNotification("TTS.Started") - local function ttsSpeakResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.hmiConnection:SendNotification("TTS.Stopped") - end - RUN_AFTER(ttsSpeakResponse, 50) - end) - EXPECT_HMICALL("UI.PerformAudioPassThru", pParams.requestUiParams) - :Do(function(_,data) - sendOnSystemContext(self, "HMI_OBSCURED", pParams.requestUiParams.appID) - local function uiResponse() - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - sendOnSystemContext(self, "MAIN", pParams.requestUiParams.appID) - end - RUN_AFTER(uiResponse, 1500) - end) - EXPECT_HMINOTIFICATION("UI.OnRecordStart", {appID = pParams.requestUiParams.appID}) - self.mobileSession1:ExpectNotification("OnHMIStatus", +local function performAudioPassThru(pParams) + local cid = common.getMobileSession():SendRPC("PerformAudioPassThru", pParams.requestParams) + pParams.requestUiParams.appID = common.getHMIAppId() + common.getHMIConnection():ExpectRequest("TTS.Speak", pParams.requestTtsParams) + :Do(function(_, data) + common.getHMIConnection():SendNotification("TTS.Started") + local function ttsSpeakResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + common.getHMIConnection():SendNotification("TTS.Stopped") + end + common.runAfter(ttsSpeakResponse, 50) + end) + common.getHMIConnection():ExpectRequest("UI.PerformAudioPassThru", pParams.requestUiParams) + :Do(function(_, data) + sendOnSystemContext("HMI_OBSCURED", pParams.requestUiParams.appID) + local function uiResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + sendOnSystemContext("MAIN", pParams.requestUiParams.appID) + end + common.runAfter(uiResponse, 1500) + end) + EXPECT_HMINOTIFICATION("UI.OnRecordStart", { appID = pParams.requestUiParams.appID }) + common.getMobileSession():ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "HMI_OBSCURED" }, { hmiLevel = "FULL", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Times(2) - self.mobileSession1:ExpectNotification("OnAudioPassThru") - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - :ValidIf (function() - local file = commonPreconditions:GetPathToSDL() .. "storage/" .. "audio.wav" - if true ~= file_check(file) then + common.getMobileSession():ExpectNotification("OnAudioPassThru") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf(function() + if common.isFileExistInAppStorage("audio.wav") ~= true then return false, "Can not found file: audio.wav" end return true @@ -136,13 +126,14 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("PerformAudioPassThru Positive Case", performAudioPassThru, { allParams }) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/046_NavApp_SubscribeButtonRequest_SUCCESS.lua b/test_scripts/Smoke/API/046_NavApp_SubscribeButtonRequest_SUCCESS.lua index d5776b6b88..4f240e1854 100644 --- a/test_scripts/Smoke/API/046_NavApp_SubscribeButtonRequest_SUCCESS.lua +++ b/test_scripts/Smoke/API/046_NavApp_SubscribeButtonRequest_SUCCESS.lua @@ -29,7 +29,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local buttonName = { @@ -51,20 +54,23 @@ local buttonName = { } --[[ Local Functions ]] -local function subscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }) - self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) - self.mobileSession1:ExpectNotification("OnHashChange") +local function subscribeButton(pButName) + local mobileSession = common.getMobileSession() + local cid = mobileSession:SendRPC("SubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", + { appID = appIDvalue, name = pButName, isSubscribed = true }) + mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + mobileSession:ExpectNotification("OnHashChange") end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, v in pairs(buttonName) do @@ -72,4 +78,4 @@ for _, v in pairs(buttonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/047_NonNavApp_SubscribeButtonRequest_REJECTED.lua b/test_scripts/Smoke/API/047_NonNavApp_SubscribeButtonRequest_REJECTED.lua index e1433a74f0..03ffc5b3e4 100644 --- a/test_scripts/Smoke/API/047_NonNavApp_SubscribeButtonRequest_REJECTED.lua +++ b/test_scripts/Smoke/API/047_NonNavApp_SubscribeButtonRequest_REJECTED.lua @@ -29,8 +29,12 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } --[[ Local Variables ]] @@ -53,19 +57,22 @@ local buttonName = { } --[[ Local Functions ]] -local function subscribeButton(pButName, self) - local cid = self.mobileSession1:SendRPC("SubscribeButton", { buttonName = pButName }) - local appIDvalue = commonSmoke.getHMIAppId() - EXPECT_HMINOTIFICATION("Buttons.OnButtonSubscription", { appID = appIDvalue, name = pButName, isSubscribed = true }):Times(0) - self.mobileSession1:ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) +local function subscribeButton(pButName) + local mobileSession = common.getMobileSession() + local cid = mobileSession:SendRPC("SubscribeButton", { buttonName = pButName }) + local appIDvalue = common.getHMIAppId() + common.getHMIConnection():ExpectNotification("Buttons.OnButtonSubscription", + { appID = appIDvalue, name = pButName, isSubscribed = true }):Times(0) + mobileSession:ExpectResponse(cid, { success = false, resultCode = "REJECTED" }) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") for _, v in pairs(buttonName) do @@ -73,4 +80,4 @@ for _, v in pairs(buttonName) do end runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/048_GetSystemCapabilityRequest_SUCCESS.lua b/test_scripts/Smoke/API/048_GetSystemCapabilityRequest_SUCCESS.lua index c3b42e9d40..734fb74f54 100644 --- a/test_scripts/Smoke/API/048_GetSystemCapabilityRequest_SUCCESS.lua +++ b/test_scripts/Smoke/API/048_GetSystemCapabilityRequest_SUCCESS.lua @@ -24,7 +24,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local navCapabilities = { @@ -71,30 +74,31 @@ local function getSystemCapabilityResponse(capabilities) return temp end -local function getSystemCapability(capabilities, self) +local function getSystemCapability(capabilities) local type = capabilities.systemCapabilityType local paramsSend = getSystemCapabilityRequest(type) local response = getSystemCapabilityResponse(capabilities) - local cid = self.mobileSession1:SendRPC("GetSystemCapability", paramsSend) + local mobileSession = common.getMobileSession() + local cid = mobileSession:SendRPC("GetSystemCapability", paramsSend) local expectedResult = response expectedResult.success = true expectedResult.resultCode = "SUCCESS" - self.mobileSession1:ExpectResponse(cid, expectedResult) + mobileSession:ExpectResponse(cid, expectedResult) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("GetSystemCapability NAVIGATION Positive Case", getSystemCapability, {navCapabilities}) runner.Step("GetSystemCapability PHONE_CALL Positive Case", getSystemCapability, {phoneCapabilities}) runner.Step("GetSystemCapability VIDEO_STREAMING Positive Case", getSystemCapability, {videoCapabilities}) - runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/049_SetMenuLayout_SUCCESS.lua b/test_scripts/Smoke/API/049_SetMenuLayout_SUCCESS.lua index 08af66f36b..9725801a5f 100644 --- a/test_scripts/Smoke/API/049_SetMenuLayout_SUCCESS.lua +++ b/test_scripts/Smoke/API/049_SetMenuLayout_SUCCESS.lua @@ -25,16 +25,19 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] -local addSubMenuParams = { +local addSubMenuParams = { menuLayout = "TILES", menuID = 44991234, menuName = "sickMenu" } -local setGlobalPropertiesParams = { +local setGlobalPropertiesParams = { menuLayout = "TILES" } @@ -113,40 +116,43 @@ local onSystemCapabilityUpdatedParams = { } --[[ Local Functions ]] -local function setMenuLayoutTiles(self) - onSystemCapabilityUpdatedParams.appID = commonSmoke.getHMIAppId() - self.hmiConnection:SendNotification("BasicCommunication.OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) - +local function setMenuLayoutTiles() + local mobileSession = common.getMobileSession() + local hmi = common.getHMIConnection() + onSystemCapabilityUpdatedParams.appID = common.getHMIAppId() + hmi:SendNotification("BasicCommunication.OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) + onSystemCapabilityUpdatedParams.appID = nil - self.mobileSession1:ExpectNotification("OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) + mobileSession:ExpectNotification("OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) :Do(function() - local cid = self.mobileSession1:SendRPC("SetGlobalProperties", setGlobalPropertiesParams) - - EXPECT_HMICALL("UI.SetGlobalProperties", {}) + local cid = mobileSession:SendRPC("SetGlobalProperties", setGlobalPropertiesParams) + + hmi:ExpectRequest("UI.SetGlobalProperties", {}) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.mobileSession1:ExpectResponse(cid, successResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", {}) + mobileSession:ExpectResponse(cid, successResponse) end) - local cid2 = self.mobileSession1:SendRPC("AddSubMenu", addSubMenuParams) - - EXPECT_HMICALL("UI.AddSubMenu", {}) + local cid2 = mobileSession:SendRPC("AddSubMenu", addSubMenuParams) + + hmi:ExpectRequest("UI.AddSubMenu", {}) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.mobileSession1:ExpectResponse(cid2, successResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", {}) + mobileSession:ExpectResponse(cid2, successResponse) end) end) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("Setting Menu Layout to supported TILES", setMenuLayoutTiles) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/050_SetMenuLayout_unsupported_WARNINGS.lua b/test_scripts/Smoke/API/050_SetMenuLayout_unsupported_WARNINGS.lua index 5a52071f81..ad28645956 100644 --- a/test_scripts/Smoke/API/050_SetMenuLayout_unsupported_WARNINGS.lua +++ b/test_scripts/Smoke/API/050_SetMenuLayout_unsupported_WARNINGS.lua @@ -25,18 +25,21 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] -local addSubMenuParams = { +local addSubMenuParams = { menuLayout = "TILES", menuID = 44991234, menuName = "sickMenu" } -local setGlobalPropertiesParams = { - menuLayout = "TILES", - menuTitle = "sickMenu" +local setGlobalPropertiesParams = { + menuLayout = "TILES", + menuTitle = "sickMenu" } local warningsResponse = { @@ -114,40 +117,43 @@ local onSystemCapabilityUpdatedParams = { } --[[ Local Functions ]] -local function setMenuLayoutTiles(self) - onSystemCapabilityUpdatedParams.appID = commonSmoke.getHMIAppId() - self.hmiConnection:SendNotification("BasicCommunication.OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) - +local function setMenuLayoutTiles() + local mobileSession = common.getMobileSession() + local hmi = common.getHMIConnection() + onSystemCapabilityUpdatedParams.appID = common.getHMIAppId() + hmi:SendNotification("BasicCommunication.OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) + onSystemCapabilityUpdatedParams.appID = nil - self.mobileSession1:ExpectNotification("OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) + mobileSession:ExpectNotification("OnSystemCapabilityUpdated", onSystemCapabilityUpdatedParams) :Do(function() - local cid = self.mobileSession1:SendRPC("SetGlobalProperties", setGlobalPropertiesParams) - - EXPECT_HMICALL("UI.SetGlobalProperties", {}) + local cid = mobileSession:SendRPC("SetGlobalProperties", setGlobalPropertiesParams) + + hmi:ExpectRequest("UI.SetGlobalProperties", {}) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.mobileSession1:ExpectResponse(cid, warningsResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", {}) + mobileSession:ExpectResponse(cid, warningsResponse) end) - local cid2 = self.mobileSession1:SendRPC("AddSubMenu", addSubMenuParams) - - EXPECT_HMICALL("UI.AddSubMenu", {}) + local cid2 = mobileSession:SendRPC("AddSubMenu", addSubMenuParams) + + hmi:ExpectRequest("UI.AddSubMenu", {}) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - self.mobileSession1:ExpectResponse(cid2, warningsResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", {}) + mobileSession:ExpectResponse(cid2, warningsResponse) end) end) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("Attempting to use unsupported menu layout TILES", setMenuLayoutTiles) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/051_GetPolicyConfigurationData_SUCCESS.lua b/test_scripts/Smoke/API/051_GetPolicyConfigurationData_SUCCESS.lua index 34762e18db..e1386be70d 100644 --- a/test_scripts/Smoke/API/051_GetPolicyConfigurationData_SUCCESS.lua +++ b/test_scripts/Smoke/API/051_GetPolicyConfigurationData_SUCCESS.lua @@ -21,24 +21,24 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Local Variables ]] -local preloadedPT = commonSmoke:read_parameter_from_smart_device_link_ini("PreloadedPT") -local preloadedFile = commonSmoke:GetPathToSDL() .. preloadedPT -local pt = commonSmoke.jsonFileToTable(preloadedFile) +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Functions ]] -local function GetPolicyConfigurationData(self) - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", +local function GetPolicyConfigurationData() + local hmi = common.getHMIConnection() + local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) - EXPECT_HMIRESPONSE(requestId, { result = { code = 0 } }) + hmi:ExpectResponse(requestId, { result = { code = 0 } }) :ValidIf(function(_, data) - if true ~= commonSmoke:is_table_equal(commonSmoke.decode(data.result.value[1]), - pt.policy_table.module_config.endpoints) then + local expectedEndpoints = common.sdl.getPreloadedPT().policy_table.module_config.endpoints + local actualEndpoints = common.json.decode(data.result.value[1]) + if true ~= common.isTableEqual(actualEndpoints, expectedEndpoints) then return false, "GetPolicyConfigurationData contains unexpected parameters.\n" .. - "Expected table: " .. commonSmoke.tableToString(pt.policy_table.module_config.endpoints) .. "\n" .. - "Actual table: " .. commonSmoke.tableToString(commonSmoke.decode(data.result.value[1])) .. "\n" + "Expected table: " .. common.tableToString(expectedEndpoints) .. "\n" .. + "Actual table: " .. common.tableToString(actualEndpoints) .. "\n" end return true end) @@ -46,11 +46,12 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Title("Test") runner.Step("GetPolicyConfigurationData from HMI", GetPolicyConfigurationData) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/052_SetInteriorVehicleData_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/052_SetInteriorVehicleData_PositiveCase_SUCCESS.lua index 10482abe50..4fcdd61468 100644 --- a/test_scripts/Smoke/API/052_SetInteriorVehicleData_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/052_SetInteriorVehicleData_PositiveCase_SUCCESS.lua @@ -23,14 +23,17 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" } --[[ Local Variables ]] -local moduleId = commonSmoke.getRcModuleId("CLIMATE", 1) +local moduleId = common.getRcModuleId("CLIMATE", 1) local moduleData = { moduleType = "CLIMATE", @@ -55,7 +58,6 @@ local params = { moduleData = moduleData }, hmiRequest = { - appID = commonSmoke.getHMIAppId(1), moduleData = moduleData }, hmiResponse = { @@ -69,26 +71,29 @@ local params = { } --[[ Local Functions ]] -local function setInteriorVehicleData(self) - local mobSession = commonSmoke.getMobileSession(1, self) +local function setInteriorVehicleData() + local mobSession = common.getMobileSession() + local hmi = common.getHMIConnection() local cid = mobSession:SendRPC("SetInteriorVehicleData", params.mobRequest) - EXPECT_HMICALL("RC.SetInteriorVehicleData", params.hmiRequest) + params.hmiRequest.appID = common.getHMIAppId(1) + hmi:ExpectRequest("RC.SetInteriorVehicleData", params.hmiRequest) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", params.hmiResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", params.hmiResponse) end) mobSession:ExpectResponse(cid, params.mobResponse) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Prepare preloaded policy table", commonSmoke.preparePreloadedPTForRC) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Prepare preloaded policy table", common.preparePreloadedPTForRC) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("SetInteriorVehicleData CLIMATE module Positive Case", setInteriorVehicleData) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/053_GetInteriorVehicleDataConsent_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/053_GetInteriorVehicleDataConsent_PositiveCase_SUCCESS.lua index da2b09795b..627a7bf034 100644 --- a/test_scripts/Smoke/API/053_GetInteriorVehicleDataConsent_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/053_GetInteriorVehicleDataConsent_PositiveCase_SUCCESS.lua @@ -23,7 +23,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 @@ -31,7 +34,7 @@ config.application1.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" } --[[ Local Variables ]] local moduleType = "CLIMATE" -local moduleIds = { commonSmoke.getRcModuleId(moduleType, 1), commonSmoke.getRcModuleId(moduleType, 2) } +local moduleIds = { common.getRcModuleId(moduleType, 1), common.getRcModuleId(moduleType, 2) } local params = { mobRequest = { @@ -46,24 +49,25 @@ local params = { } --[[ Local Functions ]] -local function getInteriorVehicleDataConsent(self) - local mobSession = commonSmoke.getMobileSession(1, self) +local function getInteriorVehicleDataConsent() + local mobSession = common.getMobileSession() local cid = mobSession:SendRPC("GetInteriorVehicleDataConsent", params.mobRequest) - EXPECT_HMICALL("RC.GetInteriorVehicleDataConsent") + common.getHMIConnection():ExpectRequest("RC.GetInteriorVehicleDataConsent") :Times(0) mobSession:ExpectResponse(cid, params.mobResponse) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Prepare preloaded policy table", commonSmoke.preparePreloadedPTForRC) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Prepare preloaded policy table", common.preparePreloadedPTForRC) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("GetInteriorVehicleDataConsent CLIMATE modules Positive Case", getInteriorVehicleDataConsent) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/054_ReleaseInteriorVehicleDataModule_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/054_ReleaseInteriorVehicleDataModule_PositiveCase_SUCCESS.lua index 7f3ced464b..74bd6b6235 100644 --- a/test_scripts/Smoke/API/054_ReleaseInteriorVehicleDataModule_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/054_ReleaseInteriorVehicleDataModule_PositiveCase_SUCCESS.lua @@ -24,7 +24,10 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 @@ -33,7 +36,7 @@ config.application1.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" } --[[ Local Variables ]] local moduleData = { moduleType = "CLIMATE", - moduleId = commonSmoke.getRcModuleId("CLIMATE", 1), + moduleId = common.getRcModuleId("CLIMATE", 1), climateControlData = { fanSpeed = 18 } @@ -44,7 +47,6 @@ local params = { moduleData = moduleData }, hmiRequest = { - appID = commonSmoke.getHMIAppId(1), moduleData = moduleData }, hmiResponse = { @@ -58,18 +60,20 @@ local params = { } --[[ Local Functions ]] -local function allocateInteriorVehicleDataModule(self) - local mobSession = commonSmoke.getMobileSession(1, self) +local function allocateInteriorVehicleDataModule() + local mobSession = common.getMobileSession() + local hmi = common.getHMIConnection() local cid = mobSession:SendRPC("SetInteriorVehicleData", params.mobRequest) - EXPECT_HMICALL("RC.SetInteriorVehicleData", params.hmiRequest) + params.hmiRequest.appID = common.getHMIAppId(1) + hmi:ExpectRequest("RC.SetInteriorVehicleData", params.hmiRequest) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", params.hmiResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", params.hmiResponse) end) mobSession:ExpectResponse(cid, params.mobResponse) end -local function releaseInteriorVehicleDataModule(self) - local mobSession = commonSmoke.getMobileSession(1, self) +local function releaseInteriorVehicleDataModule() + local mobSession = common.getMobileSession() local cid = mobSession:SendRPC("ReleaseInteriorVehicleDataModule", { moduleType = moduleData.moduleType, moduleId = moduleData.moduleId }) mobSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) @@ -77,15 +81,16 @@ end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Prepare preloaded policy table", commonSmoke.preparePreloadedPTForRC) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Prepare preloaded policy table", common.preparePreloadedPTForRC) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Step("AllocateInteriorVehicleDataModule CLIMATE module", allocateInteriorVehicleDataModule) runner.Title("Test") runner.Step("ReleaseInteriorVehicleDataModule CLIMATE module Positive Case", releaseInteriorVehicleDataModule) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/API/055_GetInteriorVehicleData_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/055_GetInteriorVehicleData_PositiveCase_SUCCESS.lua index b2a7a8b16a..ce42f7e141 100644 --- a/test_scripts/Smoke/API/055_GetInteriorVehicleData_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/055_GetInteriorVehicleData_PositiveCase_SUCCESS.lua @@ -23,14 +23,17 @@ --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.appHMIType = { "REMOTE_CONTROL" } --[[ Local Variables ]] -local moduleId = commonSmoke.getRcModuleId("CLIMATE", 1) +local moduleId = common.getRcModuleId("CLIMATE", 1) local moduleData = { moduleType = "CLIMATE", @@ -83,26 +86,28 @@ local params = { } --[[ Local Functions ]] -local function getInteriorVehicleData(self) - local mobSession = commonSmoke.getMobileSession(1, self) +local function getInteriorVehicleData() + local mobSession = common.getMobileSession() + local hmi = common.getHMIConnection() local cid = mobSession:SendRPC("GetInteriorVehicleData", params.mobRequest) - EXPECT_HMICALL("RC.GetInteriorVehicleData", params.hmiRequest) + hmi:ExpectRequest("RC.GetInteriorVehicleData", params.hmiRequest) :Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", params.hmiResponse) + hmi:SendResponse(data.id, data.method, "SUCCESS", params.hmiResponse) end) mobSession:ExpectResponse(cid, params.mobResponse) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", commonSmoke.preconditions) -runner.Step("Prepare preloaded policy table", commonSmoke.preparePreloadedPTForRC) -runner.Step("Start SDL, HMI, connect Mobile, start Session", commonSmoke.start) -runner.Step("RAI", commonSmoke.registerApp) -runner.Step("Activate App", commonSmoke.activateApp) +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Prepare preloaded policy table", common.preparePreloadedPTForRC) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) runner.Title("Test") runner.Step("GetInteriorVehicleData CLIMATE module Positive Case", getInteriorVehicleData) runner.Title("Postconditions") -runner.Step("Stop SDL", commonSmoke.postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/HeartBeat/001_HeartBeat_App_does_not_send_HB_and_does_not_respond.lua b/test_scripts/Smoke/HeartBeat/001_HeartBeat_App_does_not_send_HB_and_does_not_respond.lua index 341370e38a..51326017a3 100644 --- a/test_scripts/Smoke/HeartBeat/001_HeartBeat_App_does_not_send_HB_and_does_not_respond.lua +++ b/test_scripts/Smoke/HeartBeat/001_HeartBeat_App_does_not_send_HB_and_does_not_respond.lua @@ -21,100 +21,56 @@ -- 1. App has successfully registered. -- 2. App is disconnected by SDL due to heartbeat timeout occurs. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 3 -config.application1.registerAppInterfaceParams.isMediaApplication = true - --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local mobile_session = require('mobile_session') - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams -local default_app_params2 = config.application2.registerAppInterfaceParams +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() -commonPreconditions:BackupFile("smartDeviceLink.ini") -commonFunctions:write_parameter_to_smart_device_link_ini("HeartBeatTimeout", 5000) +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 3 -function Test:StartSDL_And_Connect_Mobile() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) -end +--[[ Local Variables ]] +local HBParams_1 = { + activateHeartbeat = false, + sendHeartbeatToSDL = false, + answerHeartbeatFromSDL = false, + ignoreSDLHeartBeatACK = false, +} ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") +local HBParams_2 = { + activateHeartbeat = true, + sendHeartbeatToSDL = true, + answerHeartbeatFromSDL = true, + ignoreSDLHeartBeatACK = false, +} -function Test:Start_Session_And_Register_App() - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession.activateHeartbeat = false - self.mobileSession.sendHeartbeatToSDL = false - self.mobileSession.answerHeartbeatFromSDL = false - self.mobileSession.ignoreSDLHeartBeatACK = false - self.mobileSession:StartRPC():Do(function() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { application = { appName = default_app_params.appName}}):Do(function(_,data) - default_app_params.hmi_app_id = data.params.application.appID +--[[ Local Functions ]] +local function firstAppIsUnregistered() + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(1), unexpectedDisconnect = true }) + :Do(function() + common.getMobileSession(1):StopHeartbeat() end) - self.mobileSession:ExpectResponse(correlation_id, {success = true, resultCode = "SUCCESS"}) - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession:ExpectNotification("OnPermissionsChange", {}) - end) + :Timeout(15000) end -function Test:Register_Second_App_With_HeartBeat() - self.mobileSession1 = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession1.activateHeartbeat = true - self.mobileSession1.sendHeartbeatToSDL = true - self.mobileSession1.answerHeartbeatFromSDL = true - self.mobileSession1.ignoreSDLHeartBeatACK = false - self.mobileSession1:StartRPC():Do(function() - local correlation_id = self.mobileSession1:SendRPC("RegisterAppInterface", default_app_params2) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = default_app_params2.appName}}) - self.mobileSession1:ExpectResponse(correlation_id, {success = true, resultCode = "SUCCESS"}) - self.mobileSession1:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession1:ExpectNotification("OnPermissionsChange", {}) - end) +local function secondAppIsStillRegistered() + local cid = common.getMobileSession(2):SendRPC("RegisterAppInterface", common.getConfigAppParams(2)) + common.getMobileSession(2):ExpectResponse(cid, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY" }) end -function Test:Wait_15_seconds_And_Verify_OnAppUnregistered() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", - {appID = default_app_params.hmi_app_id, unexpectedDisconnect = true}):Timeout(15000):Do(function() - self.mobileSession:StopHeartbeat() - end) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Set HeartBeatTimeout", common.setSDLIniParameter, { "HeartBeatTimeout", 5000 }) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App 1", common.registerApp, { 1, HBParams_1 }) +runner.Step("Register App 2", common.registerApp, { 2, HBParams_2 }) -function Test:Verify_That_Second_App_Still_Registered() - local cor_id = self.mobileSession1:SendRPC("RegisterAppInterface", default_app_params2) - self.mobileSession1:ExpectResponse(cor_id, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY"}) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - commonPreconditions:RestoreFile("smartDeviceLink.ini") - StopSDL() -end +runner.Title("Test") +runner.Step("Wait 15 seconds and verify 1st app is unregistered", firstAppIsUnregistered) +runner.Step("Verify 2nd app is still registered", secondAppIsStillRegistered) -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/HeartBeat/002_HeartBeat_App_does_not_send_HB_but_respond.lua b/test_scripts/Smoke/HeartBeat/002_HeartBeat_App_does_not_send_HB_but_respond.lua index ade96f4b4c..e0393f8019 100644 --- a/test_scripts/Smoke/HeartBeat/002_HeartBeat_App_does_not_send_HB_but_respond.lua +++ b/test_scripts/Smoke/HeartBeat/002_HeartBeat_App_does_not_send_HB_but_respond.lua @@ -20,83 +20,46 @@ -- 1. App has successfully registered. -- 2. App is still registered on HU, no unexpected disconnect occurs. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 3 -config.application1.registerAppInterfaceParams.isMediaApplication = true - --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local mobile_session = require('mobile_session') - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() -commonPreconditions:BackupFile("smartDeviceLink.ini") -commonFunctions:write_parameter_to_smart_device_link_ini("HeartBeatTimeout", 5000) +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') -function Test:StartSDL_And_Connect_Mobile() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) -end +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 3 ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") +--[[ Local Variables ]] +local HBParams = { + activateHeartbeat = true, + sendHeartbeatToSDL = false, + answerHeartbeatFromSDL = true, + ignoreSDLHeartBeatACK = true, +} -function Test:Start_Session_And_Register_App() - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession.activateHeartbeat = true - self.mobileSession.sendHeartbeatToSDL = false - self.mobileSession.answerHeartbeatFromSDL = true - self.mobileSession.ignoreSDLHeartBeatACK = true - self.mobileSession:StartRPC():Do(function() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { application = { appName = default_app_params.appName}}):Do(function(_,data) - default_app_params.hmi_app_id = data.params.application.appID - end) - self.mobileSession:ExpectResponse(correlation_id, {success = true, resultCode = "SUCCESS"}) - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession:ExpectNotification("OnPermissionsChange", {}) - end) +--[[ Local Functions ]] +local function wait() + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(), unexpectedDisconnect = true }) + :Times(0) + common.wait(15000) end -function Test.Wait_15_seconds() - commonTestCases:DelayedExp(15000) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered"):Times(0) +local function appIsStillRegistered() + local cid = common.getMobileSession():SendRPC("RegisterAppInterface", common.getConfigAppParams(1)) + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY" }) end -function Test:Verify_That_App_Still_Registered() - local cor_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - self.mobileSession:ExpectResponse(cor_id, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY"}) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Set HeartBeatTimeout", common.setSDLIniParameter, { "HeartBeatTimeout", 5000 }) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp, { 1, HBParams }) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - commonPreconditions:RestoreFile("smartDeviceLink.ini") - StopSDL() -end +runner.Title("Test") +runner.Step("Wait 15 seconds", wait) +runner.Step("Verify app is still registered", appIsStillRegistered) -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/HeartBeat/003_HeartBeat_App_send_HB.lua b/test_scripts/Smoke/HeartBeat/003_HeartBeat_App_send_HB.lua index 9c4ba44187..00ee6405a7 100644 --- a/test_scripts/Smoke/HeartBeat/003_HeartBeat_App_send_HB.lua +++ b/test_scripts/Smoke/HeartBeat/003_HeartBeat_App_send_HB.lua @@ -20,78 +20,46 @@ -- 1. App has successfully registered. -- 2. App is still registered, no unexpected disconnect occurs. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 3 -config.application1.registerAppInterfaceParams.isMediaApplication = true - --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local mobile_session = require('mobile_session') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() -commonPreconditions:BackupFile("smartDeviceLink.ini") -commonFunctions:write_parameter_to_smart_device_link_ini("HeartBeatTimeout", 5000) - -function Test:StartSDL_And_Connect_Mobile() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) -end +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 3 ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") +--[[ Local Variables ]] +local HBParams = { + activateHeartbeat = true, + sendHeartbeatToSDL = true, + answerHeartbeatFromSDL = false, + ignoreSDLHeartBeatACK = true, +} -function Test:Start_Session_And_Register_App() - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession.sendHeartbeatToSDL = true - self.mobileSession.answerHeartbeatFromSDL = false - self.mobileSession.ignoreSDLHeartBeatACK = false - self.mobileSession:StartRPC():Do(function() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = default_app_params.appName}}) - self.mobileSession:ExpectResponse(correlation_id, {success = true, resultCode = "SUCCESS"}) - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession:ExpectNotification("OnPermissionsChange", {}) - end) +--[[ Local Functions ]] +local function wait() + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(), unexpectedDisconnect = true }) + :Times(0) + common.wait(15000) end -function Test.Wait_15_seconds() - commonTestCases:DelayedExp(15000) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered"):Times(0) +local function appIsStillRegistered() + local cid = common.getMobileSession():SendRPC("RegisterAppInterface", common.getConfigAppParams(1)) + common.getMobileSession():ExpectResponse(cid, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY" }) end -function Test:Verify_That_App_Still_Registered() - local cor_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - self.mobileSession:ExpectResponse(cor_id, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY"}) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Set HeartBeatTimeout", common.setSDLIniParameter, { "HeartBeatTimeout", 5000 }) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp, { 1, HBParams }) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - commonPreconditions:RestoreFile("smartDeviceLink.ini") - StopSDL() -end +runner.Title("Test") +runner.Step("Wait 15 seconds", wait) +runner.Step("Verify app is still registered", appIsStillRegistered) -return Test \ No newline at end of file +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/HeartBeat/004_HeartBeat_no_heartbeat_v2_protocol.lua b/test_scripts/Smoke/HeartBeat/004_HeartBeat_no_heartbeat_v2_protocol.lua index b2ae7af7b5..ced4bdb55a 100644 --- a/test_scripts/Smoke/HeartBeat/004_HeartBeat_no_heartbeat_v2_protocol.lua +++ b/test_scripts/Smoke/HeartBeat/004_HeartBeat_no_heartbeat_v2_protocol.lua @@ -17,88 +17,54 @@ -- 1. App has successfully registered. -- 2. App is still registered, no unexpected disconnect occurs. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true - --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local constants = require('protocol_handler/ford_protocol_constants') -local mobile_session = require('mobile_session') -local events = require("events") - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() -commonPreconditions:BackupFile("smartDeviceLink.ini") -commonFunctions:write_parameter_to_smart_device_link_ini("HeartBeatTimeout", 5000) - -function Test:StartSDL_And_Connect_Mobile() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) -end +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 2 ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") +--[[ Local Variables ]] +local HBParams = { + activateHeartbeat = false, + sendHeartbeatToSDL = false, + answerHeartbeatFromSDL = false, + ignoreSDLHeartBeatACK = false +} -function Test:Start_Session_And_Register_App() - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession.sendHeartbeatToSDL = false - self.mobileSession.answerHeartbeatFromSDL = false - self.mobileSession:StartRPC():Do(function() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = default_app_params.appName}}) - self.mobileSession:ExpectResponse(correlation_id, {success = true, resultCode = "SUCCESS"}) - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession:ExpectNotification("OnPermissionsChange", {}) +--[[ Local Functions ]] +local function wait() + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(), unexpectedDisconnect = true }) + :Times(0) + local event = common.createEvent(function(_, data) + return data.frameType == common.constants.FRAME_TYPE.CONTROL_FRAME + and data.serviceType == common.constants.SERVICE_TYPE.CONTROL + and data.frameInfo == common.constants.FRAME_INFO.HEARTBEAT + and data.sessionId == common.getMobileSession().sessionId end) + common.getMobileSession():ExpectEvent(event, "Heartbeat") + :Times(0) + common.wait(15000) end -function Test:Wait_15_seconds() - local event = events.Event() - event.matches = function(_,data) - return data.frameType == constants.FRAME_TYPE.CONTROL_FRAME and - data.serviceType == constants.SERVICE_TYPE.CONTROL and - data.frameInfo == constants.FRAME_INFO.HEARTBEAT and - self.mobileSession.sessionId == data.sessionId - end - commonTestCases:DelayedExp(15000) - self.mobileSession:ExpectEvent(event, "Heartbeat"):Times(0) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered"):Times(0) +local function appIsStillRegistered() + local cid = common.getMobileSession(1):SendRPC("RegisterAppInterface", common.getConfigAppParams(1)) + common.getMobileSession(1):ExpectResponse(cid, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY" }) end -function Test:Verify_That_App_Still_Registered() - local cor_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - self.mobileSession:ExpectResponse(cor_id, { success = false, resultCode = "APPLICATION_REGISTERED_ALREADY"}) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Set HeartBeatTimeout", common.setSDLIniParameter, { "HeartBeatTimeout", 5000 }) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp, { 1, HBParams }) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - commonPreconditions:RestoreFile("smartDeviceLink.ini") - StopSDL() -end +runner.Title("Test") +runner.Step("Wait 15 seconds", wait) +runner.Step("Verify app is still registered", appIsStillRegistered) -return Test \ No newline at end of file +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Policies/001_PTU_all_flows.lua b/test_scripts/Smoke/Policies/001_PTU_all_flows.lua index 3ce4e29818..8d78a0db84 100644 --- a/test_scripts/Smoke/Policies/001_PTU_all_flows.lua +++ b/test_scripts/Smoke/Policies/001_PTU_all_flows.lua @@ -4,13 +4,10 @@ --------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require('user_modules/script_runner') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local mobile_session = require("mobile_session") -local json = require("modules/json") -local atf_logger = require("atf_logger") -local sdl = require("SDL") -local commonSteps = require("user_modules/shared_testcases/commonSteps") -local commonSmoke = require('test_scripts/Smoke/commonSmoke') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --[[ Local Variables ]] local flowType = { @@ -19,64 +16,6 @@ local flowType = { HTTP = 3 } ---[[ Local Functions ]] -local function preconditions() - -- Stop SDL if process is still running - commonFunctions:SDLForceStop() - -- Remove Local Policy Update - commonSteps:DeletePolicyTable() - -- Delete log files - commonSteps:DeleteLogsFiles() -end - --- Allow device from HMI -local function allowSDL(self) - -- sending notification OnAllowSDLFunctionality from HMI to allow connected device - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - { allowed = true, source = "GUI", device = { id = commonSmoke.getDeviceMAC(), name = commonSmoke.getDeviceName() }}) - return commonSmoke.wait(500) -end - --- Start SDL and HMI, establish connection between SDL and HMI, open mobile connection via TCP -local function start(self) - self:runSDL() - commonFunctions:waitForSDLStart(self) - :Do(function() - self:initHMI(self) - :Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady() - :Do(function() - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile() - :Do(function() - commonFunctions:userPrint(35, "Mobile connected") - end) - end) - end) - end) -end - --- Loging messages in terminal -local function log(...) - local str = "[" .. atf_logger.formated_time(true) .. "]" - for i, p in pairs({...}) do - local delimiter = "\t" - if i == 1 then delimiter = " " end - str = str .. delimiter .. p - end - commonFunctions:userPrint(35, str) -end - --- Convert snapshot form json to table --- @tparam file pts_f snapshot file -local function ptsToTable(pts_f) - local f = io.open(pts_f, "r") - local content = f:read("*all") - f:close() - return json.decode(content) -end - -- Creation policy table from snapshot -- @tparam table ptu snapshot table local function getPTUFromPTS(ptu) @@ -89,7 +28,7 @@ local function getPTUFromPTS(ptu) -- remove usage_and_error_counts ptu.policy_table.usage_and_error_counts = nil -- write empty struct in "DataConsent-2".rpcs - ptu.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null + ptu.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null -- remove preloaded_pt ptu.policy_table.module_config.preloaded_pt = nil -- remove preloaded_date @@ -108,95 +47,89 @@ local function getPTUFromPTS(ptu) ptu.policy_table.vehicle_data = nil end --- Save created PT in file --- @tparam table ptu PT table --- @tparam string ptu_file_name file name -local function storePTUInFile(ptu, ptu_file_name) - local f = io.open(ptu_file_name, "w") - f:write(json.encode(ptu)) - f:close() -end - -- Check that PT is sent as binary data in OnSystem request -- @tparam table bin_data binary data -- @tparam number pFlow number of floe type from flowType -local function checkIfPTSIsSentAsBinary(bin_data, pFlow, self) +local function checkIfPTSIsSentAsBinary(bin_data, pFlow) -- decode binary data to table depending on policy flow local pt = nil if bin_data ~= nil and string.len(bin_data) > 0 then if flowType[pFlow] == flowType.PROPRIETARY then - pt = json.decode(bin_data).HTTPRequest.body + pt = common.json.decode(bin_data).HTTPRequest.body elseif flowType[pFlow] == flowType.EXTERNAL_PROPRIETARY or flowType[pFlow] == flowType.HTTP then pt = bin_data end - pt = json.decode(pt) + pt = common.json.decode(pt) end -- Check presence of policy_table in decoded PT if pt == nil or not pt.policy_table then - self:FailTestCase("PTS was not sent to Mobile as binary data in payload of OnSystemRequest") + common.failTestCase("PTS was not sent to Mobile as binary data in payload of OnSystemRequest") end end -- Policy table update with Proprietary flow -- @tparam table ptu_table PT table -- @tparam string pFlow policy flow -local function ptuProprietary(ptu_table, self, pFlow) +local function ptuProprietary(ptu_table, pFlow) + local mobileSession = common.getMobileSession() + local hmi = common.getHMIConnection() -- Get path to snapshot - local pts_file_name = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") .. "/" - .. commonFunctions:read_parameter_from_smart_device_link_ini("PathToSnapshot") + local pts_file_name = common.readParameterFromSDLINI("SystemFilesPath") .. "/" + .. common.readParameterFromSDLINI("PathToSnapshot") -- create ptu_file_name as tmp file local ptu_file_name = os.tmpname() -- Send GetPolicyConfigurationData request from HMI to SDL with service 7 - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", + local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", { policyType = "module_config", property = "endpoints" }) - log("HMI->SDL: RQ: SDL.GetPolicyConfigurationData") + common.log("HMI->SDL: RQ: SDL.GetPolicyConfigurationData") -- Expect response GetPolicyConfigurationData on HMI side EXPECT_HMIRESPONSE(requestId) :Do(function() - log("SDL->HMI: RS: SDL.GetPolicyConfigurationData") + common.log("SDL->HMI: RS: SDL.GetPolicyConfigurationData") -- After receiving GetPolicyConfigurationData response send OnSystemRequest notification from HMI - self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + hmi:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = pts_file_name }) - log("HMI->SDL: N: BC.OnSystemRequest") + common.log("HMI->SDL: N: BC.OnSystemRequest") -- Prepare PT for update getPTUFromPTS(ptu_table) -- Save created PT for update in tmp file - storePTUInFile(ptu_table, ptu_file_name) + common.tableToJsonFile(ptu_table, ptu_file_name) -- Expect receiving of OnSystemRequest notification with snapshot on mobile side - self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function(_, d) -- After receiving OnSystemRequest notification on mobile side check that -- data in notification was sent as binary data - checkIfPTSIsSentAsBinary(d.binaryData, pFlow, self) - log("SDL->MOB: N: OnSystemRequest") + checkIfPTSIsSentAsBinary(d.binaryData, pFlow) + common.log("SDL->MOB: N: OnSystemRequest") -- Send SystemRequest request with PT for update from mobile side - local corIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", + local corIdSystemRequest = mobileSession:SendRPC("SystemRequest", { requestType = "PROPRIETARY" }, ptu_file_name) - log("MOB->SDL: RQ: SystemRequest") + common.log("MOB->SDL: RQ: SystemRequest") -- Expect SystemRequest request on HMI side - EXPECT_HMICALL("BasicCommunication.SystemRequest") + hmi:ExpectRequest("BasicCommunication.SystemRequest") :Do(function(_, dd) - log("SDL->HMI: RQ: BC.SystemRequest") + common.log("SDL->HMI: RQ: BC.SystemRequest") -- Send SystemRequest response form HMI with resultCode SUCCESS - self.hmiConnection:SendResponse(dd.id, dd.method, "SUCCESS", { }) - log("HMI->SDL: RS: SUCCESS: BC.SystemRequest") + hmi:SendResponse(dd.id, dd.method, "SUCCESS", { }) + common.log("HMI->SDL: RS: SUCCESS: BC.SystemRequest") -- Send OnReceivedPolicyUpdate notification from HMI - self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", + hmi:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = dd.params.fileName }) - log("HMI->SDL: N: SDL.OnReceivedPolicyUpdate") + common.log("HMI->SDL: N: SDL.OnReceivedPolicyUpdate") end) -- Expect SystemRequest response with resultCode SUCCESS on mobile side - self.mobileSession:ExpectResponse(corIdSystemRequest, { success = true, resultCode = "SUCCESS"}) + mobileSession:ExpectResponse(corIdSystemRequest, { success = true, resultCode = "SUCCESS"}) -- remove tmp PT file after receiving SystemRequest response on mobile side :Do(function() os.remove(ptu_file_name) end) - log("SDL->MOB: RS: SUCCESS: SystemRequest") + common.log("SDL->MOB: RS: SUCCESS: SystemRequest") end) end) end -- Policy table update with HTTP flow -- @tparam table ptu_table PT table -local function ptuHttp(ptu_table, self) +local function ptuHttp(ptu_table) + local mobileSession = common.getMobileSession() -- name for PT for SystemRequest local policy_file_name = "PolicyTableUpdate" -- tmp file name for PT file @@ -204,15 +137,15 @@ local function ptuHttp(ptu_table, self) -- Prepare PT for update getPTUFromPTS(ptu_table) -- Save created PT for update in tmp file - storePTUInFile(ptu_table, ptu_file_name) + common.tableToJsonFile(ptu_table, ptu_file_name) -- Send SystemRequest form mobile app with created PT - local corId = self.mobileSession:SendRPC("SystemRequest", + local corId = mobileSession:SendRPC("SystemRequest", { requestType = "HTTP", fileName = policy_file_name }, ptu_file_name) - log("MOB->SDL: RQ: SystemRequest") + common.log("MOB->SDL: RQ: SystemRequest") -- Expect successful SystemRequest response on mobile side - self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) :Do(function() - log("SDL->MOB: RS: SUCCESS: SystemRequest") + common.log("SDL->MOB: RS: SUCCESS: SystemRequest") end) -- remove tmp PT file os.remove(ptu_file_name) @@ -220,93 +153,94 @@ end -- Expect 3 OnStatusUpdate notification on HMI side during PTU local function expOnStatusUpdate() - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", + common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }, {status = "UP_TO_DATE" }) :Do(function(_, d) - log("SDL->HMI: N: SDL.OnStatusUpdate", d.params.status) + common.log("SDL->HMI: N: SDL.OnStatusUpdate", d.params.status) end) :Times(3) end -- Fail test cases by incorrect PTU -- @tparam string pRequestName request name of RPC that is failed expectations -local function failInCaseIncorrectPTU(pRequestName, self) - self:FailTestCase(pRequestName .. " was sent more than once (PTU update was incorrect)") +local function failInCaseIncorrectPTU(pRequestName) + common.failTestCase(pRequestName .. " was sent more than once (PTU update was incorrect)") end -- Registration of application with policy table update -local function raiPTU(self) +local function raiPTU() + local hmi = common.getHMIConnection() expOnStatusUpdate() -- temp solution due to issue in SDL: -- SDL.OnStatusUpdate(UPDATE_NEEDED) notification is sent before BC.OnAppRegistered (EXTERNAL_PROPRIETARY flow) - allowSDL(self):Do(function() + common.mobile.allowSDL():Do(function() -- creation mobile session - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) + local mobileSession = common.createMobileSession(1) -- open RPC service in created session - self.mobileSession:StartService(7) + mobileSession:StartService(7) :Do(function() -- Send RegisterAppInterface request from mobile application - local corId = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) - log("MOB->SDL: RQ: RegisterAppInterface") + local corId = mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + common.log("MOB->SDL: RQ: RegisterAppInterface") -- Expect OnAppRegistered on HMI side from SDL - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", + hmi:ExpectNotification("BasicCommunication.OnAppRegistered", { application = { appName = config.application1.registerAppInterfaceParams.appName } }) :Do(function() - log("SDL->HMI: N: BC.OnAppRegistered") - if sdl.buildOptions.extendedPolicy == "PROPRIETARY" - or sdl.buildOptions.extendedPolicy == "EXTERNAL_PROPRIETARY" then + common.log("SDL->HMI: N: BC.OnAppRegistered") + end) + -- Expect RegisterAppInterface response on mobile side with resultCode SUCCESS + mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :Do(function() + common.log("SDL->MOB: RS: RegisterAppInterface") + if common.SDL.buildOptions.extendedPolicy == "PROPRIETARY" + or common.SDL.buildOptions.extendedPolicy == "EXTERNAL_PROPRIETARY" then -- Expect PolicyUpdate request on HMI side - EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + hmi:ExpectRequest("BasicCommunication.PolicyUpdate") :Do(function(e, d) if e.occurences == 1 then -- SDL send BC.PolicyUpdate more than once if PTU update was incorrect - log("SDL->HMI: RQ: BC.PolicyUpdate") + common.log("SDL->HMI: RQ: BC.PolicyUpdate") -- Create PT form snapshot - local ptu_table = ptsToTable(d.params.file) + local ptu_table = common.SDL.PTS.get() -- Sending PolicyUpdate request from HMI with resultCode SUCCESS - self.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) - log("HMI->SDL: RS: BC.PolicyUpdate") + hmi:SendResponse(d.id, d.method, "SUCCESS", { }) + common.log("HMI->SDL: RS: BC.PolicyUpdate") -- PTU proprietary flow - ptuProprietary(ptu_table, self, sdl.buildOptions.extendedPolicy) + ptuProprietary(ptu_table, common.SDL.buildOptions.extendedPolicy) else - failInCaseIncorrectPTU("BC.PolicyUpdate", self) + failInCaseIncorrectPTU("BC.PolicyUpdate") end end) - elseif sdl.buildOptions.extendedPolicy == "HTTP" then + elseif common.SDL.buildOptions.extendedPolicy == "HTTP" then -- Expect OnSystemRequest notification on mobile side - self.mobileSession:ExpectNotification("OnSystemRequest") + mobileSession:ExpectNotification("OnSystemRequest") :Do(function(e, d) - log("SDL->MOB: N: OnSystemRequest", e.occurences, d.payload.requestType) + common.log("SDL->MOB: N: OnSystemRequest", e.occurences, d.payload.requestType) if d.payload.requestType == "HTTP" then if e.occurences <= 2 then -- SDL send OnSystemRequest more than once if PTU update was incorrect -- Check data in receives OnSystemRequest notification on mobile side - checkIfPTSIsSentAsBinary(d.binaryData, sdl.buildOptions.extendedPolicy, self) + checkIfPTSIsSentAsBinary(d.binaryData, common.SDL.buildOptions.extendedPolicy) if d.binaryData then -- Create PT form binary data - local ptu_table = json.decode(d.binaryData) + local ptu_table = common.json.decode(d.binaryData) -- PTU HTTP flow - ptuHttp(ptu_table, self) + ptuHttp(ptu_table) end else - failInCaseIncorrectPTU("OnSystemRequest", self) + failInCaseIncorrectPTU("OnSystemRequest") end end end) :Times(2) end - end) - -- Expect RegisterAppInterface response on mobile side with resultCode SUCCESS - self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) - :Do(function() - log("SDL->MOB: RS: RegisterAppInterface") -- Expect OnHMIStatus with hmiLevel NONE on mobile side form SDL - self.mobileSession:ExpectNotification("OnHMIStatus", + mobileSession:ExpectNotification("OnHMIStatus", { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Do(function(_, d) - log("SDL->MOB: N: OnHMIStatus", d.payload.hmiLevel) + common.log("SDL->MOB: N: OnHMIStatus", d.payload.hmiLevel) end) -- Expect OnPermissionsChange on mobile side form SDL - self.mobileSession:ExpectNotification("OnPermissionsChange") + mobileSession:ExpectNotification("OnPermissionsChange") :Do(function() - log("SDL->MOB: N: OnPermissionsChange") + common.log("SDL->MOB: N: OnPermissionsChange") end) :Times(2) end) @@ -315,32 +249,29 @@ local function raiPTU(self) end -- Check update status -local function checkPTUStatus(self) +local function checkPTUStatus() + local hmi = common.getHMIConnection() -- Send GetStatusUpdate form HMI to SDL - local reqId = self.hmiConnection:SendRequest("SDL.GetStatusUpdate") - log("HMI->SDL: RQ: SDL.GetStatusUpdate") + local reqId = hmi:SendRequest("SDL.GetStatusUpdate") + common.log("HMI->SDL: RQ: SDL.GetStatusUpdate") -- Expect GetStatusUpdate response from SDL to HMI with update status - EXPECT_HMIRESPONSE(reqId, { result = { status = "UP_TO_DATE" }}) + hmi:ExpectResponse(reqId, { result = { status = "UP_TO_DATE" }}) :Do(function(_, d) - log("HMI->SDL: RS: SDL.GetStatusUpdate", tostring(d.result.status)) + common.log("HMI->SDL: RS: SDL.GetStatusUpdate", tostring(d.result.status)) end) end -- Pring in terminal build options(RC status and policy slow) local function printSDLConfig() - commonFunctions:printTable(sdl.buildOptions) -end - -local function postconditions() - StopSDL() + print(common.tableToString(common.SDL.buildOptions)) end --[[ Scenario ]] runner.Title("Preconditions") -- Stop SDL if process is still running, delete local policy table and log files -runner.Step("Clean environment", preconditions) +runner.Step("Clean environment", common.preconditions) -- Start SDL and HMI, establish connection between SDL and HMI, open mobile connection via TCP -runner.Step("Start SDL, HMI, connect Mobile", start) +runner.Step("Start SDL, HMI, connect Mobile", common.start) -- Pring in terminal build options(RC status and policy slow) runner.Step("SDL Configuration", printSDLConfig) @@ -351,4 +282,4 @@ runner.Step("RAI, PTU", raiPTU) runner.Step("Check Status", checkPTUStatus) runner.Title("Postconditions") -runner.Step("Stop SDL", postconditions) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Registration/001_Register_5_connection.lua b/test_scripts/Smoke/Registration/001_Register_5_connection.lua index f3c91e4e2c..f54bb3d02a 100644 --- a/test_scripts/Smoke/Registration/001_Register_5_connection.lua +++ b/test_scripts/Smoke/Registration/001_Register_5_connection.lua @@ -27,102 +27,122 @@ -- 2. SDL assignes HMILevel after application registering: -- SDL->appID: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 - --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local mobile_session = require('mobile_session') -local mobile = require('mobile_connection') -local tcp = require('tcp_connection') -local file_connection = require('file_connection') -local events = require("events") - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - --- [[Local variables]] -local devicePort = 12345 - -local devices = { - "127.0.0.1", - "192.168.100.199", - "10.42.0.1", - "1.0.0.1", - "8.8.8.8" -} - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -local function createConnectionAndRegisterApp(self, device, filename, app) - local tcpConnection = tcp.Connection(device, devicePort) - local fileConnection = file_connection.FileConnection(filename, tcpConnection) - self.mobileConnection = mobile.MobileConnection(fileConnection) - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection, app) - event_dispatcher:AddConnection(self.mobileConnection) - self.mobileSession:ExpectEvent(events.connectedEvent, "Connection started") - self.mobileConnection:Connect() - self.mobileSession:StartService(7):Do(function() - local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", app) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", {application = { appName = app.appName}}) - self.mobileSession:ExpectResponse(correlationId , { success = true, resultCode = "SUCCESS"}) - self.mobileSession:ExpectNotification("OnHMIStatus",{hmiLevel = "NONE", - audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}):Do(function() - commonFunctions:userPrint(35, "App is successfully registered") + +--[[ Required Shared Libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local numOfDevices = 5 +local interface +local device = {} + +--[[ Local Variables ]] +-- local function split(pStr) +-- local result = {} +-- for match in (pStr.."."):gmatch("(.-)%.") do +-- table.insert(result, match) +-- end +-- return result +-- end + +local function execCmd(pCmd) + local handle = io.popen(pCmd) + local result = handle:read("*a") + handle:close() + return string.gsub(result, "[\n\r]+", "") +end + +local function start() + local event = common.createEvent() + common.init.SDL() + :Do(function() + common.init.HMI() + :Do(function() + common.init.HMI_onReady() + :Do(function() + common.getHMIConnection():RaiseEvent(event, "Start event") + end) + end) end) - end) + return common.getHMIConnection():ExpectEvent(event, "Start event") end -function Test.CreateDummyConections() - for i = 1, 4 do - os.execute("ifconfig lo:" .. i .." " .. devices[i + 1]) - end +local function getDeviceName(pDevice) + return pDevice .. ":" .. config.mobilePort end -function Test:Start_SDL() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function() - commonFunctions:userPrint(35, "HMI is ready") - end) - end) - end) +local function getDeviceMAC(pDevice) + return execCmd("echo -n " .. getDeviceName(pDevice) .. " | sha256sum | awk '{printf $1}'") end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") +local function registerApp(pAppId) + common.createMobileSession(pAppId, nil, pAppId) + common.getMobileSession(pAppId):StartService(7) + :Do(function() + local corId = common.getMobileSession(pAppId):SendRPC("RegisterAppInterface", common.getConfigAppParams(pAppId)) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppRegistered", + { application = { + appName = common.getConfigAppParams(pAppId).appName, + appID = common.getHMIAppId(pAppId), + deviceInfo = { + name = getDeviceName(device[pAppId]), + id = getDeviceMAC(device[pAppId]) + } + } + }) + common.getMobileSession(pAppId):ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :Do(function() + common.getMobileSession(pAppId):ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + end) + end) +end -for i = 1, 5 do - Test["CreateConnection_" .. i] = function(self) - local filename = "mobile" .. i .. ".out" - local app = config["application"..i].registerAppInterfaceParams - createConnectionAndRegisterApp(self, devices[i], filename, app) +local function preconditions() + common.preconditions() + for i = 1, numOfDevices do + if execCmd("ip addr | grep " .. device[i]) == "" then + os.execute("ip addr add " .. device[i] .. "/24 dev " .. interface) + end end end --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end -function Test.ShutDownDummyConnections() - for i = 1, 4 do - os.execute("ifconfig lo:" .. i .." down") +local function postconditions() + common.postconditions() + for i = 1, numOfDevices do + if execCmd("ip addr | grep " .. device[i]) ~= "" then + os.execute("ip addr del " .. device[i] .. "/24 dev " .. interface) + end end end -function Test.CleanTemporaryFiles() - for i = 1, 5 do - os.execute("rm -f " .. "mobile" .. i .. ".out") +local function generateDeviceData() + interface = execCmd("ip addr | grep " .. config.mobileHost .. " | rev | awk '{print $1}' | rev") + common.cprint(35, "Interface:", interface) + -- local curAddr = split(config.mobileHost, ".") + common.cprint(35, "IP-addresses:") + for i = 1, numOfDevices do + device[i] = string.match(config.mobileHost, ".+%.") .. 50 + i + common.cprint(35, " " .. device[i]) end end -return Test +generateDeviceData() + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", preconditions) +runner.Step("Start SDL, HMI, connect Mobile", start) + +runner.Title("Test") +for i = 1, numOfDevices do + runner.Step("Create connection " .. i, common.createConnection, { i, device[i] }) + runner.Step("Register App " .. i, registerApp, { i }) +end + +runner.Title("Postconditions") +runner.Step("Stop SDL", postconditions) diff --git a/test_scripts/Smoke/Registration/002_Register_5_session.lua b/test_scripts/Smoke/Registration/002_Register_5_session.lua index 186ad7720a..078d1f187b 100644 --- a/test_scripts/Smoke/Registration/002_Register_5_session.lua +++ b/test_scripts/Smoke/Registration/002_Register_5_session.lua @@ -28,83 +28,25 @@ -- 2. SDL assignes HMILevel after application registering: -- SDL->appID: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local mobile_session = require('mobile_session') +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params2 = config.application2.registerAppInterfaceParams -local default_app_params3 = config.application3.registerAppInterfaceParams -local default_app_params4 = config.application4.registerAppInterfaceParams -local default_app_params5 = config.application5.registerAppInterfaceParams +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) ---[[ Local Functions ]] -local function startSessionAndRegisterApp(self, app) - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession:StartRPC():Do(function() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", app) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = app.appName}}) - self.mobileSession:ExpectResponse(correlation_id, {success = true, resultCode = "SUCCESS"}) - self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - self.mobileSession:ExpectNotification("OnPermissionsChange", {}) - end) +runner.Title("Test") +for i = 1, 5 do + runner.Step("Register App " .. i, common.registerApp, { i }) end ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "1st App is successfully registered") - end) - end) - end) - end) - end) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") - -function Test:Start_Session2_And_Register_App_2() - startSessionAndRegisterApp(self, default_app_params2) -end - -function Test:Start_Session3_And_Register_App_3() - startSessionAndRegisterApp(self, default_app_params3) -end - -function Test:Start_Session4_And_Register_App_4() - startSessionAndRegisterApp(self, default_app_params4) -end - -function Test:Start_Session5_And_Register_App_5() - startSessionAndRegisterApp(self, default_app_params5) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end -return Test \ No newline at end of file diff --git a/test_scripts/Smoke/Registration/003_Register_App.lua b/test_scripts/Smoke/Registration/003_Register_App.lua index 88fdc85711..634143901e 100644 --- a/test_scripts/Smoke/Registration/003_Register_App.lua +++ b/test_scripts/Smoke/Registration/003_Register_App.lua @@ -19,63 +19,21 @@ -- 2. SDL assignes HMILevel after application registering: -- SDL->appID: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local mobile_session = require('mobile_session') +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +runner.Title("Test") +runner.Step("Register App", common.registerApp) ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") - -function Test:Start_SDL() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) -end - -function Test:Register_App() - self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = self.mobileSession:StartRPC() - on_rpc_service_started:Do(function() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = default_app_params.appName}}) - - EXPECT_RESPONSE(correlation_id, {success = true, resultCode = "SUCCESS"}):Do(function() - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end) - EXPECT_NOTIFICATION("OnPermissionsChange") - end) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end - -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Registration/004_Reregister_App.lua b/test_scripts/Smoke/Registration/004_Reregister_App.lua index 03215b042b..2b8d298a82 100644 --- a/test_scripts/Smoke/Registration/004_Reregister_App.lua +++ b/test_scripts/Smoke/Registration/004_Reregister_App.lua @@ -24,68 +24,23 @@ -- 3. SDL assignes HMILevel after application registering: -- SDL->appID: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') +--[[ Required Shared Libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +runner.Title("Test") +runner.Step("Register App", common.registerApp) +runner.Step("UnRegister App", common.unregisterApp) +runner.Step("ReRegister App", common.registerApp) -function Test:Start_SDL_With_One_Registered_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - end) - end) - end) - end) - end) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") - -function Test:Unregister_App() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface", default_app_params) - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = false, - appID = self.applications[default_app_params.appName]}) -end - -function Test:Reregister_Application() - local correlation_id = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = default_app_params.appName}}) - - EXPECT_RESPONSE(correlation_id, {success = true, resultCode = "SUCCESS"}):Do(function() - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end) - EXPECT_NOTIFICATION("OnPermissionsChange") -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end - -return Test \ No newline at end of file +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Registration/005_Reregister_App_after_disconnect.lua b/test_scripts/Smoke/Registration/005_Reregister_App_after_disconnect.lua index 3c85be08cc..84318cd33b 100644 --- a/test_scripts/Smoke/Registration/005_Reregister_App_after_disconnect.lua +++ b/test_scripts/Smoke/Registration/005_Reregister_App_after_disconnect.lua @@ -23,72 +23,23 @@ -- 3. SDL assignes HMILevel after application registering: -- SDL->appID: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local mobile_session = require('mobile_session') +--[[ Required Shared Libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +runner.Title("Test") +runner.Step("Register App", common.registerApp) +runner.Step("Unexpected disconnect", common.unexpectedDisconnect) +runner.Step("ReRegister App", common.registerApp) -function Test:Start_SDL_With_One_Registered_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - end) - end) - end) - end) - end) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Check that it is able to reregister App after disconnect") - -function Test:Close_Connection() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params.appName]}) - self.mobileSession:Stop() -end - -function Test:Reregister_Application() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - local cid = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params) - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = {appName = default_app_params.appName} }) - self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) - - EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) - EXPECT_NOTIFICATION("OnPermissionsChange") - end) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end - -return Test \ No newline at end of file +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Registration/006_Reregister_App_if_two_apps_are_registered.lua b/test_scripts/Smoke/Registration/006_Reregister_App_if_two_apps_are_registered.lua index 4803b63835..f2a7447ac4 100644 --- a/test_scripts/Smoke/Registration/006_Reregister_App_if_two_apps_are_registered.lua +++ b/test_scripts/Smoke/Registration/006_Reregister_App_if_two_apps_are_registered.lua @@ -25,74 +25,24 @@ -- 3. SDL assignes HMILevel after application registering: -- SDL->appID_1: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') +--[[ Required Shared Libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params1 = config.application1.registerAppInterfaceParams +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +runner.Title("Test") +runner.Step("Register App 1", common.registerApp, { 1 }) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("UnRegister App 1", common.unregisterApp, { 1 }) +runner.Step("ReRegister App 1", common.registerApp, { 1 }) -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "First app is registered") - end) - end) - end) - end) - end) -end - -commonSteps:precondition_AddNewSession() -commonSteps:RegisterTheSecondMediaApp() - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") - -function Test:Unregister_App() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface", default_app_params1) - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = false, - appID = self.applications[default_app_params1.appName]}) -end - -function Test:Reregister_Application() - local cid = self.mobileSession:SendRPC("RegisterAppInterface", default_app_params1) - self.mobileSession:ExpectResponse(cid, { success = true }) - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = {appName = default_app_params1.appName} }) - - EXPECT_HMICALL("BasicCommunication.UpdateAppList"):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, "BasicCommunication.UpdateAppList", "SUCCESS", {}) - end) - EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE"}) - EXPECT_NOTIFICATION("OnPermissionsChange", {}) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end - -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/001_Resumption_3rd_ignition_cycle.lua b/test_scripts/Smoke/Resumption/001_Resumption_3rd_ignition_cycle.lua index 015a239b77..fab154863e 100644 --- a/test_scripts/Smoke/Resumption/001_Resumption_3rd_ignition_cycle.lua +++ b/test_scripts/Smoke/Resumption/001_Resumption_3rd_ignition_cycle.lua @@ -5,7 +5,6 @@ -- Description: -- Check that: -- 1. SDL performs App data resumption in case when media app tries to resume in 3rd ignition cycle. --- 2. SDL doesn't resumes App to FULL hmi level. -- -- 1. Used precondition -- Media App is registered and active on HMI @@ -18,130 +17,59 @@ -- Connect transport. -- -- Expected behavior: --- 1. In 3rd ignition cycle App is registered and get default HMI level, app data is resumed. +-- 1. In 3rd ignition cycle App is registered, app data and HMI level are resumed. --------------------------------------------------------------------------------------------------- ---[[ General configuration parameters ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') -local SDL = require('SDL') - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - --- [[ Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams -local default_app = nil -- will be initialized after application registration +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false -- [[ Local Functions ]] -local function Start_SDL_And_Add_Mobile_Connection() - Test:runSDL() - commonFunctions:waitForSDLStart(Test):Do(function() - Test:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - Test:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - Test:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) -end - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test.Start_SDL_Add_Mobile_Connection() - Start_SDL_And_Add_Mobile_Connection() -end - -function Test:Start_Session_And_Register_App() - self:startSession():Do(function() - commonFunctions:userPrint(35, "App is registered") - default_app = self.applications[default_app_params.appName] - commonSteps:ActivateAppInSpecificLevel(self, default_app) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) -end - -function Test.AddCommand() - commonStepsResumption:AddCommand() -end - -function Test.AddSubMenu() - commonStepsResumption:AddSubMenu() -end - -function Test.AddChoiceSet() - commonStepsResumption:AddChoiceSet() -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("SDL should perform data resumption application is registered within 3 ign cycles") - -function Test:IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() - end) - end) +local function expAppUnregistered() + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) end -function Test.Restart_SDL_And_Add_Mobile_Connection() - Start_SDL_And_Add_Mobile_Connection() -end - -function Test:IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() - end) - end) -end - -function Test.Restart_SDL_And_Add_Mobile_Connection() - Start_SDL_And_Add_Mobile_Connection() -end - -function Test:Register_And_No_Resume_App() - local mobile_session1 = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobile_session1:StartRPC() - on_rpc_service_started:Do(function() - default_app_params.hashID = self.currentHashID - commonStepsResumption:Expect_Resumption_Data(default_app_params) - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppFULL, true) - end) +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHashChange") end --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end -return Test +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) + +runner.Title("Test") +runner.Step("Ignition Off", common.ignitionOff, { expAppUnregistered }) +runner.Step("Start SDL, HMI, connect Mobile, 2nd cycle", common.start) +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("Start SDL, HMI, connect Mobile, 3rd cycle", common.start) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/002_Resumption_app_registered_in_more_than_30sec_after_BC.OnReady.lua b/test_scripts/Smoke/Resumption/002_Resumption_app_registered_in_more_than_30sec_after_BC.OnReady.lua index fde537a56a..7de6eca39e 100644 --- a/test_scripts/Smoke/Resumption/002_Resumption_app_registered_in_more_than_30sec_after_BC.OnReady.lua +++ b/test_scripts/Smoke/Resumption/002_Resumption_app_registered_in_more_than_30sec_after_BC.OnReady.lua @@ -2,7 +2,7 @@ -- [HMILevel Resumption]: Conditions to resume app to FULL in the next ignition cycle -- -- Description: --- Check that SDL does not perform App resumption in case when app is +-- Check that SDL does not perform HMI level resumption of an App in case when it is -- registered in more than 30 sec. after BC.OnReady from HMI in the very next ignition cycle -- -- 1. Used precondition @@ -17,101 +17,54 @@ -- 1. SDL sends to HMI OnSDLClose. -- App is registered successfully and get default HMI level. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') -local SDL = require('SDL') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) - end) - end) +-- [[ Local Functions ]] +local function expAppUnregistered() + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("SDL does not perform App resumption when app is registered in more than 30 sec after BC.OnReady") - -function Test:IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) - end) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) -end - -function Test:Restart_SDL_And_Add_Mobile_Connection() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test.Sleep_31_sec() - os.execute("sleep " .. 31) +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Times(0) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + :Times(1) end -function Test:Register_And_No_Resume_App() - local mobile_session1 = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobile_session1:StartRPC() - on_rpc_service_started:Do(function() - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectNoResumeApp, false) - end) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Test") +runner.Step("Ignition Off", common.ignitionOff, { expAppUnregistered }) +runner.Step("Start SDL, HMI, connect Mobile, 2nd cycle", common.start) +runner.Step("Wait 31 sec", common.wait, { 31000 }) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/003_Resumption_App_Unregister_itself.lua b/test_scripts/Smoke/Resumption/003_Resumption_App_Unregister_itself.lua index c1e8795ced..074b5e7ed6 100644 --- a/test_scripts/Smoke/Resumption/003_Resumption_App_Unregister_itself.lua +++ b/test_scripts/Smoke/Resumption/003_Resumption_App_Unregister_itself.lua @@ -15,90 +15,44 @@ -- 1. SPT sends UnregisterAppInterface and EndSession to SDL. -- SPT register in usual way, no resumption occurs --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) - end) - end) -end - -function Test:Add_Command_And_Put_File() - local correlation_id = self.mobileSession:SendRPC("AddCommand", { cmdID = 1, vrCommands = {"OnlyVRCommand"}}) - local on_hmi_call = EXPECT_HMICALL("VR.AddCommand", {cmdID = 1, type = "Command", - vrCommands = {"OnlyVRCommand"}}) - on_hmi_call:Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - EXPECT_RESPONSE(correlation_id, { success = true, resultCode = "SUCCESS" }) - EXPECT_NOTIFICATION("OnHashChange"):Do(function(_, data) - self.currentHashID = data.payload.hashID - end) - - local cid = self.mobileSession:SendRPC( - "PutFile", { - syncFileName = "icon.png", - fileType = "GRAPHIC_PNG", - persistentFile = true, - systemFile = false, - }, "files/icon.png") - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("No resumption if App unregister itself") - -function Test:Unregister_App() - local cid = self.mobileSession:SendRPC("UnregisterAppInterface", default_app_params) - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS"}) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = false, - appID = self.applications[default_app_params]}) -end - -function Test:Register_And_No_Resume_App() - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectNoResumeApp, false) +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +-- [[ Local Functions ]] +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Times(0) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Times(0) + common.getMobileSession():ExpectNotification("OnHashChange") + :Times(0) end --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Times(0) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + :Times(1) end -return Test +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) + +runner.Title("Test") +runner.Step("UnRegister App", common.unregisterApp) +runner.Step("ReRegister App", common.reregisterApp, { "RESUME_FAILED", expResData, expResLvl }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/004_Resumption_BACKGROUND_level.lua b/test_scripts/Smoke/Resumption/004_Resumption_BACKGROUND_level.lua index 4846ea7ac6..60b3446249 100644 --- a/test_scripts/Smoke/Resumption/004_Resumption_BACKGROUND_level.lua +++ b/test_scripts/Smoke/Resumption/004_Resumption_BACKGROUND_level.lua @@ -19,96 +19,47 @@ -- 1. App is unregistered from HMI. -- App is registered on HMI, SDL resumes all data and App gets default HMI level NONE. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true -config.application2.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - --- [[Local variables]] -local default_app_params1 = config.application1.registerAppInterfaceParams -local default_app_params2 = config.application2.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params1.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) - end) - end) -end - -function Test.AddCommand() - commonStepsResumption:AddCommand() -end - -function Test.AddSubMenu() - commonStepsResumption:AddSubMenu() -end - -function Test.AddChoiceSet() - commonStepsResumption:AddChoiceSet() -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("Transport unexpected disconnect. Media app not resume at BACKGROUND level") -commonSteps:precondition_AddNewSession() -commonSteps:RegisterTheSecondMediaApp() -commonSteps:ActivateTheSecondMediaApp() - -function Test:Close_Session2() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params2.appName]}) - self.mobileSession2:Stop() -end - -function Test:Close_Session1() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params1.appName]}) - self.mobileSession:Stop() -end - -function Test:Register_And_No_Resume_App_BACKGROUND_And_Resumes_Data() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - default_app_params1.hashID = self.currentHashID - on_rpc_service_started:Do(function() - commonStepsResumption:Expect_Resumption_Data(default_app_params1) - commonStepsResumption:RegisterApp(default_app_params1, commonStepsResumption.ExpectNoResumeApp, true) - end) +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +-- [[ Local Functions ]] +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Times(0) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Times(0) + common.getMobileSession():ExpectNotification("OnHashChange") + :Times(0) end --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Times(0) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + :Times(1) end -return Test +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App 1", common.registerApp) +runner.Step("Activate App 1", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) +runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Activate App 2", common.activateApp, { 2 }) +runner.Step("UnRegister App 2", common.unregisterApp, { 2 }) +runner.Step("UnRegister App 1", common.unregisterApp) + +runner.Title("Test") +runner.Step("ReRegister App", common.reregisterApp, { "RESUME_FAILED", expResData, expResLvl }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/005_Resumption_big_amount_of_data.lua b/test_scripts/Smoke/Resumption/005_Resumption_big_amount_of_data.lua index 2615d7ddcf..9e0cfef0e3 100644 --- a/test_scripts/Smoke/Resumption/005_Resumption_big_amount_of_data.lua +++ b/test_scripts/Smoke/Resumption/005_Resumption_big_amount_of_data.lua @@ -18,179 +18,90 @@ -- App is registered successfully, SDL sends OnAppRegistered on HMI with "resumeVrGrammars"=true. -- SDL resumes all app's data and sends BC.ActivateApp to HMI. App gets FULL HMI Level --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:StartSDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) +-- [[ Local Functions ]] +function common.addCommand(pId) + local params = { cmdID = pId, vrCommands = { "OnlyVRCommand_" .. pId }} + local cid = common.getMobileSession():SendRPC("AddCommand", params) + common.getHMIConnection():ExpectRequest("VR.AddCommand") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") + :Do(function(_, data) + common.hashId = data.payload.hashID end) - end) -end - -function Test:AddCommand() - for i = 1, 20 do - self.mobileSession:SendRPC("AddCommand", { cmdID = i, vrCommands = {"VRCommand" .. tostring(i)}}) - end - local on_hmi_call = EXPECT_HMICALL("VR.AddCommand"):Times(20) - on_hmi_call:Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - EXPECT_RESPONSE("AddCommand", { success = true, resultCode = "SUCCESS" }):Times(20) - EXPECT_NOTIFICATION("OnHashChange"):Do(function(_, data) - self.currentHashID = data.payload.hashID - end):Times(20) -end - -function Test:AddSubMenu() - for i = 1, 20 do - self.mobileSession:SendRPC("AddSubMenu", { menuID = i, position = 500, - menuName = "SubMenu" .. tostring(i)}) - end - local on_hmi_call = EXPECT_HMICALL("UI.AddSubMenu"):Times(20) - on_hmi_call:Do(function(_, data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - EXPECT_RESPONSE("AddSubMenu", { success = true, resultCode = "SUCCESS" }):Times(20) - EXPECT_NOTIFICATION("OnHashChange"):Do(function(_, data) - self.currentHashID = data.payload.hashID - end):Times(20) end -function Test:AddChoiceSet() - for i = 1, 20 do - self.mobileSession:SendRPC("CreateInteractionChoiceSet", {interactionChoiceSetID = i, - choiceSet = { { choiceID = i, menuName = "Choice" .. tostring(i), vrCommands = { "VrChoice" .. tostring(i)}}}}) - end - local on_hmi_call = EXPECT_HMICALL("VR.AddCommand"):Times(20) - on_hmi_call:Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) +function common.addSubMenu(pId) + local params = { menuID = pId, position = 500, menuName = "SubMenu_" .. pId } + local cid = common.getMobileSession():SendRPC("AddSubMenu", params) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") + :Do(function(_, data) + common.hashId = data.payload.hashID end) - EXPECT_RESPONSE("CreateInteractionChoiceSet", { success = true, resultCode = "SUCCESS" }):Times(20) - EXPECT_NOTIFICATION("OnHashChange"):Do(function(_, data) - self.currentHashID = data.payload.hashID - end):Times(20) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Transport unexpected disconnect. App resume at FULL level") - -function Test:Close_Session() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params]}) - self.mobileSession:Stop() +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + :Times(20) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + :Times(20) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test:Register_And_Resume_App_And_Data() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - config.application1.registerAppInterfaceParams.hashID = self.currentHashID - Test:expect_Resumption_Data() - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppFULL, true) - end) +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end -function Test:expect_Resumption_Data() - local on_ui_sub_menu_added = EXPECT_HMICALL("UI.AddSubMenu"):Times(20) - on_ui_sub_menu_added:Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS") - end) - on_ui_sub_menu_added:ValidIf(function(_,data) - if data.params.menuParams.position == 500 then - if data.params.appID == default_app_params.hmi_app_id then - return true - else - commonFunctions:userPrint(31, "App is registered with wrong appID " ) - return false - end - end - end) - local is_command_received = 20 - local is_choice_received = 20 - local on_vr_commands_added = EXPECT_HMICALL("VR.AddCommand"):Times(40) - on_vr_commands_added:Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS") - end) - on_vr_commands_added:ValidIf(function(_,data) - if (data.params.type == "Command" and is_command_received ~= 0) then - if (data.params.appID == default_app_params.hmi_app_id) then - is_command_received = is_command_received - 1 - return true - else - commonFunctions:userPrint(31, "Received the same notification or App is registered with wrong appID") - return false - end - elseif (data.params.type == "Choice" and is_choice_received ~= 0) then - if (data.params.appID == default_app_params.hmi_app_id) then - is_choice_received = is_choice_received - 1 - return true - else - commonFunctions:userPrint(31, "Received the same notification or App is registered with wrong appID") - return false - end - end - end) - self.mobileSession:ExpectNotification("OnHashChange") +local function onCommand() + common.getHMIConnection():SendNotification("UI.OnCommand", { cmdID = 20, appID = common.getHMIAppId() }) + common.getMobileSession():ExpectNotification("OnCommand", { cmdID = 20, triggerSource= "MENU" }) end -function Test:OnCommand() - self.hmiConnection:SendNotification("UI.OnCommand",{ cmdID = 20, appID = default_app_params.hmi_app_id}) - EXPECT_NOTIFICATION("OnCommand", {cmdID = 20, triggerSource= "MENU"}) +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +for i = 1, 20 do + runner.Step("Add Command " .. i, common.addCommand, { i }) end - -function Test:PerformInteraction() - self.mobileSession:SendRPC("PerformInteraction",{ - initialText = "StartPerformInteraction", - initialPrompt = { - { text = "Makeyourchoice", type = "TEXT"}}, - interactionMode = "BOTH", - interactionChoiceSetIDList = { 20 }, - timeout = 5000 - }) - EXPECT_HMICALL("VR.PerformInteraction", {appID = default_app_params.hmi_app_id}):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {choiceID = 20}) - end) +for i = 1, 20 do + runner.Step("Add SubMenu " .. i, common.addSubMenu, { i }) end --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Test") +runner.Step("Unexpected Disconnect", common.unexpectedDisconnect) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) +runner.Step("OnCommand", onCommand) -return Test \ No newline at end of file +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/006_Resumption_disconnect_more_than_30s_before_SUSPEND.lua b/test_scripts/Smoke/Resumption/006_Resumption_disconnect_more_than_30s_before_SUSPEND.lua index 5eaf8f3773..1452a6debd 100644 --- a/test_scripts/Smoke/Resumption/006_Resumption_disconnect_more_than_30s_before_SUSPEND.lua +++ b/test_scripts/Smoke/Resumption/006_Resumption_disconnect_more_than_30s_before_SUSPEND.lua @@ -2,121 +2,65 @@ -- [HMILevel Resumption]: Conditions to resume app to FULL in the next ignition cycle -- -- Description: --- Check that SDL does not perform App resumption in case when transport --- disconnect occure in more than 30 sec before BC.OnExitAllApplications(SUSPEND). +-- Check that SDL does not perform HMI level resumption of an App in case when transport +-- disconnect occurs in more than 30 sec before BC.OnExitAllApplications(SUSPEND). -- 1. Used precondition -- Media App is registered and active on HMI -- 2. Performed steps -- Disconnect app, wait 31 sec --- Perform iginition off +-- Perform ignition off -- Perform ignition on -- -- Expected behavior: -- 1. App is successfully registered and receive default HMI level --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') -local SDL = require('SDL') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams -local default_app = nil -- will be initialized after application registration - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - default_app = self.applications[default_app_params.appName] - commonSteps:ActivateAppInSpecificLevel(self, default_app) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) +-- [[ Local Functions ]] +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) -end - ---[[ Test ]] -commonFunctions:newTestCasesGroup("App disconnect >30s before BC.OnExitAllApplications(SUSPEND). App not resume") - -function Test:Close_Session() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params]}) - self.mobileSession:Stop() -end - -function Test.Sleep_31_sec() - os.execute("sleep " .. 31) -end - -function Test:IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - end) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test:Restart_SDL_And_Add_Mobile_Connection() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) - end) - end) +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Times(0) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + :Times(1) end -function Test:Register_And_No_Resume_App() - local mobile_session1 = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobile_session1:StartRPC() - on_rpc_service_started:Do(function() - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectNoResumeApp, false) - end) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Test") +runner.Step("Unexpected disconnect", common.unexpectedDisconnect) +runner.Step("Wait 31 sec", common.wait, { 31000 }) + +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("Start SDL, HMI, connect Mobile, 2nd cycle", common.start) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/007_Resumption_FULL_IGNITION_OFF.lua b/test_scripts/Smoke/Resumption/007_Resumption_FULL_IGNITION_OFF.lua index 45e513f2d5..7196f8fc86 100644 --- a/test_scripts/Smoke/Resumption/007_Resumption_FULL_IGNITION_OFF.lua +++ b/test_scripts/Smoke/Resumption/007_Resumption_FULL_IGNITION_OFF.lua @@ -19,100 +19,56 @@ -- 2. App is registered, SDL sends OnAppRegistered with the same HMI appID as in last ignition cycle, -- then sends BasicCommunication.ActivateApp to HMI and after success response from HMI, SDL sends to App OnHMIStatus(FULL) --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') -local SDL = require('SDL') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[ Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams -local default_app = nil -- will be initialized after application registration - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - default_app = self.applications[default_app_params.appName] - commonSteps:ActivateAppInSpecificLevel(self, default_app) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) - end) - end) +-- [[ Local Functions ]] +local function expAppUnregistered() + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("App resume at FULL level") - -function Test:IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) - end) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test:Restart_SDL_And_Add_Mobile_Connection() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end -function Test:Register_And_Resume_App_FULL() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - default_app_params.hashID = self.currentHashID - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppFULL, false) - end) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Test") +runner.Step("Ignition Off", common.ignitionOff, { expAppUnregistered }) +runner.Step("Start SDL, HMI, connect Mobile, 2nd cycle", common.start) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/008_Resumption_heartbeat_disconnect.lua b/test_scripts/Smoke/Resumption/008_Resumption_heartbeat_disconnect.lua index 226fa7214e..b390dcb157 100644 --- a/test_scripts/Smoke/Resumption/008_Resumption_heartbeat_disconnect.lua +++ b/test_scripts/Smoke/Resumption/008_Resumption_heartbeat_disconnect.lua @@ -18,106 +18,62 @@ -- 1. SDL sends OnAppUnregistered to HMI. -- 2. App is registered and SDL resumes all App data, sends BC.ActivateApp to HMI, app gets FULL HMI level. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 3 -config.application1.registerAppInterfaceParams.isMediaApplication = true - --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') -local events = require("events") - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - --- [[Local functions]] -local function connectMobile(self) - self.mobileConnection:Connect() - return EXPECT_EVENT(events.connectedEvent, "Connected") -end -local function delayedExp(pTime, self) - local event = events.Event() - event.matches = function(e1, e2) return e1 == e2 end - EXPECT_HMIEVENT(event, "Delayed event") - :Timeout(pTime + 5000) - local function toRun() - event_dispatcher:RaiseEvent(self.hmiConnection, event) - end - RUN_AFTER(toRun, pTime) -end +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 3 -function Test:StartSDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - connectMobile(self):Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) +-- [[ Local Functions ]] +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) -end - -function Test.AddCommand() - commonStepsResumption:AddCommand() -end - -function Test.AddSubMenu() - commonStepsResumption:AddSubMenu() + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test.AddChoiceSet() - commonStepsResumption:AddChoiceSet() +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Check that SDL perform resumption after heartbeat disconnect") - -function Test:Wait_20_sec() - self.mobileSession:StopHeartbeat() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {appID = self.applications[default_app_params], unexpectedDisconnect = true }) +local function Wait_20_sec() + common.getMobileSession():StopHeartbeat() + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { appID = common.getHMIAppId(), unexpectedDisconnect = true }) :Timeout(20000) - EXPECT_EVENT(events.disconnectedEvent, "Disconnected") + common.getMobileSession():ExpectEvent(common.events.disconnectedEvent, "Disconnected") :Times(0) - delayedExp(20000, self) -end - -function Test:Register_And_Resume_App_And_Data() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - default_app_params.hashID = self.currentHashID - commonStepsResumption:Expect_Resumption_Data(default_app_params) - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppFULL, true) - end) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() + :Timeout(20000) + common.wait(20000) end -return Test +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) + +runner.Title("Test") +runner.Step("Wait_20_sec", Wait_20_sec) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/009_Resumption_LIMITED_IGNITION_OFF.lua b/test_scripts/Smoke/Resumption/009_Resumption_LIMITED_IGNITION_OFF.lua index bc44f893cb..669997063a 100644 --- a/test_scripts/Smoke/Resumption/009_Resumption_LIMITED_IGNITION_OFF.lua +++ b/test_scripts/Smoke/Resumption/009_Resumption_LIMITED_IGNITION_OFF.lua @@ -18,97 +18,61 @@ -- 1. SDL sends to HMI OnSDLClose -- 2. App is registered, SDL sends OnAppRegistered with the same HMI appID as in last ignition cycle, then sets App to LIMITED HMI level --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') -local SDL = require('SDL') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonSteps:ActivateAppInSpecificLevel(self, - self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) - end) - end) - end) - end) - end) +-- [[ Local Functions ]] +local function expAppUnregistered() + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("App resume at LIMITED level") -commonSteps:ChangeHMIToLimited() - -function Test:IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", {reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) - end) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) -end - -function Test:Restart_SDL_And_Add_Mobile_Connection() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test:Register_And_Resume_App_LIMITED() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - default_app_params.hashID = self.currentHashID - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppLIMITED, false) - end) +local function expResLvl() + common.getHMIConnection():SendNotification("BasicCommunication.OnResumeAudioSource", { appID = common.getHMIAppId() }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() +local function deactivateApp() + common.getHMIConnection():SendNotification("BasicCommunication.OnAppDeactivated", + { appID = common.getHMIAppId(), reason = "GENERAL" }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) end -return Test +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) + +runner.Title("Test") +runner.Step("Deactivate app", deactivateApp) +runner.Step("Ignition Off", common.ignitionOff, { expAppUnregistered }) +runner.Step("Start SDL, HMI, connect Mobile, 2nd cycle", common.start) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/010_Resumption_LIMITED_level.lua b/test_scripts/Smoke/Resumption/010_Resumption_LIMITED_level.lua index cbf30bb8a7..a5aae85d35 100644 --- a/test_scripts/Smoke/Resumption/010_Resumption_LIMITED_level.lua +++ b/test_scripts/Smoke/Resumption/010_Resumption_LIMITED_level.lua @@ -18,86 +18,55 @@ -- 2. App is registered on HMI, SDL resumes all App's data and sends OnResumeAudioSource to HMI. -- App gets LIMITED HMI Level --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) +-- [[ Local Functions ]] +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) -end - -function Test.AddCommand() - commonStepsResumption:AddCommand() -end - -function Test.AddSubMenu() - commonStepsResumption:AddSubMenu() + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test.AddChoiceSet() - commonStepsResumption:AddChoiceSet() +local function expResLvl() + common.getHMIConnection():SendNotification("BasicCommunication.OnResumeAudioSource", { appID = common.getHMIAppId() }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Transport unexpected disconnect. App resume at LIMITED level") -commonSteps:ChangeHMIToLimited("Change_app_to_Limited") - -function Test:Close_Session() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params]}) - self.mobileSession:Stop() +local function deactivateApp() + common.getHMIConnection():SendNotification("BasicCommunication.OnAppDeactivated", + { appID = common.getHMIAppId(), reason = "GENERAL" }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) end -function Test:Register_And_Resumes_App_And_Data() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - default_app_params.hashID = self.currentHashID - commonStepsResumption:Expect_Resumption_Data(default_app_params) - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppLIMITED, true) - end) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Test") +runner.Step("Deactivate app", deactivateApp) +runner.Step("Unexpected disconnect", common.unexpectedDisconnect) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) -return Test \ No newline at end of file +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/Resumption/011_Resumption_unexpected_disconnect.lua b/test_scripts/Smoke/Resumption/011_Resumption_unexpected_disconnect.lua index 5d07396b5a..a540c7a00c 100644 --- a/test_scripts/Smoke/Resumption/011_Resumption_unexpected_disconnect.lua +++ b/test_scripts/Smoke/Resumption/011_Resumption_unexpected_disconnect.lua @@ -17,85 +17,51 @@ -- 2. App is registered successfully, SDL resumes all App data and sends -- BC.ActivateApp to HMI. App gets FULL HMI Level. --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 -config.application1.registerAppInterfaceParams.isMediaApplication = true --- [[ Required Shared Libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonStepsResumption = require('user_modules/shared_testcases/commonStepsResumption') -local mobile_session = require('mobile_session') +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false --- [[Local variables]] -local default_app_params = config.application1.registerAppInterfaceParams - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:StartSDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_params.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL",audioStreamingState = "AUDIBLE", systemContext = "MAIN"}) - commonFunctions:userPrint(35, "App is activated") - end) - end) - end) +-- [[ Local Functions ]] +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") end) - end) -end - -function Test.AddCommand() - commonStepsResumption:AddCommand() -end - -function Test.AddSubMenu() - commonStepsResumption:AddSubMenu() + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHashChange") end -function Test.AddChoiceSet() - commonStepsResumption:AddChoiceSet() +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS") + end) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Transport unexpected disconnect. App resume at FULL level") - -function Test:Close_Session() - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", {unexpectedDisconnect = true, - appID = self.applications[default_app_params]}) - self.mobileSession:Stop() -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, 1st cycle", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Add SubMenu", common.addSubMenu) -function Test:Register_And_Resume_App_And_Data() - local mobileSession = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobileSession:StartRPC() - on_rpc_service_started:Do(function() - default_app_params.hashID = self.currentHashID - commonStepsResumption:Expect_Resumption_Data(default_app_params) - commonStepsResumption:RegisterApp(default_app_params, commonStepsResumption.ExpectResumeAppFULL, true) - end) -end +runner.Title("Test") +runner.Step("Unexpected disconnect", common.unexpectedDisconnect) +runner.Step("ReRegister App", common.reregisterApp, { "SUCCESS", expResData, expResLvl }) --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) -return Test \ No newline at end of file diff --git a/test_scripts/Smoke/ShutDown/001_ShutDown_IGNITION_OFF.lua b/test_scripts/Smoke/ShutDown/001_ShutDown_IGNITION_OFF.lua index 9fd9c09853..6fbc21dc4d 100644 --- a/test_scripts/Smoke/ShutDown/001_ShutDown_IGNITION_OFF.lua +++ b/test_scripts/Smoke/ShutDown/001_ShutDown_IGNITION_OFF.lua @@ -19,66 +19,29 @@ -- 1. SDL sends to App OnAppInterfaceUnregistered -- 2. SDL sends to HMI OnSDLClose and stops working --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local SDL = require('SDL') +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() - -function Test:Start_SDL_With_One_Activated_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonSteps:ActivateAppInSpecificLevel(self, - self.applications[config.application1.registerAppInterfaceParams.appName]) - EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) - end) - end) - end) - end) - end) +-- [[ Local Functions ]] +local function expAppUnregistered() + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Check that SDL finish it's work properly by IGNITION_OFF") -function Test:ShutDown_IGNITION_OFF() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "SUSPEND" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLPersistenceComplete"):Do(function() - SDL:DeleteFile() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "IGNITION_OFF" }) - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() - end) - end) -end +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) ---[[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() -end +runner.Title("Test") +runner.Step("Shutdown by IGNITION_OFF", common.ignitionOff, { expAppUnregistered }) -return Test +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/ShutDown/002_ShutDown_MASTER_RESET.lua b/test_scripts/Smoke/ShutDown/002_ShutDown_MASTER_RESET.lua index 3a15f705c4..4f89b1b286 100644 --- a/test_scripts/Smoke/ShutDown/002_ShutDown_MASTER_RESET.lua +++ b/test_scripts/Smoke/ShutDown/002_ShutDown_MASTER_RESET.lua @@ -16,149 +16,71 @@ -- Expected result: -- 1. SDL clear all Apps folder, app_info.dat file and shut down --------------------------------------------------------------------------------------------------- ---[[ General Precondition before ATF start ]] -config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] -local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local commonSteps = require('user_modules/shared_testcases/commonSteps') -local mobile_session = require('mobile_session') -local SDL = require('SDL') -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') ---[[ Local Variables ]] --- Hash id of AddCommand before MASTER_RESET -local hash_id = nil -local default_app_name = config.application1.registerAppInterfaceParams.appName - ---[[ General Settings for configuration ]] -Test = require('user_modules/dummy_connecttest') -require('cardinalities') -require('user_modules/AppTypes') - ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") -commonSteps:DeletePolicyTable() -commonSteps:DeleteLogsFiles() +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false -function Test:StartSDL_With_One_Registered_App() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - self:startSession():Do(function () - commonFunctions:userPrint(35, "App is registered") - end) - end) - end) - end) - end) +--[[ Local Variables ]] +local putFileParams = { + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" +} + +-- [[ Local Functions ]] +local function expAppUnregistered() + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "MASTER_RESET" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) end -function Test:Activate_App_And_Put_File() - local function addCommand() - local cid = self.mobileSession:SendRPC("AddCommand",{ cmdID = 1005, - vrCommands = { "OnlyVRCommand"} - }) - EXPECT_HMICALL("VR.AddCommand", {cmdID = 1005, type = "Command", - vrCommands = {"OnlyVRCommand"}}):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - EXPECT_NOTIFICATION("OnHashChange"):Do(function(_, data) - hash_id = data.payload.hashID - end) - end - - commonSteps:ActivateAppInSpecificLevel(self, self.applications[default_app_name]) - local on_hmi_full = EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) - on_hmi_full:Do(function() - local cid = self.mobileSession:SendRPC( - "PutFile", { - syncFileName = "icon.png", - fileType = "GRAPHIC_PNG", - persistentFile = true, - systemFile = false, - }, "files/icon.png") - EXPECT_RESPONSE(cid, { success = true, resultCode = "SUCCESS" }) - addCommand() - end) +local function expResData() + common.getHMIConnection():ExpectRequest("VR.AddCommand") + :Times(0) + common.getMobileSession():ExpectNotification("OnHashChange") + :Times(0) end ---[[ Test ]] -commonFunctions:newTestCasesGroup("Check that SDL finish it's work properly by MASTER_RESET") - -function Test:ShutDown_MASTER_RESET() - self.hmiConnection:SendNotification("BasicCommunication.OnExitAllApplications", - { reason = "MASTER_RESET" }) - EXPECT_NOTIFICATION("OnAppInterfaceUnregistered", { reason = "MASTER_RESET" }) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) - :Do(function() - SDL:DeleteFile() - end) - EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") - :Do(function() - SDL:StopSDL() - end) +local function expResLvl() + common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") + :Times(0) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + :Times(1) end ---- Start SDL again then add mobile connection -function Test:Restart_SDL_And_Add_Mobile_Connection() - self:runSDL() - commonFunctions:waitForSDLStart(self):Do(function() - self:initHMI():Do(function() - commonFunctions:userPrint(35, "HMI initialized") - self:initHMI_onReady():Do(function () - commonFunctions:userPrint(35, "HMI is ready") - self:connectMobile():Do(function () - commonFunctions:userPrint(35, "Mobile Connected") - end) - end) +local function listFiles() + local cid = common.getMobileSession():SendRPC("ListFiles", {}) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + :ValidIf(function(_, data) + if data.payload.filenames ~= nil then + return false, "Files in app storage was not removed" + end + return true end) - end) -end - ---- Check SDL will not resume application when the same application registers. -function Test:Check_Application_Not_Resume_When_Register_Again() - local mobile_session1 = mobile_session.MobileSession(self, self.mobileConnection) - local on_rpc_service_started = mobile_session1:StartRPC() - - on_rpc_service_started:Do(function() - local rai_params = config.application1.registerAppInterfaceParams - rai_params.hashID = hash_id - - local cid = self.mobileSession:SendRPC("RegisterAppInterface",rai_params) - local on_app_registered = self.mobileSession:ExpectResponse(cid, { success = true, resultCode = "RESUME_FAILED" }) - - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = {appName = default_app_name} }) - - EXPECT_HMICALL("BasicCommunication.UpdateAppList"):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, "BasicCommunication.UpdateAppList", "SUCCESS", {}) - end) - - EXPECT_NOTIFICATION("OnHMIStatus", { systemContext = "MAIN", hmiLevel = "NONE", - audioStreamingState = "NOT_AUDIBLE"}) - - on_app_registered:Do(function() - local cid1 = self.mobileSession:SendRPC("ListFiles", {}) - EXPECT_RESPONSE(cid1, { success = true, resultCode = "SUCCESS" }) :ValidIf (function(_,data) - return not data.payload.filenames - end) - EXPECT_HMICALL("BasicCommunication.ActivateApp"):Times(0) - EXPECT_HMICALL("VR.AddCommand"):Times(0) - end) - end) - commonTestCases:DelayedExp(3000) -end - --- [[ Postconditions ]] -commonFunctions:newTestCasesGroup("Postcondition") -function Test.Stop_SDL() - StopSDL() end -return Test +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Add Command", common.addCommand) +runner.Step("Put File", common.putFile, { putFileParams }) + +runner.Title("Test") +runner.Step("Shutdown by MASTER_RESET", common.masterReset, { expAppUnregistered }) +runner.Step("Start SDL, HMI, connect Mobile", common.start) +runner.Step("ReRegister App", common.reregisterApp, { "RESUME_FAILED", expResData, expResLvl }) +runner.Step("List Files", listFiles) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Smoke/commonSmoke.lua b/test_scripts/Smoke/commonSmoke.lua index 90226a7a3c..a798c40f60 100644 --- a/test_scripts/Smoke/commonSmoke.lua +++ b/test_scripts/Smoke/commonSmoke.lua @@ -2,259 +2,83 @@ -- Smoke API common module --------------------------------------------------------------------------------------------------- --[[ General configuration parameters ]] -config.mobileHost = "127.0.0.1" config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] -local mobile_session = require("mobile_session") -local json = require("modules/json") - -local consts = require("user_modules/consts") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonSteps = require("user_modules/shared_testcases/commonSteps") -local commonTestCases = require("user_modules/shared_testcases/commonTestCases") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local test = require("user_modules/dummy_connecttest") local utils = require('user_modules/utils') +local json = require("modules/json") +local mobileConnection = require('mobile_connection') +local SDL = require("SDL") +local tcp = require('tcp_connection') +local file_connection = require('file_connection') +local events = require("events") +local constants = require('protocol_handler/ford_protocol_constants') +local expectations = require('expectations') +local atf_logger = require("atf_logger") local hmi_values = require("user_modules/hmi_values") ---[[ Local Variables ]] -local hmiAppIds = {} - -local commonSmoke = {} - -commonSmoke.HMITypeStatus = { - NAVIGATION = false, - COMMUNICATION = false -} -commonSmoke.timeout = 5000 -commonSmoke.minTimeout = 500 -commonSmoke.cloneTable = utils.cloneTable -commonSmoke.tableToString = utils.tableToString -commonSmoke.decode = json.decode -commonSmoke.is_table_equal = commonFunctions.is_table_equal -commonSmoke.read_parameter_from_smart_device_link_ini = commonFunctions.read_parameter_from_smart_device_link_ini -commonSmoke.GetPathToSDL = commonPreconditions.GetPathToSDL -commonSmoke.jsonFileToTable = utils.jsonFileToTable -commonSmoke.wait = utils.wait - -local preloadedPT = commonSmoke:read_parameter_from_smart_device_link_ini("PreloadedPT") - ---[[Module functions]] -local function allowSDL(self) - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - { allowed = true, source = "GUI", device = { id = commonSmoke.getDeviceMAC(), name = commonSmoke.getDeviceName() }}) - utils.wait(commonSmoke.minTimeout) -end - -function commonSmoke.preconditions() - commonFunctions:SDLForceStop() - commonSteps:DeletePolicyTable() - commonSteps:DeleteLogsFiles() - commonPreconditions:BackupFile(preloadedPT) - commonSmoke.updatePreloadedPT() -end - -function commonSmoke.getDeviceName() - return config.mobileHost .. ":" .. config.mobilePort -end - -function commonSmoke.getDeviceMAC() - local cmd = "echo -n " .. commonSmoke.getDeviceName() .. " | sha256sum | awk '{printf $1}'" - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() - return result +--[[ Module ]] +local common = require('user_modules/sequences/actions') + +--[[ Mapped functions and constants ]] +common.cloneTable = utils.cloneTable +common.tableToString = utils.tableToString +common.getDeviceName = utils.getDeviceName +common.getDeviceMAC = utils.getDeviceMAC +common.wait = utils.wait +common.cprint = utils.cprint +common.cprintTable = utils.cprintTable +common.tableToJsonFile = utils.tableToJsonFile +common.jsonFileToTable = utils.jsonFileToTable +common.isTableEqual = utils.isTableEqual +common.constants = constants +common.json = { decode = json.decode, null = json.null } +common.events = { disconnectedEvent = events.disconnectedEvent } +common.SDL = { buildOptions = SDL.buildOptions } +common.SDL.PTS = SDL.PTS + +--[[ Module constants ]] +common.timeout = 4000 + +--[[ Module functions ]] +function common.runAfter(pFunc, pDelay) + RUN_AFTER(pFunc, pDelay) end -function commonSmoke.getPathToSDL() - return config.pathToSDL +function common.failTestCase(pMsg) + test:FailTestCase(pMsg) end -function commonSmoke.getMobileAppId(pAppId) - if not pAppId then pAppId = 1 end - return config["application" .. pAppId].registerAppInterfaceParams.fullAppID +function common.readParameterFromSDLINI(pParamName) + return SDL.INI.get(pParamName) end -function commonSmoke.getSelfAndParams(...) - local out = { } - local selfIdx = nil - for i,v in pairs({...}) do - if type(v) == "table" and v.isTest then - table.insert(out, v) - selfIdx = i - break - end +function common.log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p end - local idx = 2 - for i = 1, table.maxn({...}) do - if i ~= selfIdx then - out[idx] = ({...})[i] - idx = idx + 1 - end - end - return table.unpack(out, 1, table.maxn(out)) + utils.cprint(35, str) end -function commonSmoke.getHMIAppId(pAppId) - if not pAppId then pAppId = 1 end - return hmiAppIds[config["application" .. pAppId].registerAppInterfaceParams.fullAppID] -end - -function commonSmoke.getPathToFileInStorage(fileName) - return commonSmoke:GetPathToSDL() .. "storage/" - .. commonSmoke.getMobileAppId() .. "_" - .. commonSmoke.getDeviceMAC() .. "/" .. fileName -end - -function commonSmoke.getMobileSession(pAppId, self) - self, pAppId = commonSmoke.getSelfAndParams(pAppId, self) - if not pAppId then pAppId = 1 end - if not self["mobileSession" .. pAppId] then - self["mobileSession" .. pAppId] = mobile_session.MobileSession(self, self.mobileConnection) - end - return self["mobileSession" .. pAppId] -end - -function commonSmoke.splitString(inputStr, sep) - if sep == nil then - sep = "%s" - end - local splitted, i = {}, 1 - for str in string.gmatch(inputStr, "([^"..sep.."]+)") do - splitted[i] = str - i = i + 1 - end - return splitted -end - -function commonSmoke.expectOnHMIStatusWithAudioStateChanged(self, pAppId, request, level) - if pAppId == nil then pAppId = 1 end - if request == nil then request = "BOTH" end - if level == nil then level = "FULL" end - - local mobSession = commonSmoke.getMobileSession(pAppId, self) - local appParams = config["application" .. pAppId].registerAppInterfaceParams - - if appParams.isMediaApplication == true then - if request == "BOTH" then - mobSession:ExpectNotification("OnHMIStatus", - { systemContext = "ALERT", hmiLevel = level, audioStreamingState = "AUDIBLE" }, - { systemContext = "ALERT", hmiLevel = level, audioStreamingState = "ATTENUATED" }, - { systemContext = "ALERT", hmiLevel = level, audioStreamingState = "AUDIBLE" }, - { systemContext = "MAIN", hmiLevel = level, audioStreamingState = "AUDIBLE" }) - :Times(4) - elseif request == "speak" then - mobSession:ExpectNotification("OnHMIStatus", - { systemContext = "MAIN", hmiLevel = level, audioStreamingState = "ATTENUATED" }, - { systemContext = "MAIN", hmiLevel = level, audioStreamingState = "AUDIBLE" }) - :Times(2) - elseif request == "alert" then - mobSession:ExpectNotification("OnHMIStatus", - { systemContext = "ALERT", hmiLevel = level, audioStreamingState = "AUDIBLE" }, - { systemContext = "MAIN", hmiLevel = level, audioStreamingState = "AUDIBLE" }) - :Times(2) - end - elseif appParams.isMediaApplication == false then - if request == "BOTH" then - mobSession:ExpectNotification("OnHMIStatus", - { systemContext = "ALERT", hmiLevel = level, audioStreamingState = "NOT_AUDIBLE" }, - { systemContext = "MAIN", hmiLevel = level, audioStreamingState = "NOT_AUDIBLE" }) - :Times(2) - elseif request == "speak" then - mobSession:ExpectNotification("OnHMIStatus") - :Times(0) - elseif request == "alert" then - mobSession:ExpectNotification("OnHMIStatus", - { systemContext = "ALERT", hmiLevel = level, audioStreamingState = "NOT_AUDIBLE" }, - { systemContext = "MAIN", hmiLevel = level, audioStreamingState = "NOT_AUDIBLE" }) - :Times(2) - end - end - -end - -function commonSmoke.activateApp(pAppId, self) - self, pAppId = commonSmoke.getSelfAndParams(pAppId, self) - if not pAppId then pAppId = 1 end - local pHMIAppId = hmiAppIds[config["application" .. pAppId].registerAppInterfaceParams.fullAppID] - local mobSession = commonSmoke.getMobileSession(pAppId, self) - local requestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = pHMIAppId }) - EXPECT_HMIRESPONSE(requestId) - mobSession:ExpectNotification("OnHMIStatus", - {hmiLevel = "FULL", audioStreamingState = commonSmoke.GetAudibleState(pAppId), systemContext = "MAIN"}) - commonTestCases:DelayedExp(commonSmoke.minTimeout) -end - -function commonSmoke.start(pHMIParams, self) - self, pHMIParams = commonSmoke.getSelfAndParams(pHMIParams, self) - self:runSDL() - commonFunctions:waitForSDLStart(self) - :Do(function() - self:initHMI(self) - :Do(function() - commonFunctions:userPrint(consts.color.magenta, "HMI initialized") - self:initHMI_onReady(pHMIParams) - :Do(function() - commonFunctions:userPrint(consts.color.magenta, "HMI is ready") - self:connectMobile() - :Do(function() - commonFunctions:userPrint(consts.color.magenta, "Mobile connected") - allowSDL(self) - end) - end) - end) - end) -end - -function commonSmoke.putFile(params, pAppId, self) - if not pAppId then pAppId = 1 end - local mobileSession = commonSmoke.getMobileSession(pAppId, self); - local cid = mobileSession:SendRPC("PutFile", params.requestParams, params.filePath) - - mobileSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) -end +--[[ Local Variables ]] +local isPreloadedUpdated = false -function commonSmoke.SetAppType(HMIType) - for _,v in pairs(HMIType) do - if v == "NAVIGATION" then - commonSmoke.HMITypeStatus["NAVIGATION"] = true - elseif v == "COMMUNICATION" then - commonSmoke.HMITypeStatus["COMMUNICATION"] = true - end - end +function common.postconditions() + if SDL:CheckStatusSDL() == SDL.RUNNING then SDL:StopSDL() end + common.restoreSDLIniParameters() + if isPreloadedUpdated == true then SDL.PreloadedPT.restore() end end -function commonSmoke.GetAudibleState(pAppId) - if not pAppId then pAppId = 1 end - commonSmoke.SetAppType(config["application" .. pAppId].registerAppInterfaceParams.appHMIType) - if config["application" .. pAppId].registerAppInterfaceParams.isMediaApplication == true or - commonSmoke.HMITypeStatus.COMMUNICATION == true or - commonSmoke.HMITypeStatus.NAVIGATION == true then - return "AUDIBLE" - elseif - config["application" .. pAppId].registerAppInterfaceParams.isMediaApplication == false then - return "NOT_AUDIBLE" +function common.updatePreloadedPT() + if isPreloadedUpdated == false then + isPreloadedUpdated = true + SDL.PreloadedPT.backup() end -end - -function commonSmoke.GetAppMediaStatus(pAppId) - if not pAppId then pAppId = 1 end - local isMediaApplication = config["application" .. pAppId].registerAppInterfaceParams.isMediaApplication - return isMediaApplication -end - -function commonSmoke.readParameterFromSmartDeviceLinkIni(paramName) - return commonSmoke:read_parameter_from_smart_device_link_ini(paramName) -end - -function commonSmoke.postconditions() - StopSDL() - commonPreconditions:RestoreFile(preloadedPT) -end - -function commonSmoke.updatePreloadedPT() - local preloadedFile = commonSmoke:GetPathToSDL() .. preloadedPT - local pt = commonSmoke.jsonFileToTable(preloadedFile) + local pt = SDL.PreloadedPT.get() pt.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null local additionalRPCs = { "SendLocation", "SubscribeVehicleData", "UnsubscribeVehicleData", "GetVehicleData", "UpdateTurnList", @@ -266,16 +90,19 @@ function commonSmoke.updatePreloadedPT() hmi_levels = { "BACKGROUND", "FULL", "LIMITED" } } end - pt.policy_table.app_policies["0000001"] = commonSmoke.cloneTable(pt.policy_table.app_policies.default) + pt.policy_table.app_policies["0000001"] = utils.cloneTable(pt.policy_table.app_policies.default) pt.policy_table.app_policies["0000001"].groups = { "Base-4", "NewTestCaseGroup" } pt.policy_table.app_policies["0000001"].keep_context = true pt.policy_table.app_policies["0000001"].steal_focus = true - utils.tableToJsonFile(pt, preloadedFile) + SDL.PreloadedPT.set(pt) end -function commonSmoke.preparePreloadedPTForRC() - local preloadedFile = commonPreconditions:GetPathToSDL() .. preloadedPT - local pt = utils.jsonFileToTable(preloadedFile) +function common.preparePreloadedPTForRC() + if isPreloadedUpdated == false then + isPreloadedUpdated = true + SDL.PreloadedPT.backup() + end + local pt = SDL.PreloadedPT.get() pt.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null local appId = config["application1"].registerAppInterfaceParams.fullAppID pt.policy_table.app_policies[appId] = { @@ -287,10 +114,10 @@ function commonSmoke.preparePreloadedPTForRC() groups = { "Base-4", "RemoteControl" }, AppHMIType = { "REMOTE_CONTROL" } } - utils.tableToJsonFile(pt, preloadedFile) + SDL.PreloadedPT.set(pt) end -function commonSmoke.getRcModuleId(pRcModuleType, pIdx) +function common.getRcModuleId(pRcModuleType, pIdx) local capMap = { RADIO = "radioControlCapabilities", CLIMATE = "climateControlCapabilities", @@ -309,26 +136,211 @@ function commonSmoke.getRcModuleId(pRcModuleType, pIdx) end end -function commonSmoke.registerApp(pAppId, self) - self, pAppId = commonSmoke.getSelfAndParams(pAppId, self) +function common.createMobileSession(pAppId, pHBParams, pConId) + return common.mobile.createSession(pAppId, pConId, pHBParams) +end + +common.getMobileSession = common.mobile.getSession + +function common.putFile(pParams) + local cid = common.getMobileSession():SendRPC("PutFile", pParams.requestParams, pParams.filePath) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +function common.registerApp(pAppId, pHBParams) if not pAppId then pAppId = 1 end - local mobSession = commonSmoke.getMobileSession(pAppId, self) - mobSession:StartService(7) + local mobConnId = 1 + local session = common.mobile.createSession(pAppId, mobConnId, pHBParams) + session:StartService(7) :Do(function() - local corId = mobSession:SendRPC("RegisterAppInterface", config["application" .. pAppId].registerAppInterfaceParams) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", - { application = { appName = config["application" .. pAppId].registerAppInterfaceParams.appName } }) - :Do(function(_, data) - hmiAppIds[config["application" .. pAppId].registerAppInterfaceParams.fullAppID] = data.params.application.appID + local corId = session:SendRPC("RegisterAppInterface", common.app.getParams(pAppId)) + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppRegistered", + { application = { appName = common.app.getParams(pAppId).appName } }) + :Do(function(_, d1) + common.app.setHMIId(d1.params.application.appID, pAppId) end) - mobSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + session:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) :Do(function() - mobSession:ExpectNotification("OnHMIStatus", + session:ExpectNotification("OnHMIStatus", { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) - mobSession:ExpectNotification("OnPermissionsChange"):Times(AtLeast(1)) - mobSession:ExpectNotification("OnDriverDistraction", { state = "DD_OFF" }) + session:ExpectNotification("OnPermissionsChange") + :Times(AnyNumber()) + session:ExpectNotification("OnDriverDistraction", { state = "DD_OFF" }) + end) + end) +end + +function common.getPathToFileInAppStorage(pFileName, pAppId) + return SDL.AppStorage.path() .. common.getConfigAppParams(pAppId).fullAppID .. "_" + .. utils.getDeviceMAC() .. "/" .. pFileName +end + +function common.isFileExistInAppStorage(pFileName) + return SDL.AppStorage.isFileExist(pFileName) +end + +function common.unregisterApp(pAppId) + if pAppId == nil then pAppId = 1 end + local cid = common.getMobileSession(pAppId):SendRPC("UnregisterAppInterface", {}) + common.getMobileSession(pAppId):ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { unexpectedDisconnect = false, appID = common.getHMIAppId(pAppId) }) + :Do(function() + common.setHMIAppId(nil, pAppId) + common.deleteMobileSession(pAppId) + end) +end + +function common.reregisterApp(pResultCode, pExpResDataFunc, pExpResLvlFunc) + common.createMobileSession() + local params = common.cloneTable(common.getConfigAppParams()) + params.hashID = common.hashId + common.getMobileSession():StartService(7) + :Do(function() + if pExpResDataFunc then pExpResDataFunc() end + if pExpResLvlFunc then pExpResLvlFunc() end + local cid = common.getMobileSession():SendRPC("RegisterAppInterface", params) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppRegistered") + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = pResultCode }) + :Do(function() + common.getMobileSession():ExpectNotification("OnPermissionsChange") + :Times(AnyNumber()) + end) + end) + common.wait(common.timeout) +end + +function common.deleteMobileSession(pAppId) + if pAppId == nil then pAppId = 1 end + common.getMobileSession(pAppId):Stop() + :Do(function() + test.mobileSession[pAppId] = nil + end) +end + +function test.mobileConnection:Close() + for i = 1, common.getAppsCount() do + test.mobileSession[i] = nil + end + self.connection:Close() +end + +common.reqParams = { + AddCommand = { + mob = { cmdID = 1, vrCommands = { "OnlyVRCommand" }}, + hmi = { cmdID = 1, type = "Command", vrCommands = { "OnlyVRCommand" }} + }, + AddSubMenu = { + mob = { menuID = 1, position = 500, menuName = "SubMenu" }, + hmi = { menuID = 1, menuParams = { position = 500, menuName = "SubMenu" }} + } +} + +function common.addCommand() + local cid = common.getMobileSession():SendRPC("AddCommand", common.reqParams.AddCommand.mob) + common.getHMIConnection():ExpectRequest("VR.AddCommand", common.reqParams.AddCommand.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") + :Do(function(_, data) + common.hashId = data.payload.hashID + end) +end + +function common.addSubMenu() + local cid = common.getMobileSession():SendRPC("AddSubMenu", common.reqParams.AddSubMenu.mob) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu", common.reqParams.AddSubMenu.hmi) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getMobileSession():ExpectNotification("OnHashChange") + :Do(function(_, data) + common.hashId = data.payload.hashID + end) +end + +function common.ignitionOff(pExpFunc) + local isOnSDLCloseSent = false + if pExpFunc then pExpFunc() end + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "SUSPEND" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLPersistenceComplete") + :Do(function() + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "IGNITION_OFF" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLClose") + :Do(function() + isOnSDLCloseSent = true + SDL.DeleteFile() end) + :Times(AtMost(1)) + end) + common.wait(3000) + :Do(function() + if isOnSDLCloseSent == false then common.cprint(35, "BC.OnSDLClose was not sent") end + if SDL:CheckStatusSDL() == SDL.RUNNING then SDL:StopSDL() end + common.getMobileConnection():Close() + end) +end + +function common.masterReset(pExpFunc) + local isOnSDLCloseSent = false + if pExpFunc then pExpFunc() end + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "MASTER_RESET" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLClose") + :Do(function() + isOnSDLCloseSent = true + SDL.DeleteFile() + end) + :Times(AtMost(1)) + common.wait(3000) + :Do(function() + if isOnSDLCloseSent == false then common.cprint(35, "BC.OnSDLClose was not sent") end + if SDL:CheckStatusSDL() == SDL.RUNNING then SDL:StopSDL() end + common.getMobileConnection():Close() + end) +end + +function common.unexpectedDisconnect(pAppId) + if pAppId == nil then pAppId = 1 end + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", + { unexpectedDisconnect = true, appID = common.getHMIAppId(pAppId) }) + common.deleteMobileSession(pAppId) +end + +function common.createEvent(pMatchFunc) + if pMatchFunc == nil then + pMatchFunc = function(e1, e2) return e1 == e2 end + end + local event = events.Event() + event.matches = pMatchFunc + return event +end + +function common.createConnection(pConId, pDevice) + if pConId == nil then pConId = 1 end + if pDevice == nil then pDevice = config.mobileHost end + local filename = "mobile" .. pConId .. ".out" + local tcpConnection = tcp.Connection(SDL.GetHostURL(), config.mobilePort, pDevice) + local fileConnection = file_connection.FileConnection(filename, tcpConnection) + local connection = mobileConnection.MobileConnection(fileConnection) + test.mobileConnections[pConId] = connection + function connection:ExpectEvent(pEvent, pEventName) + if pEventName == nil then pEventName = "noname" end + local ret = expectations.Expectation(pEventName, self) + ret.event = pEvent + event_dispatcher:AddEvent(self, pEvent, ret) + test:AddExpectation(ret) + return ret + end + event_dispatcher:AddConnection(connection) + local ret = connection:ExpectEvent(events.connectedEvent, "Connection started") + ret:Do(function() + common.cprint(35, "Mobile #" .. pConId .. " connected") end) + connection:Connect() + return ret end -return commonSmoke +return common diff --git a/test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DiagnosticMessage_TOO_MANY_PENDING_REQUESTS.lua b/test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DiagnosticMessage_TOO_MANY_PENDING_REQUESTS.lua index 5b95b664fb..17fec8189f 100644 --- a/test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DiagnosticMessage_TOO_MANY_PENDING_REQUESTS.lua +++ b/test_scripts/TOO_MANY_PENDING_REQUESTS/ATF_DiagnosticMessage_TOO_MANY_PENDING_REQUESTS.lua @@ -5,7 +5,6 @@ local mobile_session = require('mobile_session') local mobile = require('mobile_connection') local tcp = require('tcp_connection') local file_connection = require('file_connection') -local config = require('config') --------------------------------------------------------------------------------------------- -----------------------------Required Shared Libraries--------------------------------------- diff --git a/test_sets/SDL5_0/rc_AUDIO_LIGHT_HMI_SETTINGS.txt b/test_sets/SDL5_0/rc_AUDIO_LIGHT_HMI_SETTINGS.txt index ac81e41fab..6408e3de64 100644 --- a/test_sets/SDL5_0/rc_AUDIO_LIGHT_HMI_SETTINGS.txt +++ b/test_sets/SDL5_0/rc_AUDIO_LIGHT_HMI_SETTINGS.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/001_Success_flow.lua ./test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/002_Disallow_flow_by_policy_AUDIO.lua ./test_scripts/RC/AUDIO_LIGHT_HMI_SETTINGS/GetInteriorVehicleData/003_Disallow_flow_by_policy_LIGHT.lua diff --git a/test_sets/SDL5_0/rc_CLIMATE_RADIO.txt b/test_sets/SDL5_0/rc_CLIMATE_RADIO.txt index d90c9a131c..8cffe77d23 100644 --- a/test_sets/SDL5_0/rc_CLIMATE_RADIO.txt +++ b/test_sets/SDL5_0/rc_CLIMATE_RADIO.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/RC/CLIMATE_RADIO/ButtonPress/001_success_flow_for_climate_and_radio.lua ./test_scripts/RC/CLIMATE_RADIO/ButtonPress/002_disallow_flow_by_policy_for_climate.lua ./test_scripts/RC/CLIMATE_RADIO/ButtonPress/003_disallow_flow_by_policy_for_radio.lua diff --git a/test_sets/SDL5_0/rc_OnRCStatus.txt b/test_sets/SDL5_0/rc_OnRCStatus.txt index c4e581fa51..75d4aa62b7 100644 --- a/test_sets/SDL5_0/rc_OnRCStatus.txt +++ b/test_sets/SDL5_0/rc_OnRCStatus.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/RC/OnRCStatus/001_notification_by_apps_registration.lua ./test_scripts/RC/OnRCStatus/002_notification_by_rc_functionality_disallowed_on_hmi.lua ./test_scripts/RC/OnRCStatus/003_registration_non_rc_app.lua diff --git a/test_sets/SDL5_0/rc_SEAT.txt b/test_sets/SDL5_0/rc_SEAT.txt index 91c5bf122c..c239a3b766 100644 --- a/test_sets/SDL5_0/rc_SEAT.txt +++ b/test_sets/SDL5_0/rc_SEAT.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/RC/SEAT/Capabilities/001_SEAT_all_params_SUCCESS.lua ./test_scripts/RC/SEAT/Capabilities/002_SEAT_all_params_UNSUPPORTED_RESOURCE.lua ./test_scripts/RC/SEAT/Capabilities/003_Resend_only_supported_parameters.lua diff --git a/test_sets/SDL5_0/rc_interior_vehicle_data_management.txt b/test_sets/SDL5_0/rc_interior_vehicle_data_management.txt index 65ac665210..aa464b4318 100644 --- a/test_sets/SDL5_0/rc_interior_vehicle_data_management.txt +++ b/test_sets/SDL5_0/rc_interior_vehicle_data_management.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/RC/InteriorVehicleData_cache/000_cache_2_apps_sequence.lua ./test_scripts/RC/InteriorVehicleData_cache/001_GetInteriorVD_without_subscribe.lua ./test_scripts/RC/InteriorVehicleData_cache/002_GetInteriorVD_without_subscribe_2_requests.lua diff --git a/test_sets/gps_shift_support.txt b/test_sets/gps_shift_support.txt index f4d1357690..cc45f92cf1 100644 --- a/test_sets/gps_shift_support.txt +++ b/test_sets/gps_shift_support.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/API/VehicleData/GpsShiftSupport/001_GetVehicleData_gps_shift.lua ./test_scripts/API/VehicleData/GpsShiftSupport/002_GetVehicleData_gps_without_shift.lua ./test_scripts/API/VehicleData/GpsShiftSupport/003_OnVehicleData_gps_shift.lua diff --git a/test_sets/rpc_message_protection.txt b/test_sets/rpc_message_protection.txt index 4d95d885db..37e02ef735 100644 --- a/test_sets/rpc_message_protection.txt +++ b/test_sets/rpc_message_protection.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/Security/RPCMessageProtection/001_Protected_Mode_Protected_RPC_EncryptedRequired_TrueFalseOrMissing_Success.lua ./test_scripts/Security/RPCMessageProtection/002_Protected_Mode_Protected_RPC_EncryptedRequired_TrueFalseOrMissing_NotEncryptedNotification.lua ./test_scripts/Security/RPCMessageProtection/003_Protected_Mode_Unprotected_RPC_EncrypRequired_True_ExpNotification.lua diff --git a/test_sets/sdl_passenger_mode.txt b/test_sets/sdl_passenger_mode.txt index d438eb065f..de0886847e 100644 --- a/test_sets/sdl_passenger_mode.txt +++ b/test_sets/sdl_passenger_mode.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/API/SDL_Passenger_Mode/001_OnDD_PT_true.lua ./test_scripts/API/SDL_Passenger_Mode/002_OnDD_PT_false.lua ./test_scripts/API/SDL_Passenger_Mode/003_OnDD_PT_missing.lua diff --git a/test_sets/security.txt b/test_sets/security.txt index 30f57e8c87..d71fbe9679 100644 --- a/test_sets/security.txt +++ b/test_sets/security.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/Security/DTLS/001_StartRPC_service.lua ./test_scripts/Security/DTLS/002_Start_Audio_service.lua ./test_scripts/Security/DTLS/003_Start_Video_service.lua @@ -46,3 +47,4 @@ ./test_scripts/Security/SSLHandshakeFlow/015_Navi-Predefined_cert_valid_PTU_is_not_started.lua ./test_scripts/Security/SSLHandshakeFlow/016_Non-Navi-Predefined_cert_valid_PTU_is_not_started.lua ./test_scripts/Security/SSLHandshakeFlow/017_App_Name_no_impact_SUCCESS.lua +./test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua diff --git a/test_sets/service_status_update_to_hmi.txt b/test_sets/service_status_update_to_hmi.txt index 14aafef881..ae7cee901f 100644 --- a/test_sets/service_status_update_to_hmi.txt +++ b/test_sets/service_status_update_to_hmi.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/API/ServiceStatusUpdateToHMI/001_1_Video_service_protected.lua ./test_scripts/API/ServiceStatusUpdateToHMI/001_2_Audio_service_protected.lua ./test_scripts/API/ServiceStatusUpdateToHMI/001_3_RPC_service_protected.lua diff --git a/test_sets/smoke_tests.txt b/test_sets/smoke_tests.txt index e0e9357130..a5e44f2ca3 100644 --- a/test_sets/smoke_tests.txt +++ b/test_sets/smoke_tests.txt @@ -1,3 +1,4 @@ +; Supported Configurations: [Local, Remote] ./test_scripts/Smoke/API/001_SetGlobalProperties_PositiveCase_SUCCESS.lua ./test_scripts/Smoke/API/002_ResetGlobalProperties_PositiveCase_SUCCESS.lua ./test_scripts/Smoke/API/003_AddCommand_PositiveCase_SUCCESS.lua diff --git a/user_modules/AppTypes.lua b/user_modules/AppTypes.lua index e2bd8cc6ea..02224af2c5 100644 --- a/user_modules/AppTypes.lua +++ b/user_modules/AppTypes.lua @@ -1,4 +1,3 @@ -local config = require('config') local CurrentAppType = config.application1.registerAppInterfaceParams.appHMIType Test.appHMITypes = {DEFAULT = false, COMMUNICATION = false, MEDIA = false, MESSAGING = false, NAVIGATION = false, INFORMATION = false, SOCIAL = false, BACKGROUND_PROCESS = false, TESTING = false, SYSTEM = false} diff --git a/user_modules/all_common_modules.lua b/user_modules/all_common_modules.lua index f47c86dd1b..50fd0389da 100644 --- a/user_modules/all_common_modules.lua +++ b/user_modules/all_common_modules.lua @@ -11,7 +11,6 @@ events = require('events') mobile = require('mobile_connection') tcp = require('tcp_connection') file_connection = require('file_connection') -config = require('config') expectations = require('expectations') Expectation = expectations.Expectation sdl = require('SDL') diff --git a/user_modules/connecttest_TTS_Isready.lua b/user_modules/connecttest_TTS_Isready.lua index 1042f17cb5..7fd58ec960 100644 --- a/user_modules/connecttest_TTS_Isready.lua +++ b/user_modules/connecttest_TTS_Isready.lua @@ -1,10 +1,11 @@ +local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") local tcp = require("tcp_connection") local file_connection = require("file_connection") local mobile_session = require("mobile_session") -local websocket = require('websocket_connection') +local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") local hmi_connection = require('hmi_connection') local events = require("events") local expectations = require('expectations') @@ -22,7 +23,7 @@ local Expectation = expectations.Expectation local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED -module.hmiConnection = hmi_connection.Connection(websocket.WebSocketConnection(config.hmiUrl, config.hmiPort)) +module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) module.mobileConnection = mobile.MobileConnection(fileConnection) diff --git a/user_modules/connecttest_VR_Isready.lua b/user_modules/connecttest_VR_Isready.lua index f89d7a28c7..bf5c15dca0 100644 --- a/user_modules/connecttest_VR_Isready.lua +++ b/user_modules/connecttest_VR_Isready.lua @@ -1,10 +1,11 @@ +local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") local tcp = require("tcp_connection") local file_connection = require("file_connection") local mobile_session = require("mobile_session") -local websocket = require('websocket_connection') +local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") local hmi_connection = require('hmi_connection') local events = require("events") local expectations = require('expectations') @@ -22,7 +23,7 @@ local Expectation = expectations.Expectation local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED -module.hmiConnection = hmi_connection.Connection(websocket.WebSocketConnection(config.hmiUrl, config.hmiPort)) +module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) module.mobileConnection = mobile.MobileConnection(fileConnection) diff --git a/user_modules/connecttest_initHMI.lua b/user_modules/connecttest_initHMI.lua index 9059fc8510..5f37747257 100644 --- a/user_modules/connecttest_initHMI.lua +++ b/user_modules/connecttest_initHMI.lua @@ -1,10 +1,11 @@ +local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") local tcp = require("tcp_connection") local file_connection = require("file_connection") local mobile_session = require("mobile_session") -local websocket = require('websocket_connection') +local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") local hmi_connection = require('hmi_connection') local events = require("events") local expectations = require('expectations') @@ -22,7 +23,7 @@ local Expectation = expectations.Expectation local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED -module.hmiConnection = hmi_connection.Connection(websocket.WebSocketConnection(config.hmiUrl, config.hmiPort)) +module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) module.mobileConnection = mobile.MobileConnection(fileConnection) diff --git a/user_modules/connecttest_resumption.lua b/user_modules/connecttest_resumption.lua index 990685ffc1..1f9f60fcec 100644 --- a/user_modules/connecttest_resumption.lua +++ b/user_modules/connecttest_resumption.lua @@ -1,10 +1,11 @@ +local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") local tcp = require("tcp_connection") local file_connection = require("file_connection") local mobile_session = require("mobile_session") -local websocket = require('websocket_connection') +local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") local hmi_connection = require('hmi_connection') local events = require("events") local expectations = require('expectations') @@ -22,7 +23,7 @@ local Expectation = expectations.Expectation local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED -module.hmiConnection = hmi_connection.Connection(websocket.WebSocketConnection(config.hmiUrl, config.hmiPort)) +module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) module.mobileConnection = mobile.MobileConnection(fileConnection) diff --git a/user_modules/dummy_connecttest.lua b/user_modules/dummy_connecttest.lua index 21b9f33ddf..541f8c0cf9 100644 --- a/user_modules/dummy_connecttest.lua +++ b/user_modules/dummy_connecttest.lua @@ -1,10 +1,10 @@ +local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") local tcp = require("tcp_connection") local file_connection = require("file_connection") local mobile_session = require("mobile_session") -local websocket = require('websocket_connection') local hmi_connection = require('hmi_connection') local events = require("events") local expectations = require('expectations') @@ -17,15 +17,16 @@ local commonTestCases = require('user_modules/shared_testcases/commonTestCases') local hmi_values = require("user_modules/hmi_values") local mob_schema = load_schema.mob_schema local hmi_schema = load_schema.hmi_schema - +local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") local Event = events.Event local Expectation = expectations.Expectation local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED -module.hmiConnection = hmi_connection.Connection(websocket.WebSocketConnection(config.hmiUrl, config.hmiPort)) -local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) +module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) + +local tcpConnection = tcp.Connection(SDL.GetHostURL(), config.mobilePort) local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) module.mobileConnection = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(module.hmiConnection) diff --git a/user_modules/sequences/actions.lua b/user_modules/sequences/actions.lua index 9d02e7b73f..b67aeced91 100644 --- a/user_modules/sequences/actions.lua +++ b/user_modules/sequences/actions.lua @@ -6,9 +6,7 @@ local mobile = require("mobile_connection") local tcp = require("tcp_connection") local file_connection = require("file_connection") local mobileSession = require("mobile_session") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local commonSteps = require("user_modules/shared_testcases/commonSteps") local events = require("events") local test = require("user_modules/dummy_connecttest") local expectations = require('expectations') @@ -119,19 +117,13 @@ local function getPTUFromPTS() local pTbl = m.sdl.getPTS() if pTbl == nil then utils.cprint(35, "PTS file was not found, PreloadedPT is used instead") - local appConfigFolder = m.sdl.getSDLIniParameter("AppConfigFolder") - if appConfigFolder == nil or appConfigFolder == "" then - appConfigFolder = commonPreconditions:GetPathToSDL() - end - local preloadedPT = m.sdl.getSDLIniParameter("PreloadedPT") - local ptsFile = appConfigFolder .. preloadedPT - if utils.isFileExist(ptsFile) then - pTbl = utils.jsonFileToTable(ptsFile) - else - utils.cprint(35, "PreloadedPT was not found, PTS is not created") + pTbl = m.sdl.getPreloadedPT() + if pTbl == nil then + utils.cprint(35, "PreloadedPT was not found, PTU file has not been created") + return nil end end - if next(pTbl) ~= nil then + if type(pTbl.policy_table) == "table" then pTbl.policy_table.consumer_friendly_messages = nil pTbl.policy_table.device_data = nil pTbl.policy_table.module_meta = nil @@ -140,6 +132,8 @@ local function getPTUFromPTS() pTbl.policy_table.module_config.preloaded_pt = nil pTbl.policy_table.module_config.preloaded_date = nil pTbl.policy_table.vehicle_data = nil + else + utils.cprint(35, "PTU file has incorrect structure") end return pTbl end @@ -457,6 +451,49 @@ function m.ptu.getAppData(pAppId) } end +--[[ @ptu.expectStart: expect start of PTU +--! @parameters: none +--! @return: expectation of PTU start event +--]] +function m.ptu.expectStart() + local event = events.Event() + event.matches = function(e1, e2) return e1 == e2 end + local function raisePtuEvent() + RUN_AFTER(function() m.hmi.getConnection():RaiseEvent(event, "PTU start event") end, m.minTimeout) + end + local policyMode = SDL.buildOptions.extendedPolicy + if policyMode == policyModes.P or policyMode == policyModes.EP then + m.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, d2) + m.hmi.getConnection():SendResponse(d2.id, d2.method, "SUCCESS", { }) + raisePtuEvent() + end) + elseif policyMode == policyModes.H then + local function getAppNums() + local out = {} + for k in pairs(test.mobileSession) do + table.insert(out, k) + end + return out + end + for _, appNum in pairs(getAppNums()) do + m.mobile.getSession(appNum):ExpectNotification("OnSystemRequest") + :Do(function(_, d3) + if d3.payload.requestType == "HTTP" then + utils.cprint(35, "App ".. appNum .. " will be used for PTU") + ptuAppNum = appNum + if d3.binaryData ~= nil then + pts = m.json.decode(d3.binaryData) + end + raisePtuEvent() + end + end) + :Times(AtMost(2)) + end + end + return m.hmi.getConnection():ExpectEvent(event, "PTU start event") +end + local function policyTableUpdateProprietary(pPTUpdateFunc, pExpNotificationFunc) local ptuFileName = os.tmpname() local requestId = m.hmi.getConnection():SendRequest("SDL.GetPolicyConfigurationData", @@ -552,7 +589,7 @@ local function registerApp(pAppId, pMobConnId, hasPTU) :Do(function(_, d1) m.app.setHMIId(d1.params.application.appID, pAppId) if hasPTU then - m.isPTUStarted() + m.ptu.expectStart() end end) session:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) @@ -669,45 +706,6 @@ function m.app.getHMIId(pAppId) return nil end -function m.isPTUStarted() - local event = events.Event() - event.matches = function(e1, e2) return e1 == e2 end - local function raisePtuEvent() - RUN_AFTER(function() m.hmi.getConnection():RaiseEvent(event, "PTU start event") end, m.minTimeout) - end - local policyMode = SDL.buildOptions.extendedPolicy - if policyMode == policyModes.P or policyMode == policyModes.EP then - m.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate") - :Do(function(_, d2) - m.hmi.getConnection():SendResponse(d2.id, d2.method, "SUCCESS", { }) - raisePtuEvent() - end) - elseif policyMode == policyModes.H then - local function getAppNums() - local out = {} - for k in pairs(test.mobileSession) do - table.insert(out, k) - end - return out - end - for _, appNum in pairs(getAppNums()) do - m.mobile.getSession(appNum):ExpectNotification("OnSystemRequest") - :Do(function(_, d3) - if d3.payload.requestType == "HTTP" then - utils.cprint(35, "App ".. appNum .. " will be used for PTU") - ptuAppNum = appNum - if d3.binaryData ~= nil then - pts = m.json.decode(d3.binaryData) - end - raisePtuEvent() - end - end) - :Times(AtMost(2)) - end - end - return m.hmi.getConnection():ExpectEvent(event, "PTU start event") -end - --[[ @app.setHMIId: set HMI application Id by script's mobile application id --! @parameters: --! pHMIAppId - HMI application Id @@ -733,6 +731,11 @@ end --[[ Functions of sdl submodule ]] +-- BuildOptions +-- LOGGER +-- CRT +-- AppStorage + --[[ @sdl.getPathToFileInStorage: get path to file in SDL storage for specified mobile application --! @parameters: --! pFileName - file name @@ -741,18 +744,22 @@ end --]] function m.sdl.getPathToFileInStorage(pFileName, pAppId) if not pAppId then pAppId = 1 end - return commonPreconditions:GetPathToSDL() .. "storage/" .. m.app.getParams(pAppId).fullAppID .. "_" + return SDL.AppStorage.path() .. m.app.getParams(pAppId).fullAppID .. "_" .. utils.getDeviceMAC() .. "/" .. pFileName end ---[[ @sdl.getPathToFileInStorage: get parameter's value from SDL .ini file +--[[ @sdl.getSDLIniFilePath: get path to SDL .ini file +--! @parameters: none +--! @return: path to SDL .ini file +--]] +m.sdl.getSDLIniFilePath = SDL.INI.file + +--[[ @sdl.getSDLIniParameter: get parameter's value from SDL .ini file --! @parameters: --! pParamName - name of the parameter --! @return: SDL parameter's value from ini file --]] -function m.sdl.getSDLIniParameter(pParamName) - return commonFunctions:read_parameter_from_smart_device_link_ini(pParamName) -end +m.sdl.getSDLIniParameter = SDL.INI.get --[[ @setSDLIniParameter: change original value of parameter in SDL .ini file --! @parameters: @@ -762,32 +769,7 @@ end --]] function m.sdl.setSDLIniParameter(pParamName, pParamValue) m.sdl.backupSDLIniFile() - local fileName = commonPreconditions:GetPathToSDL() .. "smartDeviceLink.ini" - local f = io.open(fileName, "r") - local content = f:read("*all") - f:close() - local function setParamValue(pContent, pParam, pValue) - pValue = string.gsub(pValue, "%%", "%%%%") - local out = "" - local find = false - for line in pContent:gmatch("([^\r\n]*)[\r\n]") do - local ptrn = "^%s*".. pParam .. "%s*=.*" - if string.find(line, ptrn) then - if not find then - line = string.gsub(line, ptrn, pParam .. " = " .. tostring(pValue)) - find = true - else - line = ";" .. line - end - end - out = out .. line .. "\n" - end - return out - end - content = setParamValue(content, pParamName, pParamValue) - f = io.open(fileName, "w") - f:write(content) - f:close() + SDL.INI.set(pParamName, pParamValue) end --[[ @sdl.backupSDLIniFile: backup SDL .ini file @@ -796,7 +778,7 @@ end --]] function m.sdl.backupSDLIniFile() if not m.sdl.isSdlIniBackuped then - commonPreconditions:BackupFile("smartDeviceLink.ini") + SDL.INI.backup() m.sdl.isSdlIniBackuped = true end end @@ -807,7 +789,7 @@ end --]] function m.sdl.restoreSDLIniFile() if m.sdl.isSdlIniBackuped then - commonPreconditions:RestoreFile("smartDeviceLink.ini") + SDL.INI.restore() m.sdl.isSdlIniBackuped = false end end @@ -818,8 +800,7 @@ end --]] function m.sdl.getPreloadedPTPath() if not m.sdl.preloadedPTPath then - local preloadedPTName = m.sdl.getSDLIniParameter("PreloadedPT") - m.sdl.preloadedPTPath = commonPreconditions:GetPathToSDL() .. preloadedPTName + m.sdl.preloadedPTPath = SDL.PreloadedPT.file() end return m.sdl.preloadedPTPath end @@ -830,7 +811,7 @@ end --]] function m.sdl.backupPreloadedPT() if not m.sdl.isPreloadedPTBackuped then - commonPreconditions:BackupFile(m.sdl.getSDLIniParameter("PreloadedPT")) + SDL.PreloadedPT.backup() m.sdl.isPreloadedPTBackuped = true end end @@ -841,7 +822,7 @@ end --]] function m.sdl.restorePreloadedPT() if m.sdl.isPreloadedPTBackuped then - commonPreconditions:RestoreFile(m.sdl.getSDLIniParameter("PreloadedPT")) + SDL.PreloadedPT.restore() m.sdl.isPreloadedPTBackuped = false end end @@ -850,9 +831,7 @@ end --! @parameters: none --! @return: sdl preloaded_pt table --]] -function m.sdl.getPreloadedPT() - return utils.jsonFileToTable(m.sdl.getPreloadedPTPath()) -end +m.sdl.getPreloadedPT = SDL.PreloadedPT.get --[[ @sdl.setPreloadedPT: set content into sdl preloaded_pt file --! @parameters: @@ -861,7 +840,7 @@ end --]] function m.sdl.setPreloadedPT(pPreloadedPT) m.sdl.backupPreloadedPT() - utils.tableToJsonFile(pPreloadedPT, m.sdl.getPreloadedPTPath()) + SDL.PreloadedPT.set(pPreloadedPT) end --[[ @sdl.getHMICapabilitiesFilePath: get path to default hmi_capabilities file @@ -870,8 +849,7 @@ end --]] function m.sdl.getHMICapabilitiesFilePath() if not m.sdl.hmiCapabilitiesPath then - local hmiCapabilitiesName = m.sdl.getSDLIniParameter("HMICapabilities") - m.sdl.hmiCapabilitiesPath = commonPreconditions:GetPathToSDL() .. hmiCapabilitiesName + m.sdl.hmiCapabilitiesPath = SDL.HMICap.file() end return m.sdl.hmiCapabilitiesPath end @@ -882,7 +860,7 @@ end --]] function m.sdl.backupHMICapabilitiesFile() if not m.sdl.isHMICapabilitiesBackuped then - commonPreconditions:BackupFile(m.sdl.getSDLIniParameter("HMICapabilities")) + SDL.HMICap.backup() m.sdl.isHMICapabilitiesBackuped = true end end @@ -893,7 +871,7 @@ end --]] function m.sdl.restoreHMICapabilitiesFile() if m.sdl.isHMICapabilitiesBackuped then - commonPreconditions:RestoreFile(m.sdl.getSDLIniParameter("HMICapabilities")) + SDL.HMICap.restore() m.sdl.isHMICapabilitiesBackuped = false end end @@ -902,9 +880,7 @@ end --! @parameters: none --! @return: default hmi_capabilities table --]] -function m.sdl.getHMICapabilitiesFromFile() - return utils.jsonFileToTable(m.sdl.getHMICapabilitiesFilePath()) -end +m.sdl.getHMICapabilitiesFromFile = SDL.HMICap.get --[[ @sdl.setHMICapabilitiesToFile: set content into default hmi_capabilities file --! @parameters: @@ -913,7 +889,7 @@ end --]] function m.sdl.setHMICapabilitiesToFile(pHMICapabilities) m.sdl.backupHMICapabilitiesFile() - utils.tableToJsonFile(pHMICapabilities, m.sdl.getHMICapabilitiesFilePath()) + SDL.HMICap.set(pHMICapabilities) end --[[ @sdl.start: start SDL @@ -922,7 +898,7 @@ end --]] function m.sdl.start() test:runSDL() - return commonFunctions:waitForSDLStart(test) + return SDL.WaitForSDLStart(test) end --[[ @sdl.getStatus: Retrieve current status of SDL @@ -938,7 +914,7 @@ end --! @return: boolean represents whether SDL is running --]] function m.sdl.isRunning() - return SDL:CheckStatusSDL() == SDL.RUNNING + return m.sdl.getStatus() == SDL.RUNNING end --[[ @sdl.stop: stop SDL @@ -955,18 +931,16 @@ end --! @parameters: none --! @return: path to file --]] -function m.sdl.getPTSFilePath() - return m.sdl.getSDLIniParameter("SystemFilesPath") .. "/" .. m.sdl.getSDLIniParameter("PathToSnapshot") -end +m.sdl.getPTSFilePath = SDL.PTS.file --[[ @sdl.getPTS: get Policy Table Snapshot (PTS) --! @parameters: none --! @return: table with PTS --]] function m.sdl.getPTS() - local ptsFileName = m.sdl.getPTSFilePath() - if utils.isFileExist(ptsFileName) then - pts = utils.jsonFileToTable(ptsFileName) + local remotePts = SDL.PTS.get() + if remotePts then + pts = remotePts end return pts end @@ -976,10 +950,7 @@ end --! @return: none --]] function m.sdl.deletePTS() - local ptsFileName = m.sdl.getPTSFilePath() - if utils.isFileExist(ptsFileName) then - os.remove(ptsFileName) - end + SDL.PTS.clean() pts = nil end @@ -1193,10 +1164,11 @@ end --! @return: none --]] function m.preconditions() - commonFunctions:SDLForceStop() - commonSteps:DeletePolicyTable() - commonSteps:DeleteLogsFiles() + SDL.ForceStopSDL() + SDL.PolicyDB.clean() + SDL.Log.clean() m.sdl.deletePTS() + SDL.AppStorage.clean() end --[[ @postconditions: postcondition steps @@ -1292,4 +1264,10 @@ m.setSDLIniParameter = m.sdl.setSDLIniParameter --]] m.restoreSDLIniParameters = m.sdl.restoreSDLIniFile +--[[ @isPTUStarted: expect start of PTU +--! @parameters: none +--! @return: expectation of PTU start event +--]] +m.isPTUStarted = m.ptu.expectStart + return m diff --git a/user_modules/sequences/security.lua b/user_modules/sequences/security.lua index ae090ffe57..f51d64f2a3 100644 --- a/user_modules/sequences/security.lua +++ b/user_modules/sequences/security.lua @@ -28,21 +28,25 @@ local origGetMobileSession = actions.getMobileSession --! @return: none --]] local function registerStartSecureServiceFunc(pMobSession) - function pMobSession.mobile_session_impl.control_services:StartSecureService(pServiceId) + function pMobSession.mobile_session_impl.control_services:StartSecureService(pServiceId, pData) local msg = { serviceType = pServiceId, frameInfo = constants.FRAME_INFO.START_SERVICE, sessionId = self.session.sessionId.get(), - encryption = true + encryption = true, + binaryData = pData } self:Send(msg) end - function pMobSession.mobile_session_impl:StartSecureService(pServiceId) + function pMobSession.mobile_session_impl:StartSecureService(pServiceId, pData) if not self.isSecuredSession then self.security:registerSessionSecurity() self.security:prepareToHandshake() end - return self.control_services:StartSecureService(pServiceId) + return self.control_services:StartSecureService(pServiceId, pData) + end + function pMobSession:StartSecureService(pServiceId, pData) + return self.mobile_session_impl:StartSecureService(pServiceId, pData) end end diff --git a/user_modules/shared_testcases/HMICommonSteps.lua b/user_modules/shared_testcases/HMICommonSteps.lua index 9e3dcba269..47f00dfbe5 100644 --- a/user_modules/shared_testcases/HMICommonSteps.lua +++ b/user_modules/shared_testcases/HMICommonSteps.lua @@ -3,7 +3,6 @@ local commonSteps = {} local mobile_session = require('mobile_session') -local config = require('config') --------------------------------------------------------------------------------------------- diff --git a/user_modules/shared_testcases/SmartDeviceLinkConfigurations.lua b/user_modules/shared_testcases/SmartDeviceLinkConfigurations.lua index 02be49895e..8f421d99d0 100644 --- a/user_modules/shared_testcases/SmartDeviceLinkConfigurations.lua +++ b/user_modules/shared_testcases/SmartDeviceLinkConfigurations.lua @@ -3,12 +3,10 @@ --1. local SmartDeviceLinkConfigurations = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') --2. SmartDeviceLinkConfigurations:GetValue(parameterName) --example --------------------------------------------------------------------------------------------- - + local SmartDeviceLinkConfigurations = {} local commonFunctions = require('user_modules/shared_testcases/commonFunctions') -local config = require('config') - --------------------------------------------------------------------------------------------- ------------------------------------------ Functions ---------------------------------------- --------------------------------------------------------------------------------------------- @@ -25,7 +23,7 @@ function SmartDeviceLinkConfigurations:GetValue(parameterName) if string.sub(config.pathToSDL,findresult) ~= "/" then config.pathToSDL = config.pathToSDL..tostring("/") end - + -- Opens a file in read mode local file = io.open(config.pathToSDL .. "smartDeviceLink.ini", "r") local value = "" @@ -33,21 +31,21 @@ function SmartDeviceLinkConfigurations:GetValue(parameterName) local line = file:read() if line == nil then break end - + if string.find(line, parameterName) ~= nil then value = string.sub(line, string.find(line, "=") + 2 , string.len(line)) break end end - + file:close() - + if value == "" then commonFunctions:printError(" smartDeviceLink.ini does not have parameter name: " .. tostring(parameterName)) end - + return value - + end diff --git a/user_modules/shared_testcases/commonFunctions.lua b/user_modules/shared_testcases/commonFunctions.lua index 4692979d73..8c78471564 100644 --- a/user_modules/shared_testcases/commonFunctions.lua +++ b/user_modules/shared_testcases/commonFunctions.lua @@ -7,10 +7,8 @@ local commonFunctions = {} local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') require('atf.util') local json = require('json4lua/json/json') -local expectations = require('expectations') +local SDL = require("SDL") local events = require('events') - -require('modules/config') local NewTestSuiteNumber = 0 -- use as subfix of test case "NewTestSuite" to make different test case name. local path_config = commonPreconditions:GetPathToSDL() --------------------------------------------------------------------------------------------- @@ -62,25 +60,7 @@ end --check that SDL ports are open then raise else RUN after timeout configured by step variable function commonFunctions:waitForSDLStart(test) - local step = 100 - local hmiPort = config.hmiPort - local event = events.Event() - event.matches = function(self, e) return self == e end - local function raise_event() - assert(hmiPort ~= nil or hmiPort ~= "") - local output = os.execute ("netstat -vatn | grep " .. hmiPort .. " | grep LISTEN") - if (output) then - RAISE_EVENT(event, event) - else - RUN_AFTER(raise_event, step) - end - end - RUN_AFTER(raise_event, step) - local ret = expectations.Expectation("Wait for SDL start", test.mobileConnection) - ret.event = event - event_dispatcher:AddEvent(test.mobileConnection, ret.event, ret) - test:AddExpectation(ret) - return ret + return SDL.WaitForSDLStart(test) end function commonFunctions:createMultipleExpectationsWaiter(test, name) diff --git a/user_modules/shared_testcases/commonSteps.lua b/user_modules/shared_testcases/commonSteps.lua index 606b98c42f..3c05e7e25f 100644 --- a/user_modules/shared_testcases/commonSteps.lua +++ b/user_modules/shared_testcases/commonSteps.lua @@ -22,7 +22,6 @@ local commonSteps = {} local mobile_session = require('mobile_session') -local config = require('config') local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') local utils = require ('user_modules/utils') diff --git a/user_modules/shared_testcases_custom/commonSteps.lua b/user_modules/shared_testcases_custom/commonSteps.lua index 5e198293f5..b9d84dd5a6 100644 --- a/user_modules/shared_testcases_custom/commonSteps.lua +++ b/user_modules/shared_testcases_custom/commonSteps.lua @@ -20,7 +20,6 @@ local commonSteps = {} local mobile_session = require('mobile_session') -local config = require('config') local SDLConfig = require('user_modules/shared_testcases/SmartDeviceLinkConfigurations') --------------------------------------------------------------------------------------------- diff --git a/user_modules/utils.lua b/user_modules/utils.lua index e77a67c109..e7ccff1e0b 100644 --- a/user_modules/utils.lua +++ b/user_modules/utils.lua @@ -1,9 +1,6 @@ --------------------------------------------------------------------------------------------------- -- Utils --------------------------------------------------------------------------------------------------- ---[[ General configuration parameters ]] -config.mobileHost = "127.0.0.1" - --[[ Required Shared libraries ]] local json = require("modules/json") local events = require('events') @@ -322,7 +319,11 @@ end --! @return: none --]] function m.addNetworkInterface(pId, pAddress) - os.execute("ifconfig lo:" .. pId .." " .. pAddress) + if config.remoteConnection.enabled then + m.cprint(31, "!!! utils.addNetworkInterface has been not implemented yet !!!") + else + os.execute("ifconfig lo:" .. pId .." " .. pAddress) + end end --[[ @addNetworkInterface: remove network interface @@ -332,7 +333,11 @@ end --! @return: none --]] function m.deleteNetworkInterface(pId) - os.execute("ifconfig lo:" .. pId .." down") + if config.remoteConnection.enabled then + m.cprint(31, "!!! utils.deleteNetworkInterface has been not implemented yet !!!") + else + os.execute("ifconfig lo:" .. pId .." down") + end end return m From db31e6114af492ad64b60bf11173f21df1b1739b Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Thu, 20 Feb 2020 14:12:45 -0500 Subject: [PATCH 20/64] Correct script to reproduce 3239 issue (#2344) --- .../110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua b/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua index da2177ae9b..c87d9b212e 100644 --- a/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua @@ -159,7 +159,8 @@ function Test:TestStep_Set_Odometer_Value_And_Check_That_PTU_Is_Triggered() self.hmiConnection:SendNotification("VehicleInfo.OnVehicleData", {odometer = 2250}) EXPECT_NOTIFICATION("OnVehicleData", {odometer = 2250}) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(AtLeast(1)) + :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) end --[[ Postconditions ]] From 38d04e505a28aad48a5ca2df5858f11c00964f2d Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Mon, 24 Feb 2020 23:23:49 +0200 Subject: [PATCH 21/64] Script for issue 967 (#1921) * Update script for defect 967: remove preloaded_pt changing, use actions.lua instead of commonDefects.lua * Add test set Co-authored-by: Krupenich Oleg (GitHub) <43068809+KrupenichOleg@users.noreply.github.com> Co-authored-by: Dmytro Boltovskyi (GitHub) --- ...uttonPress_OnButtonEvent_in_background.lua | 122 ++++++++++++++++++ test_sets/Defects/6_1/967.txt | 1 + 2 files changed, 123 insertions(+) create mode 100644 test_scripts/Defects/6_1/967_OnButtonPress_OnButtonEvent_in_background.lua create mode 100644 test_sets/Defects/6_1/967.txt diff --git a/test_scripts/Defects/6_1/967_OnButtonPress_OnButtonEvent_in_background.lua b/test_scripts/Defects/6_1/967_OnButtonPress_OnButtonEvent_in_background.lua new file mode 100644 index 0000000000..5c14457538 --- /dev/null +++ b/test_scripts/Defects/6_1/967_OnButtonPress_OnButtonEvent_in_background.lua @@ -0,0 +1,122 @@ +--------------------------------------------------------------------------------------------- +-- GitHub issue https://github.com/SmartDeviceLink/sdl_core/issues/967 +--------------------------------------------------------------------------------------------- +-- Preconditions: +-- 1. Core, HMI started. +-- 2. App is registered on HMI and has HMI level BACKGROUND + +-- Steps to reproduce: +-- 1. Send from HMI OnButtonEvent(CUSTOM_BUTTON, SHORT/LONG) + +-- Expected result: +-- SDL resend it to BACKGROUND App. +--------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } +config.application1.registerAppInterfaceParams.isMediaApplication = true + +local showRequestParams = { + mainField1 = "mainField1", + softButtons = { + { + type = "TEXT", + text = "Button1", + softButtonID = 1, + systemAction = "DEFAULT_ACTION", + }, + { + type = "TEXT", + text = "Button2", + softButtonID = 2, + systemAction = "DEFAULT_ACTION" + } + } +} + +local pressMode = { "SHORT", "LONG" } + +--[[ Local Functions ]] +local function Show() + local cid = common.getMobileSession():SendRPC("Show", showRequestParams) + EXPECT_HMICALL("UI.Show", { softButtons = showRequestParams.softButtons}) + :Do(function(_,data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) +end + +local function OnButtonEventPress(pBtnId, pPressMode) + local btnName = "CUSTOM_BUTTON" + local hmiAppId = common.getHMIAppId() + common.getHMIConnection():SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONDOWN", + customButtonID = pBtnId, + appID = hmiAppId + }) + common.getHMIConnection():SendNotification("Buttons.OnButtonEvent", + { + name = btnName, + mode = "BUTTONUP", + customButtonID = pBtnId, + appID = hmiAppId + }) + common.getHMIConnection():SendNotification("Buttons.OnButtonPress", + { + name = btnName, + mode = pPressMode, + customButtonID = pBtnId, + appID = hmiAppId + }) + common.getMobileSession():ExpectNotification("OnButtonEvent", + { buttonName = btnName, buttonEventMode = "BUTTONDOWN", customButtonID = pBtnId}, + { buttonName = btnName, buttonEventMode = "BUTTONUP", customButtonID = pBtnId }) + :Times(2) + common.getMobileSession():ExpectNotification("OnButtonPress", + { buttonName = btnName, buttonPressMode = pPressMode, customButtonID = pBtnId}) +end + +local function deactivateAppToLimited() + common.getHMIConnection():SendNotification("BasicCommunication.OnAppDeactivated", { appID = common.getHMIAppId() }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "LIMITED", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) +end + +local function deactivateAppToBackground() + common.getHMIConnection():SendNotification("BasicCommunication.OnEventChanged", + { isActive = true, eventName = "AUDIO_SOURCE" }) + common.getMobileSession():ExpectNotification("OnHMIStatus", + { hmiLevel = "BACKGROUND", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Show", Show) + +runner.Title("Test") +for _, value in pairs(pressMode) do + runner.Step("OnButtonEventPress in FULL level with mode " .. value, OnButtonEventPress, { 1, value }) +end +runner.Step("Bring app App to LIMITED", deactivateAppToLimited) +for _, value in pairs(pressMode) do + runner.Step("OnButtonEventPress in LIMITED level with mode " .. value, OnButtonEventPress, { 1, value }) +end +runner.Step("Bring app App to BACKGROUND", deactivateAppToBackground) +for _, value in pairs(pressMode) do + runner.Step("OnButtonEventPress in BACKGROUND level with mode " .. value, OnButtonEventPress, { 1, value }) +end + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/967.txt b/test_sets/Defects/6_1/967.txt new file mode 100644 index 0000000000..8f5fe2e6f4 --- /dev/null +++ b/test_sets/Defects/6_1/967.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/967_OnButtonPress_OnButtonEvent_in_background.lua From ec88e133cdff78386b5cdf93301bb157fcd8cf47 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Mon, 24 Feb 2020 23:29:24 +0200 Subject: [PATCH 22/64] Script for reproducing issue 995 (#1929) * Add script to verify issue 995 * Remove redundant expectation * Add test set Co-authored-by: Dmytro Boltovskyi (GitHub) Co-authored-by: Ira Lytvynenko (GitHub) --- ..._query_apps_after_unsuccessful_attempt.lua | 102 ++++++++++++++++++ test_sets/Defects/6_1/995.txt | 1 + 2 files changed, 103 insertions(+) create mode 100644 test_scripts/Defects/6_1/995_OnSystemrequest_query_apps_after_unsuccessful_attempt.lua create mode 100644 test_sets/Defects/6_1/995.txt diff --git a/test_scripts/Defects/6_1/995_OnSystemrequest_query_apps_after_unsuccessful_attempt.lua b/test_scripts/Defects/6_1/995_OnSystemrequest_query_apps_after_unsuccessful_attempt.lua new file mode 100644 index 0000000000..72b7ef38da --- /dev/null +++ b/test_scripts/Defects/6_1/995_OnSystemrequest_query_apps_after_unsuccessful_attempt.lua @@ -0,0 +1,102 @@ +--------------------------------------------------------------------------------------------- +-- Issue https://github.com/SmartDeviceLink/sdl_core/issues/995 +--------------------------------------------------------------------------------------------- +-- Preconditions: +-- 1. Core, HMI started. +-- 2. App is registered on HMI and has HMI level BACKGROUND + +-- Steps to reproduce: +-- 1. Register app via 4th protocol. +-- 2. App sends incorrect json on SystemRequest and receives error code in response. +-- 3. Bring app to background and then to foreground again or register new app via 4th protocol. + +-- Expected result: +-- SDL does not send OnSystemRequest(QUERY_APPS) to the same app after bringing it to foreground +-- and also to new registered app after unsuccessful attempt to send query json. +--------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 4 -- Set 4 protocol as default for script + +--[[ Local Variables ]] +config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } +config.application1.registerAppInterfaceParams.isMediaApplication = true +config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 4 + +--Sending OnHMIStatus notification form mobile application +local function SendingOnHMIStatusFromMobile(pAppId, pLevel) + local sessionName = common.getMobileSession(pAppId) + sessionName.correlationId = sessionName.correlationId + 100*pAppId + local msg = { + serviceType = 7, + frameInfo = 0, + rpcType = 2, + rpcFunctionId = 32768, + rpcCorrelationId = sessionName.correlationId, + payload = '{"hmiLevel" : "' .. tostring(pLevel) .. '"' + .. ', "audioStreamingState" : "NOT_AUDIBLE"' + .. ', "systemContext" : "MAIN"' + .. ', "videoStreamingState" : "NOT_STREAMABLE"}' + } + sessionName:Send(msg) + utils.cprint(33, "Sending OnHMIStatus from mobile app" .. pAppId .. " with level ".. tostring(pLevel)) +end + +local function OnSystemRequest_QueryApps_IsError() + SendingOnHMIStatusFromMobile(1, "FULL") + + common.getMobileSession(1):ExpectNotification("OnSystemRequest", { requestType = "QUERY_APPS" }) + :Do(function() + local cid = common.getMobileSession(1):SendRPC("SystemRequest", { + requestType = "QUERY_APPS", + fileName = "incorrectJSON.json" + }, + "files/jsons/QUERRY_jsons/incorrectJSON.json") + common.getMobileSession(1):ExpectResponse(cid, { success = false, resultCode = "GENERIC_ERROR" }) + end) +end + +local function RegisterSecondApp() + common.registerApp(2) +end + +local function OnSystemRequest_QueryApps_IsNotSentToNewRegisteredApp() + SendingOnHMIStatusFromMobile(1, "BACKGROUND") + SendingOnHMIStatusFromMobile(2, "FULL") + common.getMobileSession(2):ExpectNotification("OnSystemRequest", { requestType = "QUERY_APPS" }) + :Times(0) + common.getMobileSession(1):ExpectNotification("OnSystemRequest", { requestType = "QUERY_APPS" }) + :Times(0) +end + +local function OnSystemRequest_QueryApps_IsNotSentToTheSameAppInForeground() + SendingOnHMIStatusFromMobile(2, "BACKGROUND") + SendingOnHMIStatusFromMobile(1, "FULL") + common.getMobileSession(2):ExpectNotification("OnSystemRequest", { requestType = "QUERY_APPS" }) + :Times(0) + common.getMobileSession(1):ExpectNotification("OnSystemRequest", { requestType = "QUERY_APPS" }) + :Times(0) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register app1", common.registerAppWOPTU) +runner.Step("Activate app1", common.activateApp) + +runner.Title("Test") +runner.Step("OnSystemRequest_QueryApps_IsError", OnSystemRequest_QueryApps_IsError) +runner.Step("Register app2", RegisterSecondApp) +runner.Step("OnSystemRequest_QueryApps_IsNotSentToNewRegisteredApp", + OnSystemRequest_QueryApps_IsNotSentToNewRegisteredApp) +runner.Step("OnSystemRequest_QueryApps_IsNotSentToTheSameAppInForeground", + OnSystemRequest_QueryApps_IsNotSentToTheSameAppInForeground) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/995.txt b/test_sets/Defects/6_1/995.txt new file mode 100644 index 0000000000..e60ed01a91 --- /dev/null +++ b/test_sets/Defects/6_1/995.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/995_OnSystemrequest_query_apps_after_unsuccessful_attempt.lua From b874ce1f59f3bf581a04121c7d00c99f90290676 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Mon, 24 Feb 2020 23:32:03 +0200 Subject: [PATCH 23/64] Script for 1399 issue (#2137) * Script for 1399 issue * Add test set Co-authored-by: Dmytro Boltovskyi (GitHub) --- .../6_1/1399_ReadDID_TRUNCATED_DATA.lua | 79 +++++++++++++++++++ test_sets/Defects/6_1/1399.txt | 1 + 2 files changed, 80 insertions(+) create mode 100644 test_scripts/Defects/6_1/1399_ReadDID_TRUNCATED_DATA.lua create mode 100644 test_sets/Defects/6_1/1399.txt diff --git a/test_scripts/Defects/6_1/1399_ReadDID_TRUNCATED_DATA.lua b/test_scripts/Defects/6_1/1399_ReadDID_TRUNCATED_DATA.lua new file mode 100644 index 0000000000..75bfcf0d82 --- /dev/null +++ b/test_scripts/Defects/6_1/1399_ReadDID_TRUNCATED_DATA.lua @@ -0,0 +1,79 @@ +-------------------------------------------------------------------------------- +-- User story: https://github.com/SmartDeviceLink/sdl_core/issues/1399 + +-- Steps to reproduce: +-- 1. Mobile app is registered and activated +-- 2. RPC ReadDID is allowed by policy +-- 3. Mobile app requests ReadDID +-- 4. HMI sends response VehicleInfo.ReadDID to SDL with resultCode = "TRUNCATED_DATA" + +-- Expected: +-- 1. SDL sends response ReadDID(TRUNCATED_DATA) with success:true to mobile app +-------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Functions ]] +local function setReadDIDRequest() + local temp = { + ecuName = 2000, + didLocation = { + 100, + 1000, + 10000 + } + } + return temp +end + +local function setReadDIDSuccessResponse(didLocationValues) + local temp = { + didResult = {} + } + for i = 1, #didLocationValues do + temp.didResult[i] = { + resultCode = "SUCCESS", + didLocation = didLocationValues[i], + data = "123" + } + end + return temp +end + +local function readDID() + local paramsSend = setReadDIDRequest() + local response = setReadDIDSuccessResponse(paramsSend.didLocation) + local cid = common.getMobileSession():SendRPC("ReadDID",paramsSend) + paramsSend.appID = common.getHMIAppId() + EXPECT_HMICALL("VehicleInfo.ReadDID",paramsSend) + :Do(function(_,data) + common.getHMIConnection():SendResponse(data.id, data.method, "TRUNCATED_DATA", response) + end) + local expectedResult = response + expectedResult.success = true + expectedResult.resultCode = "TRUNCATED_DATA" + common.getMobileSession():ExpectResponse(cid, expectedResult) +end + +local function ptuFunc(tbl) + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].groups = { "Base-4", "PropriataryData-1" } +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("PTU", common.policyTableUpdate, { ptuFunc }) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("ReadDID with resultCode TRUNCATED_DATA", readDID) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/1399.txt b/test_sets/Defects/6_1/1399.txt new file mode 100644 index 0000000000..3e6bb9ef83 --- /dev/null +++ b/test_sets/Defects/6_1/1399.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/1399_ReadDID_TRUNCATED_DATA.lua From a233f717eff29bce1bc7dba3c660b3e24e2d3a36 Mon Sep 17 00:00:00 2001 From: "Halyna Savynetska (GitHub)" <34478015+HSavynetska@users.noreply.github.com> Date: Mon, 24 Feb 2020 23:34:30 +0200 Subject: [PATCH 24/64] Script for reproducing issue 1865 (#1962) * Add script to verify issue 1865 * Add test set Co-authored-by: Dmytro Boltovskyi (GitHub) --- .../6_1/1865_Invalid_request_from_HMI.lua | 74 +++++++++++++++++++ test_sets/Defects/6_1/1865.txt | 1 + 2 files changed, 75 insertions(+) create mode 100644 test_scripts/Defects/6_1/1865_Invalid_request_from_HMI.lua create mode 100644 test_sets/Defects/6_1/1865.txt diff --git a/test_scripts/Defects/6_1/1865_Invalid_request_from_HMI.lua b/test_scripts/Defects/6_1/1865_Invalid_request_from_HMI.lua new file mode 100644 index 0000000000..b0b9af88df --- /dev/null +++ b/test_scripts/Defects/6_1/1865_Invalid_request_from_HMI.lua @@ -0,0 +1,74 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/1865 +-- +-- Steps: +-- 1. HMI sends invalid request: +-- a) array size of parameter is beyond the max restriction +-- b) string value of parameter is beyond the max restriction +-- c) invalid value type of parameter +-- d) missing mandatory parameter +-- e) empty string value for parameter +-- +-- Expected result: +-- 1. SDL responds with code INVALID_DATA to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require('user_modules/utils') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local tcs = { + [1] = { + name = "string value of parameter is beyond the max restriction", + method = "SDL.GetUserFriendlyMessage", + params = { messageCodes = { string.rep("q", 501) } } + }, + [2] = { + name = "array size of parameter is beyond the max restriction", + method = "SDL.GetUserFriendlyMessage", + params = { messageCodes = (function() + local out = { } + for i = 1, 101 do out[i] = "DataConsent" end + return out + end)() } + }, + [3] = { + name = "invalid value type of parameter", + method = "SDL.ActivateApp", + params = { appID = "12345" } + }, + [4] = { + name = "missing mandatory parameter", + method = "SDL.ActivateApp", + params = { fake = "" } + }, + [5] = { + name = "empty string value for parameter", + method = "SDL.GetUserFriendlyMessage", + params = { messageCodes = { "" } } + } +} + +--[[ Local Functions ]] +local function hmiRequest(pRequest, pParams) + local cid = common.getHMIConnection():SendRequest(pRequest, pParams) + common.getHMIConnection():ExpectResponse(cid, { error = { code = 11, data = { method = pRequest }}}) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI, PTU", common.registerAppWOPTU) + +runner.Title("Test") +for _, tc in utils.spairs(tcs) do + runner.Step(tc.name, hmiRequest, { tc.method, tc.params }) +end + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/1865.txt b/test_sets/Defects/6_1/1865.txt new file mode 100644 index 0000000000..43a8abc6e6 --- /dev/null +++ b/test_sets/Defects/6_1/1865.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/1865_Invalid_request_from_HMI.lua From 9673fbc9db31bbae7dfdc38bf5f18abb86f940bd Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Mon, 24 Feb 2020 16:36:16 -0500 Subject: [PATCH 25/64] Add script to verify issue 1878 (#2143) * Add script to verify issue 1878 * Add test set --- .../6_1/1878_AddCommand_resumption_order.lua | 124 ++++++++++++++++++ test_sets/Defects/6_1/1878.txt | 1 + 2 files changed, 125 insertions(+) create mode 100644 test_scripts/Defects/6_1/1878_AddCommand_resumption_order.lua create mode 100644 test_sets/Defects/6_1/1878.txt diff --git a/test_scripts/Defects/6_1/1878_AddCommand_resumption_order.lua b/test_scripts/Defects/6_1/1878_AddCommand_resumption_order.lua new file mode 100644 index 0000000000..cdfd1cefd0 --- /dev/null +++ b/test_scripts/Defects/6_1/1878_AddCommand_resumption_order.lua @@ -0,0 +1,124 @@ +--------------------------------------------------------------------------------------------------- +-- User story: https://github.com/SmartDeviceLink/sdl_core/issues/1878 +-- +-- Description: +-- SDL does not restore AddCommands in the same order as they were created by mobile app +-- +-- Steps: +-- 1) App is registered and activated. +-- 2) App successfully added some AddCommands +-- 3) Ign off –> Ign on +-- 4) App registers -> SDL successfully performs HMILevel resumption and data resumption +-- +-- Expected result: +-- 1) SDL must generate +-- and assign this to each AddCommand requested by app +-- 2) Restore AddCommand by this during data resumption +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('user_modules/sequences/actions') +local test = require("user_modules/dummy_connecttest") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local hashID + +local addCommands = { + { + cmdID = 1, + menuParams = { + position = 0, + menuName ="Command1" + }, + vrCommands = { + "VRCommand1" + } + }, + { + cmdID = 22, + menuParams = { + position = 0, + menuName ="Command2" + }, + vrCommands = { + "VRCommand2" + } + }, + { + cmdID = 3, + menuParams = { + position = 0, + menuName ="Command3" + }, + vrCommands = { + "VRCommand3" + } + } +} + +--[[ Local Functions ]] +local function addCommand(pParams) + local cid = common.getMobileSession():SendRPC("AddCommand", pParams) + common.getHMIConnection():ExpectRequest("UI.AddCommand") + :Do(function(_,data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + common.getHMIConnection():ExpectRequest("VR.AddCommand") + :Do(function(_,data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) + common.getMobileSession():ExpectNotification("OnHashChange") + :Do(function(_, data) + hashID = data.payload.hashID + end) +end + +local function registerWithResumption() + config.application1.registerAppInterfaceParams.hashID = hashID + common.registerAppWOPTU() + common.getHMIConnection():ExpectRequest("VR.AddCommand", + { vrCommands = addCommands[1].vrCommands }, + { vrCommands = addCommands[2].vrCommands }, + { vrCommands = addCommands[3].vrCommands }) + :Do(function(_,data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(3) +end + +function common.ignitionOff() + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "SUSPEND" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLPersistenceComplete") + :Do(function() + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications",{ reason = "IGNITION_OFF" }) + common.getMobileSession():ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + end) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLClose") + :Do(function() + test.mobileSession[1] = nil + StopSDL() + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("App registration", common.registerApp) +runner.Step("Activate App", common.activateApp) +for key, value in pairs(addCommands) do + runner.Step("AddCommand " .. key, addCommand, { value }) +end +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("Ignition On", common.start) + +runner.Title("Test") +runner.Step("Registration with resumption", registerWithResumption) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/1878.txt b/test_sets/Defects/6_1/1878.txt new file mode 100644 index 0000000000..eaebcdb526 --- /dev/null +++ b/test_sets/Defects/6_1/1878.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/1878_AddCommand_resumption_order.lua From 5359e050cb2e20b537a5c8d90991a678d62582b1 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Wed, 26 Feb 2020 20:27:12 +0200 Subject: [PATCH 26/64] Script for issue 974 (#1919) * Script for issue 974 * Add test set Co-authored-by: Dmytro Boltovskyi (GitHub) --- ...dateDeviceList_after_closingConnection.lua | 134 ++++++++++++++++++ test_sets/Defects/6_1/974.txt | 1 + 2 files changed, 135 insertions(+) create mode 100644 test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua create mode 100644 test_sets/Defects/6_1/974.txt diff --git a/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua b/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua new file mode 100644 index 0000000000..e189835675 --- /dev/null +++ b/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua @@ -0,0 +1,134 @@ +--------------------------------------------------------------------------------------------------- +-- GitHub issue: https://github.com/smartdevicelink/sdl_core/issues/974 +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local utils = require("user_modules/utils") +local actions = require("user_modules/sequences/actions") +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local test = require("user_modules/dummy_connecttest") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local deviceParams = { + id = utils.getDeviceMAC(), + name = "127.0.0.1:12345", + transportType = "WIFI" +} + +--[[ Local Functions ]] +local function start() + test:runSDL() + commonFunctions:waitForSDLStart(test) + :Do(function() + test:initHMI() + :Do(function() + utils.cprint(35, "HMI initialized") + test:initHMI_onReady() + :Do(function() + utils.cprint(35, "HMI is ready") + end) + end) + end) +end + +local function ConnectDeviceNonEmptyDeviceList() + test:connectMobile() + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { + deviceList = { + deviceParams + } + }) + :Do(function(_,data) + actions.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) +end + +local function UpdateDeviceListNonEmptyDeviceList() + local hmiConnection = actions.getHMIConnection() + hmiConnection:SendNotification("BasicCommunication.OnStartDeviceDiscovery") + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { + deviceList = { + deviceParams + } + }) + :DoOnce(function(_,data) + hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + + hmiConnection:SendNotification("BasicCommunication.OnDeviceChosen", { + deviceInfo = { + id = data.params.deviceList[1].id, + name = data.params.deviceList[1].name + } + }) + + hmiConnection:SendNotification("BasicCommunication.OnFindApplications", { + deviceInfo = { + id = data.params.deviceList[1].id, + name = data.params.deviceList[1].name + } + }) + end) + :ValidIf(function(_,data) + if #data.params.deviceList ~= 1 then + commonFunctions:userPrint(31, "deviceList array in UpdateDeviceList contains not one device in list." .. + " Received elements number '" .. tostring(#data.params.deviceList) .. "'") + return false + else + return true + end + end) + + EXPECT_HMICALL("BasicCommunication.UpdateAppList") + :ValidIf(function(_,data) + if #data.params.applications ~= 0 then + commonFunctions:userPrint(31, "Number of applications in UpdateAppList in not 0, received number '" .. + tostring(#data.params.applications) .. "'") + return false + else return true + end + end) + :Times(AtMost(1)) +end + +local function CloseConnection() + test.mobileConnection:Close() +end + +local function UpdateDeviceListEmptyDeviceListAfterConnectionIsClosed() + local hmiConnection = actions.getHMIConnection() + hmiConnection:SendNotification("BasicCommunication.OnStartDeviceDiscovery") + + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :ValidIf(function(_,data) + if #data.params.deviceList ~= 0 then + return false, "deviceList array in UpdateDeviceList is not empty. Received elements number '" .. + tostring(#data.params.deviceList) .. "'" + else + return true + end + end) + +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", actions.preconditions) +runner.Step("Start SDL, HMI", start) + +runner.Title("Test") +runner.Step("Connect device", ConnectDeviceNonEmptyDeviceList) +runner.Step("Discover device after device connect", UpdateDeviceListNonEmptyDeviceList) +runner.Step("Close Connection", CloseConnection) +runner.Step("Discover device after device disconnect", UpdateDeviceListEmptyDeviceListAfterConnectionIsClosed) + +runner.Title("Postconditions") +runner.Step("Stop SDL", actions.postconditions) diff --git a/test_sets/Defects/6_1/974.txt b/test_sets/Defects/6_1/974.txt new file mode 100644 index 0000000000..fe7a3579f7 --- /dev/null +++ b/test_sets/Defects/6_1/974.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua From 5074f2ee25fd1919931a3129550046e41334190a Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Thu, 27 Feb 2020 17:54:43 +0200 Subject: [PATCH 27/64] Feature/Web Engine support (#2323) * Update User modules * Update iAP2TransportSwitch tests * Update Smoke tests * Update Policies tests * Update GNSD tests * Update Defects tests * Update MobileVersioning tests * Update CloudAppRPCs tests * Update AppServices tests * Update Common modules * Update MultipleModules tests * Add WebEngine tests * Adjust scripts due to changes introduced by HMI PTU feature * fixup! Adjust scripts due to changes introduced by HMI PTU feature * Improve stability of 019 Mobile Projection script * Improve stability of IgnitionOff function in The Same App scripts * fixup! Update Policies tests * Add WebEngine device unique identifier setting to user_modules * Change order of WebEngine device * Exclude ConditionalResumption tests for WS-WSS connection * Exclude TheSameApp tests for WS-WSS connection * Make scripts stable * Add script to check UpdateAppList in case if one app is unregistered * fixup! Update iAP2TransportSwitch tests * fixup! Update Policies tests * fixup! Add WebEngine tests * Align script for issue 974 with WebEngine feature * fixup! Update Policies tests Co-authored-by: Dmytro Boltovskyi (GitHub) Co-authored-by: Oleksandr Deriabin (GitHub) --- .../WebEngine/SelfSigned/client-cert.pem | 23 ++ .../WebEngine/SelfSigned/client-key.pem | 28 ++ files/Security/WebEngine/ca-cert.pem | 23 ++ files/Security/WebEngine/client-cert.pem | 21 ++ files/Security/WebEngine/client-key.pem | 28 ++ files/Security/WebEngine/server-cert.pem | 21 ++ files/Security/WebEngine/server-key.pem | 28 ++ .../API/SetAppIcon/commonIconResumed.lua | 2 +- ...r_VDitems_2_apps_unexpected_disconnect.lua | 4 +- ..._resumption_for_VDitems_2_apps_ign_off.lua | 4 +- .../commonGenericNetSignalData.lua | 8 +- ...etAppServiceData_Unexpected_Disconnect.lua | 7 +- ...12_Same_app_name_mobile_app_Disallowed.lua | 5 + ..._Same_app_name_mobile_app_Unregistered.lua | 5 + .../Defects/4_5/1376_PTU_all_flows.lua | 15 +- ...rom_SDL_after_receiving_HB_from_mobile.lua | 5 +- test_scripts/Defects/4_5/commonDefects.lua | 13 +- ...dateDeviceList_after_closingConnection.lua | 34 +- test_scripts/Defects/commonDefects.lua | 13 +- .../MobileProjection/Phase1/common.lua | 4 +- .../Phase2/019_SDL_stop_audio_video.lua | 10 +- .../Phase2/smoke/019_SDL_stop_audio_video.lua | 9 +- ...sponse_Notification_On_Registering_App.lua | 13 +- ...Assigned_Policy_After_App_Registration.lua | 13 +- .../003_ATF_HP_User_Consent_Yes.lua | 15 +- .../004_ATF_HP_User_Consent_NO.lua | 14 +- ...Id_policies_And_RequestType_Validation.lua | 13 +- ...6_ATF_Steal_focus_validation_false_PTU.lua | 11 +- ...007_ATF_StealFocus_validation_true_PTU.lua | 18 +- ...ation_To_HMI_In_First_App_Registration.lua | 2 +- ...f_Failed_Nickname_Validation_After_PTU.lua | 11 +- ...n_With_AppName_Not_Listed_In_NickNames.lua | 2 +- ...030_ATF_Successful_Nickname_Validation.lua | 2 +- ...nt_entities_on_data_consent_disallowed.lua | 1 + ...tities_omitted_data_consent_disallowed.lua | 1 + ...imeout_after_receiving_OnSystemRequest.lua | 20 +- .../125_ATF_User_PressButton_HMI_PTU.lua | 1 + .../145_ATF_PTU_Merge_Into_LPT.lua | 2 +- ...r_NewApp_not_exist_inLocalPT_FinishPTU.lua | 4 +- ...6_ATF_OnPolicyUpdate_initiation_of_PTU.lua | 11 +- ...preloaded_pt_into_local_pt_device_data.lua | 3 +- ...ATF_pt_snapshot_storage_on_file_system.lua | 2 +- ...lidate_default_priority_preDataConsent.lua | 19 +- ...ate_nondefault_priority_preDataConsent.lua | 19 +- ...Applying_Heart_Beat_Timeout_Ms_From_PT.lua | 2 +- ...iciesManager_Sets_Status_UPDATING_HTTP.lua | 12 +- .../066_ATF_PTU_Validation_Failure_HTTP.lua | 29 +- .../068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua | 20 +- ..._ConsumerFriendlyMessages_Omitted_HTTP.lua | 22 +- ...nd_GetURLs_Request_fromHMI_PROPRIETARY.lua | 20 +- ..._ATF_For_PTU_use_consented_device_only.lua | 48 ++- ...I_In_Case_PTU_Is_Triggered_PROPRIETARY.lua | 9 +- ...gh_The_URLs_During_Retry_Sequence_HTTP.lua | 4 +- ..._Timeout_wait_response_PTU_PROPRIETARY.lua | 3 +- ...EDED_after_timeout_expired_PROPRIETARY.lua | 7 +- ...ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua | 2 +- ..._exist_inLocalPT_FinishPTU_PROPRIETARY.lua | 1 + ..._ATF_HP_Device_Data_Section_Validation.lua | 26 +- ...ATF_UpdateDeviceList_on_device_connect.lua | 20 +- ...195_ATF_ActivateApp_isSDLAllowed_false.lua | 27 +- ...TF_UpdateDeviceList_isSDLAllowed_false.lua | 62 ++-- .../204_ATF_App_group_order_preconsented.lua | 12 +- .../215_ATF_User_clears_all_applications.lua | 44 ++- ...nsent_status_allowed_on_device_connect.lua | 60 ++-- ...t_status_not_allowed_on_device_connect.lua | 65 ++-- ...entifier_creation_upon_connect_no_apps.lua | 89 +++-- ...tifier_creation_upon_connect_with_apps.lua | 46 +-- .../222_ATF_Device_HashID_In_LPT.lua | 36 +- ...taConsent_cache_is_dependent_on_device.lua | 5 + test_scripts/Resumption/HMI_Level/common.lua | 2 +- .../SDL5_0/ConditionalResumption/common.lua | 10 +- .../Image_template/commonImageTemplate.lua | 1 + test_scripts/SDL5_0/LowVoltage/common.lua | 2 +- .../001_register_legacy_app.lua | 2 +- .../002_register_app_on_legacy_module.lua | 2 +- test_scripts/SDL5_0/TTSChunks/common.lua | 13 +- .../common.lua | 28 +- ...isterAppInterface_PositiveCase_SUCCESS.lua | 2 +- .../001_Register_5_connection.lua | 13 +- test_scripts/Smoke/commonSmoke.lua | 29 +- .../TheSameApp/Security/commonSecurity.lua | 17 +- test_scripts/TheSameApp/commonTheSameApp.lua | 12 +- test_scripts/WebEngine/001_WS_Connection.lua | 41 +++ test_scripts/WebEngine/002_WSS_Connection.lua | 41 +++ ..._connection_missing_client_certificate.lua | 38 +++ ...nnection_selfSigned_client_sertificate.lua | 39 +++ ..._connection_missing_serverSslPrameters.lua | 55 +++ .../006_SetAppProperties_success_flow.lua | 42 +++ ...tAppProperties_with_invalid_parameters.lua | 64 ++++ ...tAppProperties_with_unknown_parameters.lua | 29 ++ ...AppProperties_with_mandatory_parameter.lua | 80 +++++ ...Properties_without_mandatory_parameter.lua | 62 ++++ .../011_SetAppProperties_in_range_Str.lua | 58 ++++ .../012_SetAppProperties_in_range_Array.lua | 61 ++++ .../013_SetAppProperties_out_of_range_Str.lua | 55 +++ ...14_SetAppProperties_out_of_range_Array.lua | 52 +++ .../015_GetAppProperties_success_flow.lua | 72 ++++ .../016_GetAppProperties_unknown_parmeter.lua | 49 +++ ...017_GetAppProperties_wrong_policyAppID.lua | 30 ++ .../018_GetAppProperties_out_of_range_Str.lua | 34 ++ ...019_OnAppPropertiesChange_success_flow.lua | 90 +++++ ...sChange_notification_on_PTU_Mobile_HMI.lua | 125 +++++++ test_scripts/WebEngine/021_UpdateAppList.lua | 59 ++++ .../WebEngine/022_UpdateAppList_on_start.lua | 68 ++++ .../023_UpdateAppList_unregister.lua | 62 ++++ ...ies_are_stored_through_ignition_cycles.lua | 34 ++ .../025_PTU_update_app_properties.lua | 59 ++++ .../WebEngine/026_PTU_snapshot_validation.lua | 117 +++++++ .../027_UpdateAppList_unregister_2apps.lua | 66 ++++ test_scripts/WebEngine/commonWebEngine.lua | 316 ++++++++++++++++++ test_scripts/WidgetSupport/common.lua | 8 +- .../iAP2TransportSwitch/001_happy_path.lua | 17 +- .../002_resume_failed_simple_case.lua | 17 +- .../003_resume_failed_remove_data_check.lua | 17 +- .../004_commands_hold_while_switching.lua | 17 +- test_scripts/iAP2TransportSwitch/common.lua | 25 +- test_sets/webengine.txt | 27 ++ user_modules/all_common_modules.lua | 1 - user_modules/common_steps.lua | 4 +- user_modules/connecttest_TTS_Isready.lua | 19 +- user_modules/connecttest_VR_Isready.lua | 19 +- user_modules/connecttest_initHMI.lua | 19 +- user_modules/connecttest_resumption.lua | 19 +- user_modules/dummy_connecttest.lua | 35 +- user_modules/sequences/actions.lua | 129 +++++-- .../shared_testcases/commonFunctions.lua | 12 +- .../testCasesForPolicyTableSnapshot.lua | 10 +- user_modules/utils.lua | 100 +++++- 128 files changed, 3059 insertions(+), 645 deletions(-) create mode 100644 files/Security/WebEngine/SelfSigned/client-cert.pem create mode 100644 files/Security/WebEngine/SelfSigned/client-key.pem create mode 100644 files/Security/WebEngine/ca-cert.pem create mode 100644 files/Security/WebEngine/client-cert.pem create mode 100644 files/Security/WebEngine/client-key.pem create mode 100644 files/Security/WebEngine/server-cert.pem create mode 100644 files/Security/WebEngine/server-key.pem create mode 100644 test_scripts/WebEngine/001_WS_Connection.lua create mode 100644 test_scripts/WebEngine/002_WSS_Connection.lua create mode 100644 test_scripts/WebEngine/003_WSS_connection_missing_client_certificate.lua create mode 100644 test_scripts/WebEngine/004_WSS_connection_selfSigned_client_sertificate.lua create mode 100644 test_scripts/WebEngine/005_WSS_connection_missing_serverSslPrameters.lua create mode 100644 test_scripts/WebEngine/006_SetAppProperties_success_flow.lua create mode 100644 test_scripts/WebEngine/007_SetAppProperties_with_invalid_parameters.lua create mode 100644 test_scripts/WebEngine/008_SetAppProperties_with_unknown_parameters.lua create mode 100644 test_scripts/WebEngine/009_SetAppProperties_with_mandatory_parameter.lua create mode 100644 test_scripts/WebEngine/010_SetAppProperties_without_mandatory_parameter.lua create mode 100644 test_scripts/WebEngine/011_SetAppProperties_in_range_Str.lua create mode 100644 test_scripts/WebEngine/012_SetAppProperties_in_range_Array.lua create mode 100644 test_scripts/WebEngine/013_SetAppProperties_out_of_range_Str.lua create mode 100644 test_scripts/WebEngine/014_SetAppProperties_out_of_range_Array.lua create mode 100644 test_scripts/WebEngine/015_GetAppProperties_success_flow.lua create mode 100644 test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua create mode 100644 test_scripts/WebEngine/017_GetAppProperties_wrong_policyAppID.lua create mode 100644 test_scripts/WebEngine/018_GetAppProperties_out_of_range_Str.lua create mode 100644 test_scripts/WebEngine/019_OnAppPropertiesChange_success_flow.lua create mode 100644 test_scripts/WebEngine/020_OnAppPropertiesChange_notification_on_PTU_Mobile_HMI.lua create mode 100644 test_scripts/WebEngine/021_UpdateAppList.lua create mode 100644 test_scripts/WebEngine/022_UpdateAppList_on_start.lua create mode 100644 test_scripts/WebEngine/023_UpdateAppList_unregister.lua create mode 100644 test_scripts/WebEngine/024_AppProperties_are_stored_through_ignition_cycles.lua create mode 100644 test_scripts/WebEngine/025_PTU_update_app_properties.lua create mode 100644 test_scripts/WebEngine/026_PTU_snapshot_validation.lua create mode 100644 test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua create mode 100644 test_scripts/WebEngine/commonWebEngine.lua create mode 100644 test_sets/webengine.txt diff --git a/files/Security/WebEngine/SelfSigned/client-cert.pem b/files/Security/WebEngine/SelfSigned/client-cert.pem new file mode 100644 index 0000000000..bb92c46c2d --- /dev/null +++ b/files/Security/WebEngine/SelfSigned/client-cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIID5TCCAs2gAwIBAgIJANeIdIRgTwbAMA0GCSqGSIb3DQEBCwUAMIGIMQswCQYD +VQQGEwJVQTEPMA0GA1UECAwGT2Rlc3NhMQ8wDQYDVQQHDAZPZGVzc2ExDzANBgNV +BAoMBkx1eG9mdDENMAsGA1UECwwERlRDTjESMBAGA1UEAwwJbG9jYWxob3N0MSMw +IQYJKoZIhvcNAQkBFhRzZWxmLXNpZ25lZEBmdGNuLmNvbTAeFw0yMDAxMTIxNDA1 +MjhaFw0yMjEwMDgxNDA1MjhaMIGIMQswCQYDVQQGEwJVQTEPMA0GA1UECAwGT2Rl +c3NhMQ8wDQYDVQQHDAZPZGVzc2ExDzANBgNVBAoMBkx1eG9mdDENMAsGA1UECwwE +RlRDTjESMBAGA1UEAwwJbG9jYWxob3N0MSMwIQYJKoZIhvcNAQkBFhRzZWxmLXNp +Z25lZEBmdGNuLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALtc +7BaI0CYBTmhp2vR5wGwxQX6TyYzK8a/rpI0ds8V0SWSzrF04SLqur6o2WBpJsYHD +BvV1OY5h7e19QgpnHvIoyGGiMB/tfitBdqHOglxtMkA7kkCSs82PrdBdexFODLUO +rtRPsoFQsFA+xEcHfjLAE/7cNadzvNEwXfWER35VzbUTFEhDeg4ij1iapStEhhfl +ar91n/kLbTX+SzvcfBrh7JOHxhIaqyMWqggdg37a4del3Jf0gmJoOeVgn5Gbxae2 +0z0tXgEeUoGU7BSRuUs1MndLeANC/m6XUCgKTs2zsCKULj4jYWq5Dji4N0JKFtwz +VHrjxZz8nZfPY8u+U2ECAwEAAaNQME4wHQYDVR0OBBYEFOvHHlP+wBBqPbz87jbr +YSNkxvQTMB8GA1UdIwQYMBaAFOvHHlP+wBBqPbz87jbrYSNkxvQTMAwGA1UdEwQF +MAMBAf8wDQYJKoZIhvcNAQELBQADggEBAHrDCCcfmy8url2U9y5uFkOXWe1vCnYC +qryhNL7eGfvsTjr13Yl14rJ6ql0axX4GOInT10YWpE8uPXdOewj3F02hsM+26/52 +3AVoOX2Jt0Azbz0W/F6etyfmdRLnIDYRwZMojqVHVwA+py4kHumLL3NDVCrLiHgX +Hb+6brvgOydkIoz0XCu2/4SrxMRubAqSoObDEkhGlMD/CVgMAW2Jsk3kYvnciyhr +X9sSwlCo74a2fHtf8ksBoQWRYYwcIlHlbpfIOMXZfDnZNGWuG3cBKhV2Nimfm3HC +YokWCAEXnZEad+q37J92mEFq41BlgNJ2ffjBM2boj7bTDNw4P7u4f4Q= +-----END CERTIFICATE----- diff --git a/files/Security/WebEngine/SelfSigned/client-key.pem b/files/Security/WebEngine/SelfSigned/client-key.pem new file mode 100644 index 0000000000..addc96708f --- /dev/null +++ b/files/Security/WebEngine/SelfSigned/client-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQC7XOwWiNAmAU5o +adr0ecBsMUF+k8mMyvGv66SNHbPFdElks6xdOEi6rq+qNlgaSbGBwwb1dTmOYe3t +fUIKZx7yKMhhojAf7X4rQXahzoJcbTJAO5JAkrPNj63QXXsRTgy1Dq7UT7KBULBQ +PsRHB34ywBP+3DWnc7zRMF31hEd+Vc21ExRIQ3oOIo9YmqUrRIYX5Wq/dZ/5C201 +/ks73Hwa4eyTh8YSGqsjFqoIHYN+2uHXpdyX9IJiaDnlYJ+Rm8WnttM9LV4BHlKB +lOwUkblLNTJ3S3gDQv5ul1AoCk7Ns7AilC4+I2FquQ44uDdCShbcM1R648Wc/J2X +z2PLvlNhAgMBAAECggEBAJzpt3cv4VLS6T2c2ZjBlpuFrNo7HyLgnAS/DrJ4W6RU +PVsu9n2js5VU0x10IdjyOsz37o4HPMq3zTGGI5bewhYAfcD2ueMjXPURAC+G6bpK +YTlWKqgVtKvFVsYYZAccHJxNzbFVhaOzVdX+mxb5eYE7SAO7nNu+nDV9klMaE14D +QyIbEQA/2BVOCirgmQD13QJgHKIstBH/D3/rQ6fu76TTbIMNCmU4PaXK9zCkhFEG +uTtjjB44AP5zNzZ0r4LL40Vssmzqtwwc0svEeWGww89rasJ0IzCs0RXsM1wQHE4S +y+2Ugor6/Qb8y6H7xrM6YAUH+C2SDSviQvuG7/yMVgECgYEA4aA6zOuZ5Kyizdpe +ezmHzgwTOZhagW2BG4aBFWCr9iWS0ba10o/7MBr/C0tY+UKaZGgkQeNJk0cPE4Ok +aNhDCoM88Tb5GyIIiGIZD/pBYyndRWyfMC1TG6l4o2DIdEvwgSR5AD5vWq93hQjq +LA45/SXZBB6pl12JK6sPVjRr5rECgYEA1JYIhSzg1/PVX+UTzOBraZoyEv4cT+0v +XCW9855pfnMw7jlN4cYT3NcKYOHlb9aKCx18syp8M8fUcf/haAbz3Mi0BLMl2VXH +1kQN/li/j8UNNrfcP8DkYCsoUITcJ0BAynL2GT7XF4EMJXsbTtRsQAlIVReIG1us +DiFag/Pbw7ECgYAVJEt+OjFwcRDMU0L5Lvnfv9fpVLJeYGFxr9fWpflXFkw8pG9D +LMSvzEfLyiKrMKeA8xU6q06Qo17xSCuWu3UEviluvOT4uuaryO1qRtvrq9eVEsmT +3RtlgyrPvFjsNNVzdHR2JmOOztRXPe+bczXR18MPFMR1b4lT8zJ7tGvL8QKBgCqE +ExInZpRqBKuYEfywiWrmVstrnNfzVLx2I+Y8MVcDzK5oMYZM6h4Jt96mbw+N9a/B +ZvYiMhLdDUT7auY2NcFbNn2WIqSzvjLBC5dpwm4Ld9gQr3DksAf3ualY2PrUo+CZ +W1SzN6tQuNAqLcz3OOsZsCiseyEVlXSCAStQswwRAoGBAKEAybthEiqtw9CT6mpd +omtIN8cyALkiFQTsrhNbaRRz5xtnBB0W4PDUPHgwN03BgfdtEhQ6+lOAqFTKX9j2 +GiuIjYYD391Gd8lRdcDwNGoaz/w2lC5pJM6/iHhQHAKf5Sm7foSs8l9h+QLVu7wt +0o7z37jYyQxEmXDuHsHKSQaf +-----END PRIVATE KEY----- diff --git a/files/Security/WebEngine/ca-cert.pem b/files/Security/WebEngine/ca-cert.pem new file mode 100644 index 0000000000..e28684043c --- /dev/null +++ b/files/Security/WebEngine/ca-cert.pem @@ -0,0 +1,23 @@ +-----BEGIN CERTIFICATE----- +MIIDyzCCArOgAwIBAgIJAM6Tk4KJmUgsMA0GCSqGSIb3DQEBCwUAMHwxCzAJBgNV +BAYTAlVBMQ8wDQYDVQQIDAZPZGVzc2ExDzANBgNVBAcMBk9kZXNzYTEPMA0GA1UE +CgwGTHV4b2Z0MQ0wCwYDVQQLDARGVENOMQ8wDQYDVQQDDAZMdXgtQ0ExGjAYBgkq +hkiG9w0BCQEWC2NhQGZ0Y24uY29tMB4XDTIwMDExMDE0MzA1OFoXDTIyMTAwNjE0 +MzA1OFowfDELMAkGA1UEBhMCVUExDzANBgNVBAgMBk9kZXNzYTEPMA0GA1UEBwwG +T2Rlc3NhMQ8wDQYDVQQKDAZMdXhvZnQxDTALBgNVBAsMBEZUQ04xDzANBgNVBAMM +Bkx1eC1DQTEaMBgGCSqGSIb3DQEJARYLY2FAZnRjbi5jb20wggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQDWEz7yGIAEs6w/7CdMjkZ5J0O9IghL0f9wZVFO +ficeREJglClInPrD7BwG7MG1tydPULbrf1rXgxi1NdDY+lsJLFmkxrGVlgJUJl55 +cGpWGliTUepfPz/6CgIabRw2fEMx/eIUlcE+WjY+f4uowVyRYjmNj7IydlQ5UjcL +wWhjg1QMcjgmDzh8Jdx8I+JHYuOP9CtEEfFZy5DjVPFDSlTYhhnNclfw+4NkOYcs +hp+EcMBr6egfxpG2dZbdCJtGw6QqHGG7kqqtLr+9wM5VFhuvebus5waM1G18dIME +SgZmDdgvHO3bbylR+DRmAjJVn4DaDW6uszK9MSPsk53idOUXAgMBAAGjUDBOMB0G +A1UdDgQWBBSSRwc4sGpz6V1kb0H371ZqhDuQDzAfBgNVHSMEGDAWgBSSRwc4sGpz +6V1kb0H371ZqhDuQDzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQCb +ZYtM2nrokFL1D34bhozrLu0MxWwDF+gQrUsRr45s63Y5Pv7BVvuS6gF2MubMXskw +mVeCerFw2vQHJKqe7leTy69hwIydPxPQWWno7MamwBDm3VQThr+b18rEpcjbmBMm +p50usYzU9nxEEbIaiSbxfuZNvInLNmvMhKnKO/CIazJnYin9TGdOj9vZnh0UkWF3 +780mMBisycfxG+VwPXQZz5OzWWFB1uMiYrRVdwU6Y5umc2Oce7+ykWy+fXeefMhb +lLJXHZK584qY/krmW0Ec6ZWSbiWcLW5SjGh756n05gBGLDBwijHnfEHNaqn+KlnZ +qqIAImNTA9F+DlMQ7BV3 +-----END CERTIFICATE----- diff --git a/files/Security/WebEngine/client-cert.pem b/files/Security/WebEngine/client-cert.pem new file mode 100644 index 0000000000..47e85876c8 --- /dev/null +++ b/files/Security/WebEngine/client-cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDeDCCAmACAQIwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVUExDzANBgNV +BAgMBk9kZXNzYTEPMA0GA1UEBwwGT2Rlc3NhMQ8wDQYDVQQKDAZMdXhvZnQxDTAL +BgNVBAsMBEZUQ04xDzANBgNVBAMMBkx1eC1DQTEaMBgGCSqGSIb3DQEJARYLY2FA +ZnRjbi5jb20wHhcNMjAwMTEwMTQzODQxWhcNMjIxMDA2MTQzODQxWjCBhzELMAkG +A1UEBhMCVUExDTALBgNVBAgMBEt5aXYxDTALBgNVBAcMBEt5aXYxDzANBgNVBAoM +Bkx1eG9mdDEVMBMGA1UECwwMQXBwc0VueXdoZXJlMRIwEAYDVQQDDAlsb2NhbGhv +c3QxHjAcBgkqhkiG9w0BCQEWD2NsaWVudEBmdGNuLmNvbTCCASIwDQYJKoZIhvcN +AQEBBQADggEPADCCAQoCggEBALV4qI/gRvVip3u5JtT+n+7j7gUsUVW5DtwHruIy +drzNvQbG1Ukd3EXvU69HTG4BtoDRubqlSe/sjvO5Ypmg/UvpzV36IbjrA46s98uR +T6fKpJU/Zl2zwAHH++iWpFo3mqIDmu7i0KVBieKaGpz+Ft0zh7wHAztS7b6Mjns4 +QynpjDO+iaLIaHqBjc1hLn8dIBXNolOtLu8F8CL7RLRpWP2I2Fk2k0+Q5YKajbil +gptA53Uu55wCBVLTOfUYzTarGwS00+7txLY06g2x20FHD8UQxfCK7kSAeZwSNkbt +SUhXc9OWUvT1uggb2/wBHJN3fwj7y6pvzUJy7p09212hw7UCAwEAATANBgkqhkiG +9w0BAQsFAAOCAQEAjfASZwfJMTPKk45XVbvuNqdlbiI20SNV7pQQ/FqTBKbFmh4g +ndNCvECmBEUH5YdZegiGaONQlsQujmtIkguu3HnA0+2pO2SncmK6D1DLzJv1IFDC +25tTStA6806hWcTK31sxEbi5/aPdy7FMmsRfyhRr/yew0TqlWCVOfJRwgDSc3NKH +/AXgDBrqHzSBegnWe9v3xL8NxehFp41dJG2fyUab03cHzmNtR9v7/NrBglSdK9VS +AU4BCmjmvYlbvmvhZai23y+uLqzlWZ9OtK3qhEWkg6QHor11iBvxBQFeYKp1ZjMl +sQuTxyBLmXOZ/u3hkqLcKvasx9W4DmmPjG2T8Q== +-----END CERTIFICATE----- diff --git a/files/Security/WebEngine/client-key.pem b/files/Security/WebEngine/client-key.pem new file mode 100644 index 0000000000..b286854bd5 --- /dev/null +++ b/files/Security/WebEngine/client-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC1eKiP4Eb1Yqd7 +uSbU/p/u4+4FLFFVuQ7cB67iMna8zb0GxtVJHdxF71OvR0xuAbaA0bm6pUnv7I7z +uWKZoP1L6c1d+iG46wOOrPfLkU+nyqSVP2Zds8ABx/volqRaN5qiA5ru4tClQYni +mhqc/hbdM4e8BwM7Uu2+jI57OEMp6YwzvomiyGh6gY3NYS5/HSAVzaJTrS7vBfAi ++0S0aVj9iNhZNpNPkOWCmo24pYKbQOd1LuecAgVS0zn1GM02qxsEtNPu7cS2NOoN +sdtBRw/FEMXwiu5EgHmcEjZG7UlIV3PTllL09boIG9v8ARyTd38I+8uqb81Ccu6d +PdtdocO1AgMBAAECggEALiPCf+pfQE7YFJ4L4IXo9h1fzFLrTydhPtJ5RavdAr4w +vINbgV6lPebO2TcAmMu4smIgnfMerHDyG8fb6QHExUNp4uYRIuomGmWiD1Ef9qKQ +XB4lkdd9Dzbgts9udD3FBEJ0Zx6mPA5A16uk7puwBofukAEccj3wks08ANpaQVJh +LoYQdVY9Q2QHUucED9uO2hOv66bDM5aunk0x4Q/b0gIOAnJyqk0xXnmnU76FbkgI +bU3YQ73ZEJKTFLF8B2JaE9REASmHyLQChYqGA9SPdObVhgxJ8gz5AWp5yHgMmYjf +Dp66tCsyGnmfgTlG4Wi13HInxLpRWDWT2JWIy9cUlQKBgQDshRq/rTj4tuVW09hX +bWlAEV2IDn7JOWEZqPagnxew0atqow44VORW+OoUZ5760aOVjvmXeyGXpWCJk5ch +qsFRL9rLRzIy9oC6C/chkJQAprcaOBOSXvj3HnFHVChjbIBENf4dvtsYZHOW42h2 +br0kszv1bbBzVIyTTY0OvGsBUwKBgQDEauIuC6RiDN+qFAf4/lHkUx7wG6DPhvDm +EhpkiVEHYVjH5vm132/cc12y9CvsFS4MJPK4KQR9P+HFhEu/uH3uLa1vvKY+69iU +dZ1bfe4UrEm/bwBepDSbqlQk58WC6NyJ6fwMq0BYJVvx593znEbU2wLVUTm8H7l2 +yzyxQwXd1wKBgBkYvo/cJ5FshsVB0VDlkSd1MEGBmD5t0jnQzeqZNwBSHyg/iQC9 +MUVxQBVOMXZXzE3QT/ec3yGiMK4odP7jiYO92i97rH3v3hTftCdhmfK/veoQTTNY +1H4UQtzYtzhliO6z8/TgDYt3DTTTiIAYnAVK52/RZcm3DPuMXQ1VPN11AoGBAIN5 +eASSTmpDa8OQvPVyZqaK7P6Tv8Sp8r5OB9ScBd0G0EKe3S9cbKgHoQSUZIIWe0gt +wzp6WkLsa9emgn3GpKS1do6AnFcpz0MwpzACz0aPPJ4jUwAGsiAwlzpM2eySqmy2 +brycNOnLuAvoxKy4QsFgCDl5sUe3hJF74RhWYKrpAoGAUrJMF5IaAAsv367nD8CX +CfDsDlez54H/sZD7iKj8LhyuspAQBU3vQ3xKfaKRi4px8bgnty3stOMZxEC7I6BC +jHH1hQK8l9nqRhOjPvoViUM6aOpabCkVsOZjWKD+OCz3X9+MmlGkMuNd22GRdwlb +Emb3yEoFr5vDbez0IQNxnLs= +-----END PRIVATE KEY----- diff --git a/files/Security/WebEngine/server-cert.pem b/files/Security/WebEngine/server-cert.pem new file mode 100644 index 0000000000..d2b1cf0ec8 --- /dev/null +++ b/files/Security/WebEngine/server-cert.pem @@ -0,0 +1,21 @@ +-----BEGIN CERTIFICATE----- +MIIDdDCCAlwCAQEwDQYJKoZIhvcNAQELBQAwfDELMAkGA1UEBhMCVUExDzANBgNV +BAgMBk9kZXNzYTEPMA0GA1UEBwwGT2Rlc3NhMQ8wDQYDVQQKDAZMdXhvZnQxDTAL +BgNVBAsMBEZUQ04xDzANBgNVBAMMBkx1eC1DQTEaMBgGCSqGSIb3DQEJARYLY2FA +ZnRjbi5jb20wHhcNMjAwMTEwMTQzMzM2WhcNMjIxMDA2MTQzMzM2WjCBgzELMAkG +A1UEBhMCVUExDzANBgNVBAgMBk9kZXNzYTEPMA0GA1UEBwwGT2Rlc3NhMQ8wDQYD +VQQKDAZMdXhvZnQxDTALBgNVBAsMBEZUQ04xEjAQBgNVBAMMCWxvY2FsaG9zdDEe +MBwGCSqGSIb3DQEJARYPc2VydmVyQGZ0Y24uY29tMIIBIjANBgkqhkiG9w0BAQEF +AAOCAQ8AMIIBCgKCAQEApnW3zyWadWiD1eMPszMM0Hyzm3Zd6mr21LMtQMwqw10p +PxMpZLo0rgCkJevVRxO/y4J+TcE9LtralzzsWK+DD/i2Gf8CfAOapcDETJ8b68jM +rUMwmN3tdiEBqimHBKEKIgDOiJt2Y08Jw2AWR41LuyjtD+IWSWo1kqJF3rxpsfz0 +SfTQWkvHVXg1c0qbfsp2i82Nvt5HzvDdk0jzX+GNHSmkUECcE0GIhK8GHxAFYugk +siRU/tgY/wzP9iUkj7UbPWb5k+d8Z3sqUFpVAa4dXhIzx5L0l5peXvhunYqr7Vk+ +cfBAHIQZKJa7coBBahA7gjBylz+BbIOadGYYoYZVBQIDAQABMA0GCSqGSIb3DQEB +CwUAA4IBAQDNUMIv6X9scvVN8II/PbvvQzWAxi0qzDejnEF579PA9MCNt6JY20lj +JTscUN5lWNuLGJtkUuscBMBYe21ePtGeS855Q6csoUe6m0fnY+ybKVYIKk+SL5Hx +1vurBIsHOyX6097e8VIzWyxcWW1074oTYLpYfEWr0vECrGodoXGtPdEeyB0+QdbI +H0Pcngqu5yLoWxoWwuAj94YG7eX3sJv6PXOW71i4yMmT8ToYNXFwqTK/xq/pl6H2 +KH150zDNOaE2Z5+u21Elau+3qWPWQ6C9KpxhmJ/iDftRe+hgMISSygYK0nwk0zk4 +rmNODAeuTvsrh9bNsYQfjERsh0VYaG24 +-----END CERTIFICATE----- diff --git a/files/Security/WebEngine/server-key.pem b/files/Security/WebEngine/server-key.pem new file mode 100644 index 0000000000..6ff13eaf28 --- /dev/null +++ b/files/Security/WebEngine/server-key.pem @@ -0,0 +1,28 @@ +-----BEGIN PRIVATE KEY----- +MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCmdbfPJZp1aIPV +4w+zMwzQfLObdl3qavbUsy1AzCrDXSk/EylkujSuAKQl69VHE7/Lgn5NwT0u2tqX +POxYr4MP+LYZ/wJ8A5qlwMRMnxvryMytQzCY3e12IQGqKYcEoQoiAM6Im3ZjTwnD +YBZHjUu7KO0P4hZJajWSokXevGmx/PRJ9NBaS8dVeDVzSpt+ynaLzY2+3kfO8N2T +SPNf4Y0dKaRQQJwTQYiErwYfEAVi6CSyJFT+2Bj/DM/2JSSPtRs9ZvmT53xneypQ +WlUBrh1eEjPHkvSXml5e+G6diqvtWT5x8EAchBkolrtygEFqEDuCMHKXP4Fsg5p0 +ZhihhlUFAgMBAAECggEBAJ35UfuxACk0iwlNd/TlGeAyuHFtoCt8X8v0T5oTKPJH +U4GcucfyP1RzH1Utvza5M2f768n2/g2dfZ3SH6r6xjM+IfQB42W2NengS2s8BM97 +vWMhRNmOpHFbWa0XxB9MhcVHZrqWb4BH3kggxIQbQCfa60ALnIMH3NfQUObVgKl8 +khPU3fWx5zH2fbLNiLbImr5U5ViNoOKw592cmAEocIgIE33SDf2LHuuByikb38/r +98bAp6IdNhRb7qY/Jllq3fu06fLubGQusVT01vu3sp//G2gCzFwp0O/qX2M1JBPS +JYKKGXrNxeaQNzzD6cEcSkADpZvIG/CmmnR9u/FjIXECgYEA2palcAJKXPWsnwLb +QtDd7MQ6sG3qvkCaiiDsn5BAGkxn1rZ3NRGMxBx4Fb9oiIl6SBpQ/YdMkd7tMkLX +MEmbPyOcHPnsxcCqeFGsiTejpx1OyPSUAtxtpxGc/D63wCPhHGO3xNdQ2FiYb5K3 +jG8cslE39gH+/9XSN8kS2gZZ4d8CgYEAwvMUbXSBYx01I+jjqsjSI9afk3w9VwKM +vuW9MgUBYLP5ryadNqt2cuHydT5KJiZ7YUQSLNztZ++g5WR7yamWpLzoGFmrSyWb +304xA9jdLRJHMsBM0V32abdfTV5+EW+24309UmcaUtsQoUTxXOSqwDaHF4Mq1zLg +jwb2phYlzZsCgYEAtz5q2gdRh7R8TaD7ZnvqTz4BZT3/+BX4d6s6MlmfI2zB8AFu +1ZIsy4qCMNkRLMTzOda15pOx4OddOTFHbDeIadnUWYY6s1zci5kMZsu56bJsBZLj +MbLQSao+TEfXir+JS19dAyrtnzBGOeJo9NWA3QuxOg5aUuZRIGrz3spMN0kCgYB3 +ZLnpAwZO9k9aS8JLESypqEMY52kFxdj+/OKvJKOgXvkWzPZRyhcD6t878McmsEC1 +5COheDipg/etJaouan+JKuyWJSykHEdnLpMUQRfMB7q1GVKykvJb8mMaljltYlbG +4ifRNLXJcsKvkfKkKqNsjriTrNBq9YzT67bZJw1F6wKBgGlEd9O+qWY4dSPKN60N +khG1Splz+eBbbsqcISeFGZepEc4HaEIcYgIHTh8nw5ycYxh8A1UBdaBZmU9UHdfl +j9M2u0htKZ27ntVVNZJCLeSgufaPUDIfvnK4o5q630NGhKJmVcYD3WeggIrPfca3 +fP8WaHq9fx5k4YZokD2VHOJb +-----END PRIVATE KEY----- diff --git a/test_scripts/API/SetAppIcon/commonIconResumed.lua b/test_scripts/API/SetAppIcon/commonIconResumed.lua index 9ba91a125c..a06587fd63 100644 --- a/test_scripts/API/SetAppIcon/commonIconResumed.lua +++ b/test_scripts/API/SetAppIcon/commonIconResumed.lua @@ -165,7 +165,7 @@ end --]] function m.closeConnection() EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) - test.mobileConnection:Close() + actions.mobile.disconnect() end --[[ @openConnection: Open mobile connection successfully diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/032_Subscription_resumption_for_VDitems_2_apps_unexpected_disconnect.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/032_Subscription_resumption_for_VDitems_2_apps_unexpected_disconnect.lua index e88c4cafd7..fe26029a08 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/032_Subscription_resumption_for_VDitems_2_apps_unexpected_disconnect.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/032_Subscription_resumption_for_VDitems_2_apps_unexpected_disconnect.lua @@ -72,7 +72,9 @@ local function registerApps() common.getMobileSession(appSessionIdForApp2):ExpectResponse(corId2, { success = true, resultCode = "SUCCESS" }) :Do(function() common.getMobileSession(appSessionIdForApp2):ExpectNotification("OnHMIStatus", - { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) common.getMobileSession(appSessionIdForApp2):ExpectNotification("OnPermissionsChange") end) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/033_Subscription_resumption_for_VDitems_2_apps_ign_off.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/033_Subscription_resumption_for_VDitems_2_apps_ign_off.lua index 5f38fc3216..ad090bbb43 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/033_Subscription_resumption_for_VDitems_2_apps_ign_off.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/033_Subscription_resumption_for_VDitems_2_apps_ign_off.lua @@ -72,7 +72,9 @@ local function registerApps() common.getMobileSession(appSessionIdForApp2):ExpectResponse(corId2, { success = true, resultCode = "SUCCESS" }) :Do(function() common.getMobileSession(appSessionIdForApp2):ExpectNotification("OnHMIStatus", - { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }, + { hmiLevel = "FULL", audioStreamingState = "AUDIBLE", systemContext = "MAIN" }) + :Times(2) common.getMobileSession(appSessionIdForApp2):ExpectNotification("OnPermissionsChange") end) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua index 9c3cda708e..4c56917e6c 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua @@ -861,13 +861,9 @@ function common.ignitionOff() end function common.unexpectedDisconnect() - test.mobileConnection:Close() common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) - :Do(function() - for i = 1, common.getAppsCount() do - test.mobileSession[i] = nil - end - end) + :Times(actions.mobile.getAppsCount()) + actions.mobile.disconnect() end function common.connectMobile() diff --git a/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua b/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua index cb53eea034..5506695449 100644 --- a/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua +++ b/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua @@ -109,13 +109,8 @@ local function reRegisterApp(pAppId) end local function unexpectedDisconnect() - test.mobileConnection:Close() common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) - :Do(function() - for i = 1, common.getAppsCount() do - test.mobileSession[i] = nil - end - end) + common.mobile.disconnect() end local function connectMobile() diff --git a/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua b/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua index b026d6e811..0c4e021176 100644 --- a/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua +++ b/test_scripts/CloudAppRPCs/012_Same_app_name_mobile_app_Disallowed.lua @@ -19,6 +19,11 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/CloudAppRPCs/commonCloudAppRPCs') local utils = require("user_modules/utils") +--[[ Conditions to scik test ]] +if config.defaultMobileAdapterType == "WS" or config.defaultMobileAdapterType == "WSS" then + runner.skipTest("Test is not applicable for WS/WSS connection") +end + --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false diff --git a/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua b/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua index 087e79d2c3..e00de5d793 100644 --- a/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua +++ b/test_scripts/CloudAppRPCs/013_Same_app_name_mobile_app_Unregistered.lua @@ -23,6 +23,11 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/CloudAppRPCs/commonCloudAppRPCs') local utils = require("user_modules/utils") +--[[ Conditions to scik test ]] +if config.defaultMobileAdapterType == "WS" or config.defaultMobileAdapterType == "WSS" then + runner.skipTest("Test is not applicable for WS/WSS connection") +end + --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false diff --git a/test_scripts/Defects/4_5/1376_PTU_all_flows.lua b/test_scripts/Defects/4_5/1376_PTU_all_flows.lua index 0fef6dd9fd..1232693884 100644 --- a/test_scripts/Defects/4_5/1376_PTU_all_flows.lua +++ b/test_scripts/Defects/4_5/1376_PTU_all_flows.lua @@ -10,6 +10,7 @@ local json = require("modules/json") local atf_logger = require("atf_logger") local sdl = require("SDL") local commonSteps = require("user_modules/shared_testcases/commonSteps") +local utils = require ('user_modules/utils') --[[ General configuration parameters ]] config.mobileHost = "127.0.0.1" @@ -34,23 +35,13 @@ end -- Allow device from HMI local function allowSDL(self) - local function getDeviceName() - return config.mobileHost .. ":" .. config.mobilePort - end - local function getDeviceMAC() - local cmd = "echo -n " .. getDeviceName() .. " | sha256sum | awk '{printf $1}'" - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() - return result - end -- sending notification OnAllowSDLFunctionality from HMI to allow connected device self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", { allowed = true, source = "GUI", device = { - id = getDeviceMAC(), - name = getDeviceName() + id = utils.getDeviceMAC(), + name = utils.getDeviceName() } }) end diff --git a/test_scripts/Defects/4_5/1892_HB_from_SDL_after_receiving_HB_from_mobile.lua b/test_scripts/Defects/4_5/1892_HB_from_SDL_after_receiving_HB_from_mobile.lua index 520aa7c5ac..d6c9138002 100644 --- a/test_scripts/Defects/4_5/1892_HB_from_SDL_after_receiving_HB_from_mobile.lua +++ b/test_scripts/Defects/4_5/1892_HB_from_SDL_after_receiving_HB_from_mobile.lua @@ -23,7 +23,6 @@ local mobile_session = require('mobile_session') local constants = require('protocol_handler/ford_protocol_constants') local events = require('events') local mobile = require('mobile_connection') -local tcp = require('tcp_connection') local file_connection = require('file_connection') --[[ General configuration parameters ]] @@ -83,8 +82,8 @@ end --! @return: none local function OpenConnectionCreateSession(self) config.defaultProtocolVersion = 3 - local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) - local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + local mobileAdapter = self.getDefaultMobileAdapter() + local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) self.mobileConnection = mobile.MobileConnection(fileConnection) self.mobileSession1= mobile_session.MobileSession(self, self.mobileConnection) event_dispatcher:AddConnection(self.mobileConnection) diff --git a/test_scripts/Defects/4_5/commonDefects.lua b/test_scripts/Defects/4_5/commonDefects.lua index 7fceba0f0d..3994ea353d 100644 --- a/test_scripts/Defects/4_5/commonDefects.lua +++ b/test_scripts/Defects/4_5/commonDefects.lua @@ -18,6 +18,7 @@ local sdl = require("SDL") local mobile_session = require("mobile_session") local events = require("events") local json = require("modules/json") +local utils = require ('user_modules/utils') --[[ Local Variables ]] @@ -161,21 +162,13 @@ end --! @parameters: none --! @return: device name --]] -function commonDefect.getDeviceName() - return config.mobileHost .. ":" .. config.mobilePort -end +commonDefect.getDeviceName = utils.getDeviceName --[[ @getDeviceMAC: provides device MAC address --! @parameters: none --! @return: device MAC address --]] -function commonDefect.getDeviceMAC() - local cmd = "echo -n " .. commonDefect.getDeviceName() .. " | sha256sum | awk '{printf $1}'" - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() - return result -end +commonDefect.getDeviceMAC = utils.getDeviceMAC --[[ @allow_sdl: sequence that allows SDL functionality --! @parameters: diff --git a/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua b/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua index e189835675..2d8351560c 100644 --- a/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua +++ b/test_scripts/Defects/6_1/974_updateDeviceList_after_closingConnection.lua @@ -8,6 +8,12 @@ local utils = require("user_modules/utils") local actions = require("user_modules/sequences/actions") local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local test = require("user_modules/dummy_connecttest") +local SDL = require("SDL") + +--[[ Conditions to skip test ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false @@ -20,6 +26,22 @@ local deviceParams = { } --[[ Local Functions ]] +local function getUpdatedDeviceList(pExp) + if SDL.buildOptions.webSocketServerSupport == "ON" then + local weDevice = { + name = "Web Engine", + transportType = "WEBENGINE_WEBSOCKET" + } + local pos = 1 + if pExp[pos] ~= nil then + table.insert(pExp, pos, weDevice) + else + pExp[pos] = weDevice + end + end + return pExp +end + local function start() test:runSDL() commonFunctions:waitForSDLStart(test) @@ -39,9 +61,9 @@ local function ConnectDeviceNonEmptyDeviceList() test:connectMobile() EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = getUpdatedDeviceList({ deviceParams - } + }) }) :Do(function(_,data) actions.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) @@ -53,9 +75,9 @@ local function UpdateDeviceListNonEmptyDeviceList() hmiConnection:SendNotification("BasicCommunication.OnStartDeviceDiscovery") EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = getUpdatedDeviceList({ deviceParams - } + }) }) :DoOnce(function(_,data) hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) @@ -75,7 +97,7 @@ local function UpdateDeviceListNonEmptyDeviceList() }) end) :ValidIf(function(_,data) - if #data.params.deviceList ~= 1 then + if #data.params.deviceList ~= #getUpdatedDeviceList({ deviceParams }) then commonFunctions:userPrint(31, "deviceList array in UpdateDeviceList contains not one device in list." .. " Received elements number '" .. tostring(#data.params.deviceList) .. "'") return false @@ -109,7 +131,7 @@ local function UpdateDeviceListEmptyDeviceListAfterConnectionIsClosed() hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) :ValidIf(function(_,data) - if #data.params.deviceList ~= 0 then + if #data.params.deviceList ~= #getUpdatedDeviceList({ }) then return false, "deviceList array in UpdateDeviceList is not empty. Received elements number '" .. tostring(#data.params.deviceList) .. "'" else diff --git a/test_scripts/Defects/commonDefects.lua b/test_scripts/Defects/commonDefects.lua index c0fb36e806..babb5fc2f7 100644 --- a/test_scripts/Defects/commonDefects.lua +++ b/test_scripts/Defects/commonDefects.lua @@ -19,6 +19,7 @@ local mobile_session = require("mobile_session") local events = require("events") local json = require("modules/json") local actions = require("user_modules/sequences/actions") +local utils = require ('user_modules/utils') --[[ Local Variables ]] @@ -162,21 +163,13 @@ end --! @parameters: none --! @return: device name --]] -function commonDefect.getDeviceName() - return config.mobileHost .. ":" .. config.mobilePort -end +commonDefect.getDeviceName = utils.getDeviceName --[[ @getDeviceMAC: provides device MAC address --! @parameters: none --! @return: device MAC address --]] -function commonDefect.getDeviceMAC() - local cmd = "echo -n " .. commonDefect.getDeviceName() .. " | sha256sum | awk '{printf $1}'" - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() - return result -end +commonDefect.getDeviceMAC = utils.getDeviceMAC --[[ @allow_sdl: sequence that allows SDL functionality --! @parameters: diff --git a/test_scripts/MobileProjection/Phase1/common.lua b/test_scripts/MobileProjection/Phase1/common.lua index b7fdf9f4ba..ca3d282b80 100644 --- a/test_scripts/MobileProjection/Phase1/common.lua +++ b/test_scripts/MobileProjection/Phase1/common.lua @@ -72,9 +72,9 @@ function m.StopStreaming(pService, pFile, pAppId) if not pAppId then pAppId = 1 end m.getMobileSession(pAppId):StopStreaming(pFile) if pService == 11 then - m.getHMIConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }) + m.getHMIConnection():ExpectNotification("Navigation.OnVideoDataStreaming", { available = false }):Timeout(15000) else - m.getHMIConnection():ExpectNotification("Navigation.OnAudioDataStreaming", { available = false }) + m.getHMIConnection():ExpectNotification("Navigation.OnAudioDataStreaming", { available = false }):Timeout(15000) end end diff --git a/test_scripts/MobileProjection/Phase2/019_SDL_stop_audio_video.lua b/test_scripts/MobileProjection/Phase2/019_SDL_stop_audio_video.lua index bf52f8a6a5..aa31ca5d62 100644 --- a/test_scripts/MobileProjection/Phase2/019_SDL_stop_audio_video.lua +++ b/test_scripts/MobileProjection/Phase2/019_SDL_stop_audio_video.lua @@ -75,7 +75,15 @@ local function expectEndService(pServiceId) and data.sessionId == common.getMobileSession().mobile_session_impl.control_services.session.sessionId.get() and data.frameInfo == constants.FRAME_INFO.END_SERVICE end - return common.getMobileSession():ExpectEvent(event, "EndService") + local ret = common.getMobileSession():ExpectEvent(event, "EndService") + ret:Do(function() + common.getMobileSession():Send({ + frameType = constants.FRAME_TYPE.CONTROL_FRAME, + serviceType = pServiceId, + frameInfo = constants.FRAME_INFO.END_SERVICE_ACK + }) + end) + return ret end local function changeAudioSource() diff --git a/test_scripts/MobileProjection/Phase2/smoke/019_SDL_stop_audio_video.lua b/test_scripts/MobileProjection/Phase2/smoke/019_SDL_stop_audio_video.lua index bf52f8a6a5..a587736211 100644 --- a/test_scripts/MobileProjection/Phase2/smoke/019_SDL_stop_audio_video.lua +++ b/test_scripts/MobileProjection/Phase2/smoke/019_SDL_stop_audio_video.lua @@ -75,7 +75,14 @@ local function expectEndService(pServiceId) and data.sessionId == common.getMobileSession().mobile_session_impl.control_services.session.sessionId.get() and data.frameInfo == constants.FRAME_INFO.END_SERVICE end - return common.getMobileSession():ExpectEvent(event, "EndService") + local ret = common.getMobileSession():ExpectEvent(event, "EndService") + ret:Do(function() + common.getMobileSession():Send({ + frameType = constants.FRAME_TYPE.CONTROL_FRAME, + serviceType = pServiceId, + frameInfo = constants.FRAME_INFO.END_SERVICE_ACK + }) + end) end local function changeAudioSource() diff --git a/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua b/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua index bd76b81b36..92ca77fe28 100644 --- a/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua +++ b/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua @@ -76,11 +76,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() @@ -109,7 +110,7 @@ function Test:Register_App_And_Check_Order_Of_Request_Response_Notiofications() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } }) EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) diff --git a/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua b/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua index 3bd5c41994..b423fa033e 100644 --- a/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua +++ b/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua @@ -70,11 +70,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() @@ -103,7 +104,7 @@ function Test:Step1_Register_App_And_Check_Its_Permissions_In_OnPermissionsChang { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } }) :Do(function(_,data) diff --git a/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua b/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua index d4713040d0..0f291c1fb4 100644 --- a/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua +++ b/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua @@ -38,8 +38,6 @@ local commonFunctions = require ('user_modules/shared_testcases/commonFunctions' local commonSteps = require ('user_modules/shared_testcases/commonSteps') local commonTestCases = require ('user_modules/shared_testcases/commonTestCases') local commonPreconditions = require ('user_modules/shared_testcases/commonPreconditions') -local testCasesForPolicyTableSnapshot = require ('user_modules/shared_testcases/testCasesForPolicyTableSnapshot') -local testCasesForPolicyTable = require ('user_modules/shared_testcases/testCasesForPolicyTable') local utils = require ('user_modules/utils') --[[ General Precondition before ATF start ]] @@ -59,11 +57,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() @@ -108,7 +107,7 @@ function Test:Precondition_Activate_App_And_Consent_Device() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua b/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua index 42619df935..5119ed0d03 100644 --- a/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua +++ b/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua @@ -38,7 +38,6 @@ local commonFunctions = require ('user_modules/shared_testcases/commonFunctions' local commonSteps = require ('user_modules/shared_testcases/commonSteps') local commonTestCases = require ('user_modules/shared_testcases/commonTestCases') local commonPreconditions = require ('user_modules/shared_testcases/commonPreconditions') -local testCasesForPolicyTable = require ('user_modules/shared_testcases/testCasesForPolicyTable') local utils = require ('user_modules/utils') --[[ General Precondition before ATF start ]] @@ -58,11 +57,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() @@ -107,7 +107,7 @@ function Test:Precondition_Activate_App_And_Consent_Device() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua b/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua index c0c2541315..bd24215508 100644 --- a/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua +++ b/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua @@ -46,11 +46,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() @@ -92,7 +93,7 @@ function Test:Precondition_Activate_App_And_Consent_Device() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua b/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua index b333c0f5d3..71efe1ea14 100644 --- a/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua +++ b/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua @@ -41,11 +41,12 @@ local mobile_session = require("mobile_session") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() diff --git a/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua b/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua index d08dcd3a02..c5fae9aba5 100644 --- a/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua +++ b/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua @@ -46,11 +46,12 @@ local mobile_session = require("mobile_session") function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { { id = utils.getDeviceMAC(), name = utils.getDeviceName(), transportType = "WIFI", isSDLAllowed = false} } }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_StartNewSession() @@ -117,13 +118,16 @@ function Test:Preconditions_Update_Policy_With_Steal_Focus_FalseValue_for_Curren end) end ---[[Test]] -commonFunctions:newTestCasesGroup("Test") +function Test.Wait() + os.execute("sleep 2") +end +--[[Test]] function Test:TestStep_UpdatePTS() testCasesForPolicyTable:trigger_user_request_update_from_HMI(self) end +commonFunctions:newTestCasesGroup("Test") function Test:TestStep_Verify_appid_section() local test_fail = false local steal_focus = testCasesForPolicyTableSnapshot:get_data_from_PTS("app_policies.123456.steal_focus") diff --git a/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua b/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua index 32480dd8cf..326b3d8a2b 100644 --- a/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua +++ b/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua @@ -81,7 +81,7 @@ function Test:TestStep_Firs_Time_Register_App_And_Check_That_No_Permission_Notif { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua b/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua index 06ad355ebe..a0e9011103 100644 --- a/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua +++ b/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua @@ -147,7 +147,7 @@ function Test:TestStep_Update_PT_With_Another_NickName_For_Current_App_And_Check { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } @@ -182,19 +182,14 @@ function Test:TestStep_Update_PT_With_Another_NickName_For_Current_App_And_Check EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function() local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", {fileName = "PolicyTableUpdate", requestType = "PROPRIETARY"}, "files/PTFromCloud_Nickname_validation.json") - local systemRequestId + self.mobileSession:ExpectResponse(CorIdSystemRequest, {success = true, resultCode = "SUCCESS"}) EXPECT_HMICALL("BasicCommunication.SystemRequest") :Do(function(_,data) - systemRequestId = data.id + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" }) - local function to_run() - self.hmiConnection:SendResponse(systemRequestId, "BasicCommunication.SystemRequest", "SUCCESS", {}) - self.mobileSession:ExpectResponse(CorIdSystemRequest, {success = true, resultCode = "SUCCESS"}) - end - RUN_AFTER(to_run, 800) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}):Timeout(500) end) end) diff --git a/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua b/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua index 990410c36e..3711cb7b2e 100644 --- a/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua +++ b/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua @@ -145,7 +145,7 @@ function Test:Precondition_Register_App_Activate_And_consent_Device() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua b/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua index ad25f178f8..79a6c6bde9 100644 --- a/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua +++ b/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua @@ -137,7 +137,7 @@ function Test:TestStep_Register_App_With_Name_Listed_In_LPT() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua index 6c124a0e2f..727b784ce7 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua @@ -102,6 +102,7 @@ Test["TEST_NAME_OFF" .. "_Precondition_HMI_sends_OnAllowSDLFunctionality"] = fun --hmi side: send request SDL.OnAllowSDLFunctionality self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = false, source = "GUI"}) + self.mobileSession:ExpectNotification("OnPermissionsChange") end -------------------------------------------------------------------------- diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua index 1324c01769..70610c76cf 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua @@ -125,6 +125,7 @@ Test["TEST_NAME_OFF" .. "_Precondition_HMI_sends_OnAllowSDLFunctionality"] = fun --hmi side: send request SDL.OnAllowSDLFunctionality self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = false, source = "GUI"}) + self.mobileSession:ExpectNotification("OnPermissionsChange") end -------------------------------------------------------------------------- diff --git a/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua b/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua index be4484fcb9..2b5dad9310 100644 --- a/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua +++ b/test_scripts/Policies/HMI_PTU/008_reseting_timeout_after_receiving_OnSystemRequest.lua @@ -38,15 +38,17 @@ local function resetTimeoutAfterOnSystemRequest() common.hmi():SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) - common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) - :ValidIf(function() - local updateNeddedTime = timestamp() - local passedTime = updateNeddedTime - systemRequestTime -- in msec - -- timeout_after_x_seconds*1000 - convert timeout_after_x_seconds from sec to msec - if passedTime > timeout_after_x_seconds*1000 + inaccuracy or - passedTime < timeout_after_x_seconds*1000 - inaccuracy then - return false , "SDL timer was not updated. Expected time " .. timeout_after_x_seconds*1000 .. " ms. Actual time " - .. passedTime + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }):Times(AtLeast(1)) + :ValidIf(function(e) + if e.occurences == 1 then + local updateNeddedTime = timestamp() + local passedTime = updateNeddedTime - systemRequestTime -- in msec + -- timeout_after_x_seconds*1000 - convert timeout_after_x_seconds from sec to msec + if passedTime > timeout_after_x_seconds*1000 + inaccuracy or + passedTime < timeout_after_x_seconds*1000 - inaccuracy then + return false , "SDL timer was not updated. Expected time " .. timeout_after_x_seconds*1000 .. " ms. Actual time " + .. passedTime + end end return true end) diff --git a/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua b/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua index 97abf6fd18..2a233aa92d 100644 --- a/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua @@ -26,6 +26,7 @@ local commonSteps = require('user_modules/shared_testcases/commonSteps') local utils = require ('user_modules/utils') --[[ General Precondition before ATF start ]] +commonSteps:DeleteLogsFileAndPolicyTable() --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 testCasesForPolicyTable.Delete_Policy_table_snapshot() diff --git a/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua b/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua index 7c726b9660..b826429f81 100644 --- a/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua +++ b/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua @@ -147,7 +147,7 @@ function Test:TestStep_RegisterNewApp() local corId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) self.mobileSession2:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate", {file = "/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json"}) :Do(function(_,data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) diff --git a/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua b/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua index 845f364e26..682fc7a83a 100644 --- a/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua @@ -100,7 +100,7 @@ end function Test:TestStep_FinishPTU_ForAppId1() local SystemFilesPath = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") local CorIdSystemRequest = self.mobileSession:SendRPC ("SystemRequest", { requestType = "PROPRIETARY", fileName = "PolicyTableUpdate", appID = config.application1.registerAppInterfaceParams.fullAppID }, - "files/jsons/Policies/Policy_Table_Update/ptu.json") + "files/jsons/Policies/Policy_Table_Update/ptu_without_preloaded.json") EXPECT_HMICALL("BasicCommunication.SystemRequest") :Do(function(_,data) @@ -114,7 +114,7 @@ function Test:TestStep_FinishPTU_ForAppId1() }) end) --PTU is restarted because of trigger new application added. - :Do(function(_,_) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}, {status = "UPDATE_NEEDED"}):Times(2) end function Test:TestStep_CheckThatAppID_BothApps_Present_In_DataBase() diff --git a/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua b/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua index 0653706df2..6b2c600a68 100644 --- a/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua +++ b/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua @@ -69,7 +69,7 @@ function Test:Precondtion_Activate_App_Consent_Update() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } @@ -102,19 +102,14 @@ function Test:Precondtion_Activate_App_Consent_Update() EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function() local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", {fileName = "PolicyTableUpdate", requestType = "PROPRIETARY"}, "files/ptu_general.json") - local systemRequestId + self.mobileSession:ExpectResponse(CorIdSystemRequest, {success = true, resultCode = "SUCCESS"}) EXPECT_HMICALL("BasicCommunication.SystemRequest") :Do(function(_,data) - systemRequestId = data.id + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" }) - local function to_run() - self.hmiConnection:SendResponse(systemRequestId, "BasicCommunication.SystemRequest", "SUCCESS", {}) - self.mobileSession:ExpectResponse(CorIdSystemRequest, {success = true, resultCode = "SUCCESS"}) - end - RUN_AFTER(to_run, 800) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}):Timeout(500) end) end) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua b/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua index f84c1721fe..a49a6cd449 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua @@ -30,6 +30,7 @@ config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.deviceInfo.hardware = "Nexus" --[[ Local Variables ]] +local deviceFilter = ' where id = ' .. '"' .. utils.getDeviceMAC() .. '"' local TESTED_DATA = { preloaded_date = {"1988-12-01","2015-05-02"}, device = { @@ -206,7 +207,7 @@ function Test.checkLocalPT(checkTable) local isTestPass = true for _, check in pairs(checkTable) do expectedLocalPtValues = check.expectedValues - queryString = check.query + queryString = check.query .. deviceFilter actualLocalPtValues = executeSqliteQuery(queryString, constructPathToDatabase()) if actualLocalPtValues then comparationResult = isValuesCorrect(actualLocalPtValues, expectedLocalPtValues) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua b/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua index d05dac6083..62049b1621 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua @@ -198,7 +198,7 @@ function Test:Precondition_ActivateApp() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI", + transportType = utils.getDeviceTransportType(), isSDLAllowed = false } } diff --git a/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua index b46a281487..cb48b2f858 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua @@ -49,19 +49,12 @@ end function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end --[[ Test ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua index 809e0c6bcf..d8d1542f82 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua @@ -48,19 +48,12 @@ end function Test:Precondition_Connect_device() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end --[[ Test ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua index baf4fdb578..80a6bf13a9 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua @@ -121,7 +121,7 @@ function Test:TestStep_Get_HeartBeat_Time() end function Test:TestStep_Check_HB_Time() - if ( (HBTime_min < 3850) or (HBTime_max > 4150) ) then + if ( (HBTime_min < 3850) or (HBTime_max > 4200) ) then self:FailTestCase("Wrong HearBeat time! Expected: 4000ms, Actual: ["..HBTime_min.." ; "..HBTime_max.."]ms ") else print("HearBeat is in range ["..HBTime_min.." ; "..HBTime_max.."]ms ") diff --git a/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua b/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua index 6cc45ba439..53e8a6868e 100644 --- a/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua +++ b/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua @@ -57,14 +57,16 @@ function Test:TestStep_PoliciesManager_changes_status_UPDATING() self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + EXPECT_NOTIFICATION("OnSystemRequest")--, {requestType = "LOCK_SCREEN_ICON_URL"}, {requestType = "HTTP"}) + :Do(function(_,data) + print("SDL -> MOB: OnSystemRequest, requestType: " .. data.payload.requestType) + end) + :Times(2) + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", {application = { appName = config.application1.registerAppInterfaceParams.appName } }) :Do(function() - EXPECT_NOTIFICATION("OnSystemRequest")--, {requestType = "LOCK_SCREEN_ICON_URL"}, {requestType = "HTTP"}) - :Do(function(_,data) - print("SDL -> MOB: OnSystemRequest, requestType: " .. data.payload.requestType) - end) - :Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(2) :Do(function(exp,data) diff --git a/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua b/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua index 915104cb25..0101f9ed34 100644 --- a/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua +++ b/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua @@ -132,22 +132,23 @@ function Test:RAI_PTU() log("SDL->HMI: N: SDL.OnStatusUpdate", d2.params.status) end) :Times(3) - -- workaround due to issue in Mobile API: APPLINK-30390 - local onSystemRequestRecieved = false + end) - self.mobileSession:ExpectNotification("OnSystemRequest") - :Do( - function(_, d2) - log("SDL->MOB: N: OnSystemRequest, RequestType: "..d2.payload.requestType ) - if (not onSystemRequestRecieved) and (d2.payload.requestType == "HTTP") then - onSystemRequestRecieved = true - --log("SDL->MOB: N: OnSystemRequest") - ptu_table = json.decode(d2.binaryData) - ptu(self) - end - end) - :Times(2) + -- workaround due to issue in Mobile API: APPLINK-30390 + local onSystemRequestRecieved = false + + self.mobileSession:ExpectNotification("OnSystemRequest") + :Do( + function(_, d2) + log("SDL->MOB: N: OnSystemRequest, RequestType: "..d2.payload.requestType ) + if (not onSystemRequestRecieved) and (d2.payload.requestType == "HTTP") then + onSystemRequestRecieved = true + --log("SDL->MOB: N: OnSystemRequest") + ptu_table = json.decode(d2.binaryData) + ptu(self) + end end) + :Times(2) self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) :Do( diff --git a/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua b/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua index f848994aa8..257904dbca 100644 --- a/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua +++ b/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua @@ -78,20 +78,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_ConnectDevice() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - isSDLAllowed = true, - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_RegisterApp() diff --git a/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua b/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua index 909b38ed76..cb63b04aea 100644 --- a/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua +++ b/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua @@ -63,20 +63,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:ConnectMobile() self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :Times(AtLeast(1)) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:StartMobileSession() @@ -94,7 +86,7 @@ function Test:RegisterApp() { id = utils.getDeviceMAC(), name = utils.getDeviceName(), - transportType = "WIFI" + transportType = utils.getDeviceTransportType() } } }) diff --git a/test_scripts/Policies/build_options/089_ATF_Check_SDL_respond_GetURLs_Request_fromHMI_PROPRIETARY.lua b/test_scripts/Policies/build_options/089_ATF_Check_SDL_respond_GetURLs_Request_fromHMI_PROPRIETARY.lua index ec8c952b3e..e58535ec0d 100644 --- a/test_scripts/Policies/build_options/089_ATF_Check_SDL_respond_GetURLs_Request_fromHMI_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/089_ATF_Check_SDL_respond_GetURLs_Request_fromHMI_PROPRIETARY.lua @@ -39,20 +39,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:ConnectMobile() self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - }) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :Times(AtLeast(1)) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end --[[ Test ]] diff --git a/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua b/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua index 683bf4d248..1b4bf3dde8 100644 --- a/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua +++ b/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua @@ -20,7 +20,7 @@ Test = require('user_modules/connecttest_resumption') require('cardinalities') local mobile_session = require('mobile_session') -local tcp = require('tcp_connection') +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require('file_connection') local mobile = require('mobile_connection') local events = require('events') @@ -41,8 +41,9 @@ commonFunctions:SDLForceStop() commonSteps:DeleteLogsFileAndPolicyTable() --[[ Local variables ]] -local deviceMAC2 = "54286cb92365be544aa7008b92854b9648072cf8d8b17b372fd0786bef69d7a2" local mobileHost = "1.0.0.1" +local deviceMAC2 = "9cc72994ab9ca68c1daaf02834f7a94552e82aad3250778f2e12d14afee0a5c6" +local deviceName2 = mobileHost .. ":" .. config.mobilePort --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") @@ -50,20 +51,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device1() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :Times(AtLeast(1)) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_Register_app_1() @@ -101,8 +94,8 @@ function Test:Precondition_Activate_app_1() end function Test:Precondition_Connect_device_2() - local tcpConnection = tcp.Connection(mobileHost, config.mobilePort) - local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + local mobileAdapter = self.getDefaultMobileAdapter(mobileHost, config.mobilePort) + local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) self.connection2 = mobile.MobileConnection(fileConnection) self.mobileSession2 = mobile_session.MobileSession(self, self.connection2) event_dispatcher:AddConnection(self.connection2) @@ -111,16 +104,19 @@ function Test:Precondition_Connect_device_2() EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { deviceList = { + { + id = deviceMAC2, + name = deviceName2 , + transportType = utils.getDeviceTransportType() + }, { id = utils.getDeviceMAC(), name = utils.getDeviceName(), - transportType = "WIFI" + transportType = utils.getDeviceTransportType() }, { - id = deviceMAC2, - name = mobileHost, - transportType = "WIFI" - }, + transportType = "WEBENGINE_WEBSOCKET", + } } } ):Do(function(_,data) @@ -146,13 +142,13 @@ end function Test:Teat_Activate_app_2() local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.HMIAppID2}) - EXPECT_HMIRESPONSE(RequestId, {result = { code = 0, device = { id = deviceMAC2, name = mobileHost }, isSDLAllowed = false, method ="SDL.ActivateApp" }}) + EXPECT_HMIRESPONSE(RequestId, {result = { code = 0, device = { id = deviceMAC2, name = deviceName2 }, isSDLAllowed = false, method ="SDL.ActivateApp" }}) :Do(function() local RequestIdGetMes = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) EXPECT_HMIRESPONSE(RequestIdGetMes) :Do(function() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - {allowed = false, source = "GUI", device = {id = deviceMAC2, name = mobileHost}}) + {allowed = false, source = "GUI", device = {id = deviceMAC2, name = deviceName2}}) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_, data) self.hmiConnection:SendResponse(data.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -160,7 +156,6 @@ function Test:Teat_Activate_app_2() :Times(AtLeast(1)) end) end) - end function Test:Test_Start_PTU() @@ -171,7 +166,6 @@ function Test:Test_Start_PTU() self.mobileSession2:ExpectNotification("OnSystemRequest", {requestType = "PROPRIETARY"}) :Times(0) self.mobileSession:ExpectNotification("OnSystemRequest", {requestType = "PROPRIETARY"}) - :Times(1) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) diff --git a/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua b/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua index 85ebcb9f8f..05526e283b 100644 --- a/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua @@ -116,8 +116,13 @@ function Test:TestStep_Register_App_And_Check_PolicyUpdate() local CorIdRAI = self.mobileSession:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") EXPECT_RESPONSE(CorIdRAI, { success = true, resultCode = "SUCCESS"}) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) - EXPECT_HMICALL("BasicCommunication.PolicyUpdate", {timeout = timeoutAfterXSeconds, retry = secondsBetweenRetries, file = getValueFromIniFile(pathToIni, parameterName) .. "/sdl_snapshot.json"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}) + :Times(2) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate", + {timeout = timeoutAfterXSeconds, retry = secondsBetweenRetries, file = getValueFromIniFile(pathToIni, parameterName) .. "/sdl_snapshot.json"}) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua b/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua index 712764f7a1..ce9d244b97 100644 --- a/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua +++ b/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua @@ -55,9 +55,11 @@ commonSteps:DeleteLogsFileAndPolicyTable() Test = require("connecttest") require("user_modules/AppTypes") config.defaultProtocolVersion = 2 +local startSession = Test.startSession --[[ Specific Notifications ]] -function Test:RegisterNotification() +function Test:startSession() + startSession(self) self.mobileSession:ExpectNotification("OnSystemRequest") :Do(function(_, d) if d.payload.requestType == "HTTP" then diff --git a/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua b/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua index 6344af893a..45767c5d66 100644 --- a/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua @@ -67,7 +67,8 @@ function Test:TestStep_PTS_Timeout_wait_response_PTU() self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}) + :Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate", {file = "/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json"}) :Do(function(_,data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) diff --git a/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua b/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua index bdb930a1b7..8a49fe0544 100644 --- a/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua @@ -70,11 +70,11 @@ function Test:RAI_PTU() function() self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = "PTU" }) self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) - :Do( + :DoOnce( function() local OnSystemRequest_time = timestamp() print("OnSystemRequest: " .. tostring(OnSystemRequest_time)) - EXPECT_HMINOTIFICATION ("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) + EXPECT_HMINOTIFICATION ("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}) :ValidIf( function() local OnStatusUpdate_time = timestamp() @@ -87,8 +87,11 @@ function Test:RAI_PTU() return false, "Expected timeout '60000' ms, actual '" .. diff .. "' ms (tolerance = 500ms)" end end) + :Times(2) :Timeout(63000) end) + :Times(2) + :Timeout(63000) end) end) end) diff --git a/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua b/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua index 46a0838f62..11a7417bf2 100644 --- a/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua @@ -89,7 +89,7 @@ function Test:RegisterNewApp() :Do(function(_, d) self.hmiConnection:SendResponse(d.id, d.method, "SUCCESS", { }) end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }):Times(2) end function Test:Precondition_SUCCEESS_Flow_PROPRIETARY() diff --git a/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua b/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua index fcb4ea9e0a..d0ccfe2c04 100644 --- a/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua @@ -106,6 +106,7 @@ function Test:TestStep_FinishPTU_ForAppId1() self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = "/tmp/fs/mp/images/ivsu_cache/ptu.json" }) -- PTU will be restarted because of new AppID is registered EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}, {status = "UPDATE_NEEDED"}) + :Times(2) end) end diff --git a/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua b/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua index fec118dcc2..1a4dd36cfe 100644 --- a/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua +++ b/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua @@ -56,7 +56,6 @@ commonSteps:DeletePolicyTable() local pathToSnapshot local consentDeviceSystemTimeStamp local consentGroupSystemTimeStamp -local MACHash local appID = config.application1.registerAppInterfaceParams["fullAppID"] --[[ Local Functions ]] @@ -93,7 +92,7 @@ local function GetDataFromSnapshot(pathToFile) file:close() local json = require("modules/json") local data = json.decode(json_data) - local ucr = data.policy_table.device_data[MACHash].user_consent_records + local ucr = data.policy_table.device_data[utils.getDeviceMAC()].user_consent_records local res = { deviceConsentTimeStamp = dateToTimeStamp(getData(ucr.device, "time_stamp")), deviceInput = getData(ucr.device, "input"), @@ -109,21 +108,12 @@ end commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Get_List_Of_Connected_Devices() self.hmiConnection:SendNotification("BasicCommunication.OnStartDeviceDiscovery") - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - - name = utils.getDeviceName(), - transportType = "WIFI", - isSDLAllowed = false - } - } - } - ):Do(function(_,data) - MACHash = data.params.deviceList[1].id - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_Activate_App_Consent_Device_Make_PTU_Consent_Group() @@ -133,7 +123,7 @@ function Test:Precondition_Activate_App_Consent_Device_Make_PTU_Consent_Group() local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) :Do(function(_,_) - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = MACHash, name = utils.getDeviceName()}}) + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) GetCurrentTimeStampDeviceConsent() EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) diff --git a/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua b/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua index b35825d2b5..07dadcf674 100644 --- a/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua +++ b/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua @@ -36,20 +36,12 @@ commonFunctions:newTestCasesGroup("Test") function Test:UpdateDeviceList_on_device_connect() self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - isSDLAllowed = false, - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end commonTestCases:DelayedExp(60*1000) end diff --git a/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua b/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua index 7ec27549b1..4bc84810d5 100644 --- a/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua +++ b/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua @@ -36,29 +36,18 @@ require('mobile_session') --[[ Local variables ]] local mobile_session = require('mobile_session') -local device_id = utils.getDeviceMAC() -local server_address = utils.getDeviceName() --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_UpdateDeviceList_on_device_connect() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - isSDLAllowed = false, - name = server_address, - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - device_id = data.params.deviceList[1].id - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_RegisterApp1() @@ -83,7 +72,7 @@ function Test:ActivateApp_isSDLAllowed_false() local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", { appID = self.applications[config.application1.registerAppInterfaceParams.appName]}) EXPECT_HMIRESPONSE(RequestId, {result = { code = 0, - device = { id = device_id, name = server_address }, + device = { id = utils.getDeviceMAC(), name = utils.getDeviceName() }, isAppPermissionsRevoked = false, isAppRevoked = false, isSDLAllowed = false, isPermissionsConsentNeeded = false, method ="SDL.ActivateApp"}}) :Do(function(_,data) --Consent for device is needed @@ -95,7 +84,7 @@ function Test:ActivateApp_isSDLAllowed_false() EXPECT_HMIRESPONSE(RequestId1) :Do(function(_,_) self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = server_address}}) + {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,_data1) self.hmiConnection:SendResponse(_data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) diff --git a/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua b/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua index 620dedb900..20f075e032 100644 --- a/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua +++ b/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua @@ -15,43 +15,57 @@ -- PoliciesManager must provide "isSDLAllowed:false" param of "DeviceInfo" struct ONLY when sending "UpdateDeviceList" RPC to HMI --------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] +Test = require('user_modules/dummy_connecttest') local commonSteps = require ('user_modules/shared_testcases/commonSteps') -local commonTestCases = require ('user_modules/shared_testcases/commonTestCases') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') -local commonPreconditions = require ('user_modules/shared_testcases/commonPreconditions') local utils = require ('user_modules/utils') +local hmi_values = require('user_modules/hmi_values') +local SDL = require('SDL') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() -commonPreconditions:Connecttest_without_ExitBySDLDisconnect_WithoutOpenConnectionRegisterApp("connecttest_ConnectMobile.lua") ---[[ General Settings for configuration ]] -Test = require('user_modules/connecttest_ConnectMobile') -require('cardinalities') -require('user_modules/AppTypes') -require('mobile_session') +--[[Local Functions ]] +function Test:initHMIonReady() + local hmiParams = hmi_values.getDefaultHMITable() + hmiParams.BasicCommunication.UpdateDeviceList = nil + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { deviceList = { [1] = { isSDLAllowed = false } } }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and 1 or 0) + return self:initHMI_onReady(hmiParams) +end --[[ Test ]] commonFunctions:newTestCasesGroup("Test") +function Test:HMI_SDL_initialization() + self:runSDL() + commonFunctions:waitForSDLStart(self):Do(function() + self:initHMI():Do(function() + commonFunctions:userPrint(35, "HMI initialized") + self:initHMIonReady():Do(function () + commonFunctions:userPrint(35, "HMI is ready") + end) + end) + end) +end function Test:UpdateDeviceList_on_device_connect() - commonTestCases:DelayedExp(2000) - self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { - { - id = utils.getDeviceMAC(), - isSDLAllowed = false, - name = utils.getDeviceName(), - transportType = "WIFI" - }}}) - :Do(function(_,data) - if data.params.deviceList[1].isSDLAllowed ~= false then - commonFunctions:userPrint(31, "Error: SDL should not be allowed for a new unconsented device") - else + local exp = { deviceList = { [1] = { isSDLAllowed = false } } } + if SDL.buildOptions.webSocketServerSupport == "ON" then + exp.deviceList[2] = exp.deviceList[1] + end + if utils.getDeviceTransportType() == "WIFI" then + self:connectMobile() + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", exp) + :Do(function(_,data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end - end) + end) + else + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Times(0) + end end --[[ Postconditions ]] diff --git a/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua b/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua index 2748097ff8..9b97631ee8 100644 --- a/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua +++ b/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua @@ -257,12 +257,12 @@ commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_ConnectDevice() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { deviceList = { { id = utils.getDeviceMAC(), isSDLAllowed = false, name = utils.getDeviceName(), transportType = "WIFI" }}}) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end --[[ Test ]] diff --git a/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua b/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua index b8ccfac9a5..ad0bd88229 100644 --- a/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua +++ b/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua @@ -39,14 +39,15 @@ require('cardinalities') require('user_modules/AppTypes') local mobile_session = require('mobile_session') -local tcp = require('tcp_connection') +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require('file_connection') local mobile = require('mobile_connection') local events = require('events') --[[ Local variables ]] -local deviceMAC2 = "54286cb92365be544aa7008b92854b9648072cf8d8b17b372fd0786bef69d7a2" +local deviceMAC2 = "9cc72994ab9ca68c1daaf02834f7a94552e82aad3250778f2e12d14afee0a5c6" local mobileHost = "1.0.0.1" +local deviceName2 = mobileHost .. ":" .. config.mobilePort -- Creation dummy connection os.execute("ifconfig lo:1 1.0.0.1") @@ -54,20 +55,12 @@ os.execute("ifconfig lo:1 1.0.0.1") function Test:Precondition_Connect_device1() commonTestCases:DelayedExp(2000) self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI", - isSDLAllowed = false - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_Register_app1() @@ -116,8 +109,8 @@ end commonFunctions:newTestCasesGroup("Test") function Test:TestStep_Check_two_devices_visible_on_device2_connect() - local tcpConnection = tcp.Connection(mobileHost, config.mobilePort) - local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + local mobileAdapter = self.getDefaultMobileAdapter(mobileHost, config.mobilePort) + local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) local connection = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(connection) connection:Connect() @@ -128,17 +121,20 @@ function Test:TestStep_Check_two_devices_visible_on_device2_connect() { deviceList = { { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI", + id = deviceMAC2, + name = deviceName2, + transportType = utils.getDeviceTransportType(), isSDLAllowed = false }, { - id = deviceMAC2, - name = mobileHost, - transportType = "WIFI", + id = utils.getDeviceMAC(), + name = utils.getDeviceName(), + transportType = utils.getDeviceTransportType(), isSDLAllowed = false }, + { + transportType = "WEBENGINE_WEBSOCKET", + } }}) :Do(function(_,data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) diff --git a/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua b/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua index 721b04f2d7..bc9edf2e81 100644 --- a/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua +++ b/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua @@ -15,11 +15,13 @@ -- SDL must request DataConsent status of the corresponding device from the PoliciesManager ------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] +Test = require('user_modules/dummy_connecttest') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local utils = require ('user_modules/utils') +local hmi_values = require('user_modules/hmi_values') +local SDL = require('SDL') --[[ General Precondition before ATF start ]] commonFunctions:SDLForceStop() @@ -53,31 +55,47 @@ local function UpdatePolicy() end UpdatePolicy() ---[[ General Settings for configuration ]] -Test = require('user_modules/connecttest_resumption') -require('user_modules/AppTypes') +function Test:initHMIonReady() + local hmiParams = hmi_values.getDefaultHMITable() + hmiParams.BasicCommunication.UpdateDeviceList = nil + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { deviceList = { [1] = { isSDLAllowed = true } } }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and 1 or 0) + return self:initHMI_onReady(hmiParams) +end --[[ Test ]] commonFunctions:newTestCasesGroup("Test") -function Test:Check_device_connects_as_consented() - commonTestCases:DelayedExp(2000) - self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - isSDLAllowed = true, - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) +function Test:HMI_SDL_initialization() + self:runSDL() + commonFunctions:waitForSDLStart(self):Do(function() + self:initHMI():Do(function() + commonFunctions:userPrint(35, "HMI initialized") + self:initHMIonReady():Do(function () + commonFunctions:userPrint(35, "HMI is ready") + end) + end) end) - :Times(AtLeast(1)) +end + +function Test:Check_device_connects_as_consented() + local exp = { deviceList = { [1] = { isSDLAllowed = true } } } + if SDL.buildOptions.webSocketServerSupport == "ON" then + exp.deviceList[2] = exp.deviceList[1] + end + if utils.getDeviceTransportType() == "WIFI" then + self:connectMobile() + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", exp) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + else + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Times(0) + end end --[[ Postconditions ]] diff --git a/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua b/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua index 4e52cc5183..04dae6839e 100644 --- a/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua +++ b/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua @@ -14,40 +14,61 @@ -- SDL must request DataConsent status of the corresponding device from the PoliciesManager ------------------------------------------------------------------------------------------------- --[[ General Settings for configuration ]] -Test = require('user_modules/connecttest_resumption') -require('cardinalities') +Test = require('user_modules/dummy_connecttest') --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') local utils = require ('user_modules/utils') -require('user_modules/AppTypes') +local hmi_values = require('user_modules/hmi_values') +local SDL = require('SDL') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFiles() commonSteps:DeletePolicyTable() +--[[ Local Functions ]] +function Test:initHMIonReady() + local hmiParams = hmi_values.getDefaultHMITable() + hmiParams.BasicCommunication.UpdateDeviceList = nil + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { deviceList = { [1] = { isSDLAllowed = false } } }) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and 1 or 0) + return self:initHMI_onReady(hmiParams) +end + --[[ Test ]] commonFunctions:newTestCasesGroup("Test") -function Test:Check_device_connects_as_not_consented() - commonTestCases:DelayedExp(2000) - self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - isSDLAllowed = false, - name = utils.getDeviceName(), - transportType = "WIFI" - } - } - } - ):Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :Times(AtLeast(1)) + +function Test:HMI_SDL_initialization() + self:runSDL() + commonFunctions:waitForSDLStart(self):Do(function() + self:initHMI():Do(function() + commonFunctions:userPrint(35, "HMI initialized") + self:initHMIonReady():Do(function () + commonFunctions:userPrint(35, "HMI is ready") + end) + end) + end) +end + +function Test:UpdateDeviceList_on_device_connect() + local exp = { deviceList = { [1] = { isSDLAllowed = false } } } + if SDL.buildOptions.webSocketServerSupport == "ON" then + exp.deviceList[2] = exp.deviceList[1] + end + if utils.getDeviceTransportType() == "WIFI" then + self:connectMobile() + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", exp) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + else + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Times(0) + end end --[[ Postconditions ]] diff --git a/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua b/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua index 7f548314f9..19ceffb83d 100644 --- a/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua +++ b/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua @@ -13,45 +13,82 @@ -- Expected result: -- SDL must add new device in deviceList of BasicCommunication.UpdateDeviceList --------------------------------------------------------------------------------------------- +--[[ General Settings for configuration ]] +Test = require('user_modules/dummy_connecttest') + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') -local commonTestCases = require('user_modules/shared_testcases/commonTestCases') local utils = require ('user_modules/utils') +local hmi_values = require('user_modules/hmi_values') +local SDL = require('SDL') --[[ General Precondition before ATF start ]] -commonSteps:DeleteLogsFileAndPolicyTable() - ---[[ General Settings for configuration ]] -Test = require('user_modules/connecttest_resumption') -require('cardinalities') -require('user_modules/AppTypes') +commonSteps:DeleteLogsFiles() +commonSteps:DeletePolicyTable() ---[[ Preconditions ]] -commonFunctions:newTestCasesGroup("Preconditions") +--[[ Local Variables ]] +local hmiParams = hmi_values.getDefaultHMITable() +local vin = hmiParams.VehicleInfo.GetVehicleData.params.vin ---[[ Test ]] -commonFunctions:newTestCasesGroup("Test") -function Test:Test_Connect_device() - commonTestCases:DelayedExp(2000) - self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI", - isSDLAllowed = false - } +--[[ Local Functions ]] +function Test:initHMIonReady() + hmiParams.BasicCommunication.UpdateDeviceList = nil + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { + deviceList = { + [1] = { + id = utils.buildDeviceMAC("WS"), + isSDLAllowed = false } } - ) + }) :Do(function(_,data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and 1 or 0) + return self:initHMI_onReady(hmiParams) +end + +--[[ Test ]] +commonFunctions:newTestCasesGroup("Test") + +function Test:HMI_SDL_initialization() + self:runSDL() + commonFunctions:waitForSDLStart(self):Do(function() + self:initHMI():Do(function() + commonFunctions:userPrint(35, "HMI initialized") + self:initHMIonReady():Do(function () + commonFunctions:userPrint(35, "HMI is ready") + end) + end) + end) +end - --SDL snapshot will not be created until Device is consented through registered application +function Test:UpdateDeviceList_on_device_connect() + local exp = { + deviceList = { + [1] = { + id = utils.buildDeviceMAC("TCP", { host = config.mobileHost, port = config.mobilePort }), + isSDLAllowed = false + } + } + } + if SDL.buildOptions.webSocketServerSupport == "ON" then + table.insert(exp.deviceList, 1, { + id = utils.buildDeviceMAC("WS"), + isSDLAllowed = false + }) + end + if utils.getDeviceTransportType() == "WIFI" then + self:connectMobile() + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", exp) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + else + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Times(0) + end end --[[ Postconditions ]] @@ -59,5 +96,3 @@ commonFunctions:newTestCasesGroup("Postconditions") function Test.Postcondition_SDLStop() StopSDL() end - -return Test diff --git a/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua b/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua index be39413a58..6096e832b9 100644 --- a/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua +++ b/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua @@ -22,6 +22,7 @@ local commonTestCases = require('user_modules/shared_testcases/commonTestCases') local mobile_session = require('mobile_session') local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') local utils = require ('user_modules/utils') +local SDL = require('SDL') --[[ Local variables ]] local pts_json = '/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json' @@ -39,23 +40,26 @@ require('user_modules/AppTypes') commonFunctions:newTestCasesGroup("Preconditions") function Test:Precondition_Connect_device() - commonTestCases:DelayedExp(2000) - self:connectMobile() - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI", - isSDLAllowed = false - } + local exp = { + deviceList = { + { + id = utils.getDeviceMAC(), + name = utils.getDeviceName(), + transportType = utils.getDeviceTransportType(), + isSDLAllowed = false } } - ) - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + } + if SDL.buildOptions.webSocketServerSupport == "ON" then + table.insert(exp.deviceList, 1, { transportType = "WEBENGINE_WEBSOCKET" }) + end + self:connectMobile() + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", exp) + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end function Test:Precondition_Register_app() @@ -72,7 +76,7 @@ function Test:Precondition_Register_app() { name = utils.getDeviceName(), id = utils.getDeviceMAC(), - transportType = "WIFI" + transportType = utils.getDeviceTransportType() } } }) @@ -99,9 +103,13 @@ function Test:Check_device_identifier_added_to_lpt() file:close() local json = require("modules/json") local data = json.decode(json_data) - local deviceIdentificatorInPTS = next(data.policy_table.device_data, nil) - - if (deviceIdentificatorInPTS == utils.getDeviceMAC()) then + local deviceIdentificatorInPTS = nil + for device in pairs(data.policy_table.device_data) do + if device == utils.getDeviceMAC() then + deviceIdentificatorInPTS = device + end + end + if deviceIdentificatorInPTS ~= nil then commonFunctions:userPrint(33, "device_identifier ".. deviceIdentificatorInPTS.. " section is created") else self:FailTestCase("Test is FAILED. device_identifier section is not created.") diff --git a/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua b/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua index 108facba61..c4346fb56e 100644 --- a/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua +++ b/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua @@ -26,9 +26,6 @@ local utils = require ('user_modules/utils') commonSteps:DeleteLogsFiles() commonSteps:DeletePolicyTable() ---[[ Local Variables ]] -local MACHash = nil - --[[ General Settings for configuration ]] Test = require('connecttest') require('cardinalities') @@ -41,28 +38,22 @@ local function GetDeviceMacHashFromSnapshot(pathToFile) file:close() local json = require("modules/json") local data = json.decode(json_data) - local macHashFromPTS = next(data.policy_table.device_data, nil) + local macHashFromPTS = {} + for device in pairs(data.policy_table.device_data) do + table.insert(macHashFromPTS, device) + end return macHashFromPTS end --[[ Preconditions ]] function Test:Precondition_Get_List_Of_Connected_Devices() self.hmiConnection:SendNotification("BasicCommunication.OnStartDeviceDiscovery") - EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", - { - deviceList = { - { - id = utils.getDeviceMAC(), - name = utils.getDeviceName(), - transportType = "WIFI", - isSDLAllowed = false - } - } - } - ):Do(function(_,data) - MACHash = data.params.deviceList[1].id - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) + if utils.getDeviceTransportType() == "WIFI" then + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + end end --[[ Test ]] @@ -74,7 +65,7 @@ function Test:Initiate_PTU_And_Check_DeviceHashId_In_PTS() local RequestIdGetUserFriendlyMessage = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {"DataConsent"}}) EXPECT_HMIRESPONSE(RequestIdGetUserFriendlyMessage,{result = {code = 0, method = "SDL.GetUserFriendlyMessage"}}) :Do(function(_,_) - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = MACHash, name = utils.getDeviceName()}}) + self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) EXPECT_HMICALL("BasicCommunication.ActivateApp") :Do(function(_,data1) self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) @@ -84,7 +75,10 @@ function Test:Initiate_PTU_And_Check_DeviceHashId_In_PTS() end) EXPECT_HMICALL("BasicCommunication.PolicyUpdate") :ValidIf (function(_,data) - return GetDeviceMacHashFromSnapshot(data.params.file) == MACHash + for _, device in pairs(GetDeviceMacHashFromSnapshot(data.params.file)) do + if device == utils.getDeviceMAC() then return true end + end + return false, "Expected device was not found in PTS" end) EXPECT_NOTIFICATION("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN", audioStreamingState = "AUDIBLE"}) end diff --git a/test_scripts/RC/MultipleModules/Cache/005_GetInteriorVehicleDataConsent_cache_is_dependent_on_device.lua b/test_scripts/RC/MultipleModules/Cache/005_GetInteriorVehicleDataConsent_cache_is_dependent_on_device.lua index 44dc6b6162..a332f34ccd 100644 --- a/test_scripts/RC/MultipleModules/Cache/005_GetInteriorVehicleDataConsent_cache_is_dependent_on_device.lua +++ b/test_scripts/RC/MultipleModules/Cache/005_GetInteriorVehicleDataConsent_cache_is_dependent_on_device.lua @@ -39,6 +39,11 @@ local runner = require('user_modules/script_runner') local common = require("test_scripts/RC/MultipleModules/commonRCMulModules") +--[[ Conditions to scik test ]] +if config.defaultMobileAdapterType == "WS" or config.defaultMobileAdapterType == "WSS" then + runner.skipTest("Test is not applicable for WS/WSS connection") +end + --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false diff --git a/test_scripts/Resumption/HMI_Level/common.lua b/test_scripts/Resumption/HMI_Level/common.lua index e64669a65e..6a160a14e2 100644 --- a/test_scripts/Resumption/HMI_Level/common.lua +++ b/test_scripts/Resumption/HMI_Level/common.lua @@ -36,7 +36,7 @@ m.runAfter = actions.run.runAfter --[[ Common Functions ]] function m.unexpectedDisconnect() - m.mobile.deleteSession() + m.mobile.closeSession() m.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) end diff --git a/test_scripts/SDL5_0/ConditionalResumption/common.lua b/test_scripts/SDL5_0/ConditionalResumption/common.lua index 57d2a262aa..55a1b43995 100644 --- a/test_scripts/SDL5_0/ConditionalResumption/common.lua +++ b/test_scripts/SDL5_0/ConditionalResumption/common.lua @@ -17,6 +17,12 @@ local commonTestCases = require("user_modules/shared_testcases/commonTestCases") local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local test = require("user_modules/dummy_connecttest") local utils = require('user_modules/utils') +local runner = require('user_modules/script_runner') + +--[[ Conditions to skip tests ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end --[[ Local Variables ]] local hmiAppIds = {} @@ -45,7 +51,7 @@ common.appHMITypesByOption = { common.wait = utils.wait --[[Module functions]] -local basePreconditions = actions.preconditions +local basePreconditions = actions.preconditions function common.preconditions() basePreconditions() commonPreconditions:BackupFile("smartDeviceLink.ini") @@ -225,4 +231,4 @@ function common.postconditions() commonPreconditions:RestoreFile("smartDeviceLink.ini") end -return common \ No newline at end of file +return common diff --git a/test_scripts/SDL5_0/Image_template/commonImageTemplate.lua b/test_scripts/SDL5_0/Image_template/commonImageTemplate.lua index fad369f420..9102f04c0f 100644 --- a/test_scripts/SDL5_0/Image_template/commonImageTemplate.lua +++ b/test_scripts/SDL5_0/Image_template/commonImageTemplate.lua @@ -178,6 +178,7 @@ function m.alert(pIsTemplate, pParams) mobSession:ExpectNotification("OnHMIStatus", { systemContext = "ALERT"}, { systemContext = "MAIN"}) + :Times(2) mobSession:ExpectResponse(cid, { success = true, resultCode = "SUCCESS"}) end diff --git a/test_scripts/SDL5_0/LowVoltage/common.lua b/test_scripts/SDL5_0/LowVoltage/common.lua index 622b9ad17f..feb0817f3f 100644 --- a/test_scripts/SDL5_0/LowVoltage/common.lua +++ b/test_scripts/SDL5_0/LowVoltage/common.lua @@ -175,11 +175,11 @@ end --! @return: none --]] function m.connectMobile() - test.mobileConnection:Connect() EXPECT_EVENT(events.connectedEvent, "Connected") :Do(function() utils.cprint(35, "Mobile connected") end) + test.mobileConnection:Connect() end --[[ @reRegisterApp: re-register application diff --git a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua index 680daca63a..aafc553a79 100644 --- a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua +++ b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/001_register_legacy_app.lua @@ -79,7 +79,7 @@ local function GetNotificationParams() notificationParams.application.deviceInfo = { name = commonSmoke.getDeviceName(), id = commonSmoke.getDeviceMAC(), - transportType = "WIFI", + transportType = commonSmoke.getDeviceTransportType(), isSDLAllowed = true } notificationParams.application.policyAppID = requestParams.appID diff --git a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua index d5c634b4f9..994511ebb8 100644 --- a/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua +++ b/test_scripts/SDL5_0/MobileVersioning/VersionNegotiation/002_register_app_on_legacy_module.lua @@ -83,7 +83,7 @@ local function GetNotificationParams() notificationParams.application.deviceInfo = { name = commonSmoke.getDeviceName(), id = commonSmoke.getDeviceMAC(), - transportType = "WIFI", + transportType = commonSmoke.getDeviceTransportType(), isSDLAllowed = true } notificationParams.application.policyAppID = requestParams.appID diff --git a/test_scripts/SDL5_0/TTSChunks/common.lua b/test_scripts/SDL5_0/TTSChunks/common.lua index 7ef76c3410..7df6fa7a5f 100644 --- a/test_scripts/SDL5_0/TTSChunks/common.lua +++ b/test_scripts/SDL5_0/TTSChunks/common.lua @@ -10,6 +10,7 @@ config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 5 local actions = require("user_modules/sequences/actions") local hmi_values = require('user_modules/hmi_values') local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local utils = require ('user_modules/utils') --[[ Module ]] local m = actions @@ -49,17 +50,9 @@ function m.getPathToFileInStorage(fileName) .. m.getDeviceMAC() .. "/" .. fileName end -function m.getDeviceName() - return config.mobileHost .. ":" .. config.mobilePort -end +m.getDeviceName = utils.getDeviceName -function m.getDeviceMAC() - local cmd = "echo -n " .. m.getDeviceName() .. " | sha256sum | awk '{printf $1}'" - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() - return result -end +m.getDeviceMAC = utils.getDeviceMAC function m.getMobileAppId(pAppId) if not pAppId then pAppId = 1 end diff --git a/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/common.lua b/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/common.lua index 423152326b..c23da3b520 100644 --- a/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/common.lua +++ b/test_scripts/SDL5_0/Transfer_RPC_with_invalid_image/common.lua @@ -8,32 +8,14 @@ config.defaultProtocolVersion = 2 local actions = require("user_modules/sequences/actions") local utils = require('user_modules/utils') local json = require("modules/json") -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local commonSteps = require("user_modules/shared_testcases/commonSteps") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') --[[ Local Variables ]] local common = actions common.cloneTable = utils.cloneTable -local preloadedPT = commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") --[[Module functions]] -function common.preconditions() - commonFunctions:SDLForceStop() - commonSteps:DeletePolicyTable() - commonSteps:DeleteLogsFiles() - commonPreconditions:BackupFile(preloadedPT) - common.updatePreloadedPT() -end - -function common.postconditions() - StopSDL() - commonPreconditions:RestoreFile(preloadedPT) -end - function common.updatePreloadedPT() - local preloadedFile = commonPreconditions:GetPathToSDL() .. preloadedPT - local pt = utils.jsonFileToTable(preloadedFile) + local pt = common.sdl.getPreloadedPT() pt.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null local additionalRPCs = { "SendLocation", "SubscribeVehicleData", "UnsubscribeVehicleData", "GetVehicleData", "UpdateTurnList", @@ -50,7 +32,13 @@ function common.updatePreloadedPT() pt.policy_table.app_policies["0000001"].groups = { "Base-4", "NewTestCaseGroup" } pt.policy_table.app_policies["0000001"].keep_context = true pt.policy_table.app_policies["0000001"].steal_focus = true - utils.tableToJsonFile(pt, preloadedFile) + common.sdl.setPreloadedPT(pt) +end + +local preconditions_Orig = common.preconditions +function common.preconditions() + preconditions_Orig() + common.updatePreloadedPT() end return common diff --git a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua index 5efeeea723..98a7a30bf6 100644 --- a/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua +++ b/test_scripts/Smoke/API/037_RegisterAppInterface_PositiveCase_SUCCESS.lua @@ -78,7 +78,7 @@ local function SetNotificationParams() notificationParams.application.deviceInfo = { name = common.getDeviceName(), id = common.getDeviceMAC(), - transportType = "WIFI", + transportType = common.getDeviceTransportType(), isSDLAllowed = true } notificationParams.application.policyAppID = requestParams.fullAppID diff --git a/test_scripts/Smoke/Registration/001_Register_5_connection.lua b/test_scripts/Smoke/Registration/001_Register_5_connection.lua index f54bb3d02a..df3a14fa88 100644 --- a/test_scripts/Smoke/Registration/001_Register_5_connection.lua +++ b/test_scripts/Smoke/Registration/001_Register_5_connection.lua @@ -34,6 +34,7 @@ local common = require('test_scripts/Smoke/commonSmoke') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +config.defaultMobileAdapterType = "TCP" --[[ Local Variables ]] local numOfDevices = 5 @@ -71,14 +72,6 @@ local function start() return common.getHMIConnection():ExpectEvent(event, "Start event") end -local function getDeviceName(pDevice) - return pDevice .. ":" .. config.mobilePort -end - -local function getDeviceMAC(pDevice) - return execCmd("echo -n " .. getDeviceName(pDevice) .. " | sha256sum | awk '{printf $1}'") -end - local function registerApp(pAppId) common.createMobileSession(pAppId, nil, pAppId) common.getMobileSession(pAppId):StartService(7) @@ -89,8 +82,8 @@ local function registerApp(pAppId) appName = common.getConfigAppParams(pAppId).appName, appID = common.getHMIAppId(pAppId), deviceInfo = { - name = getDeviceName(device[pAppId]), - id = getDeviceMAC(device[pAppId]) + name = common.getDeviceName(device[pAppId]), + id = common.getDeviceMAC(device[pAppId]) } } }) diff --git a/test_scripts/Smoke/commonSmoke.lua b/test_scripts/Smoke/commonSmoke.lua index a798c40f60..58c15aa20f 100644 --- a/test_scripts/Smoke/commonSmoke.lua +++ b/test_scripts/Smoke/commonSmoke.lua @@ -10,7 +10,7 @@ local utils = require('user_modules/utils') local json = require("modules/json") local mobileConnection = require('mobile_connection') local SDL = require("SDL") -local tcp = require('tcp_connection') +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require('file_connection') local events = require("events") local constants = require('protocol_handler/ford_protocol_constants') @@ -37,19 +37,14 @@ common.json = { decode = json.decode, null = json.null } common.events = { disconnectedEvent = events.disconnectedEvent } common.SDL = { buildOptions = SDL.buildOptions } common.SDL.PTS = SDL.PTS +common.runAfter = common.run.runAfter +common.failTestCase = common.run.fail +common.getDeviceTransportType = utils.getDeviceTransportType --[[ Module constants ]] common.timeout = 4000 --[[ Module functions ]] -function common.runAfter(pFunc, pDelay) - RUN_AFTER(pFunc, pDelay) -end - -function common.failTestCase(pMsg) - test:FailTestCase(pMsg) -end - function common.readParameterFromSDLINI(pParamName) return SDL.INI.get(pParamName) end @@ -319,11 +314,23 @@ function common.createEvent(pMatchFunc) end function common.createConnection(pConId, pDevice) + local function getMobileAdapter(pSource) + if config.defaultMobileAdapterType ~= "TCP" then + print("WARNING: Default mobile adapter type is not TCP. Create TCP mobile connection.") + end + local mobileAdapterParameters = { + host = SDL.GetHostURL(), + port = config.mobilePort, + source = pSource + } + return mobile_adapter_controller.getAdapter("TCP", mobileAdapterParameters) + end + if pConId == nil then pConId = 1 end if pDevice == nil then pDevice = config.mobileHost end local filename = "mobile" .. pConId .. ".out" - local tcpConnection = tcp.Connection(SDL.GetHostURL(), config.mobilePort, pDevice) - local fileConnection = file_connection.FileConnection(filename, tcpConnection) + local mobileAdapter = getMobileAdapter(pDevice) + local fileConnection = file_connection.FileConnection(filename, mobileAdapter) local connection = mobileConnection.MobileConnection(fileConnection) test.mobileConnections[pConId] = connection function connection:ExpectEvent(pEvent, pEventName) diff --git a/test_scripts/TheSameApp/Security/commonSecurity.lua b/test_scripts/TheSameApp/Security/commonSecurity.lua index 54a7145429..62dfe2b052 100644 --- a/test_scripts/TheSameApp/Security/commonSecurity.lua +++ b/test_scripts/TheSameApp/Security/commonSecurity.lua @@ -144,7 +144,7 @@ end function m.cleanUpCertificates() local sdlBin = commonPreconditions:GetPathToSDL() os.execute("cd " .. sdlBin .. " && find . -type l -not -name 'lib*' -exec rm -f {} \\;") - os.execute("cd " .. sdlBin .. " && rm -rf *.pem") + os.execute("cd " .. sdlBin .. " && rm -rf rootCA.pem issuingCA.pem module_key.pem module_crt.pem") end local postconditionsOrig = m.postconditions @@ -165,9 +165,10 @@ local function saveFile(pContent, pFileName) f:close() end -local function createCrtHashes() - local sdlBin = commonPreconditions:GetPathToSDL() - os.execute("cd " .. sdlBin .. " && c_rehash .") +local function createCrtHash(pCrtFilePath, pCrtFileName) + os.execute("cd " .. pCrtFilePath + .. " && openssl x509 -in " .. pCrtFileName + .. " -hash -noout | awk '{print $0\".0\"}' | xargs ln -sf " .. pCrtFileName) end local function updateSDLIniFile() @@ -195,9 +196,11 @@ function m.initSDLCertificates(pCrtsFileName, pIsModuleCrtDefined) if pIsModuleCrtDefined == nil then pIsModuleCrtDefined = true end local allCrts = getAllCrtsFromPEM(pCrtsFileName) local sdlBin = commonPreconditions:GetPathToSDL() - saveFile(allCrts.rootCA, sdlBin .. "rootCA.pem") - saveFile(allCrts.issuingCA, sdlBin .. "issuingCA.pem") - createCrtHashes() + local ext = ".pem" + for _, v in pairs({ "rootCA", "issuingCA" }) do + saveFile(allCrts[v], sdlBin .. v .. ext) + createCrtHash(sdlBin, v .. ext) + end if pIsModuleCrtDefined then saveFile(allCrts.key, sdlBin .. "module_key.pem") saveFile(allCrts.crt, sdlBin .. "module_crt.pem") diff --git a/test_scripts/TheSameApp/commonTheSameApp.lua b/test_scripts/TheSameApp/commonTheSameApp.lua index a89b0302ed..9e603e0709 100644 --- a/test_scripts/TheSameApp/commonTheSameApp.lua +++ b/test_scripts/TheSameApp/commonTheSameApp.lua @@ -8,6 +8,12 @@ local events = require("events") local constants = require('protocol_handler/ford_protocol_constants') local hmi_values = require("user_modules/hmi_values") local rc = require('user_modules/sequences/remote_control') +local runner = require('user_modules/script_runner') + +--[[ Conditions to skip tests ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 @@ -643,8 +649,8 @@ function common.ignitionOff(pDevices, pExpFunc) end) common.run.wait(3000) :Do(function() - if isOnSDLCloseSent == false then common.cprint(35, "BC.OnSDLClose was not sent") end - if common.sdl.isRunning() then common.sdl.StopSDL() end + if isOnSDLCloseSent == false then utils.cprint(35, "BC.OnSDLClose was not sent") end + common.sdl.stop() for i in pairs(pDevices) do common.mobile.deleteConnection(i) end @@ -690,7 +696,7 @@ function common.unexpectedDisconnect(pAppId) if pAppId == nil then pAppId = 1 end common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true, appID = common.app.getHMIId(pAppId) }) - common.mobile.deleteSession(pAppId) + common.mobile.closeSession(pAppId) end function common.triggerPTUtoGetPTS() diff --git a/test_scripts/WebEngine/001_WS_Connection.lua b/test_scripts/WebEngine/001_WS_Connection.lua new file mode 100644 index 0000000000..32a2a311ac --- /dev/null +++ b/test_scripts/WebEngine/001_WS_Connection.lua @@ -0,0 +1,41 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Successfully registering the Web application over the WebSocket connection +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. Create WebSocket connection +-- a. SDL successfully established a WebSocket connection +-- 2. Register the Web application +-- a. SDL successfully registers Web application +-- 3. Activate the Web application +-- a. Web application is activated successfully on the HMI and it has FULL level +--------------------------------------------------------------------------------------------------- +--[[ General test configuration ]] +config.defaultMobileAdapterType = "WS" + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ General configuration parameters ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = {{webSocketServerSupport = {"ON"}}} + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Update WS Server Certificate parameters in smartDeviceLink.ini file", common.commentAllCertInIniFile) +runner.Step("Start SDL, HMI, connect regular mobile, start Session", common.startWOdeviceConnect) + +runner.Title("Test") +runner.Step("Connect WebEngine device", common.connectWebEngine, { 1, config.defaultMobileAdapterType }) +runner.Step("RAI of web app", common.registerApp, { 1, 1 }) +runner.Step("Activate web app", common.activateApp, { 1 }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/002_WSS_Connection.lua b/test_scripts/WebEngine/002_WSS_Connection.lua new file mode 100644 index 0000000000..b90058d624 --- /dev/null +++ b/test_scripts/WebEngine/002_WSS_Connection.lua @@ -0,0 +1,41 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Successfully registering the Web application over the WebSocket-Secure connection +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. Create WebSocket-Secure connection +-- a. SDL successfully established a WebSocket-Secure connection +-- 2. Register the Web application +-- a. Web application is registered successfully +-- 3. Activate the Web application +-- a. Web application is activated successfully on the HMI and it has FULL level +--------------------------------------------------------------------------------------------------- +--[[ General test configuration ]] +config.defaultMobileAdapterType = "WSS" + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ General configuration parameters ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = {{webSocketServerSupport = {"ON"}}} + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Add certificates for WS Server in smartDeviceLink.ini file", common.addAllCertInIniFile) +runner.Step("Start SDL, HMI, connect regular mobile, start Session", common.startWOdeviceConnect) + +runner.Title("Test") +runner.Step("Connect WebEngine device", common.connectWebEngine, { 1, config.defaultMobileAdapterType }) +runner.Step("RAI of web app", common.registerApp, { 1, 1 }) +runner.Step("Activate web app", common.activateApp, { 1 }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/003_WSS_connection_missing_client_certificate.lua b/test_scripts/WebEngine/003_WSS_connection_missing_client_certificate.lua new file mode 100644 index 0000000000..21eb0aaf2d --- /dev/null +++ b/test_scripts/WebEngine/003_WSS_connection_missing_client_certificate.lua @@ -0,0 +1,38 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL does not establish WebSocket-Secure connection in case of WS Client Certificate is not define +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. Create WebSocket-Secure connection +-- a. SDL does not establish WebSocket-Secure connection +--------------------------------------------------------------------------------------------------- +--[[ General test configuration ]] +config.defaultMobileAdapterType = "WSS" + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ General configuration parameters ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = {{webSocketServerSupport = {"ON"}}} + +config.wssCertificateCAPath = "./files/Security/WebEngine/ca-cert.pem" +config.wssCertificateClientPath = "" +config.wssPrivateKeyPath = "./files/Security/WebEngine/client-key.pem" + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Add certificates for WS Server in smartDeviceLink.ini file", common.addAllCertInIniFile) +runner.Step("Start SDL, HMI, connect regular mobile, start Session", common.startWOdeviceConnect) +runner.Title("Test") +runner.Step("Connect WebEngine device", common.connectWSSWebEngine) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/004_WSS_connection_selfSigned_client_sertificate.lua b/test_scripts/WebEngine/004_WSS_connection_selfSigned_client_sertificate.lua new file mode 100644 index 0000000000..2bc03c00d1 --- /dev/null +++ b/test_scripts/WebEngine/004_WSS_connection_selfSigned_client_sertificate.lua @@ -0,0 +1,39 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL does not establish WebSocket-Secure connection in case of WS Client Certificate is self signed +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. Create WebSocket-Secure connection +-- a. SDL does not establish WebSocket-Secure connection +--------------------------------------------------------------------------------------------------- +--[[ General test configuration ]] +config.defaultMobileAdapterType = "WSS" + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ General configuration parameters ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = {{webSocketServerSupport = {"ON"}}} + +config.wssCertificateCAPath = "./files/Security/WebEngine/ca-cert.pem" +config.wssCertificateClientPath = "./files/Security/WebEngine/SelfSigned/client-cert.pem" +config.wssPrivateKeyPath = "./files/Security/WebEngine/SelfSigned/client-key.pem" + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Add certificates for WS Server in smartDeviceLink.ini file", common.addAllCertInIniFile) +runner.Step("Start SDL, HMI, connect regular mobile, start Session", common.startWOdeviceConnect) + +runner.Title("Test") +runner.Step("Connect WebEngine device", common.connectWSSWebEngine) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/005_WSS_connection_missing_serverSslPrameters.lua b/test_scripts/WebEngine/005_WSS_connection_missing_serverSslPrameters.lua new file mode 100644 index 0000000000..5368b5e387 --- /dev/null +++ b/test_scripts/WebEngine/005_WSS_connection_missing_serverSslPrameters.lua @@ -0,0 +1,55 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL does not establish WebSocket-Secure connection in case of WS Server Certificate +-- does not define in SmartDeviceLink.ini file +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. Create WebSocket-Secure connection +-- a. SDL does not establish WebSocket-Secure connection +--------------------------------------------------------------------------------------------------- +--[[ General test configuration ]] +config.defaultMobileAdapterType = "WSS" + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/WebEngine/commonWebEngine') +local hmi_values = require('user_modules/hmi_values') + +--[[ General configuration parameters ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = {{webSocketServerSupport = {"ON"}}} + +--[[ Local Variables ]] +local sslParametersServer = { + "WSServerCertificatePath", + "WSServerKeyPath", + "WSServerCACertificatePath" +} +local hmiValues = hmi_values.getDefaultHMITable() +hmiValues.BasicCommunication.UpdateDeviceList.occurrence = 0 + +--[[ Local Functions ]] +local function addAllCertInIniFile(pCertName) + common.addAllCertInIniFile() + common.setSDLIniParameter(pCertName, ";") +end + +--[[ Scenario ]] +for _, value in ipairs(sslParametersServer) do + runner.Title("Preconditions") + runner.Step("Clean environment", common.preconditions) + runner.Step("Update WS Server Certificate parameters in smartDeviceLink.ini file", addAllCertInIniFile, + { value }) + runner.Step("Start SDL, HMI, connect regular mobile, start Session", common.startWOdeviceConnect, { hmiValues }) + + runner.Title("Test") + runner.Step("Connect WebEngine device", common.connectWSSWebEngine) + + runner.Title("Postconditions") + runner.Step("Stop SDL", common.postconditions) +end diff --git a/test_scripts/WebEngine/006_SetAppProperties_success_flow.lua b/test_scripts/WebEngine/006_SetAppProperties_success_flow.lua new file mode 100644 index 0000000000..c143791051 --- /dev/null +++ b/test_scripts/WebEngine/006_SetAppProperties_success_flow.lua @@ -0,0 +1,42 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the SetAppProperties request from HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends BC.GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with application properties of the policyAppID to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local propTypes = { + hybridAppPreference = { "MOBILE", "CLOUD", "BOTH" }, + enabled = { true, false } +} + +-- [[ Scenario ]] +for parameter, pValues in pairs(propTypes) do + common.Title("TC processing [" .. parameter .."] parameter") + common.Title("Preconditions") + common.Step("Clean environment", common.preconditions) + common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + + common.Title("Test") + for _, value in pairs(pValues) do + common.Step("SetAppProperties request parameter " .. parameter .. " with ".. tostring(value), + common.setAppProperties, { common.updateDefaultAppProperties(parameter, value) }) + common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.updateDefaultAppProperties(parameter, value) }) + end + + common.Title("Postconditions") + common.Step("Stop SDL", common.postconditions) +end diff --git a/test_scripts/WebEngine/007_SetAppProperties_with_invalid_parameters.lua b/test_scripts/WebEngine/007_SetAppProperties_with_invalid_parameters.lua new file mode 100644 index 0000000000..968c562e61 --- /dev/null +++ b/test_scripts/WebEngine/007_SetAppProperties_with_invalid_parameters.lua @@ -0,0 +1,64 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL responds with success:false, "INVALID_DATA" on request with invalid parameters type +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with invalid parameters type +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +-- 2. HMI sends BC.GetAppProperties request with wrong policyAppID to SDL +-- a. SDL sends response with success:false, "DATA_NOT_AVAILABLE" to HMI +-- 3. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 4. HMI sends BC.SetAppProperties request with invalid parameters type +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +-- 5. HMI sends BC.GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with application properties of the policyAppID to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local invalidAppPropType = { + -- value type is updated to string instead of array + nicknames = "Test Web Application invalidType", + -- value type is updated to integer instead of string + policyAppID = 5, + -- value type is updated to string instead of boolean + enabled = "false", + -- value type is updated to integer instead of string + authToken = 12345, + -- value type is updated to integer instead of string + transportType = 123, + -- value type is updated to "INVALID_TYPE" instead of ("BOTH", "CLOUD", "MOBILE") + hybridAppPreference = "INVALID_TYPE", + -- value type is updated to integer instead of string + endpoint = 8080 +} + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +for parameter, value in pairs(invalidAppPropType) do + common.Step("SetAppProperties request: invalid parameter type " .. parameter .. " with ".. tostring(value), + common.errorRPCprocessingUpdate, { "SetAppProperties", common.resultCode.INVALID_DATA, parameter, value }) + common.Step("GetAppProperties request: with policyAppID", + common.errorRPCprocessing, { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE }) +end + +common.Step("SetAppProperties request for policyAppID", common.setAppProperties, { common.defaultAppProperties }) +for parameter, value in pairs(invalidAppPropType) do + common.Step("SetAppProperties request: invalid parameter type " .. parameter .. " with ".. tostring(value), + common.errorRPCprocessingUpdate, { "SetAppProperties", common.resultCode.INVALID_DATA, parameter, value }) + common.Step("GetAppProperties request: with policyAppID", common.getAppProperties, { common.defaultAppProperties }) +end + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/008_SetAppProperties_with_unknown_parameters.lua b/test_scripts/WebEngine/008_SetAppProperties_with_unknown_parameters.lua new file mode 100644 index 0000000000..5d5994411d --- /dev/null +++ b/test_scripts/WebEngine/008_SetAppProperties_with_unknown_parameters.lua @@ -0,0 +1,29 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the SetAppProperties request with unknown parameter from HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends the BC.SetAppProperties request with unknown parameter +-- a. SDL cuts off the unknown parameter and process this RPC as assigned +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request: with unknown parameter", common.setAppProperties, + { common.updateDefaultAppProperties("unknownParameter", "unknownParameter") }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.defaultAppProperties }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/009_SetAppProperties_with_mandatory_parameter.lua b/test_scripts/WebEngine/009_SetAppProperties_with_mandatory_parameter.lua new file mode 100644 index 0000000000..d600defe10 --- /dev/null +++ b/test_scripts/WebEngine/009_SetAppProperties_with_mandatory_parameter.lua @@ -0,0 +1,80 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the SetAppProperties request with only mandatory parameters from HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties (only mandatory parameters, +-- missing some not mandatory parameters ) of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends BC.GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with appropriate application properties of the policyAppID to HMI +-------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appPropMandatory = { + policyAppID = "0000001" +} + +local appPropMandatoryResponse = { + policyAppID = "0000001", + enabled = false, + nicknames = common.EMPTY_ARRAY +} + +local appPropMissingSomeParam = { + policyAppID = "0000001", + enabled = false, + nicknames = common.EMPTY_ARRAY, + authToken = "ABCD12345", + transportType = "WS" + -- hybridAppPreference is missed + -- endpoint is missed +} + +local appPropUpdateParam = { + policyAppID = "0000001", + nicknames = { "Test Web Application_1", "Test Web Application_2" }, + hybridAppPreference = "CLOUD", + endpoint = "ws://127.0.0.1:8080/", + enabled = true + -- authToken is missed + -- transportType is missed +} + +local appPropUpdateParamResponse = { + nicknames = { "Test Web Application_1", "Test Web Application_2" }, + policyAppID = "0000001", + enabled = true, + hybridAppPreference = "CLOUD", + endpoint = "ws://127.0.0.1:8080/", + authToken = "ABCD12345", + transportType = "WS" +} + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request: mandatory parameters only", common.setAppProperties, { appPropMandatory }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { appPropMandatoryResponse }) +common.Step("SetAppProperties request: one of parameters is missing", common.setAppProperties, + { appPropMissingSomeParam }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { appPropMissingSomeParam }) +common.Step("SetAppProperties request: update some parameter", common.setAppProperties, { appPropUpdateParam }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { appPropUpdateParamResponse }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/010_SetAppProperties_without_mandatory_parameter.lua b/test_scripts/WebEngine/010_SetAppProperties_without_mandatory_parameter.lua new file mode 100644 index 0000000000..7d73876d56 --- /dev/null +++ b/test_scripts/WebEngine/010_SetAppProperties_without_mandatory_parameter.lua @@ -0,0 +1,62 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL responds with success:false, "INVALID_DATA" to request without mandatory parameters +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties (without mandatory parameters) +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +-- 2. HMI sends BC.GetAppProperties request with wrong policyAppID to SDL +-- a. SDL sends response with success:false, "DATA_NOT_AVAILABLE" to HMI +-- 3. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 4. HMI sends BC.GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with application properties of the policyAppID to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appPropWOMandatory = { + properties = { + -- policyAppId is missed + nicknames = { "Test Web Application_3" }, + enabled = false, + authToken = "ABCD", + transportType = "WSS", + hybridAppPreference = "BOTH", + endpoint = "wss://127.0.0.1:8080/" + } +} + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request: mandatory parameter policyAppID is missing", common.errorRPCprocessing, + { "SetAppProperties", common.resultCode.INVALID_DATA, appPropWOMandatory }) +common.Step("GetAppProperties request to check set values", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE }) +common.Step("SetAppProperties request: mandatory parameter properties is missing", common.errorRPCprocessing, + { "SetAppProperties", common.resultCode.INVALID_DATA }) +common.Step("GetAppProperties request to check set values", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE }) + +common.Step("SetAppProperties request for policyAppID", common.setAppProperties, { common.defaultAppProperties }) +common.Step("SetAppProperties request: mandatory parameter policyAppID is missing", common.errorRPCprocessing, + { "SetAppProperties", common.resultCode.INVALID_DATA, appPropWOMandatory }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.defaultAppProperties }) +common.Step("SetAppProperties request: mandatory parameter 'properties' is missing", common.errorRPCprocessing, + { "SetAppProperties", common.resultCode.INVALID_DATA }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.defaultAppProperties }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/011_SetAppProperties_in_range_Str.lua b/test_scripts/WebEngine/011_SetAppProperties_in_range_Str.lua new file mode 100644 index 0000000000..2bd74a57d6 --- /dev/null +++ b/test_scripts/WebEngine/011_SetAppProperties_in_range_Str.lua @@ -0,0 +1,58 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the SetAppProperties request with the minlength and maxlength for String type from HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with the application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends the GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with application properties of the policyAppID to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local strInRangeAppProperties = { + nicknames = { + stringMinMaxLength = { "", string.rep("a", 100)} + }, + policyAppID = { + stringMinLength = string.rep("a", 1), + stringMaxLength = string.rep("a", 100) + }, + authToken = { + stringMinLength = string.rep("a", 1), + stringMaxLength = string.rep("a", 65535) + }, + transportType = { + stringMinLength = string.rep("a", 1), + stringMaxLength = string.rep("a", 100) + }, + endpoint = { + stringMinLength = string.rep("a", 1), + stringMaxLength = string.rep("a", 100) + } +} + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +for parameter, range in pairs(strInRangeAppProperties) do + for length, value in pairs(range) do + common.Step("SetAppProperties request parameter " .. parameter .. " to " .. length, + common.setAppProperties, { common.updateDefaultAppProperties(parameter, value) }) + common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.updateDefaultAppProperties(parameter, value) }) + end +end + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/012_SetAppProperties_in_range_Array.lua b/test_scripts/WebEngine/012_SetAppProperties_in_range_Array.lua new file mode 100644 index 0000000000..c688d80d01 --- /dev/null +++ b/test_scripts/WebEngine/012_SetAppProperties_in_range_Array.lua @@ -0,0 +1,61 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the SetAppProperties request with the minsize and maxsize value for Array type, +-- minlength and maxlength for array element +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with the application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends the GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with application properties of the policyAppID to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local boundaryNicknames = { + minsize = 0, + maxsize = 100, + minLength = 0, + maxLength = 100 +} + +local stringMinLength = string.rep("a", boundaryNicknames.minLength) +local stringMaxLength = string.rep("a", boundaryNicknames.maxLength) + +local arrayMaxSizeMinLengthNicknames = {} +local arrayMaxSizeMaxLengthNicknames = {} + +for i = 1, boundaryNicknames.maxsize do + arrayMaxSizeMinLengthNicknames[i] = stringMinLength + arrayMaxSizeMaxLengthNicknames[i] = stringMaxLength +end + +local arrayMinSize = common.EMPTY_ARRAY + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request: nicknames of maxsize, minlength", common.setAppProperties, + { common.updateDefaultAppProperties("nicknames", arrayMaxSizeMinLengthNicknames) }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.updateDefaultAppProperties("nicknames", arrayMaxSizeMinLengthNicknames) }) +common.Step("SetAppProperties request: nicknames of maxsize, maxlength", common.setAppProperties, + { common.updateDefaultAppProperties("nicknames", arrayMaxSizeMaxLengthNicknames) }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.updateDefaultAppProperties("nicknames", arrayMaxSizeMaxLengthNicknames) }) +common.Step("SetAppProperties request: nicknames of minsize", common.setAppProperties, + { common.updateDefaultAppProperties("nicknames", arrayMinSize) }) +common.Step("GetAppProperties request to check set values", common.getAppProperties, + { common.updateDefaultAppProperties("nicknames", arrayMinSize) }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/013_SetAppProperties_out_of_range_Str.lua b/test_scripts/WebEngine/013_SetAppProperties_out_of_range_Str.lua new file mode 100644 index 0000000000..09cf9f3c80 --- /dev/null +++ b/test_scripts/WebEngine/013_SetAppProperties_out_of_range_Str.lua @@ -0,0 +1,55 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL responds with success:false, "INVALID_DATA" on request with value in out of range for String type +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends the SetAppProperties request with out of range for String type +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local strOutOfRangeAppProperties = { + nicknames = { + stringOutOfMaxLength = string.rep("a", 101) + }, + policyAppID = { + stringOutOfMinLength = string.rep("a", 0), + stringOutOfMaxLength = string.rep("a", 101) + }, + authToken = { + stringOutOfMinLength = string.rep("a", 0), + stringOutOfMaxLength = string.rep("a", 65536) + }, + transportType = { + stringOutOfMinLength = string.rep("a", 0), + stringOutOfMaxLength = string.rep("a", 101) + }, + endpoint = { + stringOutOfMinLength = string.rep("a", 0), + stringOutOfMaxLength = string.rep("a", 65536) + } +} + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +for parameter, range in pairs(strOutOfRangeAppProperties) do + for length, value in pairs(range) do + common.Step("SetAppProperties request parameter " .. parameter .. " to " .. length, + common.errorRPCprocessingUpdate, { "SetAppProperties", common.resultCode.INVALID_DATA, parameter, value }) + common.Step("GetAppProperties request to check set values", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE }) + end +end +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/014_SetAppProperties_out_of_range_Array.lua b/test_scripts/WebEngine/014_SetAppProperties_out_of_range_Array.lua new file mode 100644 index 0000000000..78a3271bfa --- /dev/null +++ b/test_scripts/WebEngine/014_SetAppProperties_out_of_range_Array.lua @@ -0,0 +1,52 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL responds with success:false, "INVALID_DATA" on request with value in out of range for Array type, +-- minlength and maxlength for array element +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends the SetAppProperties request with out of range for Array type +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local boundaryNicknames = { + minsize = 0, + maxsize = 100, + minLength = 0, + maxLength = 100 +} + +local stringMinLength = string.rep("a", boundaryNicknames.minLength) +local stringMaxLength = string.rep("a", boundaryNicknames.maxLength) + +local arrayOutOfRangeMaxSizeMinLengthNicknames = {} +local arrayOutOfRangeMaxSizeMaxLengthNicknames = {} + +for i = 1, boundaryNicknames.maxsize + 1 do + arrayOutOfRangeMaxSizeMinLengthNicknames[i] = stringMinLength + arrayOutOfRangeMaxSizeMaxLengthNicknames[i] = stringMaxLength +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request: nicknames out of maxsize, minlength", common.errorRPCprocessingUpdate, + { "SetAppProperties", common.resultCode.INVALID_DATA, "nicknames", arrayOutOfRangeMaxSizeMinLengthNicknames }) +common.Step("GetAppProperties request to check set values", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE }) +common.Step("SetAppProperties request: nicknames out of maxsize, maxlength", common.errorRPCprocessingUpdate, + { "SetAppProperties", common.resultCode.INVALID_DATA, "nicknames", arrayOutOfRangeMaxSizeMaxLengthNicknames }) +common.Step("GetAppProperties request to check set values", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE }) +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua b/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua new file mode 100644 index 0000000000..3d129eaf7c --- /dev/null +++ b/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua @@ -0,0 +1,72 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the GetAppProperties request from HMI (with parameter, with omitted policyAppID parameter) +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties of the policyAppID1 to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends BC.SetAppProperties request with application properties of the policyAppID2 to SDL +-- a. SDL sends successful response to HMI +-- 3. HMI sends BC.GetAppProperties request with policyAppID1 to SDL +-- a. SDL sends successful response with application properties of the policyAppID1 to HMI +-- 4. HMI sends BC.GetAppProperties request with policyAppID2 to SDL +-- a. SDL sends successful response with application properties of the policyAppID2 to HMI +-- 5. HMI sends BC.GetAppProperties request with omitted policyAppID parameter to SDL +-- a. SDL sends successful response with all applications properties ( policyAppID1, policyAppID2 ) to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appProperties1 = { + nicknames = { "Test Web Application_11" }, + policyAppID = "0000001", + enabled = true, + authToken = "ABCD12345", + transportType = "WS", + hybridAppPreference = "CLOUD", + endpoint = "ws://127.0.0.1:8080/" +} + +local appProperties2 = { + nicknames = { "Test Web Application_21", "Test Web Application_22" }, + policyAppID = "0000002", + enabled = false +} + +--[[ Local Functions ]] +local function getAppPropertiesAll(pData) + local sdlResponseDataResult = {} + sdlResponseDataResult.success = true + sdlResponseDataResult.resultCode = "SUCCESS" + sdlResponseDataResult.properties = pData + local corId = common.getHMIConnection():SendRequest("BasicCommunication.GetAppProperties", {}) + common.getHMIConnection():ExpectResponse(corId, { result = sdlResponseDataResult }) + :ValidIf(function(_,data) + return common.validation(data.result.properties, sdlResponseDataResult.properties, + "BasicCommunication.GetAppProperties") + end) +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) +common.Step("SetAppProperties request for policyAppID1", common.setAppProperties, { appProperties1 }) +common.Step("SetAppProperties request for policyAppID2", common.setAppProperties, { appProperties2 }) + +common.Title("Test") +common.Step("GetAppProperties request: with policyAppID1", common.getAppProperties, + { appProperties1 }) +common.Step("GetAppProperties request: with policyAppID2", common.getAppProperties, + { appProperties2 }) +common.Step("GetAppProperties request: policyAppID is missing", getAppPropertiesAll, + {{ appProperties1, appProperties2 }}) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua b/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua new file mode 100644 index 0000000000..a26975f859 --- /dev/null +++ b/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua @@ -0,0 +1,49 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the GetAppProperties request with (unknown parameter, invalid parameter type) from HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends BC.GetAppProperties request with unknown parameter to SDL +-- a. SDL cuts off the unknown parameter and process this RPC as assigned +-- 3. HMI sends BC.GetAppProperties request with invalid parameter type to SDL +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Functions ]] +local function getAppPropertiesUnknownParameter(pData) + local hmiResponseDataResult = {} + hmiResponseDataResult.success = true + hmiResponseDataResult.resultCode = "SUCCESS" + hmiResponseDataResult.properties = { pData } + local corId = common.getHMIConnection():SendRequest("BasicCommunication.GetAppProperties", + { unknownParameter = "unknownParameter" }) + common.getHMIConnection():ExpectResponse(corId, { result = hmiResponseDataResult }) + :ValidIf(function(_,data) + return common.validation(data.result.properties, hmiResponseDataResult.properties, + "BasicCommunication.GetAppProperties") + end) +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request", common.setAppProperties, { common.defaultAppProperties }) +common.Step("GetAppProperties request: with unknown parameter", getAppPropertiesUnknownParameter, + { common.defaultAppProperties }) +common.Step("GetAppProperties request: policyAppID is invalid type", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.INVALID_DATA, { policyAppID = 123 }}) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/017_GetAppProperties_wrong_policyAppID.lua b/test_scripts/WebEngine/017_GetAppProperties_wrong_policyAppID.lua new file mode 100644 index 0000000000..12c923c555 --- /dev/null +++ b/test_scripts/WebEngine/017_GetAppProperties_wrong_policyAppID.lua @@ -0,0 +1,30 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL responds with success:false, "DATA_NOT_AVAILABLE" on GetAppProperties request +-- with wrong policyAppID +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. HMI sends BC.GetAppProperties request with wrong policyAppID to SDL +-- a. SDL sends response with success:false, "DATA_NOT_AVAILABLE" to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("GetAppProperties request: wrong policyAppID", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.DATA_NOT_AVAILABLE, { policyAppID = "WrongPolicyAppID" }}) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/018_GetAppProperties_out_of_range_Str.lua b/test_scripts/WebEngine/018_GetAppProperties_out_of_range_Str.lua new file mode 100644 index 0000000000..c8368b78a0 --- /dev/null +++ b/test_scripts/WebEngine/018_GetAppProperties_out_of_range_Str.lua @@ -0,0 +1,34 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that the SDL responds with success:false, "INVALID_DATA" on request with value +-- in out of range for String type +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends the GetAppProperties request with out of range for String type +-- a. SDL sends response with success:false, "INVALID_DATA" to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local stringOutOfMinLengthPolicyAppID = string.rep("a", 0) +local stringOutOfMaxLengthPolicyAppID = string.rep("a", 101) + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("GetAppProperties request: policyAppID to minLenght", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.INVALID_DATA, { policyAppID = stringOutOfMinLengthPolicyAppID }}) +common.Step("GetAppProperties request: policyAppID to maxLenght", common.errorRPCprocessing, + { "GetAppProperties", common.resultCode.INVALID_DATA, { policyAppID = stringOutOfMaxLengthPolicyAppID }}) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/019_OnAppPropertiesChange_success_flow.lua b/test_scripts/WebEngine/019_OnAppPropertiesChange_success_flow.lua new file mode 100644 index 0000000000..a4fb81654f --- /dev/null +++ b/test_scripts/WebEngine/019_OnAppPropertiesChange_success_flow.lua @@ -0,0 +1,90 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the OnAppPropertiesChange notification to HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties +-- (only mandatory, all parameters, the same parameters ) of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- b. SDL sends BC.OnAppPropertiesChange notification with appropriate app properties parameters to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local notExpected = 0 + +local appProperties = { + policyAppID = "0000001" +} + +local appPropertiesExpect = { + policyAppID = "0000001", + enabled = false, + nicknames = common.EMPTY_ARRAY +} + +local appProperties1 = { + nicknames = { "nickname_11", "nickname_12" }, + policyAppID = "0000001", + enabled = true, + authToken = "authToken1", + transportType = "transportType1", + hybridAppPreference = "CLOUD", + endpoint = "endpoint1" +} + +local appProperties2 = { + nicknames = { "nickname_22", "nickname_21" }, + policyAppID = "0000001", + enabled = false, + authToken = "authToken2", + transportType = "transportType2", + hybridAppPreference = "BOTH", + endpoint = "endpoint2" +} + +local appProperties3 = { + nicknames = common.EMPTY_ARRAY, + policyAppID = "0000001", + enabled = false, + authToken = "authToken2", + transportType = "transportType2", + hybridAppPreference = "BOTH", + endpoint = "endpoint2" +} + +--[[ Local Variables ]] +local function onAppPropertiesChange(pData, pDataExpect, pTimes) + common.setAppProperties(pData) + common.onAppPropertiesChange(pDataExpect, pTimes) +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("OnAppPropertiesChange notification: added only mandatory app properties parameter", + onAppPropertiesChange, { appProperties, appPropertiesExpect }) + +common.Step("OnAppPropertiesChange notification: added all app properties parameters", + onAppPropertiesChange, { appProperties1, appProperties1 }) + +common.Step("OnAppPropertiesChange notification: update all app properties parameters", + onAppPropertiesChange, { appProperties2, appProperties2 }) + +common.Step("OnAppPropertiesChange notification: update with the same app properties parameters", + onAppPropertiesChange, { appProperties2, appProperties2, notExpected }) + +common.Step("OnAppPropertiesChange notification: update with the empty nicknames", + onAppPropertiesChange, { appProperties3, appProperties3 }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/020_OnAppPropertiesChange_notification_on_PTU_Mobile_HMI.lua b/test_scripts/WebEngine/020_OnAppPropertiesChange_notification_on_PTU_Mobile_HMI.lua new file mode 100644 index 0000000000..056c7dd9c6 --- /dev/null +++ b/test_scripts/WebEngine/020_OnAppPropertiesChange_notification_on_PTU_Mobile_HMI.lua @@ -0,0 +1,125 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the OnAppPropertiesChange notification on update from (PTU, Mobile, HMI) to HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- 2. Mobile app is registered +-- +-- Sequence: +-- 1. PTU is performed, the update contains app properties of the policyAppID +-- a. SDL sends BC.OnAppPropertiesChange notification with appropriate app properties parameters to HMI +-- 2. MobileApp sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to MobileApp +-- b. SDL sends BC.OnAppPropertiesChange notification with appropriate app properties parameters to HMI +-- 3. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- b. SDL sends BC.OnAppPropertiesChange notification with appropriate app properties parameters to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appPropPTU = { + nicknames = { "Test Web Application_11", "Test Web Application_12" }, + enabled = true, + auth_token = "ABCD1111", + cloud_transport_type = "WS", + hybrid_app_preference = "MOBILE", + endpoint = "ws://127.0.0.1:8080/", + keep_context = false, + steal_focus = false, + priority = "NONE", + default_hmi = "NONE", + groups = { "Base-4" } +} + +local appPropPTUExpect = { + nicknames = appPropPTU.nicknames, + policyAppID = "0000002", + enabled = appPropPTU.enabled, + authToken = appPropPTU.auth_token, + transportType = appPropPTU.cloud_transport_type, + hybridAppPreference = appPropPTU.hybrid_app_preference, + endpoint = appPropPTU.endpoint +} + +local appPropMobile = { + properties = { + nicknames = { "Test Web Application_21", "Test Web Application_22" }, + appID = "0000002", + enabled = true, + authToken = "ABCD2222", + cloudTransportType = "WSS", + hybridAppPreference = "BOTH", + endpoint = "ws://127.0.0.1:8080/" + } +} + +local appPropMobileExpect = { + nicknames = appPropMobile.properties.nicknames, + policyAppID = appPropMobile.properties.appID, + enabled = appPropMobile.properties.enabled, + authToken = appPropMobile.properties.authToken, + transportType = appPropMobile.properties.cloudTransportType, + hybridAppPreference = appPropMobile.properties.hybridAppPreference, + endpoint = appPropMobile.properties.endpoint +} + +local appPropHMI = { + nicknames = { "Test Web Application_31", "Test Web Application_32" }, + policyAppID = "0000002", + enabled = true, + authToken = "ABCD3333", + transportType = "WS", + hybridAppPreference = "CLOUD", + endpoint = "ws://127.0.0.1:8080/" +} + +--[[ Local Variables ]] +local function PTUfunc(tbl) + tbl.policy_table.app_policies[common.getConfigAppParams(2).fullAppID] = appPropPTU; +end + +local function onAppPropertiesChangePTU() + common.getHMIConnection():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + common.getHMIConnection():ExpectNotification("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) + common.onAppPropertiesChange(appPropPTUExpect) +end + +local function onAppPropertiesChangeMobile() + common.processRPCSuccess(1, "SetCloudAppProperties", appPropMobile) + common.onAppPropertiesChange(appPropMobileExpect) +end + +local function onAppPropertiesChangeHMI(pData) + common.setAppProperties(pData) + common.onAppPropertiesChange(pData) +end + +local function updatePreloadedPT() + local pt = common.getPreloadedPT() + pt.policy_table.functional_groupings["DataConsent-2"].rpcs = common.null + pt.policy_table.functional_groupings["Base-4"].rpcs.SetCloudAppProperties = { + hmi_levels = { "FULL", "NONE", "LIMITED", "BACKGROUND" } + } + common.setPreloadedPT(pt) +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Back-up/update PPT", updatePreloadedPT) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) +common.Step("RAI", common.registerApp) + +common.Title("Test") +common.Step("App activation", common.activateApp) +common.Step("OnAppPropertiesChange notification: on PTU", common.policyTableUpdate, + { PTUfunc, onAppPropertiesChangePTU }) +common.Step("OnAppPropertiesChange notification: on MobileApp", onAppPropertiesChangeMobile ) +common.Step("OnAppPropertiesChange notification: on HMI", onAppPropertiesChangeHMI, { appPropHMI, appPropHMI }) + +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/021_UpdateAppList.lua b/test_scripts/WebEngine/021_UpdateAppList.lua new file mode 100644 index 0000000000..3dc7ed2040 --- /dev/null +++ b/test_scripts/WebEngine/021_UpdateAppList.lua @@ -0,0 +1,59 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the UpdateAppList request to HMI +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with new application properties 'enabled' = false of the policyAppID1 to SDL +-- a. SDL sends successful response to HMI +-- b. SDL does not send an UpdateAppList message with policyAppID1 to HMI +-- 2. HMI sends BC.SetAppProperties request with modified app properties 'enabled' = true of the policyAppID1 to SDL +-- a. SDL sends successful response to HMI +-- b. SDL sends an UpdateAppList message with policyAppID1 to HMI +-- 3. HMI sends BC.SetAppProperties request with modified app properties 'enabled' = false of the policyAppID1 to SDL +-- a. SDL sends successful response to HMI +-- b. SDL does not send an UpdateAppList message with policyAppID1 to HMI +-- 4. HMI sends BC.SetAppProperties request with app properties 'enabled' = true of the policyAppID2 to SDL +-- a. SDL sends successful response to HMI +-- b. SDL sends an UpdateAppList message with policyAppID2 and without policyAppID1 to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Functions ]] +local expected = 1 + +--[[ Local Functions ]] +local function setAppProperties(pAppId, pEnabled, pTimes, pExpNumOfApps) + local webAppProperties = { + nicknames = { "Test Web Application_" .. pAppId }, + policyAppID = "000000" .. pAppId, + enabled = pEnabled, + transportType = "WS", + hybridAppPreference = "CLOUD" + } + common.setAppProperties(webAppProperties) + common.checkUpdateAppList(webAppProperties.policyAppID, pTimes, pExpNumOfApps) +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("UpdateAppList on setAppProperties for policyAppID1: enabled = false", + setAppProperties, { 1, false }) +common.Step("UpdateAppList on setAppProperties for policyAppID1: modified enabled from false to true", + setAppProperties, { 1, true, expected, 1 }) +common.Step("UpdateAppList on setAppProperties for policyAppID1: modified enabled from true to false", + setAppProperties, { 1, false, expected, 0 }) +common.Step("UpdateAppList on setAppProperties for policyAppID2: enabled = true", + setAppProperties, { 2, true, expected, 1 }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/022_UpdateAppList_on_start.lua b/test_scripts/WebEngine/022_UpdateAppList_on_start.lua new file mode 100644 index 0000000000..1b24ae108d --- /dev/null +++ b/test_scripts/WebEngine/022_UpdateAppList_on_start.lua @@ -0,0 +1,68 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the UpdateAppList request to HMI on start +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with new application properties 'enabled' = false of the policyAppID1 to SDL +-- a. SDL sends successful response to HMI +-- 2. Ignition off/on are performed +-- a. SDL does not send an UpdateAppList message with policyAppID1 to HMI +-- 3. HMI sends BC.SetAppProperties request with modified app properties 'enabled' = true of the policyAppID1 to SDL +-- a. SDL sends successful response to HMI +-- 4. Ignition off/on are performed +-- a. SDL sends an UpdateAppList message with policyAppID1 to HMI +-- 5. HMI sends BC.SetAppProperties request with new application properties 'enabled' = false of the policyAppID2 to SDL +-- a. SDL sends successful response to HMI +-- 6. Ignition off/on are performed +-- b. SDL sends an UpdateAppList message with policyAppID1 and without policyAppID2 to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Functions ]] +local expected = 1 +local notExpected = 0 + +--[[ Local Functions ]] +local function setAppProperties(pAppId, pEnabled) + local webAppProperties = { + nicknames = { "Test Web Application_" .. pAppId }, + policyAppID = "000000" .. pAppId, + enabled = pEnabled, + transportType = "WS", + hybridAppPreference = "CLOUD" + } + common.setAppProperties(webAppProperties) +end + +local function start(pAppID, pTimes, pExpNumOfApps) + local policyAppID = "000000" .. tostring(pAppID) + common.checkUpdateAppList(policyAppID, pTimes, pExpNumOfApps) + common.start() +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request for policyAppID1: enabled = false", setAppProperties, { 1, false }) +common.Step("IgnitionOff", common.ignitionOff) +common.Step("UpdateAppList on start: policyAppID1", start, { 1, notExpected}) + +common.Step("SetAppProperties request for policyAppID1: modified enabled from false to true", setAppProperties, { 1, true }) +common.Step("IgnitionOff", common.ignitionOff) +common.Step("UpdateAppList on start: policyAppID1", start, { 1, expected, 1}) + +common.Step("SetAppProperties request for policyAppID2: enabled = false", setAppProperties, { 2, false }) +common.Step("IgnitionOff", common.ignitionOff) +common.Step("UpdateAppList on start: policyAppID1", start, { 1, expected, 1}) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/023_UpdateAppList_unregister.lua b/test_scripts/WebEngine/023_UpdateAppList_unregister.lua new file mode 100644 index 0000000000..8517ced460 --- /dev/null +++ b/test_scripts/WebEngine/023_UpdateAppList_unregister.lua @@ -0,0 +1,62 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the UpdateAppList request to HMI if Web application is unregistered +-- +-- Precondition: +-- 1. SDL and HMI are started +-- 2. Web app is enabled through SetAppProperties +-- 3. Web app is registered and activated + +-- Sequence: +-- 1. Web app is unregistered +-- a. SDL does send BC.UpdateAppList with Web app since it is still enabled +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') +local runner = require('user_modules/script_runner') + +--[[ Required Shared libraries ]] +runner.testSettings.restrictions.sdlBuildOptions = {{webSocketServerSupport = {"ON"}}} + +--[[ Local Variables ]] + local appProp = { + nicknames = { "Test Application" }, + policyAppID = "0000001", + enabled = true, + authToken = "ABCD12345", + transportType = "WS", + hybridAppPreference = "CLOUD" + } + +--[[ Local Functions ]] +local function setAppProperties() + + common.checkUpdateAppList(appProp.policyAppID, 1, 1) + common.setAppProperties(appProp) +end + +local function unRegisterApp() + common.checkUpdateAppList(appProp.policyAppID, 1, 1) + common.unRegisterApp() +end + +local function registerApp() + common.registerAppWOPTU() + common.getHMIConnection():ExpectRequest("BasicCommunication.UpdateAppList") +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties enabled=true", setAppProperties) +common.Step("Register App", registerApp) +common.Step("Activate App", common.activateApp) +common.Step("Unregister App", unRegisterApp) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/024_AppProperties_are_stored_through_ignition_cycles.lua b/test_scripts/WebEngine/024_AppProperties_are_stored_through_ignition_cycles.lua new file mode 100644 index 0000000000..ad01376ac4 --- /dev/null +++ b/test_scripts/WebEngine/024_AppProperties_are_stored_through_ignition_cycles.lua @@ -0,0 +1,34 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that defined AppProperties are stored through ignition cycles +-- +-- Precondition: +-- 1. SDL and HMI are started + +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- 2. Ignition off is performed +-- 3. Ignition on is performed +-- 4. HMI sends BC.GetAppProperties request with policyAppID to SDL +-- a. SDL sends successful response with application properties of the policyAppID to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("SetAppProperties request for policyAppID", common.setAppProperties, { common.defaultAppProperties }) +common.Step("IgnitionOff", common.ignitionOff) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) +common.Step("GetAppProperties request: with policyAppID", common.getAppProperties, + { common.defaultAppProperties }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/025_PTU_update_app_properties.lua b/test_scripts/WebEngine/025_PTU_update_app_properties.lua new file mode 100644 index 0000000000..2dcd5b5692 --- /dev/null +++ b/test_scripts/WebEngine/025_PTU_update_app_properties.lua @@ -0,0 +1,59 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Applying of the update application properties for policyAppID from PTU +-- +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. PTU is performed, the update contains app properties of the policyAppID +-- 2. HMI sends the GetAppProperties request with appropriate policyAppID to SDL +-- a. SDL sends successful response with application properties data to HMI +-------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appPropPTU = { + nicknames = { "Test Web Application_11", "Test Web Application_12" }, + enabled = true, + auth_token = "ABCD1111", + cloud_transport_type = "WS", + hybrid_app_preference = "CLOUD", + keep_context = false, + steal_focus = false, + priority = "NONE", + default_hmi = "NONE", + groups = { "Base-4" } +} + +local appPropPTUExpect = { + nicknames = { "Test Web Application_11", "Test Web Application_12" }, + policyAppID = "0000002", + enabled = true, + authToken = "ABCD1111", + transportType = "WS", + hybridAppPreference = "CLOUD" +} + +--[[ Local Functions ]] +local function PTUfunc(tbl) + tbl.policy_table.app_policies[common.getConfigAppParams(2).fullAppID] = appPropPTU; +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("RAI", common.registerApp) +common.Step("PTU with app properties", common.policyTableUpdate, { PTUfunc }) +common.Step("GetAppProperties request to check PTU", common.getAppProperties, + { appPropPTUExpect }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/026_PTU_snapshot_validation.lua b/test_scripts/WebEngine/026_PTU_snapshot_validation.lua new file mode 100644 index 0000000000..037216fee1 --- /dev/null +++ b/test_scripts/WebEngine/026_PTU_snapshot_validation.lua @@ -0,0 +1,117 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Verify that PTU is performed after BC.SetAppProperties request with new application properties of the policyAppID +-- Precondition: +-- 1. SDL and HMI are started +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with new application properties of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- b. PTU is triggered, SDL sends UPDATE_NEDDED to HMI +-- с. PTS is created with application properties of the policyAppID +-------------------------------------------------------------------------------- +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appStoreConfig = { + keep_context = false, + steal_focus = false, + priority = "NONE", + default_hmi = "NONE", + groups = { "Base-4" } +} + +local appProperties = { + nicknames = { "Test Web Application_21", "Test Web Application_22" }, + policyAppID = "0000002", + enabled = true, + authToken = "ABCD12345", + transportType = "WS", + hybridAppPreference = "CLOUD" +} + +local appPropExpected = { + nicknames = { "Test Web Application_21", "Test Web Application_22" }, + auth_token = "ABCD12345", + cloud_transport_type = "WS", + enabled = "true", + hybrid_app_preference = "CLOUD" +} + +--[[ Local Functions ]] +local function PTUfunc(tbl) + tbl.policy_table.app_policies[common.getConfigAppParams().fullAppID] = appStoreConfig; +end + +local function setAppProperties(pData) + local corId = common.getHMIConnection():SendRequest("BasicCommunication.SetAppProperties", + { properties = pData }) + common.getHMIConnection():ExpectResponse(corId, + { result = { success = true, resultCode = "SUCCESS" }}) + common.isPTUStarted() + common.wait(1000) +end + +local function verifyAppProperties() + local snp_tbl = common.ptsTable() + local app_id = appProperties.policyAppID + local result = {} + local msg = "" + + result.nicknames = snp_tbl.policy_table.app_policies[app_id].nicknames + if not common.isTableEqual(result.nicknames, appPropExpected.nicknames) then + msg = msg .. "Incorrect nicknames\n" .. + " Expected: " .. common.tableToString(appPropExpected.nicknames) .. "\n" .. + " Actual: " .. common.tableToString(result.nicknames) .. "\n" + end + + result.auth_token = snp_tbl.policy_table.app_policies[app_id].auth_token + if not (result.auth_token == appPropExpected.auth_token) then + msg = msg .. "Incorrect auth token value\n" .. + " Expected: " .. appPropExpected.auth_token .. "\n" .. + " Actual: " .. result.auth_token .. "\n" + end + + result.cloud_transport_type = snp_tbl.policy_table.app_policies[app_id].cloud_transport_type + if not (result.cloud_transport_type == appPropExpected.cloud_transport_type) then + msg = msg .. "Incorrect cloud_transport_type value\n" .. + " Expected: " .. appPropExpected.cloud_transport_type .. "\n" .. + " Actual: " .. result.cloud_transport_type .. "\n" + end + + result.enabled = tostring(snp_tbl.policy_table.app_policies[app_id].enabled) + if not (result.enabled == appPropExpected.enabled) then + msg = msg .. "Incorrect enabled value\n".. + " Expected: " .. appPropExpected.enabled .. "\n" .. + " Actual: " .. result.enabled .. "\n" + end + + result.hybrid_app_preference = snp_tbl.policy_table.app_policies[app_id].hybrid_app_preference + if not (result.hybrid_app_preference == appPropExpected.hybrid_app_preference) then + msg = msg .. "Incorrect hybrid_app_preference value\n" .. + " Expected: " .. appPropExpected.hybrid_app_preference .. "\n" .. + " Actual: " .. result.hybrid_app_preference .. "\n" + end + + if string.len(msg) > 0 then + common.failTestStep("PTS is incorrect\n".. msg) + end +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("RAI", common.registerApp) +common.Step("PTU", common.policyTableUpdate, { PTUfunc }) +common.Step("SetAppProperties request to check: PTU is triggered", setAppProperties, { appProperties }) +common.Step("Verify app properties via PTS", verifyAppProperties) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua b/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua new file mode 100644 index 0000000000..2197dc32f6 --- /dev/null +++ b/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua @@ -0,0 +1,66 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0240-sdl-js-pwa.md +-- +-- Description: +-- Processing of the UpdateAppList request to HMI if Web application is unregistered +-- +-- Precondition: +-- 1. SDL and HMI are started +-- 2. Web WebApp_1 is enabled through SetAppProperties +-- 3. Web WebApp_2 is enabled through SetAppProperties +-- 4. Web WebApp_1 is registered and activated + +-- Sequence: +-- 1. Web app is unregistered +-- a. SDL sends BC.UpdateAppList with WebApp_1 and WebApp_2 since they are still enabled +--------------------------------------------------------------------------------------------------- +--[[ General test configuration ]] +config.defaultMobileAdapterType = "WS" + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ General configuration parameters ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = {{ webSocketServerSupport = { "ON" }}} + +--[[ Local Variables ]] +local expected = 1 + +--[[ Local Functions ]] +local function setAppProperties(pAppId, pEnabled, pTimes, pExpNumOfApps) + local webAppProperties = { + nicknames = { "Test Application" }, + policyAppID = "000000" .. pAppId, + enabled = pEnabled, + transportType = "WS", + hybridAppPreference = "CLOUD" + } + common.setAppProperties(webAppProperties) + common.checkUpdateAppList(webAppProperties.policyAppID, pTimes, pExpNumOfApps) +end + +local function unregisterApp(pAppID, pTimes, pExpNumOfApps) + local cid = common.getMobileSession(1):SendRPC("UnregisterAppInterface", {}) + common.getMobileSession():ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered") + common.checkUpdateAppList("000000" .. pAppID, pTimes, pExpNumOfApps) +end + +--[[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) + +common.Title("Test") +common.Step("UpdateAppList on setAppProperties for policyAppID1:enabled=true", + setAppProperties, { 1, true, expected, 1 }) +common.Step("UpdateAppList on setAppProperties for policyAppID2:enabled=true", + setAppProperties, { 2, true, expected, 2 }) +common.Step("RAI of web App1", common.registerApp, { 1, 1 }) +common.Step("Activate web app1", common.activateApp, { 1 }) +common.Step("Unregister App1", unregisterApp, { 2, expected, 2 }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/WebEngine/commonWebEngine.lua b/test_scripts/WebEngine/commonWebEngine.lua new file mode 100644 index 0000000000..0c6447d797 --- /dev/null +++ b/test_scripts/WebEngine/commonWebEngine.lua @@ -0,0 +1,316 @@ +--------------------------------------------------------------------------------------------------- +-- Common module +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local actions = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local runner = require('user_modules/script_runner') +local events = require('events') +local test = require("user_modules/dummy_connecttest") +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 2 + +--[[ Shared Functions ]] +local common = {} +common.Title = runner.Title +common.Step = runner.Step +common.start = actions.start +common.stopSDL = actions.sdl.stop +common.getHMIConnection = actions.hmi.getConnection +common.registerApp = actions.registerApp +common.registerAppWOPTU = actions.registerAppWOPTU +common.activateApp = actions.activateApp +common.getMobileSession = actions.getMobileSession +common.cloneTable = utils.cloneTable +common.printTable = utils.printTable +common.tableToString = utils.tableToString +common.isTableEqual = utils.isTableEqual +common.wait = actions.run.wait +common.getAppsCount = actions.getAppsCount +common.cprint = utils.cprint +common.getConfigAppParams = actions.getConfigAppParams +common.policyTableUpdate = actions.policyTableUpdate +common.ptsTable = actions.sdl.getPTS +common.isPTUStarted = actions.isPTUStarted +common.failTestStep = actions.run.fail +common.getPreloadedPT = actions.sdl.getPreloadedPT +common.setPreloadedPT = actions.sdl.setPreloadedPT +common.null = actions.json.null +common.EMPTY_ARRAY = actions.json.EMPTY_ARRAY +common.sdlBuildOptions = test.sdlBuildOptions +common.deletePTS = actions.sdl.deletePTS +common.runAfter = actions.run.runAfter +common.unRegisterApp = actions.app.unRegister +common.backupSDLIniFile = actions.sdl.backupSDLIniFile +common.setSDLIniParameter = actions.sdl.setSDLIniParameter + +--[[ Local Variables ]] +common.defaultAppProperties = { + nicknames = { "Test Web Application_1", "Test Web Application_2" }, + policyAppID = "0000001", + enabled = true, + authToken = "ABCD12345", + transportType = "WS", + hybridAppPreference = "CLOUD", + endpoint = "ws://127.0.0.1:8080/" +} + +common.resultCode = { + DATA_NOT_AVAILABLE = 9, + INVALID_DATA = 11 +} + +common.wssCertificateCAname = "ca-cert.pem" +common.wssCertificateClientName = "client-cert.pem" +common.wssPrivateKeyName = "client-key.pem" +common.wssServerPrivateKeyName = "server-key.pem" +common.wssCertificateServerName = "server-cert.pem" + +local aftCertPath = "./files/Security/WebEngine/" + +config.wssCertificateCAPath = aftCertPath.. common.wssCertificateCAname +config.wssCertificateClientPath = aftCertPath .. common.wssCertificateClientName +config.wssPrivateKeyPath = aftCertPath .. common.wssPrivateKeyName + + +--[[ Common Functions ]] +local function getWebEngineConParams(pConnectionType) + if pConnectionType == "WS" then return config.wsMobileURL, config.wsMobilePort end + if pConnectionType == "WSS" then return config.wssMobileURL, config.wssMobilePort end +end + +function common.validation(actualData, expectedData, pMessage) + if true ~= common.isTableEqual(actualData, expectedData) then + return false, pMessage .. " contains unexpected parameters.\n" .. + "Expected table: " .. common.tableToString(expectedData) .. "\n" .. + "Actual table: " .. common.tableToString(actualData) .. "\n" + end + return true +end + +function common.setAppProperties(pData) + local corId = common.getHMIConnection():SendRequest("BasicCommunication.SetAppProperties", + { properties = pData }) + common.getHMIConnection():ExpectResponse(corId, + { result = { success = true, resultCode = "SUCCESS" }}) +end + +function common.getAppProperties(pData) + local sdlResponseDataResult = {} + sdlResponseDataResult.success = true + sdlResponseDataResult.resultCode = "SUCCESS" + sdlResponseDataResult.properties = { pData } + local corId = common.getHMIConnection():SendRequest("BasicCommunication.GetAppProperties", + { policyAppID = pData.policyAppID }) + common.getHMIConnection():ExpectResponse(corId, { result = sdlResponseDataResult }) + :ValidIf(function(_,data) + return common.validation(data.result.properties, sdlResponseDataResult.properties, + "BasicCommunication.GetAppProperties") + end) +end + +function common.updateDefaultAppProperties(pParam, pValue) + local updatedAppProperties = common.cloneTable(common.defaultAppProperties) + updatedAppProperties[pParam] = pValue + return updatedAppProperties +end + +function common.onAppPropertiesChange(pDataExpect, pTimes) + if not pTimes then pTimes = 1 end + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppPropertiesChange", + { properties = pDataExpect }) + :Times(pTimes) + :ValidIf(function(_,data) + return common.validation(data.params.properties, pDataExpect, "BasicCommunication.OnAppPropertiesChange") + end) +end + +function common.errorRPCprocessing(pRPC, pErrorCode, pData) + if not pData then pData = {} end + local corId = common.getHMIConnection():SendRequest("BasicCommunication." .. pRPC, pData) + common.getHMIConnection():ExpectResponse(corId, + { error = { code = pErrorCode, data = { method = "BasicCommunication." .. pRPC }}}) +end + +function common.errorRPCprocessingUpdate(pRPC, pErrorCode, pParam, pValue) + local appPropertiesRequestData = common.updateDefaultAppProperties(pParam, pValue) + common.errorRPCprocessing(pRPC, pErrorCode, { properties = appPropertiesRequestData }) +end + +function common.processRPCSuccess(pAppId, pRPC, pData) + local responseParams = {} + responseParams.success = true + responseParams.resultCode = "SUCCESS" + local mobileSession = common.getMobileSession(pAppId) + local cid = mobileSession:SendRPC(pRPC, pData) + mobileSession:ExpectResponse(cid, responseParams) +end + +function common.ignitionOff() + local timeout = 5000 + local function removeSessions() + for i = 1, common.getAppsCount() do + test.mobileSession[i] = nil + end + end + local event = events.Event() + event.matches = function(event1, event2) return event1 == event2 end + common.getHMIConnection():ExpectEvent(event, "SDL shutdown") + :Do(function() + removeSessions() + StopSDL() + common.wait(1000) + end) + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "SUSPEND" }) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLPersistenceComplete") + :Do(function() + common.getHMIConnection():SendNotification("BasicCommunication.OnExitAllApplications",{ reason = "IGNITION_OFF" }) + for i = 1, common.getAppsCount() do + common.getMobileSession(i):ExpectNotification("OnAppInterfaceUnregistered", { reason = "IGNITION_OFF" }) + end + end) + common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) + :Times(common.getAppsCount()) + local isSDLShutDownSuccessfully = false + common.getHMIConnection():ExpectNotification("BasicCommunication.OnSDLClose") + :Do(function() + common.cprint(35, "SDL was shutdown successfully") + isSDLShutDownSuccessfully = true + common.getHMIConnection():RaiseEvent(event, "SDL shutdown") + end) + :Timeout(timeout) + local function forceStopSDL() + if isSDLShutDownSuccessfully == false then + common.cprint(35, "SDL was shutdown forcibly") + common.getHMIConnection():RaiseEvent(event, "SDL shutdown") + end + end + RUN_AFTER(forceStopSDL, timeout + 500) +end + +function common.connectWebEngine(pMobConnId, pConnectionType) + local url, port = getWebEngineConParams(pConnectionType) + actions.mobile.createConnection(pMobConnId, url, port, actions.mobile.CONNECTION_TYPE[pConnectionType]) + actions.mobile.connect(pMobConnId) + :Do(function() + local conType = config.defaultMobileAdapterType + config.defaultMobileAdapterType = pConnectionType + actions.mobile.allowSDL(pMobConnId) + config.defaultMobileAdapterType = conType + end) +end + +function common.startWOdeviceConnect(pHMIParams) + local event = actions.run.createEvent() + actions.init.SDL() + :Do(function() + actions.init.HMI() + :Do(function() + actions.init.HMI_onReady(pHMIParams) + :Do(function() + actions.hmi.getConnection():RaiseEvent(event, "Start event") + end) + end) + end) + return actions.hmi.getConnection():ExpectEvent(event, "Start event") +end + +function common.GetPathToSDL() + return commonPreconditions:GetPathToSDL() +end + +function common.preconditions() + actions.preconditions() + if config.defaultMobileAdapterType == "WSS" then + common.addAllCertInSDLbinFolder() + common.addAllCertInIniFile() + else + common.commentAllCertInIniFile() + end +end + +function common.postconditions() + actions.postconditions() + if config.defaultMobileAdapterType == "WSS" then + common.removeAllCertFromSDLbinFolder() + end +end + +function common.addAllCertInSDLbinFolder() + os.execute("cp -f " .. aftCertPath .. common.wssCertificateCAname .. " " .. common.GetPathToSDL()) + os.execute("cp -f " .. aftCertPath .. common.wssCertificateServerName .. " " .. common.GetPathToSDL()) + os.execute("cp -f " .. aftCertPath .. common.wssServerPrivateKeyName .. " " .. common.GetPathToSDL()) +end + +function common.removeAllCertFromSDLbinFolder() + local command = "rm -f " .. common.GetPathToSDL() .. common.wssCertificateCAname .. " " + .. common.GetPathToSDL() .. common.wssCertificateServerName .. " " + .. common.GetPathToSDL() .. common.wssServerPrivateKeyName + os.execute(command) +end + +function common.addAllCertInIniFile() + common.setSDLIniParameter("WSServerCertificatePath", common.wssCertificateServerName) + common.setSDLIniParameter("WSServerKeyPath", common.wssServerPrivateKeyName) + common.setSDLIniParameter("WSServerCACertificatePath", common.wssCertificateCAname) +end + +function common.commentAllCertInIniFile() + common.setSDLIniParameter("WSServerCertificatePath", ";") + common.setSDLIniParameter("WSServerKeyPath", ";") + common.setSDLIniParameter("WSServerCACertificatePath", ";") +end + +function common.deviceNotConnected(pMobConnId) + local connection = actions.mobile.getConnection(pMobConnId) + connection:ExpectEvent(events.disconnectedEvent, "Disconnected") + :Times(AnyNumber()) + :DoOnce(function() + common.cprint(35, "Mobile #" .. pMobConnId .. " disconnected") + end) + connection:ExpectEvent(events.connectedEvent, "Connected") + :Times(0) + connection:Connect() +end + +function common.connectWSSWebEngine() + local url, port = getWebEngineConParams("WSS") + actions.mobile.createConnection(1, url, port, actions.mobile.CONNECTION_TYPE.WSS) + common.deviceNotConnected(1) +end + +function common.checkUpdateAppList(pPolicyAppID, pTimes, pExpNumOfApps) + if not pTimes then pTimes = 0 end + if not pExpNumOfApps then pExpNumOfApps = 0 end + common.getHMIConnection():ExpectRequest("BasicCommunication.UpdateAppList") + :Times(pTimes) + :ValidIf(function(_,data) + if #data.params.applications == pExpNumOfApps then + if #data.params.applications ~= 0 then + for i = 1,#data.params.applications do + local app = data.params.applications[i] + if app.policyAppID == pPolicyAppID then + if app.isCloudApplication == false then + return true + else + return false, "Parameter isCloudApplication = " .. tostring(app.isCloudApplication) .. + ", expected = false" + end + end + end + return false, "Application was not found in application array" + else + return true + end + else + return false, "Application array in BasicCommunication.UpdateAppList contains " .. + tostring(#data.params.applications)..", expected " .. tostring(pExpNumOfApps) + end + end) + common.wait() +end + +return common diff --git a/test_scripts/WidgetSupport/common.lua b/test_scripts/WidgetSupport/common.lua index bf0ddc54d9..08d443ab14 100644 --- a/test_scripts/WidgetSupport/common.lua +++ b/test_scripts/WidgetSupport/common.lua @@ -482,13 +482,9 @@ end --! @return: none --]] function m.unexpectedDisconnect() - test.mobileConnection:Close() m.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) - :Do(function() - for i = 1, m.getAppsCount() do - test.mobileSession[i] = nil - end - end) + :Times(actions.mobile.getAppsCount()) + actions.mobile.disconnect() end --[[ @connectMobile: create connection diff --git a/test_scripts/iAP2TransportSwitch/001_happy_path.lua b/test_scripts/iAP2TransportSwitch/001_happy_path.lua index af42a40df9..c930f1ad18 100644 --- a/test_scripts/iAP2TransportSwitch/001_happy_path.lua +++ b/test_scripts/iAP2TransportSwitch/001_happy_path.lua @@ -33,6 +33,11 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/iAP2TransportSwitch/common') local mobSession = require("mobile_session") +--[[ Conditions to skip test ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end + --[[ Local Variables ]] local deviceBluetooth local deviceBluetoothName = common.device.bluetooth.id..":"..common.device.bluetooth.port @@ -43,13 +48,13 @@ local function connectBluetoothDevice(self) common.device.bluetooth.port, common.device.bluetooth.out) EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = deviceBluetoothName, transportType = common.device.bluetooth.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) @@ -77,7 +82,7 @@ local function connectUSBDevice(self) local is_switching_done = false EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, @@ -88,16 +93,16 @@ local function connectUSBDevice(self) name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }, { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, transportType = common.device.usb.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) diff --git a/test_scripts/iAP2TransportSwitch/002_resume_failed_simple_case.lua b/test_scripts/iAP2TransportSwitch/002_resume_failed_simple_case.lua index f2cfd21e03..51de50bbdb 100644 --- a/test_scripts/iAP2TransportSwitch/002_resume_failed_simple_case.lua +++ b/test_scripts/iAP2TransportSwitch/002_resume_failed_simple_case.lua @@ -39,6 +39,11 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/iAP2TransportSwitch/common') local mobSession = require("mobile_session") +--[[ Conditions to skip test ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end + --[[ Local Variables ]] local deviceBluetooth local sessionBluetooth @@ -49,13 +54,13 @@ local function connectBluetoothDevice(self) common.device.bluetooth.port, common.device.bluetooth.out) EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) @@ -101,7 +106,7 @@ local function connectUSBDevice(self) local is_switching_done = false EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, @@ -112,16 +117,16 @@ local function connectUSBDevice(self) name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }, { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, transportType = common.device.usb.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) diff --git a/test_scripts/iAP2TransportSwitch/003_resume_failed_remove_data_check.lua b/test_scripts/iAP2TransportSwitch/003_resume_failed_remove_data_check.lua index e4309de1db..4e1eaa409d 100644 --- a/test_scripts/iAP2TransportSwitch/003_resume_failed_remove_data_check.lua +++ b/test_scripts/iAP2TransportSwitch/003_resume_failed_remove_data_check.lua @@ -39,6 +39,11 @@ local common = require('test_scripts/iAP2TransportSwitch/common') local mobSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") +--[[ Conditions to skip test ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end + --[[ Local Variables ]] local deviceBluetooth local sessionBluetooth @@ -75,13 +80,13 @@ local function connectBluetoothDevice(self) common.device.bluetooth.port, common.device.bluetooth.out) EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) @@ -279,7 +284,7 @@ local function connectUSBDevice(self) local is_switching_done = false EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, @@ -290,16 +295,16 @@ local function connectUSBDevice(self) name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }, { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, transportType = common.device.usb.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) diff --git a/test_scripts/iAP2TransportSwitch/004_commands_hold_while_switching.lua b/test_scripts/iAP2TransportSwitch/004_commands_hold_while_switching.lua index 079707cf85..122ced7318 100644 --- a/test_scripts/iAP2TransportSwitch/004_commands_hold_while_switching.lua +++ b/test_scripts/iAP2TransportSwitch/004_commands_hold_while_switching.lua @@ -33,6 +33,11 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/iAP2TransportSwitch/common') local mobSession = require("mobile_session") +--[[ Conditions to skip test ]] +if config.defaultMobileAdapterType ~= "TCP" then + runner.skipTest("Test is applicable only for TCP connection") +end + --[[ Local Variables ]] local deviceBluetooth local sessionBluetooth @@ -47,13 +52,13 @@ local function connectBluetoothDevice(self) common.device.bluetooth.port, common.device.bluetooth.out) EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) @@ -102,7 +107,7 @@ local function connectUSBDevice(self) local is_switching_done = false EXPECT_HMICALL("BasicCommunication.UpdateDeviceList", { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, @@ -113,16 +118,16 @@ local function connectUSBDevice(self) name = common.device.bluetooth.uid, transportType = common.device.bluetooth.type } - } + }) }, { - deviceList = { + deviceList = common.getUpdatedDeviceList({ { id = config.deviceMAC, name = common.device.usb.uid, transportType = common.device.usb.type } - } + }) }) :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) diff --git a/test_scripts/iAP2TransportSwitch/common.lua b/test_scripts/iAP2TransportSwitch/common.lua index 82e60cadac..df4ad30f35 100644 --- a/test_scripts/iAP2TransportSwitch/common.lua +++ b/test_scripts/iAP2TransportSwitch/common.lua @@ -10,7 +10,7 @@ local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") local SDL = require("SDL") local commonPreconditions = require("user_modules/shared_testcases/commonPreconditions") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobile = require("mobile_connection") local events = require("events") @@ -76,8 +76,9 @@ function module:expectEvent(pEvent, pName, pDevice) end function module:createIAP2Device(pDeviceId, pDevicePort, pDeviceOut) - local connection = tcp.Connection(pDeviceId, pDevicePort) - local fileConnection = file_connection.FileConnection(pDeviceOut, connection) + local mobileAdapterParameters = { host = pDeviceId , port = pDevicePort } + local mobileAdapter = mobile_adapter_controller.getAdapter(config.defaultMobileAdapterType, mobileAdapterParameters) + local fileConnection = file_connection.FileConnection(pDeviceOut, mobileAdapter) local device = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(device) return device @@ -122,6 +123,7 @@ function m.preconditions() commonPreconditions:BackupFile(ptFileName) os.execute("cp -f " .. ptName .. " " .. commonPreconditions:GetPathToSDL() .. "/" .. ptFileName) actions.setSDLIniParameter("AppTransportChangeTimer", "5000") + actions.setSDLIniParameter("ApplicationListUpdateTimeout", "3000") end function m.postconditions() @@ -139,4 +141,21 @@ function m.print(pMsg) commonFunctions:userPrint(35, pMsg) end +function m.getUpdatedDeviceList(pExp) + if SDL.buildOptions.webSocketServerSupport == "ON" then + local weDevice = { + name = "Web Engine", + transportType = "WEBENGINE_WEBSOCKET" + } + local pos = 1 + if pExp[1].name == m.device.usb.uid then pos = 2 end + if pExp[pos] ~= nil then + table.insert(pExp, pos, weDevice) + else + pExp[pos] = weDevice + end + end + return pExp +end + return m diff --git a/test_sets/webengine.txt b/test_sets/webengine.txt new file mode 100644 index 0000000000..b585850ab3 --- /dev/null +++ b/test_sets/webengine.txt @@ -0,0 +1,27 @@ +./test_scripts/WebEngine/001_WS_Connection.lua +./test_scripts/WebEngine/002_WSS_Connection.lua +./test_scripts/WebEngine/003_WSS_connection_missing_client_certificate.lua +./test_scripts/WebEngine/004_WSS_connection_selfSigned_client_sertificate.lua +./test_scripts/WebEngine/005_WSS_connection_missing_serverSslPrameters.lua +./test_scripts/WebEngine/006_SetAppProperties_success_flow.lua +./test_scripts/WebEngine/007_SetAppProperties_with_invalid_parameters.lua +./test_scripts/WebEngine/008_SetAppProperties_with_unknown_parameters.lua +./test_scripts/WebEngine/009_SetAppProperties_with_mandatory_parameter.lua +./test_scripts/WebEngine/010_SetAppProperties_without_mandatory_parameter.lua +./test_scripts/WebEngine/011_SetAppProperties_in_range_Str.lua +./test_scripts/WebEngine/012_SetAppProperties_in_range_Array.lua +./test_scripts/WebEngine/013_SetAppProperties_out_of_range_Str.lua +./test_scripts/WebEngine/014_SetAppProperties_out_of_range_Array.lua +./test_scripts/WebEngine/015_GetAppProperties_success_flow.lua +./test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua +./test_scripts/WebEngine/017_GetAppProperties_wrong_policyAppID.lua +./test_scripts/WebEngine/018_GetAppProperties_out_of_range_Str.lua +./test_scripts/WebEngine/019_OnAppPropertiesChange_success_flow.lua +./test_scripts/WebEngine/020_OnAppPropertiesChange_notification_on_PTU_Mobile_HMI.lua +./test_scripts/WebEngine/021_UpdateAppList.lua +./test_scripts/WebEngine/022_UpdateAppList_on_start.lua +./test_scripts/WebEngine/023_UpdateAppList_unregister.lua +./test_scripts/WebEngine/024_AppProperties_are_stored_through_ignition_cycles.lua +./test_scripts/WebEngine/025_PTU_update_app_properties.lua +./test_scripts/WebEngine/026_PTU_snapshot_validation.lua +./test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua diff --git a/user_modules/all_common_modules.lua b/user_modules/all_common_modules.lua index 50fd0389da..71e2449406 100644 --- a/user_modules/all_common_modules.lua +++ b/user_modules/all_common_modules.lua @@ -9,7 +9,6 @@ module = require('testbase') require('cardinalities') events = require('events') mobile = require('mobile_connection') -tcp = require('tcp_connection') file_connection = require('file_connection') expectations = require('expectations') Expectation = expectations.Expectation diff --git a/user_modules/common_steps.lua b/user_modules/common_steps.lua index 461aaa0d79..0a6bfdd9e6 100644 --- a/user_modules/common_steps.lua +++ b/user_modules/common_steps.lua @@ -35,8 +35,8 @@ local CommonSteps = {} function CommonSteps:AddMobileConnection(test_case_name, mobile_connection_name) Test[test_case_name] = function(self) mobile_connection_name = mobile_connection_name or "mobileConnection" - local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) - local fileConnection = file_connection.FileConnection("mobile_" .. mobile_connection_name .. ".out", tcpConnection) + local mobileAdapter = self.getDefaultMobileAdapter() + local fileConnection = file_connection.FileConnection("mobile_" .. mobile_connection_name .. ".out", mobileAdapter) self[mobile_connection_name] = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(self[mobile_connection_name]) self[mobile_connection_name]:Connect() diff --git a/user_modules/connecttest_TTS_Isready.lua b/user_modules/connecttest_TTS_Isready.lua index 7fd58ec960..135f690af0 100644 --- a/user_modules/connecttest_TTS_Isready.lua +++ b/user_modules/connecttest_TTS_Isready.lua @@ -2,7 +2,7 @@ local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobile_session = require("mobile_session") local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") @@ -24,8 +24,14 @@ local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) -local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) -local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + +--- Default mobile connection +function module.getDefaultMobileAdapter(tcpHost, tcpPort) + return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) +end + +local mobileAdapter = module.getDefaultMobileAdapter() +local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) module.mobileConnection = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(module.hmiConnection) event_dispatcher:AddConnection(module.mobileConnection) @@ -640,6 +646,10 @@ function module:initHMI_onReady() end end) + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and AtLeast(1) or AnyNumber()) + self.hmiConnection:SendNotification("BasicCommunication.OnReady") end @@ -652,8 +662,9 @@ function module:connectMobile() print("Disconnected!!!") --quit(1) end) + local ret = EXPECT_EVENT(events.connectedEvent, "Connected") self.mobileConnection:Connect() - return EXPECT_EVENT(events.connectedEvent, "Connected") + return ret end function module:startSession() diff --git a/user_modules/connecttest_VR_Isready.lua b/user_modules/connecttest_VR_Isready.lua index bf5c15dca0..adb164e95d 100644 --- a/user_modules/connecttest_VR_Isready.lua +++ b/user_modules/connecttest_VR_Isready.lua @@ -2,7 +2,7 @@ local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobile_session = require("mobile_session") local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") @@ -24,8 +24,14 @@ local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) -local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) -local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + +--- Default mobile connection +function module.getDefaultMobileAdapter(tcpHost, tcpPort) + return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) +end + +local mobileAdapter = module.getDefaultMobileAdapter() +local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) module.mobileConnection = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(module.hmiConnection) event_dispatcher:AddConnection(module.mobileConnection) @@ -639,6 +645,10 @@ function module:initHMI_onReady() end end) + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and AtLeast(1) or AnyNumber()) + self.hmiConnection:SendNotification("BasicCommunication.OnReady") end @@ -651,8 +661,9 @@ function module:connectMobile() print("Disconnected!!!") --quit(1) end) + local ret = EXPECT_EVENT(events.connectedEvent, "Connected") self.mobileConnection:Connect() - return EXPECT_EVENT(events.connectedEvent, "Connected") + return ret end function module:startSession() diff --git a/user_modules/connecttest_initHMI.lua b/user_modules/connecttest_initHMI.lua index 5f37747257..6936436ae7 100644 --- a/user_modules/connecttest_initHMI.lua +++ b/user_modules/connecttest_initHMI.lua @@ -2,7 +2,7 @@ local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobile_session = require("mobile_session") local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") @@ -24,8 +24,14 @@ local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) -local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) -local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + +--- Default mobile connection +function module.getDefaultMobileAdapter(tcpHost, tcpPort) + return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) +end + +local mobileAdapter = module.getDefaultMobileAdapter() +local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) module.mobileConnection = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(module.hmiConnection) event_dispatcher:AddConnection(module.mobileConnection) @@ -621,6 +627,10 @@ function module:initHMI_onReady() end end) + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and AtLeast(1) or AnyNumber()) + self.hmiConnection:SendNotification("BasicCommunication.OnReady") end @@ -632,8 +642,9 @@ function module:connectMobile() :Do(function() print("Disconnected!!!") end) + local ret = EXPECT_EVENT(events.connectedEvent, "Connected") self.mobileConnection:Connect() - return EXPECT_EVENT(events.connectedEvent, "Connected") + return ret end function module:startSession() diff --git a/user_modules/connecttest_resumption.lua b/user_modules/connecttest_resumption.lua index 1f9f60fcec..1b26b08637 100644 --- a/user_modules/connecttest_resumption.lua +++ b/user_modules/connecttest_resumption.lua @@ -2,7 +2,7 @@ local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobile_session = require("mobile_session") local hmi_adapter_controller = require("hmi_adapter/hmi_adapter_controller") @@ -24,8 +24,14 @@ local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) -local tcpConnection = tcp.Connection(config.mobileHost, config.mobilePort) -local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) + +--- Default mobile connection +function module.getDefaultMobileAdapter(tcpHost, tcpPort) + return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) +end + +local mobileAdapter = module.getDefaultMobileAdapter() +local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) module.mobileConnection = mobile.MobileConnection(fileConnection) event_dispatcher:AddConnection(module.hmiConnection) event_dispatcher:AddConnection(module.mobileConnection) @@ -623,6 +629,10 @@ function module:initHMI_onReady() end end) + EXPECT_HMICALL("BasicCommunication.UpdateDeviceList") + :Do(function(_, data) self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + :Times(SDL.buildOptions.webSocketServerSupport == "ON" and AtLeast(1) or AnyNumber()) + self.hmiConnection:SendNotification("BasicCommunication.OnReady") end @@ -634,8 +644,9 @@ function module:connectMobile() :Do(function() print("Disconnected!!!") end) + local ret = EXPECT_EVENT(events.connectedEvent, "Connected") self.mobileConnection:Connect() - return EXPECT_EVENT(events.connectedEvent, "Connected") + return ret end function module:startSession() diff --git a/user_modules/dummy_connecttest.lua b/user_modules/dummy_connecttest.lua index 541f8c0cf9..8844bdd719 100644 --- a/user_modules/dummy_connecttest.lua +++ b/user_modules/dummy_connecttest.lua @@ -2,7 +2,7 @@ local ATF = require('ATF') require('atf.util') local module = require('testbase') local mobile = require("mobile_connection") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobile_session = require("mobile_session") local hmi_connection = require('hmi_connection') @@ -24,13 +24,22 @@ local Expectation = expectations.Expectation local SUCCESS = expectations.SUCCESS local FAILED = expectations.FAILED +--- HMI connection module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) -local tcpConnection = tcp.Connection(SDL.GetHostURL(), config.mobilePort) -local fileConnection = file_connection.FileConnection("mobile.out", tcpConnection) +--- Default mobile connection +function module.getDefaultMobileAdapter(tcpHost, tcpPort) + return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) +end + +local mobileAdapter = module.getDefaultMobileAdapter() +local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) module.mobileConnection = mobile.MobileConnection(fileConnection) + event_dispatcher:AddConnection(module.hmiConnection) event_dispatcher:AddConnection(module.mobileConnection) + +--- Notification counter module.notification_counter = 1 module.sdlBuildOptions = SDL.buildOptions @@ -287,6 +296,8 @@ function StopSDL() end function module:runSDL() + event_dispatcher:ClearEvents() + module.expectations_list:Clear() if config.autorunSDL ~= true then SDL.autoStarted = false return @@ -335,7 +346,8 @@ function module:initHMI() "BasicCommunication.OnResumeAudioSource", "BasicCommunication.OnSystemTimeReady", "BasicCommunication.OnSystemCapabilityUpdated", - "BasicCommunication.OnServiceUpdate" + "BasicCommunication.OnServiceUpdate", + "BasicCommunication.OnAppPropertiesChange" }) registerComponent("UI", { @@ -381,8 +393,13 @@ function module:initHMI_onReady(hmi_table) event.matches = function(self, data) return data.method == name end + + local occurrence = hmi_table_element.occurrence + if occurrence == nil then + occurrence = hmi_table_element.mandatory and 1 or AnyNumber() + end local exp = EXPECT_HMIEVENT(event, name) - :Times(hmi_table_element.mandatory and 1 or AnyNumber()) + :Times(occurrence) :Do(function(_, data) xmlReporter.AddMessage("hmi_connection","SendResponse", { @@ -412,6 +429,11 @@ function module:initHMI_onReady(hmi_table) if hmi_table_internal.BasicCommunication then bc_update_app_list = hmi_table_internal.BasicCommunication.UpdateAppList hmi_table_internal.BasicCommunication.UpdateAppList = nil + local bc_update_device_list = hmi_table_internal.BasicCommunication.UpdateDeviceList + if SDL.buildOptions.webSocketServerSupport == "ON" and bc_update_device_list then + bc_update_device_list.mandatory = true + if not bc_update_device_list.occurrence then bc_update_device_list.occurrence = AtLeast(1) end + end end for k_module, v_module in pairs(hmi_table_internal) do @@ -447,8 +469,9 @@ function module:connectMobile() :Do(function() print("Disconnected!!!") end) + local ret = EXPECT_EVENT(events.connectedEvent, "Connected") self.mobileConnection:Connect() - return EXPECT_EVENT(events.connectedEvent, "Connected") + return ret end function module:startSession() diff --git a/user_modules/sequences/actions.lua b/user_modules/sequences/actions.lua index b67aeced91..4a4d563b8d 100644 --- a/user_modules/sequences/actions.lua +++ b/user_modules/sequences/actions.lua @@ -3,10 +3,9 @@ --------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local mobile = require("mobile_connection") -local tcp = require("tcp_connection") +local mobile_adapter_controller = require("mobile_adapter/mobile_adapter_controller") local file_connection = require("file_connection") local mobileSession = require("mobile_session") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local events = require("events") local test = require("user_modules/dummy_connecttest") local expectations = require('expectations') @@ -62,8 +61,8 @@ end --- Raise event on mobile connection local function MobRaiseEvent(self, pEvent, pEventName) if pEventName == nil then pEventName = "noname" end - reporter.AddMessage(debug.getinfo(1, "n").name, pEventName) - event_dispatcher:RaiseEvent(self, pEvent) + reporter.AddMessage(debug.getinfo(1, "n").name, pEventName) + event_dispatcher:RaiseEvent(self, pEvent) end --- Create expectation for event on mobile connection @@ -82,8 +81,12 @@ local function prepareMobileConnectionsTable() if test.mobileConnection then if test.mobileConnection.connection then local defaultMobileConnection = test.mobileConnection + local transportConnection = test.mobileConnection.connection.connection defaultMobileConnection.RaiseEvent = MobRaiseEvent defaultMobileConnection.ExpectEvent = MobExpectEvent + defaultMobileConnection.host = transportConnection.host or transportConnection.url + defaultMobileConnection.port = transportConnection.port + defaultMobileConnection.type = config.defaultMobileAdapterType test.mobileConnections[1] = defaultMobileConnection end end @@ -253,6 +256,30 @@ end --[[ Functions of mobile submodule ]] +m.mobile.CONNECTION_TYPE = { + TCP = "TCP", + WS = "WS", + WSS = "WSS" +} + +--- Register connection/disconnection event handlers for connection +local function registerConnectionExpectations(pMobConnId) + local connection = m.mobile.getConnection(pMobConnId) + connection:ExpectEvent(events.disconnectedEvent, "Disconnected") + :Pin() + :Times(AnyNumber()) + :Do(function() + utils.cprint(35, "Mobile #" .. pMobConnId .. " disconnected") + end) + + local ret = connection:ExpectEvent(events.connectedEvent, "Connected") + ret:Do(function() + utils.cprint(35, "Mobile #" .. pMobConnId .. " connected") + end) + + return ret +end + --[[ @mobile.createConnection: Create mobile connection --! @parameters: --! pMobConnId - script's mobile connection id @@ -260,16 +287,34 @@ end --! pMobConnPort - mobile connection port --! @return: none --]] -function m.mobile.createConnection(pMobConnId, pMobConnHost, pMobConnPort) +function m.mobile.createConnection(pMobConnId, pMobConnHost, pMobConnPort, pMobConnType, pSslParameters) if pMobConnId == nil then pMobConnId = 1 end + if pMobConnType == nil then pMobConnType = config.defaultMobileAdapterType end + if pSslParameters == nil then pSslParameters = {} end + local adapterParams = {} + adapterParams.port = pMobConnPort + if pMobConnType == m.mobile.CONNECTION_TYPE.TCP then + adapterParams.host = pMobConnHost + else -- WS or WSS + adapterParams.url = pMobConnHost + if pMobConnType == m.mobile.CONNECTION_TYPE.WSS and type(pSslParameters) == "table" then + adapterParams.sslProtocol = pSslParameters.protocol or config.wssSecurityProtocol + adapterParams.sslCypherListString = pSslParameters.cypherListString or config.wssCypherListString + adapterParams.sslCaCertPath = pSslParameters.caCertPath or config.wssCertificateCAPath + adapterParams.sslCertPath = pSslParameters.certPath or config.wssCertificateClientPath + adapterParams.sslKeyPath = pSslParameters.keyPath or config.wssPrivateKeyPath + end + end + + local baseConnection = mobile_adapter_controller.getAdapter(pMobConnType, adapterParams) local filename = "mobile" .. pMobConnId .. ".out" - local tcpConnection = tcp.Connection(pMobConnHost, pMobConnPort) - local fileConnection = file_connection.FileConnection(filename, tcpConnection) + local fileConnection = file_connection.FileConnection(filename, baseConnection) local connection = mobile.MobileConnection(fileConnection) connection.RaiseEvent = MobRaiseEvent connection.ExpectEvent = MobExpectEvent connection.host = pMobConnHost connection.port = pMobConnPort + connection.type = pMobConnType event_dispatcher:AddConnection(connection) test.mobileConnections[pMobConnId] = connection end @@ -281,20 +326,8 @@ end --]] function m.mobile.connect(pMobConnId) if pMobConnId == nil then pMobConnId = 1 end - local connection = m.mobile.getConnection(pMobConnId) - - connection:ExpectEvent(events.disconnectedEvent, "Disconnected") - :Pin() - :Times(AnyNumber()) - :Do(function() - utils.cprint(35, "Mobile #" .. pMobConnId .. " disconnected") - end) - - local ret = connection:ExpectEvent(events.connectedEvent, "Connected") - ret:Do(function() - utils.cprint(35, "Mobile #" .. pMobConnId .. " connected") - end) - connection:Connect() + local ret = registerConnectionExpectations(pMobConnId) + m.mobile.getConnection(pMobConnId):Connect() return ret end @@ -308,10 +341,27 @@ function m.mobile.disconnect(pMobConnId) local connection = m.mobile.getConnection(pMobConnId) local sessions = m.mobile.getApps(pMobConnId) for id in pairs(sessions) do - m.mobile.deleteSession(id) + m.mobile.closeSession(id) + :Do(function() + if next(m.mobile.getApps(pMobConnId)) == nil then + -- remove pinned mobile disconnect expectation + connection:Close() + end + end) end - -- remove pinned mobile disconnect expectation - connection:Close() +end + +--[[ @mobile.closeConnection: Close and delete mobile connection +--! @parameters: +--! pMobConnId - script's mobile connection id +--! @return: none +--]] +function m.mobile.closeConnection(pMobConnId) + if pMobConnId == nil then pMobConnId = 1 end + m.mobile.disconnect(pMobConnId) + local connection = m.mobile.getConnection(pMobConnId) + event_dispatcher:DeleteConnection(connection) + m.mobile.deleteConnection(pMobConnId) end --[[ @mobile.deleteConnection: Remove mobile connection @@ -321,6 +371,10 @@ end --]] function m.mobile.deleteConnection(pMobConnId) if pMobConnId == nil then pMobConnId = 1 end + local sessions = m.mobile.getApps(pMobConnId) + for id in pairs(sessions) do + m.mobile.deleteSession(id) + end local connection = m.mobile.getConnection(pMobConnId) event_dispatcher:DeleteConnection(connection) test.mobileConnections[pMobConnId] = nil @@ -388,17 +442,28 @@ function m.mobile.createSession(pAppId, pMobConnId, pMobSesionConfig) return session end ---[[ @mobile.deleteSession: remove mobile session +--[[ @mobile.closeSession: close and delete mobile session --! @parameters: --! pAppId - script's mobile application id --! @return: mobile session object --]] -function m.mobile.deleteSession(pAppId) +function m.mobile.closeSession(pAppId) if pAppId == nil then pAppId = 1 end - m.mobile.getSession(pAppId):Stop() + local ret = m.mobile.getSession(pAppId):Stop() :Do(function() - test.mobileSession[pAppId] = nil + m.mobile.deleteSession(pAppId) end) + return ret +end + +--[[ @mobile.deleteSession: remove mobile session +--! @parameters: +--! pAppId - script's mobile application id +--! @return: mobile session object +--]] +function m.mobile.deleteSession(pAppId) + if pAppId == nil then pAppId = 1 end + test.mobileSession[pAppId] = nil end --[[ @mobile.getApps: get collection of mobile sessions on mobile connectuion @@ -425,6 +490,7 @@ end --! @return: mobile sessions count --]] function m.mobile.getAppsCount(pMobConnId) + if not pMobConnId then pMobConnId = 1 end local sessions = m.mobile.getApps(pMobConnId) local count = 0 for _, _ in pairs(sessions) do @@ -652,8 +718,8 @@ function m.app.unRegister(pAppId) m.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false, appID = m.app.getHMIId(pAppId) }) :Do(function() - m.app.deleteHMIId(pAppId) - m.mobile.deleteSession(pAppId) + m.app.deleteHMIId(pAppId) + m.mobile.deleteSession(pAppId) end) end @@ -1144,7 +1210,7 @@ function m.start(pHMIParams) :Do(function() m.init.HMI() :Do(function() - m.init.HMI_onReady(pHMIParams) + m.init.HMI_onReady(pHMIParams) :Do(function() m.init.connectMobile() :Do(function() @@ -1167,6 +1233,7 @@ function m.preconditions() SDL.ForceStopSDL() SDL.PolicyDB.clean() SDL.Log.clean() + SDL.AppInfo.clean() m.sdl.deletePTS() SDL.AppStorage.clean() end diff --git a/user_modules/shared_testcases/commonFunctions.lua b/user_modules/shared_testcases/commonFunctions.lua index 8c78471564..233afe321d 100644 --- a/user_modules/shared_testcases/commonFunctions.lua +++ b/user_modules/shared_testcases/commonFunctions.lua @@ -81,8 +81,9 @@ function commonFunctions:createMultipleExpectationsWaiter(test, name) function exp_waiter:AddExpectation(exp) table.insert(exp_waiter.expectation_list, exp) exp:Do(function() - exp_waiter:RemoveExpectation(exp) - exp_waiter:CheckStatus() + if exp_waiter:RemoveExpectation(exp) then + exp_waiter:CheckStatus() + end end) end @@ -93,9 +94,9 @@ function commonFunctions:createMultipleExpectationsWaiter(test, name) end return nil end - - table.remove(exp_waiter.expectation_list, - AnIndexOf(exp_waiter.expectation_list, exp)) + local index = AnIndexOf(exp_waiter.expectation_list, exp) + if index then table.remove(exp_waiter.expectation_list, index) end + return index end exp_waiter.event = events.Event() @@ -256,6 +257,7 @@ function commonFunctions:cloneTable(original) end copy[k] = v end + if getmetatable(original) ~= nil then setmetatable(copy, getmetatable(original)) end return copy end diff --git a/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua b/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua index b777c173cb..5260a5e627 100644 --- a/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua +++ b/user_modules/shared_testcases/testCasesForPolicyTableSnapshot.lua @@ -461,7 +461,15 @@ function testCasesForPolicyTableSnapshot:verify_PTS(is_created, app_IDs, device_ local pts = '/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json' if ( commonSteps:file_exists(pts) ) then testCasesForPolicyTableSnapshot:extract_pts() - + -- Skip other devices + if device_IDs ~= nil then + for i = #testCasesForPolicyTableSnapshot.pts_elements, 1, -1 do + local item = testCasesForPolicyTableSnapshot.pts_elements[i].name + if string.find(item, "^device_data") and not string.find(item, device_IDs[1]) then + table.remove(testCasesForPolicyTableSnapshot.pts_elements, i) + end + end + end --Check for ommited parameters for i = 1, #testCasesForPolicyTableSnapshot.pts_elements do local is_existing = false diff --git a/user_modules/utils.lua b/user_modules/utils.lua index e7ccff1e0b..3d98b5d66c 100644 --- a/user_modules/utils.lua +++ b/user_modules/utils.lua @@ -70,6 +70,9 @@ function m.cloneTable(pTbl) end copy[k] = v end + if getmetatable(pTbl) ~= nil then + setmetatable(copy, getmetatable(pTbl)) + end return copy end @@ -165,6 +168,7 @@ function m.wait(pTimeOut) return ret end +--- [DEPRECATED] --[[ @getDeviceName: provide device name --! @parameters: none --! @return: name of the device @@ -172,19 +176,89 @@ end function m.getDeviceName(pHost, pPort) if not pHost then pHost = config.mobileHost end if not pPort then pPort = config.mobilePort end - return pHost .. ":" .. pPort + if config.defaultMobileAdapterType == "TCP" then + local parameters = { + host = pHost, + port = pPort + } + return m.buildDeviceName("TCP", parameters) + else + return m.buildDeviceName("WS") + end end +--- [DEPRECATED] --[[ @getDeviceMAC: provide device MAC address --! @parameters: none --! @return: MAC address of the device --]] function m.getDeviceMAC(pHost, pPort) - local cmd = "echo -n " .. m.getDeviceName(pHost, pPort) .. " | sha256sum | awk '{printf $1}'" - local handle = io.popen(cmd) - local result = handle:read("*a") - handle:close() - return result + if not pHost then pHost = config.mobileHost end + if not pPort then pPort = config.mobilePort end + local parameters = nil + if config.defaultMobileAdapterType == "TCP" then + parameters = { host = pHost, port = pPort } + end + return m.buildDeviceMAC(config.defaultMobileAdapterType, parameters) +end + +--[[ @buildDeviceName: provide device name +--! @parameters: +--! pDeviceType - device type (TCP, WS) +--! pParams - device specific parameters +--! TCP: +--! host - host of connection +--! port - port of connection +--! WS: none +--! @return: name of the device +--]] +function m.buildDeviceName(pDeviceType, pParams) + if pDeviceType == "TCP" then + local host = config.mobileHost + local port = config.mobilePort + if type(pParams) == "table" then + host = pParams.host or host + port = pParams.port or port + end + return host .. ":" .. port + elseif pDeviceType == "WS" or pDeviceType == "WSS" then + return "Web Engine" + else + m.cprint(35, "Unknown device type " .. tostring(pDeviceType) + .. "\n Possible values: TCP, WS, WSS") + end + return nil +end + +--[[ @buildDeviceMAC: provide device MAC address +--! @parameters: +--! pDeviceType - device type (TCP, WS) +--! pParams - device specific parameters +--! TCP: +--! host - host of connection +--! port - port of connection +--! WS: +--! vin - vin of vehicle +--! @return: MAC address of the device +--]] +function m.buildDeviceMAC(pDeviceType, pParams) + local function makeHash(pValue) + local cmd = "echo -n " .. tostring(pValue) .. " | sha256sum | awk '{printf $1}'" + local handle = io.popen(cmd) + local result = handle:read("*a") + handle:close() + return result + end + + if pDeviceType == "TCP" then + return makeHash(pParams.host .. ":" .. pParams.port) + elseif pDeviceType == "WS" or pDeviceType == "WSS" then + return makeHash(config.webengineUniqueId) + else + m.cprint(35, "ERROR: Unknown device type " .. tostring(pDeviceType) + .. "\n Possible values: TCP, WS, WSS") + return makeHash(nil) + end end --[[ @protect: make table immutable @@ -340,4 +414,18 @@ function m.deleteNetworkInterface(pId) end end +--[[ @getDeviceTransportType: provide transport type name +--! @parameters: none +--! @return: none +--]] +function m.getDeviceTransportType() + if config.defaultMobileAdapterType == "TCP" then + return "WIFI" + elseif config.defaultMobileAdapterType == "WS" then + return "WEBENGINE_WEBSOCKET" + elseif config.defaultMobileAdapterType == "WSS" then + return "WEBENGINE_WEBSOCKET" + end +end + return m From 21e188b0007f2eeb0a06411fda009a29ff4cbefa Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Fri, 28 Feb 2020 10:17:58 -0500 Subject: [PATCH 28/64] Align scripts with fix for 2932 (#2350) --- .../build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua | 2 +- .../053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua | 2 +- .../078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua | 2 +- .../build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua | 2 +- .../118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua b/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua index fccc7e15d2..a367a75242 100644 --- a/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua +++ b/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua @@ -206,7 +206,7 @@ function Test:TestStep_Register_app() self.mobileSession:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) end) - EXPECT_NOTIFICATION("OnSystemRequest"):Times(2)-- {requestType = "LOCK_SCREEN_ICON_URL"}, {requestType = "HTTP"} + EXPECT_NOTIFICATION("OnSystemRequest") EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate") :ValidIf(function(exp,data) if exp.occurences == 1 and data.params.status == "UPDATE_NEEDED" then diff --git a/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua b/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua index 7d652b4ce7..adbcd44527 100644 --- a/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua +++ b/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua @@ -118,7 +118,7 @@ function Test:TestStep_Register_App_And_Check_That_PTU_Triggered() EXPECT_HMICALL("BasicCommunication.PolicyUpdate"):Times(0) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status="UPDATE_NEEDED" }, { status="UPDATING" }):Times(2) - EXPECT_NOTIFICATION("OnSystemRequest"):Times(2) -- { requestType = "LOCK_SCREEN_ICON_URL" }, { requestType = "HTTP" } + EXPECT_NOTIFICATION("OnSystemRequest") end diff --git a/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua b/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua index eaafa73735..829ab3b149 100644 --- a/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua +++ b/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua @@ -141,7 +141,7 @@ function Test:TestStep_RegisterSecondApp() self.mobileSession1:ExpectNotification("OnPermissionsChange") end) - self.mobileSession1:ExpectNotification("OnSystemRequest"):Times(Between(1,2)) --"LOCK_SCREEN_ICON_URL" + HTTP + self.mobileSession1:ExpectNotification("OnSystemRequest"):Times(Between(0,1)) --HTTP :Do(function(_,data) print("SDL -> MOB2: OnSystemRequest, requestType: " .. data.payload.requestType) if(data.payload.requestType == "HTTP") then diff --git a/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua b/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua index d2d4781e38..7ff206b26d 100644 --- a/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua +++ b/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua @@ -56,7 +56,7 @@ function Test:TestStep_Trigger_PTU_Check_HTTP_flow() local corId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = config.application2.registerAppInterfaceParams.appName }}) - self.mobileSession2:ExpectNotification("OnSystemRequest"):Times(Between(1,2)) + self.mobileSession2:ExpectNotification("OnSystemRequest"):Times(Between(0,1)) :Do(function(_,data) print("SDL-> MOB2: OnSystemRequest, requestType: "..data.payload.requestType) if(data.payload.requestType == "HTTP") then diff --git a/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua b/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua index 8ecfa98777..df5e37f10d 100644 --- a/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua +++ b/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua @@ -82,7 +82,7 @@ function Test:TestStep_PTU_AppID_SecondApp_NotListed_PT() end end end) - :Times(Between(1,2)) + :Times(Between(0,1)) self.mobileSession:ExpectNotification("OnSystemRequest") :Do(function(_, data) From f3626532a0323a313049cd5fc8d1ff26dee5a331 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Fri, 28 Feb 2020 15:07:42 -0500 Subject: [PATCH 29/64] Scripts for defect 3136 (#2318) * Add scripts to verify 3136 issue * Add scripts to verify 3136 issue in scope of TheSameApp feature * Speed up policy scripts for retry sequence * Update existing scripts in scope of 3136 issue * Make 006 policy script stable * Adjust scripts due to changes introduced by HMI PTU feature * Include HMI PTU feature scripts * Correct number of retries * Correct script to reproduce 3237 issue * Add additional scripts for 3 apps * Align scripts with fix for 2932 * Make RC scripts stable Co-authored-by: Shobhit Adlakha Co-authored-by: Jacob Keeler --- files/PTU_AppIDAppHMIType.json | 2 +- files/PTU_AppIDDefaultHMI.json | 2 +- files/PTU_AppIDGroups.json | 2 +- .../Policies/build_options/retry_seq.json | 2 +- .../Defects/6_1/3136_01_Proprietary.lua | 166 ++++++++++++++++ .../6_1/3136_02_External_Proprietary.lua | 180 +++++++++++++++++ test_scripts/Defects/6_1/3136_03_Http.lua | 114 +++++++++++ .../Defects/6_1/3136_04_Proprietary_3apps.lua | 168 ++++++++++++++++ .../3136_05_External_Proprietary_3apps.lua | 184 ++++++++++++++++++ .../Defects/6_1/3136_06_Http_3apps.lua | 114 +++++++++++ ...6_ATF_Steal_focus_validation_false_PTU.lua | 23 +-- ..._external_consent_status_groups_struct.lua | 8 +- ...r_failed_retry_consequtive_trigger_ext.lua | 22 +-- ...failed_retry_consequtive_trigger_propr.lua | 22 +-- ...fter_failed_retry_parallel_trigger_ext.lua | 11 +- ...er_failed_retry_parallel_trigger_propr.lua | 8 +- ...des_data_consent_prompt_on_HMI_request.lua | 2 +- ...TF_Validate_default_hmi_appId_policies.lua | 79 +------- ...278_ATF_Validate_groups_appID_policies.lua | 76 +------- ...ATF_Validate_appHMIType_appID_policies.lua | 80 +------- ...TF_Check_app_registration_language_gui.lua | 3 +- ...iciesManager_Sets_Status_UPDATING_HTTP.lua | 20 +- ...equence_Retry_Timeout_Computation_HTTP.lua | 14 +- ..._Restarting_Policy_Table_Exchange_HTTP.lua | 16 +- ...Sequence_Retry_Timeout_Expiration_HTTP.lua | 14 +- ...cessful_Even_After_Retry_Strategy_HTTP.lua | 2 +- ...F_Start_PTU_retry_sequence_PROPRIETARY.lua | 8 +- ...e_resource_on_PTU_with_module_disallow.lua | 1 + ...lease_resource_on_PTU_with_app_revoked.lua | 1 + ...ification_by_revoking_module_by_policy.lua | 1 + ..._by_revoking_several_modules_by_policy.lua | 1 + test_scripts/RC/commonRC.lua | 3 +- ...fter_registration_app_with_the_same_id.lua | 60 ++++++ ...registration_app_with_different_app_id.lua | 70 +++++++ ...tration_app_with_the_same_id_after_PTU.lua | 54 +++++ ...on_app_with_different_app_id_after_PTU.lua | 62 ++++++ ...p_with_different_app_id_during_timeout.lua | 79 ++++++++ test_scripts/TheSameApp/commonTheSameApp.lua | 33 ++++ test_sets/Defects/6_1/3136_EXT.txt | 7 + test_sets/Defects/6_1/3136_HTTP.txt | 7 + test_sets/Defects/6_1/3136_PROP.txt | 7 + test_sets/hmi_ptu.txt | 5 +- test_sets/same_app_from_multiple_devices.txt | 5 + .../testCasesForExternalUCS.lua | 1 + 44 files changed, 1420 insertions(+), 319 deletions(-) create mode 100644 test_scripts/Defects/6_1/3136_01_Proprietary.lua create mode 100644 test_scripts/Defects/6_1/3136_02_External_Proprietary.lua create mode 100644 test_scripts/Defects/6_1/3136_03_Http.lua create mode 100644 test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua create mode 100644 test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua create mode 100644 test_scripts/Defects/6_1/3136_06_Http_3apps.lua create mode 100644 test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua create mode 100644 test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua create mode 100644 test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua create mode 100644 test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua create mode 100644 test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua create mode 100644 test_sets/Defects/6_1/3136_EXT.txt create mode 100644 test_sets/Defects/6_1/3136_HTTP.txt create mode 100644 test_sets/Defects/6_1/3136_PROP.txt diff --git a/files/PTU_AppIDAppHMIType.json b/files/PTU_AppIDAppHMIType.json index 30377c1aac..8ff90c465d 100644 --- a/files/PTU_AppIDAppHMIType.json +++ b/files/PTU_AppIDAppHMIType.json @@ -2253,7 +2253,7 @@ "groups": ["Base-4"], "RequestType": [] }, - "0000002": { + "0000001": { "keep_context": false, "steal_focus": false, "priority": "NONE", diff --git a/files/PTU_AppIDDefaultHMI.json b/files/PTU_AppIDDefaultHMI.json index 7cc3e69e98..fb63814daa 100644 --- a/files/PTU_AppIDDefaultHMI.json +++ b/files/PTU_AppIDDefaultHMI.json @@ -2253,7 +2253,7 @@ "groups": ["Base-4"], "RequestType": [] }, - "0000002": { + "0000001": { "keep_context": false, "steal_focus": false, "priority": "NONE", diff --git a/files/PTU_AppIDGroups.json b/files/PTU_AppIDGroups.json index 5e8fada630..175b33606d 100644 --- a/files/PTU_AppIDGroups.json +++ b/files/PTU_AppIDGroups.json @@ -2253,7 +2253,7 @@ "groups": ["Base-4"], "RequestType": [] }, - "0000002": { + "0000001": { "keep_context": false, "steal_focus": false, "priority": "NONE", diff --git a/files/jsons/Policies/build_options/retry_seq.json b/files/jsons/Policies/build_options/retry_seq.json index 1444b397b6..d28885004d 100644 --- a/files/jsons/Policies/build_options/retry_seq.json +++ b/files/jsons/Policies/build_options/retry_seq.json @@ -5,7 +5,7 @@ "exchange_after_x_ignition_cycles": 100, "exchange_after_x_kilometers": 1800, "exchange_after_x_days": 30, - "timeout_after_x_seconds": 30, + "timeout_after_x_seconds": 8, "seconds_between_retries": [1, 2, 3, diff --git a/test_scripts/Defects/6_1/3136_01_Proprietary.lua b/test_scripts/Defects/6_1/3136_01_Proprietary.lua new file mode 100644 index 0000000000..b3ca696ce4 --- /dev/null +++ b/test_scripts/Defects/6_1/3136_01_Proprietary.lua @@ -0,0 +1,166 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Successful 2nd PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) App_1 doesn't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 still doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status and send `BC.PolicyUpdate` request to HMI +-- 4) Mobile provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local color = require("user_modules/consts").color + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } +local timeout_after_x_seconds = 4 +local expNumOfOnSysReq = #secondsBetweenRetries + 1 + +--[[ Local Functions ]] +local function log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(color.magenta, str) +end + +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function updatePreloaded(pUpdFunc) + local preloadedTable = common.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pUpdFunc(preloadedTable) + common.sdl.setPreloadedPT(preloadedTable) +end + +local function checkPTUStatus(pExpStatus) + local cid = common.hmi.getConnection():SendRequest("SDL.GetStatusUpdate") + common.hmi.getConnection():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +local function unsuccessfulPTUviaMobile() + local timeout = 60000 + common.hmi.getConnection():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + common.mobile.getSession():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function() + log("SDL->MOB:", "OnSystemRequest") + end) + :Times(expNumOfOnSysReq) + :Timeout(timeout) + + local isBCPUReceived = false + common.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + log("SDL->HMI:", "BC.PolicyUpdate") + isBCPUReceived = true + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL:", "SUCCESS BC.PolicyUpdate") + end) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if e.occurences == 2 then + checkPTUStatus("UPDATING") + common.sdl.deletePTS() + end + if e.occurences == 3 then + common.app.registerNoPTU(2) + log("SDL->MOB2:", "RAI2") + end + end) + :ValidIf(function(e) + if e.occurences == #exp - 1 and isBCPUReceived == true then + return false, "BC.PolicyUpdate is sent before new PTU sequence" + end + if e.occurences == #exp - 3 and common.sdl.getPTS() ~= nil then + return false, "PTS was created before new PTU sequence" + end + return true + end) +end + +local function policyTableUpdate() + if common.sdl.getPTS == nil then + common.run.fail("PTS was not created within new PTU sequence") + end + local function expNotifFunc() + common.hmi.getConnection():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", + { status = "UP_TO_DATE" }) + :Times(1) + end + common.ptu.policyTableUpdate(nil, expNotifFunc) +end + +local function unsuccessfulPTUviaHMI() + local requestId = common.hmi.getConnection():SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + common.hmi.getConnection():ExpectResponse(requestId) + :Do(function() + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) + common.mobile.getSession():ExpectNotification("OnPermissionsChange") + :Times(0) + end) + common.run.wait(500) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.app.register) +runner.Step("Activate App", common.app.activate) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Successful PTU via Mobile", policyTableUpdate) +runner.Step("Check PTU status UP_TO_DATE", checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua b/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua new file mode 100644 index 0000000000..cb1212b0b9 --- /dev/null +++ b/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua @@ -0,0 +1,180 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Successful 2nd PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for EXTERNAL_PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) App_1 doesn't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 still doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status and send `BC.PolicyUpdate` request to HMI +-- 4) Mobile provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local color = require("user_modules/consts").color + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } +local timeout_after_x_seconds = 4 +local expNumOfOnSysReq = #secondsBetweenRetries + 2 +local numOfOnSysReq = 0 + +--[[ Local Functions ]] +local function log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(color.magenta, str) +end + +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function updatePreloaded(pUpdFunc) + local preloadedTable = common.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pUpdFunc(preloadedTable) + common.sdl.setPreloadedPT(preloadedTable) +end + +local function checkPTUStatus(pExpStatus) + local cid = common.hmi.getConnection():SendRequest("SDL.GetStatusUpdate") + common.hmi.getConnection():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +local function sendOnSystemRequest() + if numOfOnSysReq == expNumOfOnSysReq then return end + common.hmi.getConnection():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + log("HMI->SDL:", "BC.OnSystemRequest") + numOfOnSysReq = numOfOnSysReq + 1 +end + +local function unsuccessfulPTUviaMobile() + local timeout = 60000 + common.mobile.getSession():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_, data) + log("SDL->MOB1:", "OnSystemRequest", data.payload.requestType) + end) + :Times(expNumOfOnSysReq) + :Timeout(timeout) + + local isBCPUReceived = false + common.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + log("SDL->HMI:", "BC.PolicyUpdate") + isBCPUReceived = true + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL:", "SUCCESS BC.PolicyUpdate") + end) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if data.params.status == "UPDATE_NEEDED" then + common.run.runAfter(sendOnSystemRequest, 1000) + end + if e.occurences == 2 then + checkPTUStatus("UPDATING") + common.sdl.deletePTS() + end + if e.occurences == 3 then + common.app.registerNoPTU(2) + log("SDL->MOB2:", "RAI2") + end + end) + :ValidIf(function(e) + if e.occurences == #exp - 1 and isBCPUReceived == true then + return false, "BC.PolicyUpdate is sent before new PTU sequence" + end + if e.occurences == #exp - 2 and common.sdl.getPTS() ~= nil then + return false, "PTS was created before new PTU sequence" + end + return true + end) +end + +local function policyTableUpdate() + if common.sdl.getPTS == nil then + common.run.fail("PTS was not created within new PTU sequence") + end + local function expNotifFunc() + common.hmi.getConnection():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", + { status = "UP_TO_DATE" }) + :Times(1) + end + common.ptu.policyTableUpdate(nil, expNotifFunc) +end + +local function unsuccessfulPTUviaHMI() + local requestId = common.hmi.getConnection():SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + common.hmi.getConnection():ExpectResponse(requestId) + :Do(function() + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) + common.mobile.getSession():ExpectNotification("OnPermissionsChange") + :Times(0) + end) + common.run.wait(500) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.app.register) +runner.Step("Activate App", common.app.activate) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Successful PTU via Mobile", policyTableUpdate) +runner.Step("Check PTU status UP_TO_DATE", checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3136_03_Http.lua b/test_scripts/Defects/6_1/3136_03_Http.lua new file mode 100644 index 0000000000..f336c69b32 --- /dev/null +++ b/test_scripts/Defects/6_1/3136_03_Http.lua @@ -0,0 +1,114 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Successful 2nd PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for HTTP policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) App_1 doesn't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 still doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status +-- 4) Mobile provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local color = require("user_modules/consts").color + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "HTTP" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } +local timeout_after_x_seconds = 4 +local expNumOfOnSysReq = #secondsBetweenRetries + 1 + +--[[ Local Functions ]] +local function log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(color.magenta, str) +end + +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function updatePreloaded(pUpdFunc) + local preloadedTable = common.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pUpdFunc(preloadedTable) + common.sdl.setPreloadedPT(preloadedTable) +end + +local function checkPTUStatus(pExpStatus) + local cid = common.hmi.getConnection():SendRequest("SDL.GetStatusUpdate") + common.hmi.getConnection():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +local function unsuccessfulPTUviaMobile() + local timeout = 30000 + common.mobile.getSession():ExpectNotification("OnSystemRequest", { requestType = "HTTP" }) + :Do(function() + log("SDL->MOB:", "OnSystemRequest") + end) + :Times(expNumOfOnSysReq) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if e.occurences == 3 then + common.app.registerNoPTU(2) + log("SDL->MOB2:", "RAI2") + end + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.app.register) +runner.Step("Activate App", common.app.activate) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) + +runner.Step("Successful PTU via Mobile", common.ptu.policyTableUpdate) +runner.Step("Check PTU status UP_TO_DATE", checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua b/test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua new file mode 100644 index 0000000000..9873c9bfde --- /dev/null +++ b/test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua @@ -0,0 +1,168 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Successful 2nd PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) App_1 doesn't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 still doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status and send `BC.PolicyUpdate` request to HMI +-- 4) Mobile provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local color = require("user_modules/consts").color + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } +local timeout_after_x_seconds = 4 +local expNumOfOnSysReq = #secondsBetweenRetries + 1 + +--[[ Local Functions ]] +local function log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(color.magenta, str) +end + +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function updatePreloaded(pUpdFunc) + local preloadedTable = common.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pUpdFunc(preloadedTable) + common.sdl.setPreloadedPT(preloadedTable) +end + +local function checkPTUStatus(pExpStatus) + local cid = common.hmi.getConnection():SendRequest("SDL.GetStatusUpdate") + common.hmi.getConnection():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +local function unsuccessfulPTUviaMobile(pNewAppId) + local timeout = 60000 + common.hmi.getConnection():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + common.mobile.getSession():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function() + log("SDL->MOB:", "OnSystemRequest") + end) + :Times(expNumOfOnSysReq) + :Timeout(timeout) + + local isBCPUReceived = false + common.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + log("SDL->HMI:", "BC.PolicyUpdate") + isBCPUReceived = true + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL:", "SUCCESS BC.PolicyUpdate") + end) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if e.occurences == 2 then + checkPTUStatus("UPDATING") + common.sdl.deletePTS() + end + if e.occurences == 3 then + common.app.registerNoPTU(pNewAppId) + log("SDL->MOB:", "RAI" .. pNewAppId) + end + end) + :ValidIf(function(e) + if e.occurences == #exp - 1 and isBCPUReceived == true then + return false, "BC.PolicyUpdate is sent before new PTU sequence" + end + if e.occurences == #exp - 3 and common.sdl.getPTS() ~= nil then + return false, "PTS was created before new PTU sequence" + end + return true + end) +end + +local function policyTableUpdate() + if common.sdl.getPTS == nil then + common.run.fail("PTS was not created within new PTU sequence") + end + local function expNotifFunc() + common.hmi.getConnection():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", + { status = "UP_TO_DATE" }) + :Times(1) + end + common.ptu.policyTableUpdate(nil, expNotifFunc) +end + +local function unsuccessfulPTUviaHMI() + local requestId = common.hmi.getConnection():SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + common.hmi.getConnection():ExpectResponse(requestId) + :Do(function() + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) + common.mobile.getSession():ExpectNotification("OnPermissionsChange") + :Times(0) + end) + common.run.wait(500) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.app.register) +runner.Step("Activate App", common.app.activate) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile, { 2 }) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile, { 3 }) + +runner.Step("Successful PTU via Mobile", policyTableUpdate) +runner.Step("Check PTU status UP_TO_DATE", checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua b/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua new file mode 100644 index 0000000000..1a2f43e893 --- /dev/null +++ b/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua @@ -0,0 +1,184 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Successful 2nd PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for EXTERNAL_PROPRIETARY policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) App_1 doesn't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 still doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status and send `BC.PolicyUpdate` request to HMI +-- 4) Mobile provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local color = require("user_modules/consts").color + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } +local timeout_after_x_seconds = 4 +local expNumOfOnSysReq = #secondsBetweenRetries + 2 +local numOfOnSysReq + +--[[ Local Functions ]] +local function log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(color.magenta, str) +end + +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function updatePreloaded(pUpdFunc) + local preloadedTable = common.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pUpdFunc(preloadedTable) + common.sdl.setPreloadedPT(preloadedTable) +end + +local function checkPTUStatus(pExpStatus) + local cid = common.hmi.getConnection():SendRequest("SDL.GetStatusUpdate") + common.hmi.getConnection():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +local function sendOnSystemRequest() + if numOfOnSysReq == expNumOfOnSysReq then return end + common.hmi.getConnection():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) + log("HMI->SDL:", "BC.OnSystemRequest") + numOfOnSysReq = numOfOnSysReq + 1 +end + +local function unsuccessfulPTUviaMobile(pNewAppId) + numOfOnSysReq = 0 + local timeout = 60000 + common.mobile.getSession():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + :Do(function(_, data) + log("SDL->MOB1:", "OnSystemRequest", data.payload.requestType) + end) + :Times(expNumOfOnSysReq) + :Timeout(timeout) + + local isBCPUReceived = false + common.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + log("SDL->HMI:", "BC.PolicyUpdate") + isBCPUReceived = true + common.hmi.getConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + log("HMI->SDL:", "SUCCESS BC.PolicyUpdate") + end) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + utils.printTable(exp) + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if data.params.status == "UPDATE_NEEDED" then + common.run.runAfter(sendOnSystemRequest, 1000) + end + if e.occurences == 2 then + checkPTUStatus("UPDATING") + common.sdl.deletePTS() + end + if e.occurences == 3 then + common.app.registerNoPTU(pNewAppId) + log("SDL->MOB:", "RAI" .. pNewAppId) + end + end) + :ValidIf(function(e) + if e.occurences == #exp - 1 and isBCPUReceived == true then + return false, "BC.PolicyUpdate is sent before new PTU sequence" + end + if e.occurences == #exp - 2 and common.sdl.getPTS() ~= nil then + return false, "PTS was created before new PTU sequence" + end + return true + end) +end + +local function policyTableUpdate() + if common.sdl.getPTS == nil then + common.run.fail("PTS was not created within new PTU sequence") + end + local function expNotifFunc() + common.hmi.getConnection():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", + { status = "UP_TO_DATE" }) + :Times(1) + end + common.ptu.policyTableUpdate(nil, expNotifFunc) +end + +local function unsuccessfulPTUviaHMI() + local requestId = common.hmi.getConnection():SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + common.hmi.getConnection():ExpectResponse(requestId) + :Do(function() + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) + common.mobile.getSession():ExpectNotification("OnPermissionsChange") + :Times(0) + end) + common.run.wait(500) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.app.register) +runner.Step("Activate App", common.app.activate) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile, { 2 }) +runner.Step("Unsuccessful PTU via a HMI", unsuccessfulPTUviaHMI) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile, { 3 }) + +runner.Step("Successful PTU via Mobile", policyTableUpdate) +runner.Step("Check PTU status UP_TO_DATE", checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3136_06_Http_3apps.lua b/test_scripts/Defects/6_1/3136_06_Http_3apps.lua new file mode 100644 index 0000000000..3f51c70788 --- /dev/null +++ b/test_scripts/Defects/6_1/3136_06_Http_3apps.lua @@ -0,0 +1,114 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Successful 2nd PTU if it's triggered within failed retry for the 1st PTU +-- Note: script is applicable for HTTP policy flow +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) App_1 is registered +-- SDL does: +-- - start PTU sequence +-- +-- Steps: +-- 1) App_1 doesn't provide PTU update +-- 2) App_2 is registered within PTU retry sequence +-- SDL does: +-- - postpone new PTU sequence until the previous one is finished +-- 3) App_1 still doesn't provide PTU update +-- SDL does: +-- - finish 1st PTU retry sequence with `UPDATE_NEEDED` status +-- - start new PTU sequence with `UPDATE_NEEDED` status +-- 4) Mobile provides valid PTU update +-- SDL does: +-- - finish 2nd PTU sequence successfully with `UP_TO_DATE` status +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") +local color = require("user_modules/consts").color + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "HTTP" } } } + +--[[ Local Variables ]] +local secondsBetweenRetries = { 1, 2 } +local timeout_after_x_seconds = 4 +local expNumOfOnSysReq = #secondsBetweenRetries + 1 + +--[[ Local Functions ]] +local function log(...) + local str = "[" .. atf_logger.formated_time(true) .. "]" + for i, p in pairs({...}) do + local delimiter = "\t" + if i == 1 then delimiter = " " end + str = str .. delimiter .. p + end + utils.cprint(color.magenta, str) +end + +local function updatePreloadedTimeout(pTbl) + pTbl.policy_table.module_config.timeout_after_x_seconds = timeout_after_x_seconds + pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries +end + +local function updatePreloaded(pUpdFunc) + local preloadedTable = common.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pUpdFunc(preloadedTable) + common.sdl.setPreloadedPT(preloadedTable) +end + +local function checkPTUStatus(pExpStatus) + local cid = common.hmi.getConnection():SendRequest("SDL.GetStatusUpdate") + common.hmi.getConnection():ExpectResponse(cid, { result = { status = pExpStatus }}) +end + +local function unsuccessfulPTUviaMobile(pNewAppId) + local timeout = 30000 + common.mobile.getSession():ExpectNotification("OnSystemRequest", { requestType = "HTTP" }) + :Do(function() + log("SDL->MOB:", "OnSystemRequest") + end) + :Times(expNumOfOnSysReq) + :Timeout(timeout) + + local exp = { + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATE_NEEDED" }, -- new PTU sequence + { status = "UPDATING" } + } + common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) + :Times(#exp) + :Timeout(timeout) + :Do(function(e, data) + log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") + if e.occurences == 3 then + common.app.registerNoPTU(pNewAppId) + log("SDL->MOB:", "RAI" .. pNewAppId) + end + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Preloaded update with retry parameters", updatePreloaded, { updatePreloadedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.app.register) +runner.Step("Activate App", common.app.activate) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile, { 2 }) +runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile, { 3 }) +runner.Step("Successful PTU via Mobile", common.ptu.policyTableUpdate) +runner.Step("Check PTU status UP_TO_DATE", checkPTUStatus, { "UP_TO_DATE" }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua b/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua index 71efe1ea14..9582360b3d 100644 --- a/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua +++ b/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua @@ -100,25 +100,14 @@ function Test:Preconditions_Update_Policy_With_Steal_Focus_FalseValue_for_Curren ) EXPECT_NOTIFICATION("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function() - local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", - { - fileName = "PolicyTableUpdate", - requestType = "PROPRIETARY" - }, "files/ptu_general_steal_focus_false.json") - local systemRequestId + local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", { + requestType = "PROPRIETARY" }, "files/ptu_general_steal_focus_false.json") EXPECT_HMICALL("BasicCommunication.SystemRequest") - :Do(function(_,data) - systemRequestId = data.id - self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", - { - policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" - }) - local function to_run() - self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) - end - RUN_AFTER(to_run, 800) - self.mobileSession:ExpectResponse(CorIdSystemRequest, {success = true, resultCode = "SUCCESS"}) + :Do(function(_, data) + self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = data.params.fileName }) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) + self.mobileSession:ExpectResponse(CorIdSystemRequest, { success = true, resultCode = "SUCCESS" }) end) end) end diff --git a/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua index 86d8326a03..3dc5e73aa6 100644 --- a/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua @@ -92,12 +92,8 @@ function Test.RemovePTS() testCasesForExternalUCS.removePTS() end -function Test:StartSession_2() - testCasesForExternalUCS.startSession(self, 2) -end - -function Test:RAI_2() - testCasesForExternalUCS.registerApp(self, 2) +function Test:CreateNewPTS() + self.hmiConnection:SendNotification("SDL.OnPolicyUpdate") EXPECT_HMICALL("BasicCommunication.PolicyUpdate") :Do(function(_, d) testCasesForExternalUCS.pts = testCasesForExternalUCS.createTableFromJsonFile(d.params.file) end) end diff --git a/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua b/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua index 202e2adbc9..9a4025cdbc 100644 --- a/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua +++ b/test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua @@ -32,6 +32,8 @@ runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTER --[[ Local Variables ]] local secondsBetweenRetries = { 1, 2 } -- in sec local timeout_after_x_seconds = 4 -- in sec +local expNumOfOnSysReq = #secondsBetweenRetries + 2 +local numOfOnSysReq = 0 --[[ Local Functions ]] local function updatePreloadedTimeout(pTbl) @@ -39,20 +41,12 @@ local function updatePreloadedTimeout(pTbl) pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries end -function common.registerApp(pAppId) - common.register(pAppId) - local exp = { { status = "UPDATE_NEEDED" }, { status = "UPDATING" } } - common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) - :Times(#exp) - :Do(function(_, data) - common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") - end) -end - local function sendOnSystemRequest() + if numOfOnSysReq == expNumOfOnSysReq then return end common.hmi():SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) common.log("HMI->SDL:", "BC.OnSystemRequest") + numOfOnSysReq = numOfOnSysReq + 1 end local function unsuccessfulPTUviaMobile() @@ -61,7 +55,7 @@ local function unsuccessfulPTUviaMobile() :Do(function() common.log("SDL->MOB:", "OnSystemRequest") end) - :Times(3) + :Times(expNumOfOnSysReq) :Timeout(timeout) local exp = { @@ -71,14 +65,16 @@ local function unsuccessfulPTUviaMobile() { status = "UPDATING" }, { status = "UPDATE_NEEDED" }, { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, { status = "UPDATE_NEEDED" } } common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp)) :Times(#exp) :Timeout(timeout) - :Do(function(e, data) + :Do(function(_, data) common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") - if data.params.status == "UPDATE_NEEDED" and e.occurences < #exp then + if data.params.status == "UPDATE_NEEDED" then common.runAfter(sendOnSystemRequest, 1000) end end) diff --git a/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua b/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua index ff61a3d99d..3d7ab7aca0 100644 --- a/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua +++ b/test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua @@ -32,6 +32,7 @@ runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPR --[[ Local Variables ]] local secondsBetweenRetries = { 1, 2 } -- in sec local timeout_after_x_seconds = 4 -- in sec +local expNumOfOnSysReq = #secondsBetweenRetries + 1 --[[ Local Functions ]] local function updatePreloadedTimeout(pTbl) @@ -39,26 +40,15 @@ local function updatePreloadedTimeout(pTbl) pTbl.policy_table.module_config.seconds_between_retries = secondsBetweenRetries end -function common.registerApp(pAppId) - common.register(pAppId) - local exp = { - [1] = { { status = "UPDATE_NEEDED" }, { status = "UPDATING" } }, - [2] = { { status = "UPDATE_NEEDED" }, { status = "UPDATING" } } - } - common.hmi():ExpectNotification("SDL.OnStatusUpdate", unpack(exp[pAppId])) - :Times(#exp[pAppId]) - :Do(function(_, data) - common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") - end) -end - local function unsuccessfulPTUviaMobile() local timeout = 60000 + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function() common.log("SDL->MOB:", "OnSystemRequest") end) - :Times(2) + :Times(expNumOfOnSysReq) :Timeout(timeout) local exp = { @@ -83,12 +73,12 @@ runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Title("Test") -runner.Step("Register App", common.registerApp, { 1 }) +runner.Step("Register App1", common.registerApp, { 1 }) runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) runner.Step("Check PTU status UPDATE_NEEDED", common.checkPTUStatus, { "UPDATE_NEEDED" }) -runner.Step("Register App 2", common.registerApp, { 2 }) +runner.Step("Register App2", common.registerApp, { 2 }) runner.Step("Successful PTU via HMI", common.ptuViaHMI) runner.Step("Check PTU status UP_TO_DATE", common.checkPTUStatus, { "UP_TO_DATE" }) diff --git a/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua b/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua index 31d728da95..eeabdd28e4 100644 --- a/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua +++ b/test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua @@ -34,6 +34,8 @@ runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTER --[[ Local Variables ]] local secondsBetweenRetries = { 1, 2 } -- in sec local timeout_after_x_seconds = 4 -- in sec +local expNumOfOnSysReq = #secondsBetweenRetries + 2 +local numOfOnSysReq = 0 --[[ Local Functions ]] local function updatePreloadedTimeout(pTbl) @@ -42,9 +44,11 @@ local function updatePreloadedTimeout(pTbl) end local function sendOnSystemRequest() + if numOfOnSysReq == expNumOfOnSysReq then return end common.hmi():SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) common.log("HMI->SDL:", "BC.OnSystemRequest") + numOfOnSysReq = numOfOnSysReq + 1 end local function unsuccessfulPTUviaMobile() @@ -53,7 +57,7 @@ local function unsuccessfulPTUviaMobile() :Do(function(_, data) common.log("SDL->MOB1:", "OnSystemRequest", data.payload.requestType) end) - :Times(4) + :Times(expNumOfOnSysReq) :Timeout(timeout) local isBCPUReceived = false @@ -62,6 +66,7 @@ local function unsuccessfulPTUviaMobile() isBCPUReceived = true common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) end) + :Timeout(timeout) local exp = { { status = "UPDATE_NEEDED" }, @@ -71,6 +76,8 @@ local function unsuccessfulPTUviaMobile() { status = "UPDATE_NEEDED" }, { status = "UPDATING" }, { status = "UPDATE_NEEDED" }, + { status = "UPDATING" }, + { status = "UPDATE_NEEDED" }, { status = "UPDATE_NEEDED" }, -- new PTU sequence { status = "UPDATING" } } @@ -79,7 +86,7 @@ local function unsuccessfulPTUviaMobile() :Timeout(timeout) :Do(function(e, data) common.log("SDL->HMI:", "SDL.OnStatusUpdate(" .. data.params.status .. ")") - if data.params.status == "UPDATE_NEEDED" and e.occurences < #exp - 2 then + if data.params.status == "UPDATE_NEEDED" then common.runAfter(sendOnSystemRequest, 1000) end if e.occurences == 2 then diff --git a/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua b/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua index def472d8bc..2256f06710 100644 --- a/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua +++ b/test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua @@ -34,6 +34,7 @@ runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPR --[[ Local Variables ]] local secondsBetweenRetries = { 1, 2 } -- in sec local timeout_after_x_seconds = 4 -- in sec +local expNumOfOnSysReq = #secondsBetweenRetries + 1 --[[ Local Functions ]] local function updatePreloadedTimeout(pTbl) @@ -43,11 +44,13 @@ end local function unsuccessfulPTUviaMobile() local timeout = 60000 + common.hmi():SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "files/ptu.json" }) common.mobile():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) :Do(function() common.log("SDL->MOB:", "OnSystemRequest") end) - :Times(2) + :Times(expNumOfOnSysReq) :Timeout(timeout) local isBCPUReceived = false @@ -56,6 +59,7 @@ local function unsuccessfulPTUviaMobile() isBCPUReceived = true common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) end) + :Timeout(timeout) local exp = { { status = "UPDATE_NEEDED" }, @@ -102,7 +106,7 @@ runner.Step("Preloaded update with retry parameters", common.updatePreloaded, { runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Title("Test") -runner.Step("Register App", common.register, { 1 }) +runner.Step("Register App", common.registerApp, { 1 }) runner.Step("Activate App", common.activateApp, { 1 }) runner.Step("Unsuccessful PTU via a HMI", common.unsuccessfulPTUviaHMI) runner.Step("Unsuccessful PTU via a mobile device", unsuccessfulPTUviaMobile) diff --git a/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua b/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua index bed17852ac..482e7dd8ad 100644 --- a/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua +++ b/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua @@ -56,7 +56,7 @@ function Test:TestStep_ActivateApp_StatusNeeded() self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName(), isSDLAllowed = true}}) - -- EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }):Times(2) EXPECT_HMICALL("BasicCommunication.PolicyUpdate",{}) :Do(function(_,data) diff --git a/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua index fdd5fef7fd..5498d915b3 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua @@ -25,6 +25,7 @@ config.defaultProtocolVersion = 2 local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') local utils = require ('user_modules/utils') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() @@ -32,90 +33,22 @@ commonSteps:DeleteLogsFileAndPolicyTable() --[[ General Settings for configuration ]] Test = require('connecttest') require('cardinalities') -local mobile_session = require('mobile_session') require('user_modules/AppTypes') --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") -function Test:Precondition_Register_app() - self.mobileSession2 = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession2:StartService(7) - :Do(function() - local correlationId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") - :Do(function(_,data) - self.HMIAppID2 = data.params.application.appID - end) - self.mobileSession2:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end) -end - -function Test:Precondition_Activate_app() - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", {appID = self.HMIAppID2 }) - EXPECT_HMIRESPONSE(RequestId,{}) - :Do(function(_,data) - if data.result.isSDLAllowed ~= true then - local RequestIdGetMes = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", - {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestIdGetMes) - :Do(function() - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) - EXPECT_HMICALL("BasicCommunication.PolicyUpdate") - :Do(function(_,data3) - self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) - end) - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data1) - self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - end) - end - end) - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) - EXPECT_NOTIFICATION("OnHMIStatus"):Times(0) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) +function Test:Precondition_trigger_getting_device_consent() + testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) end --[[ Test ]] commonFunctions:newTestCasesGroup("Test") function Test:TestStep_Validate_default_hmi_upon_PTU() - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", - { policyType = "module_config", property = "endpoints" }) - EXPECT_HMIRESPONSE(requestId) - :Do(function(_,data) - self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", - { - requestType = "PROPRIETARY", - fileName = "filename" - } - ) - self.mobileSession2:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) - :Do(function() - local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", - { fileName = "PolicyTableUpdate", requestType = "PROPRIETARY", appID = config.application2.registerAppInterfaceParams.fullAppID}, - "files/PTU_AppIDDefaultHMI.json") - local systemRequestId - EXPECT_HMICALL("BasicCommunication.SystemRequest") - :Do(function() - systemRequestId = data.id - self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", - { - policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" - }) - local function to_run() - self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) - end - RUN_AFTER(to_run, 500) - end) - self.mobileSession:ExpectResponse(CorIdSystemRequest, {}) - end) - end) - --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) + local ptu_file_path = "files/" + local ptu_file = "PTU_AppIDDefaultHMI.json" + testCasesForPolicyTable:flow_SUCCEESS_EXTERNAL_PROPRIETARY(self, nil, nil, nil, ptu_file_path, nil, ptu_file) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua index 95e1601d23..e653d543a4 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua @@ -24,6 +24,7 @@ config.defaultProtocolVersion = 2 local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') local utils = require ('user_modules/utils') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() @@ -31,85 +32,22 @@ commonSteps:DeleteLogsFileAndPolicyTable() --[[ General Settings for configuration ]] Test = require('connecttest') require('cardinalities') -local mobile_session = require('mobile_session') require('user_modules/AppTypes') --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") -function Test:Precondition_Register_app() - self.mobileSession2 = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession2:StartService(7) - :Do(function() - local correlationId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") - :Do(function(_,data) - self.HMIAppID2 = data.params.application.appID - end) - self.mobileSession2:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end) -end - -function Test:Precondition_Activate_app() - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", {appID = self.HMIAppID2 }) - EXPECT_HMIRESPONSE(RequestId,{}) - :Do(function(_,data) - if data.result.isSDLAllowed ~= true then - local RequestIdGetMes = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", - {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestIdGetMes) - :Do(function() - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data1) - self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - end) - end - end) - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) +function Test:Precondition_trigger_getting_device_consent() + testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) end --[[ Test ]] commonFunctions:newTestCasesGroup("Test") -function Test:TestStep_Validate_groups_from_appId_upon_PTU() - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", - { policyType = "module_config", property = "endpoints" }) - EXPECT_HMIRESPONSE(requestId) - :Do(function(_,data) - self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", - { - requestType = "PROPRIETARY", - fileName = "filename" - } - ) - self.mobileSession2:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) - :Do(function() - local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", - { fileName = "PolicyTableUpdate", requestType = "PROPRIETARY", appID = config.application2.registerAppInterfaceParams.fullAppID}, - "files/PTU_AppIDGroups.json") - local systemRequestId - EXPECT_HMICALL("BasicCommunication.SystemRequest") - :Do(function() - systemRequestId = data.id - self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", - { - policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" - }) - local function to_run() - self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) - end - RUN_AFTER(to_run, 500) - end) - self.mobileSession:ExpectResponse(CorIdSystemRequest, {}) - end) - end) - --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", - {status = "UPDATING"}, {status = "UP_TO_DATE"}):Times(2) +function Test:TestStep_Validate_default_hmi_upon_PTU() + local ptu_file_path = "files/" + local ptu_file = "PTU_AppIDGroups.json" + testCasesForPolicyTable:flow_SUCCEESS_EXTERNAL_PROPRIETARY(self, nil, nil, nil, ptu_file_path, nil, ptu_file) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua index 797ab6268b..390b15eb5e 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua @@ -24,6 +24,7 @@ config.defaultProtocolVersion = 2 local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') local utils = require ('user_modules/utils') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() @@ -31,89 +32,22 @@ commonSteps:DeleteLogsFileAndPolicyTable() --[[ General Settings for configuration ]] Test = require('connecttest') require('cardinalities') -local mobile_session = require('mobile_session') require('user_modules/AppTypes') --[[ Preconditions ]] commonFunctions:newTestCasesGroup("Preconditions") -function Test:Precondition_Register_app() - self.mobileSession2 = mobile_session.MobileSession(self, self.mobileConnection) - self.mobileSession2:StartService(7) - :Do(function() - local correlationId = self.mobileSession2:SendRPC("RegisterAppInterface", config.application2.registerAppInterfaceParams) - EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered") - :Do(function(_,data) - self.HMIAppID2 = data.params.application.appID - end) - self.mobileSession2:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) - end) -end - -function Test:Precondition_Activate_app() - local RequestId = self.hmiConnection:SendRequest("SDL.ActivateApp", {appID = self.HMIAppID2 }) - EXPECT_HMIRESPONSE(RequestId,{}) - :Do(function(_,data) - if data.result.isSDLAllowed ~= true then - local RequestIdGetMes = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", - {language = "EN-US", messageCodes = {"DataConsent"}}) - EXPECT_HMIRESPONSE(RequestIdGetMes) - :Do(function() - self.hmiConnection:SendNotification("SDL.OnAllowSDLFunctionality", - {allowed = true, source = "GUI", device = {id = utils.getDeviceMAC(), name = utils.getDeviceName()}}) - EXPECT_HMICALL("BasicCommunication.PolicyUpdate") - :Do(function(_,data3) - self.hmiConnection:SendResponse(data3.id, data3.method, "SUCCESS", {}) - end) - EXPECT_HMICALL("BasicCommunication.ActivateApp") - :Do(function(_,data1) - self.hmiConnection:SendResponse(data1.id,"BasicCommunication.ActivateApp", "SUCCESS", {}) - end) - end) - end - end) - self.mobileSession2:ExpectNotification("OnHMIStatus", {hmiLevel = "FULL", systemContext = "MAIN"}) - EXPECT_NOTIFICATION("OnHMIStatus", {}):Times(0) +function Test:Precondition_trigger_getting_device_consent() + testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) end --[[ Test ]] commonFunctions:newTestCasesGroup("Test") -function Test:TestStep_Validate_appHMIType_from_appId_upon_PTU() - local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", - { policyType = "module_config", property = "endpoints" }) - EXPECT_HMIRESPONSE(requestId) - :Do(function(_,data) - self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", - { - requestType = "PROPRIETARY", - fileName = "filename" - } - ) - self.mobileSession2:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) - :Do(function() - local CorIdSystemRequest = self.mobileSession:SendRPC("SystemRequest", - { fileName = "PolicyTableUpdate", requestType = "PROPRIETARY", appID = config.application2.registerAppInterfaceParams.fullAppID}, - "files/PTU_AppIDAppHMIType.json") - local systemRequestId - EXPECT_HMICALL("BasicCommunication.SystemRequest") - :Do(function() - systemRequestId = data.id - self.hmiConnection:SendNotification("SDL.OnReceivedPolicyUpdate", - { - policyfile = "/tmp/fs/mp/images/ivsu_cache/PolicyTableUpdate" - }) - local function to_run() - self.hmiConnection:SendResponse(systemRequestId,"BasicCommunication.SystemRequest", "SUCCESS", {}) - end - RUN_AFTER(to_run, 500) - end) - self.mobileSession:ExpectResponse(CorIdSystemRequest, {}) - end) - end) - --PTU is valid - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UP_TO_DATE"}) +function Test:TestStep_Validate_default_hmi_upon_PTU() + local ptu_file_path = "files/" + local ptu_file = "PTU_AppIDAppHMIType.json" + testCasesForPolicyTable:flow_SUCCEESS_EXTERNAL_PROPRIETARY(self, nil, nil, nil, ptu_file_path, nil, ptu_file) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua index 4997862742..f90a07b7a1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua @@ -139,6 +139,7 @@ function Test:RegisterFirstApp() EXPECT_RESPONSE(correlationId, { success = true }) EXPECT_NOTIFICATION("OnPermissionsChange") end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) end function Test:CheckDB_app_registration_language_gui() @@ -164,7 +165,7 @@ function Test:ActivateAppInFULLLevel() self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) end) :Times(AtLeast(1)) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) end function Test:InitiatePTUForGetSnapshot() diff --git a/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua b/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua index 53e8a6868e..1e82ad407f 100644 --- a/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua +++ b/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua @@ -66,18 +66,16 @@ function Test:TestStep_PoliciesManager_changes_status_UPDATING() EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", {application = { appName = config.application1.registerAppInterfaceParams.appName } }) :Do(function() - - - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(2) - :Do(function(exp,data) - print("SDL -> HMI: OnStatusUpdate, status: " .. data.params.status) - if(data.params.status == "UPDATE_NEEDED" and exp.occurences ~= 1) then - self:FailTestCase("SDL.OnStatusUpdate(UPDATE_NEEDED) is not received for first OnStatusUpdate, Received at occurences: " .. exp.occurences) - elseif(data.params.status == "UPDATING" and exp.occurences ~= 2) then - self:FailTestCase("SDL.OnStatusUpdate(UPDATING) is not received for second OnStatusUpdate, Received at occurences: " .. exp.occurences) - end - end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate"):Times(2) + :Do(function(exp,data) + print("SDL -> HMI: OnStatusUpdate, status: " .. data.params.status) + if(data.params.status == "UPDATE_NEEDED" and exp.occurences ~= 1) then + self:FailTestCase("SDL.OnStatusUpdate(UPDATE_NEEDED) is not received for first OnStatusUpdate, Received at occurences: " .. exp.occurences) + elseif(data.params.status == "UPDATING" and exp.occurences ~= 2) then + self:FailTestCase("SDL.OnStatusUpdate(UPDATING) is not received for second OnStatusUpdate, Received at occurences: " .. exp.occurences) + end end) + end) end --[[ Postconditions ]] diff --git a/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua b/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua index af212b0915..9b435a1a02 100644 --- a/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua +++ b/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua @@ -90,17 +90,17 @@ function Test:TestStep_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request() end function Test:TestStep_Retry_Timeout_Expiration() - local timeout_after_x_seconds = 30 + local timeout_after_x_seconds = 8 local time_wait = {} local sec_btw_ret = {1, 2, 3, 4, 5} local total_time - time_wait[0] = timeout_after_x_seconds -- 30 - time_wait[1] = timeout_after_x_seconds + sec_btw_ret[1] -- 30 + 1 = 31 - time_wait[2] = timeout_after_x_seconds + sec_btw_ret[2] + time_wait[1] -- 30 + 2 + 31 = 63 - time_wait[3] = timeout_after_x_seconds + sec_btw_ret[3] + time_wait[2] -- 30 + 3 + 63 = 96 - time_wait[4] = timeout_after_x_seconds + sec_btw_ret[4] + time_wait[3] -- 30 + 4 + 96 = 130 - time_wait[5] = timeout_after_x_seconds + sec_btw_ret[5] + time_wait[4] -- 30 + 5 + 130 = 165 + time_wait[0] = timeout_after_x_seconds -- 8 + time_wait[1] = timeout_after_x_seconds + sec_btw_ret[1] -- 8 + 1 = 9 + time_wait[2] = timeout_after_x_seconds + sec_btw_ret[2] + time_wait[1] -- 8 + 2 + 9 = 19 + time_wait[3] = timeout_after_x_seconds + sec_btw_ret[3] + time_wait[2] -- 8 + 3 + 19 = 30 + time_wait[4] = timeout_after_x_seconds + sec_btw_ret[4] + time_wait[3] -- 8 + 4 + 30 = 42 + time_wait[5] = timeout_after_x_seconds + sec_btw_ret[5] + time_wait[4] -- 8 + 5 + 42 = 55 total_time = (time_wait[0] + time_wait[1] + time_wait[2] + time_wait[3] + time_wait[4] + time_wait[5]) * 1000 + 10000 print("Waiting " .. total_time .. "ms") diff --git a/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua b/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua index b3274c93fb..c184294e40 100644 --- a/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua +++ b/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua @@ -31,14 +31,14 @@ local commonTestCases = require ('user_modules/shared_testcases/commonTestCases' --[[ Local Variables ]] local seconds_between_retries = {1, 1, 1, 1, 1} -- in min -local timeout_after_x_seconds = 30 -- in sec +local timeout_after_x_seconds = 8 -- in sec local timeout = {} -- in sec -timeout[1] = timeout_after_x_seconds -- 30 -timeout[2] = timeout_after_x_seconds + seconds_between_retries[1] -- 30 + 1 = 31 -timeout[3] = timeout_after_x_seconds + seconds_between_retries[2] + timeout[2] -- 30 + 1 + 31 = 62 -timeout[4] = timeout_after_x_seconds + seconds_between_retries[3] + timeout[3] -- 30 + 1 + 62 = 93 -timeout[5] = timeout_after_x_seconds + seconds_between_retries[4] + timeout[4] -- 30 + 1 + 93 = 124 -timeout[6] = timeout_after_x_seconds + seconds_between_retries[5] + timeout[5] -- 30 + 1 + 124 = 155 +timeout[1] = timeout_after_x_seconds -- 8 +timeout[2] = timeout_after_x_seconds + seconds_between_retries[1] -- 8 + 1 = 9 +timeout[3] = timeout_after_x_seconds + seconds_between_retries[2] + timeout[2] -- 8 + 1 + 9 = 18 +timeout[4] = timeout_after_x_seconds + seconds_between_retries[3] + timeout[3] -- 8 + 1 + 18 = 27 +timeout[5] = timeout_after_x_seconds + seconds_between_retries[4] + timeout[4] -- 8 + 1 + 27 = 36 +timeout[6] = timeout_after_x_seconds + seconds_between_retries[5] + timeout[5] -- 8 + 1 + 36 = 45 local onsysrequest_app1 = false local onsysrequest_app2 = false @@ -270,7 +270,7 @@ end EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}):Times(2) self.mobileSession2:ExpectResponse(CorIdRAI2, {success = true, resultCode = "SUCCESS"}) - commonTestCases:DelayedExp(10000) + commonTestCases:DelayedExp(5000) end function Test:TestStep_CheckHTTP_Received() diff --git a/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua b/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua index 63a8eb06aa..f4685e45d2 100644 --- a/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua +++ b/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua @@ -76,17 +76,17 @@ function Test:TestStep_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request() end function Test:TestStep_Retry_Timeout_Expiration() - local timeout_after_x_seconds = 30 + local timeout_after_x_seconds = 8 local time_wait = {} local sec_btw_ret = {1, 2, 3, 4, 5} local total_time - time_wait[0] = timeout_after_x_seconds -- 30 - time_wait[1] = timeout_after_x_seconds + sec_btw_ret[1] -- 30 + 1 = 31 - time_wait[2] = timeout_after_x_seconds + sec_btw_ret[2] + time_wait[1] -- 30 + 2 + 31 = 63 - time_wait[3] = timeout_after_x_seconds + sec_btw_ret[3] + time_wait[2] -- 30 + 3 + 63 = 96 - time_wait[4] = timeout_after_x_seconds + sec_btw_ret[4] + time_wait[3] -- 30 + 4 + 96 = 130 - time_wait[5] = timeout_after_x_seconds + sec_btw_ret[5] + time_wait[4] -- 30 + 5 + 130 = 165 + time_wait[0] = timeout_after_x_seconds -- 8 + time_wait[1] = timeout_after_x_seconds + sec_btw_ret[1] -- 8 + 1 = 9 + time_wait[2] = timeout_after_x_seconds + sec_btw_ret[2] + time_wait[1] -- 8 + 2 + 9 = 19 + time_wait[3] = timeout_after_x_seconds + sec_btw_ret[3] + time_wait[2] -- 8 + 3 + 19 = 30 + time_wait[4] = timeout_after_x_seconds + sec_btw_ret[4] + time_wait[3] -- 8 + 4 + 30 = 42 + time_wait[5] = timeout_after_x_seconds + sec_btw_ret[5] + time_wait[4] -- 8 + 5 + 42 = 55 total_time = (time_wait[0] + time_wait[1] + time_wait[2] + time_wait[3] + time_wait[4] + time_wait[5]) * 1000 + 10000 print("Waiting " .. total_time .. "ms") diff --git a/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua b/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua index 98ff18b689..f55a6e6f5f 100644 --- a/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua +++ b/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua @@ -71,7 +71,7 @@ function Test:TestStep_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request() end function Test:TestStep_Retry_Timeout_Expiration() - local total_time = 525000 + local total_time = 185000 print("Waiting " .. total_time .. "ms") EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", diff --git a/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua b/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua index 1683b06254..7d9f0c07ce 100644 --- a/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua @@ -36,7 +36,7 @@ local atf_logger = require('atf_logger') --[[ Local variables ]] local time_prev = 0 local time_curr = 0 -local exp_timeout = 30000 +local exp_timeout = 8000 local tolerance = 500 -- ms --[[ General Precondition before ATF start ]] @@ -109,13 +109,13 @@ function Test:TestStep_RetrySequenceStart() end end) :Times(2) - :Timeout(40000) + :Timeout(15000) EXPECT_HMICALL("BasicCommunication.PolicyUpdate"):Times(0) self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }):Times(1) - :Timeout(40000) + :Timeout(15000) - commonTestCases:DelayedExp(40000) + commonTestCases:DelayedExp(15000) end --[[ Postconditions ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua index d22e4548a2..bc20bdb4bb 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua @@ -42,6 +42,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonRC.preconditions, { false }) +runner.Step("Update SDL config", commonRC.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start) runner.Step("RAI1", commonRC.registerApp) runner.Step("PTU with RADIO for App1", commonRC.policyTableUpdate, { PTUfunc1 }) diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua index e259ce50bb..fa2112c7fd 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua @@ -29,6 +29,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonRC.preconditions, { true, 1 }) +runner.Step("Update SDL config", commonRC.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start) runner.Step("RAI1", commonRC.registerAppWOPTU) diff --git a/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua b/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua index 42e97b2044..39d928869d 100644 --- a/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua +++ b/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua @@ -51,6 +51,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions, { true, 1 }) +runner.Step("Update SDL config", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register RC application 1", common.registerRCApplication) runner.Step("Activate App 1", common.activateApp) diff --git a/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua b/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua index e93a668f95..a36f3cf51d 100644 --- a/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua +++ b/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua @@ -46,6 +46,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions, { true, 1 }) +runner.Step("Update SDL config", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register RC application 1", common.registerRCApplication) runner.Step("Activate App 1", common.activateApp) diff --git a/test_scripts/RC/commonRC.lua b/test_scripts/RC/commonRC.lua index 9a7ffe5d0c..0c6e428418 100644 --- a/test_scripts/RC/commonRC.lua +++ b/test_scripts/RC/commonRC.lua @@ -42,6 +42,7 @@ commonRC.cprint = utils.cprint commonRC.start = actions.start commonRC.json = json commonRC.HMICap = SDL.HMICap +commonRC.setSDLIniParameter = actions.setSDLIniParameter commonRC.modules = { "RADIO", "CLIMATE" } commonRC.allModules = { "RADIO", "CLIMATE", "SEAT", "AUDIO", "LIGHT", "HMI_SETTINGS" } @@ -941,7 +942,7 @@ function commonRC.activateApp(pAppId) EXPECT_HMIRESPONSE(requestId) mobSession:ExpectNotification("OnHMIStatus", { hmiLevel = "FULL", audioStreamingState = audibleState(pAppId), systemContext = "MAIN" }) - actions.run.wait() + actions.run.wait(commonRC.minTimeout) end function commonRC.getModuleId(pModuleType) diff --git a/test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua b/test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua new file mode 100644 index 0000000000..fa7eeb40fa --- /dev/null +++ b/test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua @@ -0,0 +1,60 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Check that SDL defines the same application from second device as known one +-- and does not trigger 2nd PTU for it in case second app is registered during first PTU +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) Mobile №1 and №2 are connected to SDL and are consented +-- 3) App1 is registered from Mobile №1 and triggers PTU +-- +-- Steps: +-- 1) App1 is registered from Mobile №2 during PTU for App1 from Mobile №1 is in progress +-- Check: SDL does not send SDL.OnStatusUpdate and BC.PolicyUpdate to HMI during the app registration +-- 2) First PTU is successful +-- Check: SDL does not trigger new PTU after the first one is finished +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/TheSameApp/commonTheSameApp') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Data ]] +local devices = { + [1] = { host = "1.0.0.1", port = config.mobilePort }, + [2] = { host = "192.168.100.199", port = config.mobilePort } +} + +local appParams = { + [1] = { + appName = "Test App", + isMediaApplication = true, + appHMIType = { "NAVIGATION" }, + appID = "0008", + fullAppID = "0000008" + } +} + +local function secondPTUIsNotTriggered() + common.isPTUNotStarted() + common.run.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL and HMI", common.start) +runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) + +runner.Title("Test") +runner.Step("Register App1 from device 1", common.registerAppWithPTU, { 1, appParams[1], 1 }) +runner.Step("Register App1 from device 2", common.registerAppWithoutPTU, { 2, appParams[1], 2 }) +runner.Step("PTU", common.ptu.policyTableUpdate, { nil, secondPTUIsNotTriggered }) + +runner.Title("Postconditions") +runner.Step("Remove mobile devices", common.clearMobDevices, {devices}) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua b/test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua new file mode 100644 index 0000000000..03f6545355 --- /dev/null +++ b/test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua @@ -0,0 +1,70 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Check that SDL triggers new PTU for App2 from Mobile №2 after +-- the first PTU for App1 from Mobile №1 is finished in case App2 is registered during first PTU +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) Mobile №1 and №2 are connected to SDL and are consented +-- 3) App1 is registered from Mobile №1 and triggers PTU +-- +-- Steps: +-- 1) App2 is registered from Mobile №2 during PTU for App1 from Mobile №1 is in progress +-- Check: SDL does not send SDL.OnStatusUpdate and BC.PolicyUpdate to HMI during the app registration +-- 2) First PTU is performed successful +-- Check: SDL triggers new PTU after the first one is finished +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/TheSameApp/commonTheSameApp') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Data ]] +local devices = { + [1] = { host = "1.0.0.1", port = config.mobilePort }, + [2] = { host = "192.168.100.199", port = config.mobilePort } +} + +local appParams = { + [1] = { + appName = "Test Appl", + isMediaApplication = true, + appHMIType = { "DEFAULT" }, + appID = "0009", + fullAppID = "0000009" + }, + [2] = { + appName = "Test Appl", + isMediaApplication = true, + appHMIType = { "DEFAULT" }, + appID = "0010", + fullAppID = "0000010" + } +} + +local function secondPTUIsTriggered() + common.isPTUStarted() + common.hmi.getConnection():ExpectRequest("SDL.OnStatusUpdate", + { status = "UP_TO_DATE" }, { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(3) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL and HMI", common.start) +runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) + +runner.Title("Test") +runner.Step("Register App1 from device 1", common.registerAppWithPTU, { 1, appParams[1], 1 }) +runner.Step("Register App2 from device 2", common.registerAppWithoutPTU, { 2, appParams[2], 2 }) +runner.Step("PTU 1", common.ptu.policyTableUpdate, { nil, secondPTUIsTriggered }) +runner.Step("PTU 2", common.ptu.policyTableUpdate) + +runner.Title("Postconditions") +runner.Step("Remove mobile devices", common.clearMobDevices, {devices}) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua b/test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua new file mode 100644 index 0000000000..eef964436e --- /dev/null +++ b/test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua @@ -0,0 +1,54 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Check that SDL defines the same application from second device as known one +-- and does not trigger the PTU for second app after first PTU is finished +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) Mobile №1 and №2 are connected to SDL and are consented +-- 3) App1 is registered from Mobile №1 and triggers PTU +-- 4) PTU for App1 from Mobile №1 is performed successful +-- +-- Steps: +-- 1) App1 is registered from Mobile №2 +-- Check: SDL does not trigger new PTU: does not send SDL.OnStatusUpdate and BC.PolicyUpdate to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/TheSameApp/commonTheSameApp') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Data ]] +local devices = { + [1] = { host = "1.0.0.1", port = config.mobilePort }, + [2] = { host = "192.168.100.199", port = config.mobilePort } +} + +local appParams = { + [1] = { + appName = "Test App", + isMediaApplication = true, + appHMIType = { "NAVIGATION" }, + appID = "0008", + fullAppID = "0000008" + } +} + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL and HMI", common.start) +runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) + +runner.Title("Test") +runner.Step("Register App1 from device 1", common.registerAppWithPTU, { 1, appParams[1], 1 }) +runner.Step("PTU", common.ptu.policyTableUpdate) +runner.Step("Register App1 from device 2", common.registerAppWithoutPTU, { 2, appParams[1], 2 }) + +runner.Title("Postconditions") +runner.Step("Remove mobile devices", common.clearMobDevices, {devices}) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua b/test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua new file mode 100644 index 0000000000..6e1765afe5 --- /dev/null +++ b/test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua @@ -0,0 +1,62 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Check that SDL triggers new PTU for App2 from Mobile №2 after +-- the first PTU for App1 from Mobile №1 is finished in case App2 was registered after first PTU +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) Mobile №1 and №2 are connected to SDL and are consented +-- 3) App1 is registered from Mobile №1 and triggers PTU +-- 4) PTU for App1 from Mobile №1 is finished successfully +-- +-- Steps: +-- 1) App2 is registered from Mobile №2 +-- Check: SDL does trigger new PTU: send SDL.OnStatusUpdate and BC.PolicyUpdate to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/TheSameApp/commonTheSameApp') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Data ]] +local devices = { + [1] = { host = "1.0.0.1", port = config.mobilePort }, + [2] = { host = "192.168.100.199", port = config.mobilePort } +} + +local appParams = { + [1] = { + appName = "Test Appl", + isMediaApplication = true, + appHMIType = { "DEFAULT" }, + appID = "0009", + fullAppID = "0000009" + }, + [2] = { + appName = "Test Appl", + isMediaApplication = true, + appHMIType = { "DEFAULT" }, + appID = "0010", + fullAppID = "0000010" + } +} + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL and HMI", common.start) +runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) + +runner.Title("Test") +runner.Step("Register App1 from device 1", common.registerAppWithPTU, { 1, appParams[1], 1 }) +runner.Step("PTU", common.ptu.policyTableUpdate) +runner.Step("Register App2 from device 2", common.registerAppWithPTU, { 2, appParams[2], 2 }) +runner.Step("PTU", common.ptu.policyTableUpdate) + +runner.Title("Postconditions") +runner.Step("Remove mobile devices", common.clearMobDevices, {devices}) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua b/test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua new file mode 100644 index 0000000000..67efbe851b --- /dev/null +++ b/test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua @@ -0,0 +1,79 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0204-same-app-from-multiple-devices.md +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3136 +-- +-- Description: Check that SDL does not trigger 2nd PTU for App2 from Mobile №2 after +-- the first PTU for App1 from Mobile №1 is finished in case App1 and App2 are registered +-- within 'ApplicationListUpdateTimeout' +-- +-- Preconditions: +-- 1) SDL and HMI are started +-- 2) Mobile №1 and №2 are connected to SDL and are consented +-- 3) App1 is registered from Mobile №1 and triggers PTU +-- +-- Steps: +-- 1) App2 is registered from Mobile №2 within 'ApplicationListUpdateTimeout' +-- during PTU for App1 from Mobile №1 is in progress +-- Check: SDL does not send SDL.OnStatusUpdate and BC.PolicyUpdate to HMI during the app registration +-- 2) First PTU is performed successful +-- Check: SDL does not trigger new PTU after the first one is finished +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/TheSameApp/commonTheSameApp') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Data ]] +local devices = { + [1] = { host = "1.0.0.1", port = config.mobilePort }, + [2] = { host = "192.168.100.199", port = config.mobilePort } +} + +local appParams = { + [1] = { + appName = "Test Appl", + isMediaApplication = true, + appHMIType = { "DEFAULT" }, + appID = "0009", + fullAppID = "0000009" + }, + [2] = { + appName = "Test Appl", + isMediaApplication = true, + appHMIType = { "DEFAULT" }, + appID = "0010", + fullAppID = "0000010" + } +} + +local function registerApp1() + common.hmi.getConnection():ExpectRequest("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) + common.registerAppEx(1, appParams[1], 1, false) +end + +local function registerApp2() + common.registerAppEx(2, appParams[2], 2, true) + common.hmi.getConnection():ExpectRequest("SDL.OnStatusUpdate", { status = "UPDATING" }) +end + +local function secondPTUIsNotTriggered() + common.isPTUNotStarted() + common.run.wait(5000) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL and HMI", common.start) +runner.Step("Connect two mobile devices to SDL", common.connectMobDevices, {devices}) + +runner.Title("Test") +runner.Step("Register App1 from device 1 - No PTU before ApplicationListUpdateTimeout is expired", registerApp1) +runner.Step("Register App2 from device 2 - PTU started after ApplicationListUpdateTimeout is expired", registerApp2) +runner.Step("PTU", common.ptu.policyTableUpdate, { nil, secondPTUIsNotTriggered }) + +runner.Title("Postconditions") +runner.Step("Remove mobile devices", common.clearMobDevices, {devices}) +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/TheSameApp/commonTheSameApp.lua b/test_scripts/TheSameApp/commonTheSameApp.lua index 9e603e0709..506ed0cb25 100644 --- a/test_scripts/TheSameApp/commonTheSameApp.lua +++ b/test_scripts/TheSameApp/commonTheSameApp.lua @@ -8,6 +8,7 @@ local events = require("events") local constants = require('protocol_handler/ford_protocol_constants') local hmi_values = require("user_modules/hmi_values") local rc = require('user_modules/sequences/remote_control') +local SDL = require('SDL') local runner = require('user_modules/script_runner') --[[ Conditions to skip tests ]] @@ -34,6 +35,7 @@ common.cloneTable = utils.cloneTable common.isTableContains = utils.isTableContains common.setModuleAllocation = rc.state.setModuleAllocation common.resetModulesAllocationByApp = rc.state.resetModulesAllocationByApp +common.extendedPolicyOption = SDL.buildOptions.extendedPolicy --[[ Common Functions ]] function common.start(pHMIParams) @@ -915,4 +917,35 @@ function common.createNewGroup(pAppId, pTestGroupName, pTestGroup, pPolicyTable) pt.policy_table.app_policies[pAppId].groups = { pTestGroupName, "Notifications-RC" } end +function common.registerAppWithPTU(pAppId, pAppParams, pDeviceId) + common.registerAppEx(pAppId, pAppParams, pDeviceId, true) + common.hmi.getConnection():ExpectRequest("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(2) + common.run.wait(2500) +end + +function common.isPTUNotStarted() + if common.extendedPolicyOption == "HTTP" then + for appNum = 1, common.mobile.getAppsCount() do + common.mobile.getSession(appNum):ExpectNotification("OnSystemRequest") + :Times(AtMost(1)) + :ValidIf(function(_, data) + if data.payload.requestType == "HTTP" then + return false, "RequestType 'HTTP' is unexpected" + end + return true + end) + end + else + common.hmi.getConnection():ExpectRequest("BasicCommunication.PolicyUpdate"):Times(0) + end +end + +function common.registerAppWithoutPTU(pAppId, pAppParams, pDeviceId) + common.registerAppEx(pAppId, pAppParams, pDeviceId, false) + common.isPTUNotStarted() + common.hmi.getConnection():ExpectRequest("SDL.OnStatusUpdate"):Times(0) + common.run.wait(2500) +end + return common diff --git a/test_sets/Defects/6_1/3136_EXT.txt b/test_sets/Defects/6_1/3136_EXT.txt new file mode 100644 index 0000000000..0a7fb1920f --- /dev/null +++ b/test_sets/Defects/6_1/3136_EXT.txt @@ -0,0 +1,7 @@ +./test_scripts/Defects/6_1/3136_02_External_Proprietary.lua +./test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua +./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua +./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua +./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua diff --git a/test_sets/Defects/6_1/3136_HTTP.txt b/test_sets/Defects/6_1/3136_HTTP.txt new file mode 100644 index 0000000000..05e377a2be --- /dev/null +++ b/test_sets/Defects/6_1/3136_HTTP.txt @@ -0,0 +1,7 @@ +./test_scripts/Defects/6_1/3136_03_Http.lua +./test_scripts/Defects/6_1/3136_06_Http_3apps.lua +./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua +./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua +./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua diff --git a/test_sets/Defects/6_1/3136_PROP.txt b/test_sets/Defects/6_1/3136_PROP.txt new file mode 100644 index 0000000000..440c1282a9 --- /dev/null +++ b/test_sets/Defects/6_1/3136_PROP.txt @@ -0,0 +1,7 @@ +./test_scripts/Defects/6_1/3136_01_Proprietary.lua +./test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua +./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua +./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua +./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua diff --git a/test_sets/hmi_ptu.txt b/test_sets/hmi_ptu.txt index 12df968184..c262886216 100644 --- a/test_sets/hmi_ptu.txt +++ b/test_sets/hmi_ptu.txt @@ -13,6 +13,5 @@ ./test_scripts/Policies/HMI_PTU/013_UPDATING_status_absence_after_timeout_expired_for_PolicyUpdate_response.lua ./test_scripts/Policies/HMI_PTU/014_Successful_PTU_after_failed_retry_consequtive_trigger_ext.lua ./test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua -; Tests 016 and 017 should be omitted until core issue #3136 is fixed -;./test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua https://github.com/smartdevicelink/sdl_core/issues/3136 -;./test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua https://github.com/smartdevicelink/sdl_core/issues/3136 +./test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua +./test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua diff --git a/test_sets/same_app_from_multiple_devices.txt b/test_sets/same_app_from_multiple_devices.txt index d03fcf52fa..d2168e90d9 100644 --- a/test_sets/same_app_from_multiple_devices.txt +++ b/test_sets/same_app_from_multiple_devices.txt @@ -54,6 +54,11 @@ ./test_scripts/TheSameApp/RC/003_RC_modules_allocation_AUTO_DENY_same_app_2_devices.lua ./test_scripts/TheSameApp/RC/004_RC_modules_allocation_ASK_DRIVER_same_app_2_devices.lua ./test_scripts/TheSameApp/RC/005_RC_modules_release_same_app_2_devices.lua +./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua +./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua +./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua +./test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua ./test_scripts/TheSameApp/Policies/NicknameValidation/001_Register_two_apps_with_same_appName_appID_DIFF_devices_appName1_2_in_nickname.lua ./test_scripts/TheSameApp/Policies/NicknameValidation/002_Register_two_apps_with_diff_appName_same_appID_DIFF_devices_appName1_in_nickname.lua ./test_scripts/TheSameApp/Policies/NicknameValidation/003_Register_two_apps_with_same_appName_diff_appID_DIFF_devices_appName1_in_nickname.lua diff --git a/user_modules/shared_testcases/testCasesForExternalUCS.lua b/user_modules/shared_testcases/testCasesForExternalUCS.lua index 754b3ca739..9acfbd7945 100644 --- a/user_modules/shared_testcases/testCasesForExternalUCS.lua +++ b/user_modules/shared_testcases/testCasesForExternalUCS.lua @@ -72,6 +72,7 @@ local m = { } local filePath = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") .. "/" .. commonFunctions:read_parameter_from_smart_device_link_ini("PathToSnapshot") os.execute("rm -rf " .. filePath) + m.pts = nil end --[[@updatePTU: Update Policy Table Snapshot (PTS) in the way it can be used as Policy Table Update (PTU) From ba6952752254797a2f31a7e8136310d616202d3d Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Fri, 28 Feb 2020 15:40:38 -0500 Subject: [PATCH 30/64] Correct script to reproduce 3237 issue (#2343) From 09a25a6718a8e4c08e8450b1248b4eea35c12ed8 Mon Sep 17 00:00:00 2001 From: jacobkeeler Date: Tue, 3 Mar 2020 15:36:31 -0500 Subject: [PATCH 31/64] Fix bson library includes in project --- .../Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua b/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua index 867080e39f..e9d691c6eb 100644 --- a/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua +++ b/test_scripts/Security/SSLHandshakeFlow/018_V5_happy_path_SUCCESS.lua @@ -8,7 +8,7 @@ local constants = require("protocol_handler/ford_protocol_constants") local utils = require("user_modules/utils") local bson -if utils.isFileExist("lib/libbson4lua.so") then +if utils.isFileExist("lib/bson4lua.so") then bson = require('bson4lua') else runner.skipTest("'bson4lua' library is not available in ATF") From 59b0ab1e5ea9a2be342509442a47fdd066328f9d Mon Sep 17 00:00:00 2001 From: Dmitriy Boltovskiy Date: Fri, 6 Mar 2020 19:40:51 -0500 Subject: [PATCH 32/64] Fix Remote Connection issue --- test_scripts/Smoke/commonSmoke.lua | 2 +- user_modules/connecttest_TTS_Isready.lua | 4 +--- user_modules/connecttest_VR_Isready.lua | 4 +--- user_modules/connecttest_initHMI.lua | 4 +--- user_modules/connecttest_resumption.lua | 4 +--- user_modules/dummy_connecttest.lua | 4 +--- user_modules/sequences/actions.lua | 4 ---- 7 files changed, 6 insertions(+), 20 deletions(-) diff --git a/test_scripts/Smoke/commonSmoke.lua b/test_scripts/Smoke/commonSmoke.lua index 58c15aa20f..32fe6c26bc 100644 --- a/test_scripts/Smoke/commonSmoke.lua +++ b/test_scripts/Smoke/commonSmoke.lua @@ -319,7 +319,7 @@ function common.createConnection(pConId, pDevice) print("WARNING: Default mobile adapter type is not TCP. Create TCP mobile connection.") end local mobileAdapterParameters = { - host = SDL.GetHostURL(), + host = config.remoteConnection.enabled and config.remoteConnection.url or config.mobileHost, port = config.mobilePort, source = pSource } diff --git a/user_modules/connecttest_TTS_Isready.lua b/user_modules/connecttest_TTS_Isready.lua index 135f690af0..a448003e39 100644 --- a/user_modules/connecttest_TTS_Isready.lua +++ b/user_modules/connecttest_TTS_Isready.lua @@ -26,9 +26,7 @@ local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) --- Default mobile connection -function module.getDefaultMobileAdapter(tcpHost, tcpPort) - return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) -end +module.getDefaultMobileAdapter = mobile_adapter_controller.getDefaultAdapter local mobileAdapter = module.getDefaultMobileAdapter() local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) diff --git a/user_modules/connecttest_VR_Isready.lua b/user_modules/connecttest_VR_Isready.lua index adb164e95d..c45f973aad 100644 --- a/user_modules/connecttest_VR_Isready.lua +++ b/user_modules/connecttest_VR_Isready.lua @@ -26,9 +26,7 @@ local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) --- Default mobile connection -function module.getDefaultMobileAdapter(tcpHost, tcpPort) - return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) -end +module.getDefaultMobileAdapter = mobile_adapter_controller.getDefaultAdapter local mobileAdapter = module.getDefaultMobileAdapter() local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) diff --git a/user_modules/connecttest_initHMI.lua b/user_modules/connecttest_initHMI.lua index 6936436ae7..248fa67964 100644 --- a/user_modules/connecttest_initHMI.lua +++ b/user_modules/connecttest_initHMI.lua @@ -26,9 +26,7 @@ local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) --- Default mobile connection -function module.getDefaultMobileAdapter(tcpHost, tcpPort) - return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) -end +module.getDefaultMobileAdapter = mobile_adapter_controller.getDefaultAdapter local mobileAdapter = module.getDefaultMobileAdapter() local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) diff --git a/user_modules/connecttest_resumption.lua b/user_modules/connecttest_resumption.lua index 1b26b08637..6c335c9f29 100644 --- a/user_modules/connecttest_resumption.lua +++ b/user_modules/connecttest_resumption.lua @@ -26,9 +26,7 @@ local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) --- Default mobile connection -function module.getDefaultMobileAdapter(tcpHost, tcpPort) - return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) -end +module.getDefaultMobileAdapter = mobile_adapter_controller.getDefaultAdapter local mobileAdapter = module.getDefaultMobileAdapter() local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) diff --git a/user_modules/dummy_connecttest.lua b/user_modules/dummy_connecttest.lua index 8844bdd719..0f023c55a9 100644 --- a/user_modules/dummy_connecttest.lua +++ b/user_modules/dummy_connecttest.lua @@ -28,9 +28,7 @@ local FAILED = expectations.FAILED module.hmiConnection = hmi_connection.Connection(hmi_adapter_controller.getHmiAdapter({connection = ATF.remoteConnection})) --- Default mobile connection -function module.getDefaultMobileAdapter(tcpHost, tcpPort) - return mobile_adapter_controller.getDefaultAdapter(tcpHost, tcpPort) -end +module.getDefaultMobileAdapter = mobile_adapter_controller.getDefaultAdapter local mobileAdapter = module.getDefaultMobileAdapter() local fileConnection = file_connection.FileConnection("mobile.out", mobileAdapter) diff --git a/user_modules/sequences/actions.lua b/user_modules/sequences/actions.lua index 4a4d563b8d..6125735356 100644 --- a/user_modules/sequences/actions.lua +++ b/user_modules/sequences/actions.lua @@ -81,12 +81,8 @@ local function prepareMobileConnectionsTable() if test.mobileConnection then if test.mobileConnection.connection then local defaultMobileConnection = test.mobileConnection - local transportConnection = test.mobileConnection.connection.connection defaultMobileConnection.RaiseEvent = MobRaiseEvent defaultMobileConnection.ExpectEvent = MobExpectEvent - defaultMobileConnection.host = transportConnection.host or transportConnection.url - defaultMobileConnection.port = transportConnection.port - defaultMobileConnection.type = config.defaultMobileAdapterType test.mobileConnections[1] = defaultMobileConnection end end From ee9d6524b19178bea511199ca2205d062b2343d0 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 10 Mar 2020 09:26:04 -0400 Subject: [PATCH 33/64] Add policy mode restrictions to policy scripts (#2363) * Update script runner * Update EUCS tests * Update User consent of Policies tests * Update appID Management tests * Update Validation of PolicyTables tests * Update Related HMI API tests * Update Policy Table Update tests * Update App Permissions tests * Update Policies Security tests * Update Build options: PROPRIETARY tests * Update Build options: EXTERNAL_PROPRIETARY tests * Update Build options: HTTP tests * Update policy test sets * Update test_sets/policies_happy_paths_HTTP.txt Co-Authored-By: Collin Co-authored-by: Collin --- ...sponse_Notification_On_Registering_App.lua | 2 + ...Assigned_Policy_After_App_Registration.lua | 2 + .../003_ATF_HP_User_Consent_Yes.lua | 2 + .../004_ATF_HP_User_Consent_NO.lua | 2 + ...Id_policies_And_RequestType_Validation.lua | 2 + ...6_ATF_Steal_focus_validation_false_PTU.lua | 2 + ...007_ATF_StealFocus_validation_true_PTU.lua | 2 + ...lt_policies_And_RequestType_Validation.lua | 2 + .../009_ATF_Steal_Focus_Validation_False.lua | 1 + ..._ATF_StealFocus_validation_true_app_id.lua | 1 + .../011_ATF_KeepContext_Validation_false.lua | 1 + .../012_ATF_KeepContext_Validation_true.lua | 1 + ...tted_In_The_Policy_Table_Default_Group.lua | 2 + ...t_Of_Parameters_Disallowed_By_Policies.lua | 2 + ...ameters_Are_Not_Allowed_In_The_Request.lua | 2 + ...t_Of_Parameters_Disallowed_By_Policies.lua | 2 + ...ot-allowed_Parameters_By_Policies_Only.lua | 2 + ...And_Not-allowed_By_Policies_Parameters.lua | 2 + ...wed_Rpc_Is_Omitted_In_The_Policy_Table.lua | 2 + ...vel_Is_Not_Listed_In_Assigned_Policies.lua | 2 + ...fication_Is_Allowed_To_Be_Processed_In.lua | 2 + ...ation_To_HMI_In_First_App_Registration.lua | 2 + ...Default_Priority_Value_Assigned_To_App.lua | 2 + ...f_Failed_Nickname_Validation_After_PTU.lua | 2 + ...n_With_AppName_Not_Listed_In_NickNames.lua | 2 + ...ame_Does_Not_Match_With_Nickname_In_PT.lua | 2 + .../027_ATF_NickName_Case_Insensitivity.lua | 2 + ...ation_Before_Duplicate_Name_Validation.lua | 2 + .../029_ATF_OnPermissionsChange_After_PTU.lua | 2 + ...030_ATF_Successful_Nickname_Validation.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...off_struct_with_invalid_type_of_params.lua | 2 + ..._on_struct_with_invalid_type_of_params.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...off_struct_with_invalid_type_of_params.lua | 2 + ..._on_struct_with_invalid_type_of_params.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ..._external_consent_status_groups_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...y_external_consent_entities_off_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...by_external_consent_entities_on_struct.lua | 2 + ...off_struct_with_invalid_type_of_params.lua | 2 + ..._on_struct_with_invalid_type_of_params.lua | 2 + ...nt_entities_on_data_consent_disallowed.lua | 1 + ...nt_entities_on_user_consent_disallowed.lua | 1 + ...nsent_entities_on_user_consent_allowed.lua | 1 + ...t_entities_off_data_consent_disallowed.lua | 1 + ...sent_entities_off_user_consent_allowed.lua | 1 + ...t_entities_off_user_consent_disallowed.lua | 1 + ...tities_omitted_data_consent_disallowed.lua | 1 + ..._entities_omitted_user_consent_allowed.lua | 1 + ...tities_omitted_user_consent_disallowed.lua | 1 + ..._entities_omitted_user_consent_omitted.lua | 1 + ...al_Consent_OFF_through_ignition_cycles.lua | 1 + ...h_ignition_cycles_user_disallowed_RPCs.lua | 1 + ...d_by_external_consent_entities_omitted.lua | 1 + ...nt_OFF_disallowed_change_to_ON_allowed.lua | 1 + ...onsent_disallowed_user_consent_allowed.lua | 1 + ...ent_disallowed_user_consent_disallowed.lua | 1 + ...onsent_disallowed_user_consent_omitted.lua | 1 + ...l_consent_allowed_user_consent_allowed.lua | 1 + ...onsent_allowed_user_consent_disallowed.lua | 1 + ...l_consent_allowed_user_consent_omitted.lua | 1 + ...nt_OFF_allowed_change_to_ON_disallowed.lua | 1 + ...lowed_by_external_consent_entities_off.lua | 1 + ...llowed_by_external_consent_entities_on.lua | 1 + ...FF_many_entities_pairs_in_one_group_01.lua | 1 + ...FF_many_entities_pairs_in_one_group_02.lua | 1 + ...FF_many_entities_pairs_in_one_group_03.lua | 1 + ...FF_many_entities_pairs_in_one_group_04.lua | 1 + ...lowed_externalConsentStatus_disallowed.lua | 1 + ...sallowed_externalConsentStatus_allowed.lua | 1 + ...ernal_Consent_OFF_empty_consent_groups.lua | 1 + ..._ATF_Policies_External_Consent_missing.lua | 1 + ...sent_OFF_through_ignition_cycles_combo.lua | 1 + ...t_entities_off_data_consent_disallowed.lua | 1 + ...sent_entities_off_user_consent_allowed.lua | 1 + ...t_entities_off_user_consent_disallowed.lua | 1 + ...nt_entities_on_data_consent_disallowed.lua | 1 + ...nsent_entities_on_user_consent_allowed.lua | 1 + ...nt_entities_on_user_consent_disallowed.lua | 1 + ...tities_omitted_data_consent_disallowed.lua | 1 + ..._entities_omitted_user_consent_allowed.lua | 1 + ...tities_omitted_user_consent_disallowed.lua | 1 + ..._entities_omitted_user_consent_omitted.lua | 1 + ...N_through_ignition_cycles_allowed_RPCs.lua | 1 + ...h_ignition_cycles_user_disallowed_RPCs.lua | 1 + ...d_by_external_consent_entities_omitted.lua | 1 + ...nt_ON_disallowed_change_to_OFF_allowed.lua | 1 + ...onsent_disallowed_user_consent_allowed.lua | 1 + ...ent_disallowed_user_consent_disallowed.lua | 1 + ...onsent_disallowed_user_consent_omitted.lua | 1 + ...l_consent_allowed_user_consent_allowed.lua | 1 + ...onsent_allowed_user_consent_disallowed.lua | 1 + ...l_consent_allowed_user_consent_omitted.lua | 1 + ...nt_ON_allowed_change_to_OFF_disallowed.lua | 1 + ...lowed_by_external_consent_entities_off.lua | 1 + ...llowed_by_external_consent_entities_on.lua | 1 + ...ON_many_entities_pairs_in_one_group_01.lua | 1 + ...ON_many_entities_pairs_in_one_group_02.lua | 1 + ...ON_many_entities_pairs_in_one_group_03.lua | 1 + ...ON_many_entities_pairs_in_one_group_04.lua | 1 + ...lowed_externalConsentStatus_disallowed.lua | 1 + ...sallowed_externalConsentStatus_allowed.lua | 1 + ...ternal_Consent_ON_empty_consent_groups.lua | 1 + ...t_ON_externalConsentStatus_is_not_sent.lua | 1 + ...ent_ON_OFF_without_user_consent_prompt.lua | 1 + ...licies_External_Consent_ON_OFF_combine.lua | 1 + ..._appID_all_ecs_in_bound_EntitySatus_ON.lua | 2 + ...pID_all_ecs_upper_bound_EntitySatus_ON.lua | 2 + ...th_appID_fake_param_cut_EntitySatus_ON.lua | 2 + ...appID_all_ecs_in_bound_EntitySatus_OFF.lua | 2 + ...ID_all_ecs_lower_bound_EntitySatus_OFF.lua | 2 + ...ID_all_ecs_upper_bound_EntitySatus_OFF.lua | 2 + ...h_appID_fake_param_cut_EntitySatus_OFF.lua | 2 + ...fPermissions_with_appID_not_stored_ecs.lua | 2 + ...ermissions_no_appID_stored_ecs_present.lua | 2 + ...tofPermissions_no_appID_not_stored_ecs.lua | 2 + ..._no_appID_no_app_registered_stored_ecs.lua | 2 + ...appID_no_app_registered_not_stored_ecs.lua | 2 + ...s_no_appID_app_unregistered_stored_ecs.lua | 2 + ..._appID_app_unregistered_not_stored_ecs.lua | 2 + ...sing_entity_type_OnAppPermissionChange.lua | 2 + ...missing_entityID_OnAppPermissionChange.lua | 2 + ...o_missing_status_OnAppPermissionChange.lua | 2 + ...param_entityType_OnAppPermissionChange.lua | 2 + ...d_param_entityID_OnAppPermissionChange.lua | 2 + ...lid_param_status_OnAppPermissionChange.lua | 2 + ...PermissionConsent_not_sent_when_no_PTU.lua | 2 + ...ATF_P_Policies_Performance_Requirement.lua | 2 + ...TF_PolicyTable_Certificate_EMPTY_value.lua | 2 + ...NotListed_PT_DeviceConsented_SecondApp.lua | 2 + ...tSuccessful_AppID_ListedPT_NewIgnCycle.lua | 2 + .../123_ATF_PTU_DeviceConsent_from_User.lua | 2 + .../124_ATF_User_requests_PTU.lua | 2 + .../125_ATF_User_PressButton_HMI_PTU.lua | 2 + ...usUpdate_UPDATE_NEEDED_new_PTU_request.lua | 2 + .../127_ATF_PTS_Creation_rule.lua | 2 + .../128_ATF_PTU_GetURLs.lua | 2 + .../131_ATF_PTS_storage_on_file_system.lua | 2 + .../132_ATF_Timeout_to_wait_response_PTU.lua | 2 + .../133_ATF_PTU_retry_timeout_definition.lua | 2 + ...34_ATF_WiFi_one_application_registered.lua | 2 + .../135_ATF_PM_sends_PTS_to_HMI.lua | 2 + .../136_ATF_Define_urls_PTS_will_sent_hmi.lua | 2 + ..._ATF_Sending_PTS_to_mobile_application.lua | 2 + ...S_to_app_OnSystemRequest_appID_default.lua | 2 + .../140_ATF_timeout_countdown_start.lua | 2 + ...41_ATF_Got_PTU_from_mobile_application.lua | 2 + ...esManager_changes_status_to_UP_TO_DATE.lua | 2 + .../143_ATF_PTU_validation_rules.lua | 2 + .../144_ATF_PTU_validation_failure.lua | 2 + .../145_ATF_PTU_Merge_Into_LPT.lua | 2 + ...Lvl_on_PTU_affected_in_FULL_or_LIMITED.lua | 2 + ...able_Update_Trigger_After_N_Kilometers.lua | 2 + ..._on_PTU_affected_in_BACKGROUND_or_NONE.lua | 2 + ...licy_Table_Update_Trigger_After_N_Days.lua | 2 + ...tifying_HMI_via_OnAppPermissionChanged.lua | 2 + ...pply_PTU_and_OnPermissionChange_notify.lua | 2 + ...TU_Merge_Of_Consumer_Friendly_Messages.lua | 2 + ...PTU_Omit_Of_Consumer_Friendly_Messages.lua | 2 + ...ot_From_Sync_After_Getting_The_Updates.lua | 2 + ...anager_Changes_Status_To_UPDATE_NEEDED.lua | 2 + .../156_ATF_PTU_OnStatusUpdate_Trigger.lua | 2 + ...s_Manager_Changes_Status_To_UP_TO_DATE.lua | 2 + ...plication_Taking_Part_In_Policy_Update.lua | 2 + ...F_Default_Policy_For_The_App_After_PTU.lua | 2 + ...igger_PTU_While_Another_Is_In_Progress.lua | 2 + .../162_ATF_Policies_UTF-8_Encoding.lua | 2 + ...egister_NewApp_not_exist_inLocalPT_PTU.lua | 2 + ...r_NewApp_not_exist_inLocalPT_FinishPTU.lua | 2 + ...t_exist_inLocalPT_start_PTU_for_NewApp.lua | 2 + ...nData_one_app_registered_urls_3default.lua | 2 + ..._HMILvl_on_PTU_affected_app_in_LIMITED.lua | 2 + ...vi_App_Registration_And_No_Certificate.lua | 2 + ...ATF_Policies_Memory_Allocation_For_PTU.lua | 2 + ...TF_PTU_request_after_N_ignition_cycles.lua | 2 + ...unctionality_allowed_false_with_device.lua | 2 + ...tionality_allowed_false_without_device.lua | 2 + ...ctionality_allowed_true_without_device.lua | 2 + ...unctionality_allowed_false_with_device.lua | 2 + ...Functionality_allowed_true_with_device.lua | 2 + ...F_OnAppPermissionConsent_without_appID.lua | 2 + ..._ATF_OnAppPermissionConsent_with_appID.lua | 2 + ..._language_section_is_absent_in_LocalPT.lua | 2 + ...yMessage_Language_not_found_in_localPT.lua | 2 + ...F_GetUserFriendlyMessage_with_Language.lua | 2 + ...des_data_consent_prompt_on_HMI_request.lua | 2 + ...ATF_GetListOfPermissions_without_appID.lua | 2 + ...85_ATF_GetListOfPermissions_with_appID.lua | 2 + ...6_ATF_OnPolicyUpdate_initiation_of_PTU.lua | 2 + ...ATF_Get_Status_Update_Request_from_HMI.lua | 2 + ...into_local_pt_launch_on_each_sdl_start.lua | 1 + ...ation_rules_request_type_array_omitted.lua | 2 + ...quest_type_array_has_one_invalid_value.lua | 2 + ...pe_array_has_only_one_value_is_invalid.lua | 2 + ...counts_update_count_sync_out_of_memory.lua | 2 + ...or_counts_update_count_of_sync_reboots.lua | 2 + ...counts_update_count_of_iap_buffer_full.lua | 2 + ...rror_counts_update_minutes_in_hmi_none.lua | 2 + ...r_counts_update_minutes_in_hmi_limited.lua | 2 + ...rror_counts_update_minutes_in_hmi_full.lua | 1 + ...ounts_update_minutes_in_hmi_background.lua | 2 + ...tion_rules_for_omited_parameters_exist.lua | 2 + ...ion_rules_for_omited_parameters_absent.lua | 2 + ...lidation_rules_for_optional_parameters.lua | 2 + ...lidation_rules_for_required_parameters.lua | 2 + ...TF_preloaded_pt_invalid_required_param.lua | 2 + ...TF_preloaded_pt_invalid_optional_param.lua | 2 + ...loaded_pt_exists_with_read_permissions.lua | 2 + ...aded_pt_exists_but_no_read_permissions.lua | 2 + .../242_ATF_preloaded_pt_does_not_exists.lua | 2 + .../243_ATF_preloaded_pt_exists.lua | 2 + ...oaded_pt_parameter_is_true_in_local_pt.lua | 2 + ...oaded_pt_parameter_trigger_in_local_pt.lua | 2 + ...requesttype_parameters_all_are_invalid.lua | 2 + ...al_pt_consumer_frendly_messages_exists.lua | 2 + ...onsumer_frendly_messages_do_not_exists.lua | 2 + ...nsumer_frendly_messages_exists_in_both.lua | 2 + ...reloaded_pt_into_local_pt_app_policies.lua | 2 + ...o_local_pt_functional_groupings_exists.lua | 2 + ...pt_functional_groupings_does_not_exist.lua | 2 + ...t_into_local_pt_usage_and_error_counts.lua | 2 + ...preloaded_pt_into_local_pt_device_data.lua | 2 + ...erge_preloaded_pt_into_local_pt_launch.lua | 2 + ..._into_local_pt_launch_does_not_changed.lua | 2 + ...eloaded_pt_into_local_pt_module_config.lua | 2 + .../258_ATF_pt_snapshot_path_is_correct.lua | 2 + .../259_ATF_pt_snapshot_path_is_incorrect.lua | 2 + ...ocal_pt_from_preloaded_pt_master_reset.lua | 2 + ...lidation_rules_for_optional_parameters.lua | 2 + ...alidation_rules_for_omitted_parameters.lua | 2 + ...lidation_rules_for_required_parameters.lua | 2 + .../264_ATF_pt_snapshot_creation_rule.lua | 2 + ...ATF_pt_snapshot_storage_on_file_system.lua | 2 + ...idation_rules_optional_parameters_type.lua | 2 + ...idation_rules_required_parameters_type.lua | 2 + ...ATF_pt_update_validation_rules_general.lua | 2 + ...dation_rules_consumer_friendly_message.lua | 2 + ..._Validate_default_hmi_default_policies.lua | 2 + ...e_preconsented_groups_default_policies.lua | 2 + ...2_ATF_Validate_groups_default_policies.lua | 2 + ...TF_Validate_default_hmi_appId_policies.lua | 2 + ...F_Validate_appID_and_steal_focus_false.lua | 2 + ...TF_Validate_appID_and_steal_focus_true.lua | 2 + ...F_Validate_appID_and_keep_context_true.lua | 2 + ..._Validate_appID_and_keep_context_false.lua | 2 + ...278_ATF_Validate_groups_appID_policies.lua | 2 + ...TF_Store_vin_from_GetVehicleData_in_PT.lua | 2 + ...ition_cycles_since_last_exchange_in_PT.lua | 2 + ...ition_cycles_since_last_exchange_in_PT.lua | 2 + ...PT_Exchanged_X_Days_After_Epoch_In_PTS.lua | 2 + ...Store_pt_exchanged_at_odometer_x_in_PT.lua | 2 + .../284_ATF_Store_wers_country_code_in_PT.lua | 2 + .../285_ATF_Store_language_in_PT.lua | 2 + ...ATF_RAI_ccpu_version_via_GetSystemInfo.lua | 2 + ...ATF_Validate_appHMIType_appID_policies.lua | 2 + ...ray_preconsented_groups_preDataConsent.lua | 2 + ...lue_preconsented_groups_preDataConsent.lua | 2 + ...nal_preconsented_groups_preDataConsent.lua | 2 + ...lid_preconsented_groups_preDataConsent.lua | 2 + ...2_ATF_Valid_default_hmi_preDataConsent.lua | 2 + ...lidate_default_priority_preDataConsent.lua | 2 + ...ate_nondefault_priority_preDataConsent.lua | 2 + ...te_preDataConsent_and_stealFocus_false.lua | 2 + ...ate_preDataConsent_and_stealFocus_true.lua | 2 + ...e_preDataConsent_and_keepContext_false.lua | 2 + ...te_preDataConsent_and_keepContext_true.lua | 2 + ...299_ATF_Memory_Kb_Constraints_Ignoring.lua | 2 + ...Applying_Heart_Beat_Timeout_Ms_From_PT.lua | 2 + ...s_update_app_registration_language_vui.lua | 2 + ...plying_Heart_Beat_Timeout_Ms_After_PTU.lua | 2 + ...TF_HP_Usage_And_Error_Counts_For_AppID.lua | 2 + ...HP_Validation_Count_Of_User_Selections.lua | 2 + ...nt_of_run_attempts_while_revoked_in_PT.lua | 2 + ..._preDataConsent_RequestType_disallowed.lua | 2 + ...TF_Check_app_registration_language_gui.lua | 2 + ...ATF_Check_count_of_rejected_rpcs_calls.lua | 2 + ...havior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua | 2 + ...bad_behavior_too_many_pending_requests.lua | 2 + ...als_for_bad_behavior_too_many_requests.lua | 2 + ...F_Check_count_of_rpcs_sent_in_hmi_none.lua | 2 + ...314_ATF_Check_count_of_user_selections.lua | 2 + ...egister_App_Interface_App_Unauthorized.lua | 2 + ...terface_Successful_Nickname_Validation.lua | 2 + ...Interface_Order_Of_Nickname_Validation.lua | 2 + ..._ATF_Register_App_Interface_Disallowed.lua | 2 + ...nterface_Case-insensitivity_Of_AppName.lua | 2 + ...036_ATF_Change_Registration_Disallowed.lua | 2 + ...App_Interface_Assign_Existing_Policies.lua | 2 + ...onsent_Assign_pre_DataConsent_Policies.lua | 2 + ...h_Data_Consent_Assign_Default_Policies.lua | 2 + ..._Interface_Case-insensitivity_Of_AppId.lua | 2 + ...OnAppPermissionChanged_appRevoked_true.lua | 2 + ...RAI_with_NULL_policies_RPCs_DISALLOWED.lua | 2 + ..._Status_Appid_Gets_Null_In_Case_Of_PTU.lua | 2 + ...MI_Status_Value_Of_AppId_In_PT_Is_Null.lua | 2 + ...tion_Which_Appid_Does_Not_Exist_In_LPT.lua | 2 + ..._Application_Which_Appid_Exists_In_LPT.lua | 2 + ..._DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua | 2 + ...uild_Flag_DEXTENDED_POLICY_PROPRIETARY.lua | 2 + ...rigger_PTU_failed_previous_IGN_ON_HTTP.lua | 2 + ...Update_Trigger_After_N_Kilometers_HTTP.lua | 2 + .../052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua | 2 + ...Table_Update_Trigger_After_N_Days_HTTP.lua | 2 + ...PTU_UPDATE_NEEDED_new_PTU_Request_HTTP.lua | 2 + ...TF_Policy_Table_Snapshot_Creation_HTTP.lua | 2 + ...Several_Apps_Different_HMI_Levels_HTTP.lua | 2 + ...57_ATF_PTS_Define_URL_to_send_PTS_HTTP.lua | 2 + ...Ls_via_GetPolicyConfigurationData_HTTP.lua | 2 + ..._ATF_Timeout_to_wait_response_PTU_HTTP.lua | 2 + ...Sending_PTS_to_Mobile_Application_HTTP.lua | 2 + ...eout_Countdown_Start_PTU_Response_HTTP.lua | 2 + ...iciesManager_Sets_Status_UPDATING_HTTP.lua | 2 + ...eived_PTU_From_Mobile_Application_HTTP.lua | 2 + .../066_ATF_PTU_Validation_Failure_HTTP.lua | 2 + ...Manager_Sets_Status_to_UP_TO_DATE_HTTP.lua | 2 + .../068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua | 2 + ...Local_PT_ConsumerFriendlyMessages_HTTP.lua | 2 + ..._ConsumerFriendlyMessages_Omitted_HTTP.lua | 2 + ...PTU_Local_PT_Start_Retry_Sequence_HTTP.lua | 2 + ..._PTU_PM_Sets_Status_UPDATE_NEEDED_HTTP.lua | 2 + ...equence_Retry_Timeout_Computation_HTTP.lua | 2 + ..._Restarting_Policy_Table_Exchange_HTTP.lua | 2 + ...Sequence_Retry_Timeout_Expiration_HTTP.lua | 2 + ...PermissionChange_Notification_App_HTTP.lua | 2 + ...PermissionChange_Notification_HMI_HTTP.lua | 2 + ..._Level_Affected_Apps_FULL_LIMITED_HTTP.lua | 2 + ...vel_Affected_Apps_NONE_BACKGROUND_HTTP.lua | 2 + ...atsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua | 2 + ..._OnStatsusUpdate_Trigger_UPDATING_HTTP.lua | 2 + ...nStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua | 2 + .../083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua | 2 + ...ault_Policy_For_The_App_After_PTU_HTTP.lua | 2 + ...PTU_In_Progress_New_App_Registers_HTTP.lua | 2 + .../086_ATF_PTU_Merging_wtih_LPT_HTTP.lua | 2 + ...quence_AppRegistered_PTU_Progress_HTTP.lua | 2 + ...eivedPolicyUpdate_from_HMI_PROPRIETARY.lua | 2 + ...nd_GetURLs_Request_fromHMI_PROPRIETARY.lua | 2 + ..._ATF_For_PTU_use_consented_device_only.lua | 2 + ...Check_STATUS_UPDATE_NEEDED_PROPRIETARY.lua | 2 + ...ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua | 2 + .../094_ATF_PTS_creation_rule_PROPRIETARY.lua | 2 + ..._exist_inLocalPT_FinishPTU_PROPRIETARY.lua | 2 + ...I_In_Case_PTU_Is_Triggered_PROPRIETARY.lua | 2 + ...gh_The_URLs_During_Retry_Sequence_HTTP.lua | 2 + ...cessful_Even_After_Retry_Strategy_HTTP.lua | 2 + ...I_In_Case_PTU_Is_Triggered_PROPRIETARY.lua | 2 + ..._Apps_Different_HMI_Levels_PROPRIETARY.lua | 2 + ...101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua | 2 + ..._Timeout_wait_response_PTU_PROPRIETARY.lua | 2 + ...sfer_OnSystemRequest_toApp_PROPRIETARY.lua | 2 + ...EDED_after_timeout_expired_PROPRIETARY.lua | 2 + ...changes_status_to_UPDATING_PROPRIETARY.lua | 2 + ...egy_during_previous_IGN_ON_PROPRIETARY.lua | 2 + .../108_ATF_PTU_Trigger_days_PROPRIETARY.lua | 2 + ...ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua | 2 + ...ATF_PTU_Trigger_kilometers_PROPRIETARY.lua | 2 + ...F_Start_PTU_retry_sequence_PROPRIETARY.lua | 2 + ...temRequest_from_app_to_HMI_PROPRIETARY.lua | 2 + ...temRequest_from_HMI_to_app_PROPRIETARY.lua | 2 + ..._exist_inLocalPT_FinishPTU_PROPRIETARY.lua | 2 + ...calPT_start_PTU_for_NewApp_PROPRIETARY.lua | 2 + .../116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua | 2 + .../117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua | 2 + ...quest_PTU_Trigger_App_Excluded_PT_HTTP.lua | 2 + ..._ATF_HP_Device_Data_Section_Validation.lua | 2 + .../189_ATF_isAppPermissionsRevoked_true.lua | 2 + .../190_ATF_Device_treated_as_consented.lua | 2 + ...ATF_UpdateDeviceList_on_device_connect.lua | 2 + ...2_ATF_isPermissionsConsentNeeded_false.lua | 2 + ...93_ATF_isPermissionsConsentNeeded_true.lua | 2 + .../194_ATF_ActivateApp_isSDLAllowed_true.lua | 2 + ...195_ATF_ActivateApp_isSDLAllowed_false.lua | 2 + ...TF_UpdateDeviceList_isSDLAllowed_false.lua | 2 + .../197_ATF_ActivateApp_isSDLAllowed_true.lua | 2 + ...GetUserFriendlyMessage_language_missed.lua | 2 + ...9_ATF_appPermissionsConsentNeeded_true.lua | 2 + .../200_ATF_Data_consent_prompt.lua | 2 + .../201_ATF_User_consents_permissions.lua | 2 + .../202_ATF_No_OnSDLConsentNeeded.lua | 2 + .../203_ATF_Master_reset.lua | 2 + .../204_ATF_App_group_order_preconsented.lua | 2 + .../205_ATF_Consent_timestamp.lua | 2 + ...TF_Permissions_before_device_consented.lua | 2 + ...207_ATF_HMILevel_before_data_consented.lua | 2 + ...08_ATF_No_consent_for_default_policies.lua | 2 + ...F_Device_user_disallowed_after_consent.lua | 2 + ...TF_User_consent_initing_after_PTU_FULL.lua | 2 + ...User_consent_initing_after_PTU_LIMITED.lua | 2 + ...212_ATF_Data_consent_device_not_in_LPT.lua | 2 + ...13_ATF_No_user_consent_prompt_in_group.lua | 2 + .../214_ATF_User_consent_prompt_persists.lua | 2 + .../215_ATF_User_clears_all_applications.lua | 2 + .../216_ATF_User_consent_storage_in_LPT.lua | 2 + ...nsent_status_allowed_on_device_connect.lua | 2 + ...t_status_not_allowed_on_device_connect.lua | 2 + ...entifier_creation_upon_connect_no_apps.lua | 2 + ...tifier_creation_upon_connect_with_apps.lua | 2 + .../221_ATF_Factory_reset.lua | 2 + .../222_ATF_Device_HashID_In_LPT.lua | 2 + test_sets/policies_all_flows.txt | 418 ++++++++++++++++++ test_sets/policies_happy_paths_HTTP.txt | 2 +- user_modules/script_runner.lua | 5 + 421 files changed, 1189 insertions(+), 1 deletion(-) create mode 100644 test_sets/policies_all_flows.txt diff --git a/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua b/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua index 92ca77fe28..27bb68c6dc 100644 --- a/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua +++ b/test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua @@ -27,6 +27,8 @@ -- 4. SDL assigns the appropriate policies and notifies application: -- SDL->app: OnPermissionsChange (params) - as specified in "pre_DataConsent" section. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua b/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua index b423fa033e..532fbfca53 100644 --- a/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua +++ b/test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua @@ -17,6 +17,8 @@ -- 1. SDL -> app: RegisterAppInterface_response -- 2. SDL -> app: OnPermissionsChange () --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua b/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua index 0f291c1fb4..adf4c400ea 100644 --- a/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua +++ b/test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua @@ -29,6 +29,8 @@ -- PoliciesManager: update "" subsection of "user_consent_records" subsection of "" section of "device_data" section in Local PT. -- c) SDL responds SUCCESS to allowed by USER RPC and DISALLOW to disallowed by Policy RPC. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua b/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua index 5119ed0d03..b1f63e2b34 100644 --- a/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua +++ b/test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua @@ -29,6 +29,8 @@ -- SDL->HMI: GetListOfPermissions_response{} -- b) HMI->SDL: OnAppPermissionConsent {allowed = false} --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua b/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua index bd24215508..0d6bb4eff2 100644 --- a/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua +++ b/test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL allow SystemRequest with requestType = "PROPRIETARY" and disallow SystemRequest with requestType = "HTTP" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua b/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua index 9582360b3d..0b764374d9 100644 --- a/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua +++ b/test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua @@ -14,6 +14,8 @@ -- Expected result -- SDL must response: success = false, resultCode = "DISALLOWED" ------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua b/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua index c5fae9aba5..9ac985e719 100644 --- a/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua +++ b/test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua @@ -14,6 +14,8 @@ -- Expected result -- SDL must response: success = true, resultCode = "SUCCESS" -------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/008_ATF_DISALLOWED_default_policies_And_RequestType_Validation.lua b/test_scripts/Policies/App_Permissions/008_ATF_DISALLOWED_default_policies_And_RequestType_Validation.lua index 07503cfe79..7758c44138 100644 --- a/test_scripts/Policies/App_Permissions/008_ATF_DISALLOWED_default_policies_And_RequestType_Validation.lua +++ b/test_scripts/Policies/App_Permissions/008_ATF_DISALLOWED_default_policies_And_RequestType_Validation.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL allow SystemRequest with requestType = "PROPRIETARY" and disallow SystemRequest with requestType = "HTTP" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/009_ATF_Steal_Focus_Validation_False.lua b/test_scripts/Policies/App_Permissions/009_ATF_Steal_Focus_Validation_False.lua index 46eead0838..f42d1cb10a 100644 --- a/test_scripts/Policies/App_Permissions/009_ATF_Steal_Focus_Validation_False.lua +++ b/test_scripts/Policies/App_Permissions/009_ATF_Steal_Focus_Validation_False.lua @@ -13,6 +13,7 @@ -- Expected result -- SDL must response: success = false, resultCode = "DISALLOWED" ------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/010_ATF_StealFocus_validation_true_app_id.lua b/test_scripts/Policies/App_Permissions/010_ATF_StealFocus_validation_true_app_id.lua index 2dc0c3f5f3..6af36b48a9 100644 --- a/test_scripts/Policies/App_Permissions/010_ATF_StealFocus_validation_true_app_id.lua +++ b/test_scripts/Policies/App_Permissions/010_ATF_StealFocus_validation_true_app_id.lua @@ -13,6 +13,7 @@ -- Expected result -- SDL must response: success = true, resultCode = "SUCCESS -------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/011_ATF_KeepContext_Validation_false.lua b/test_scripts/Policies/App_Permissions/011_ATF_KeepContext_Validation_false.lua index 355f0f2281..d9e4b26502 100644 --- a/test_scripts/Policies/App_Permissions/011_ATF_KeepContext_Validation_false.lua +++ b/test_scripts/Policies/App_Permissions/011_ATF_KeepContext_Validation_false.lua @@ -13,6 +13,7 @@ -- Expected result -- SDL must response: success = false, resultCode = "DISALLOWED" -------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/012_ATF_KeepContext_Validation_true.lua b/test_scripts/Policies/App_Permissions/012_ATF_KeepContext_Validation_true.lua index 35e247dd20..47c6f141d4 100644 --- a/test_scripts/Policies/App_Permissions/012_ATF_KeepContext_Validation_true.lua +++ b/test_scripts/Policies/App_Permissions/012_ATF_KeepContext_Validation_true.lua @@ -13,6 +13,7 @@ -- Expected result -- SDL must response: success = true, resultCode = "SUCCESS" -------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/013_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table_Default_Group.lua b/test_scripts/Policies/App_Permissions/013_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table_Default_Group.lua index 9bd23abda7..843fab9902 100644 --- a/test_scripts/Policies/App_Permissions/013_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table_Default_Group.lua +++ b/test_scripts/Policies/App_Permissions/013_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table_Default_Group.lua @@ -18,6 +18,8 @@ -- Expected result: -- SDL -> App: RPC (DISALLOWED, success: "false") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/014_ATF_Unsubscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua b/test_scripts/Policies/App_Permissions/014_ATF_Unsubscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua index c11794ba06..a746b1c4e9 100644 --- a/test_scripts/Policies/App_Permissions/014_ATF_Unsubscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua +++ b/test_scripts/Policies/App_Permissions/014_ATF_Unsubscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua @@ -32,6 +32,8 @@ -- - for allowed: dataType: , resultCode: SUCCESS -- - for disallowed: dataType: , resultCode: DISALLOWED --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/015_ATF_Subscribe_Vehicle_Data_Disallowed_Response_When_All_Parameters_Are_Not_Allowed_In_The_Request.lua b/test_scripts/Policies/App_Permissions/015_ATF_Subscribe_Vehicle_Data_Disallowed_Response_When_All_Parameters_Are_Not_Allowed_In_The_Request.lua index 8ee18dc6c8..50d3a95152 100644 --- a/test_scripts/Policies/App_Permissions/015_ATF_Subscribe_Vehicle_Data_Disallowed_Response_When_All_Parameters_Are_Not_Allowed_In_The_Request.lua +++ b/test_scripts/Policies/App_Permissions/015_ATF_Subscribe_Vehicle_Data_Disallowed_Response_When_All_Parameters_Are_Not_Allowed_In_The_Request.lua @@ -24,6 +24,8 @@ -- General: success: false, resultCode: DISALLOWED -- Individual: dataType: , resultCode: DISALLOWED --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/016_ATF_Subscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua b/test_scripts/Policies/App_Permissions/016_ATF_Subscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua index b34ffb17a3..2199f9d055 100644 --- a/test_scripts/Policies/App_Permissions/016_ATF_Subscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua +++ b/test_scripts/Policies/App_Permissions/016_ATF_Subscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua @@ -31,6 +31,8 @@ -- - for allowed: dataType: , resultCode: SUCCESS -- - for disallowed: dataType: , resultCode: DISALLOWED --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/017_ATF_Get_Vehicle_Data_App_Sends_Not-allowed_Parameters_By_Policies_Only.lua b/test_scripts/Policies/App_Permissions/017_ATF_Get_Vehicle_Data_App_Sends_Not-allowed_Parameters_By_Policies_Only.lua index 8d61b9a70c..bcb7ee4db5 100644 --- a/test_scripts/Policies/App_Permissions/017_ATF_Get_Vehicle_Data_App_Sends_Not-allowed_Parameters_By_Policies_Only.lua +++ b/test_scripts/Policies/App_Permissions/017_ATF_Get_Vehicle_Data_App_Sends_Not-allowed_Parameters_By_Policies_Only.lua @@ -21,6 +21,8 @@ -- Expected result: -- SDL -> App: success: false, resultCode: DISALLOWED --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/018_ATF_Get_Vehicle_Data_App_Sends_Allowed_Parameters_And_Not-allowed_By_Policies_Parameters.lua b/test_scripts/Policies/App_Permissions/018_ATF_Get_Vehicle_Data_App_Sends_Allowed_Parameters_And_Not-allowed_By_Policies_Parameters.lua index 2bf5fa07fe..29b6c2284b 100644 --- a/test_scripts/Policies/App_Permissions/018_ATF_Get_Vehicle_Data_App_Sends_Allowed_Parameters_And_Not-allowed_By_Policies_Parameters.lua +++ b/test_scripts/Policies/App_Permissions/018_ATF_Get_Vehicle_Data_App_Sends_Allowed_Parameters_And_Not-allowed_By_Policies_Parameters.lua @@ -24,6 +24,8 @@ -- SDL -> HMI: Only allowed parameters -- SDL -> App: "success: true, resultCode: SUCCESS, + "info" parameter listing the params disallowed by policies --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/019_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table.lua b/test_scripts/Policies/App_Permissions/019_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table.lua index bc700024df..763894ee87 100644 --- a/test_scripts/Policies/App_Permissions/019_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table.lua +++ b/test_scripts/Policies/App_Permissions/019_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table.lua @@ -18,6 +18,8 @@ -- Expected result: -- SDL -> App: RPC (DISALLOWED, success: "false") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local testCasesForPolicyTable = require("user_modules/shared_testcases/testCasesForPolicyTable") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/App_Permissions/020_ATF_General_Result_Codes_Disallowed_In_Case_App_Current_Hmi_Level_Is_Not_Listed_In_Assigned_Policies.lua b/test_scripts/Policies/App_Permissions/020_ATF_General_Result_Codes_Disallowed_In_Case_App_Current_Hmi_Level_Is_Not_Listed_In_Assigned_Policies.lua index e80d76065a..2842733050 100644 --- a/test_scripts/Policies/App_Permissions/020_ATF_General_Result_Codes_Disallowed_In_Case_App_Current_Hmi_Level_Is_Not_Listed_In_Assigned_Policies.lua +++ b/test_scripts/Policies/App_Permissions/020_ATF_General_Result_Codes_Disallowed_In_Case_App_Current_Hmi_Level_Is_Not_Listed_In_Assigned_Policies.lua @@ -19,6 +19,8 @@ -- Expected result: -- SDL -> App: RPC (DISALLOWED, success: "false") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/App_Permissions/021_ATF_HMI_Levels_The_Notification_Is_Allowed_To_Be_Processed_In.lua b/test_scripts/Policies/App_Permissions/021_ATF_HMI_Levels_The_Notification_Is_Allowed_To_Be_Processed_In.lua index ef6b1e6eea..578c95559e 100644 --- a/test_scripts/Policies/App_Permissions/021_ATF_HMI_Levels_The_Notification_Is_Allowed_To_Be_Processed_In.lua +++ b/test_scripts/Policies/App_Permissions/021_ATF_HMI_Levels_The_Notification_Is_Allowed_To_Be_Processed_In.lua @@ -20,6 +20,8 @@ -- Expected result: -- SDL -> App: There is no notification --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua b/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua index 326b3d8a2b..4a94418ab5 100644 --- a/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua +++ b/test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua @@ -14,6 +14,8 @@ -- No prompts or notification are observed on HMI -- Note: Requirement under clarification! Assumed that OnAppPermissionChanged and OnSDLConsentNeeded should not come --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/023_ATF_Default_Priority_Value_Assigned_To_App.lua b/test_scripts/Policies/App_Permissions/023_ATF_Default_Priority_Value_Assigned_To_App.lua index dedcddaae9..4c5f7ec534 100644 --- a/test_scripts/Policies/App_Permissions/023_ATF_Default_Priority_Value_Assigned_To_App.lua +++ b/test_scripts/Policies/App_Permissions/023_ATF_Default_Priority_Value_Assigned_To_App.lua @@ -17,6 +17,8 @@ -- SDL->HMI: SDL.ActivateApp_response {priority: NONE, params} -- SDL->HMI: SDL.OnAppPermissionsChanged {priority: NONE, params} --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua b/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua index a0e9011103..bde7714bbb 100644 --- a/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua +++ b/test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua @@ -14,6 +14,8 @@ -- Expected result: -- a) SDL->app: OnAppInterfaceUnregistered (APP_UNAUTHORIZED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua b/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua index 3711cb7b2e..32001b3c25 100644 --- a/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua +++ b/test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua @@ -14,6 +14,8 @@ -- Expected result: -- a) (DISALLOWED, success:false) to this application for ChangeRegistration (not unregister it) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/026_ATF_DISALLOWED_App_Which_Name_Does_Not_Match_With_Nickname_In_PT.lua b/test_scripts/Policies/App_Permissions/026_ATF_DISALLOWED_App_Which_Name_Does_Not_Match_With_Nickname_In_PT.lua index 4355acf878..73736ea2cd 100644 --- a/test_scripts/Policies/App_Permissions/026_ATF_DISALLOWED_App_Which_Name_Does_Not_Match_With_Nickname_In_PT.lua +++ b/test_scripts/Policies/App_Permissions/026_ATF_DISALLOWED_App_Which_Name_Does_Not_Match_With_Nickname_In_PT.lua @@ -12,6 +12,8 @@ -- Expected result: -- a) SDL->app: RegisterAppInterface(DISALLOWED, success:false) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/027_ATF_NickName_Case_Insensitivity.lua b/test_scripts/Policies/App_Permissions/027_ATF_NickName_Case_Insensitivity.lua index e15ee9a7d2..e38fdaeb9d 100644 --- a/test_scripts/Policies/App_Permissions/027_ATF_NickName_Case_Insensitivity.lua +++ b/test_scripts/Policies/App_Permissions/027_ATF_NickName_Case_Insensitivity.lua @@ -13,6 +13,8 @@ -- Expected result: -- a) SDL->appID: SUCCESS: RegisterAppInterface() --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/028_ATF_Nickname_Validation_Before_Duplicate_Name_Validation.lua b/test_scripts/Policies/App_Permissions/028_ATF_Nickname_Validation_Before_Duplicate_Name_Validation.lua index a559d4bacd..100157f1cc 100644 --- a/test_scripts/Policies/App_Permissions/028_ATF_Nickname_Validation_Before_Duplicate_Name_Validation.lua +++ b/test_scripts/Policies/App_Permissions/028_ATF_Nickname_Validation_Before_Duplicate_Name_Validation.lua @@ -16,6 +16,8 @@ -- Expected result: -- a) SDL validate nicknames before duplicate name validation and respond for second app RegisterAppInterface_response (DISALLOWED, success: false) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/029_ATF_OnPermissionsChange_After_PTU.lua b/test_scripts/Policies/App_Permissions/029_ATF_OnPermissionsChange_After_PTU.lua index 1a0e082e51..6f71777d29 100644 --- a/test_scripts/Policies/App_Permissions/029_ATF_OnPermissionsChange_After_PTU.lua +++ b/test_scripts/Policies/App_Permissions/029_ATF_OnPermissionsChange_After_PTU.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL notify app with new changed permissions via OnPermissionsChange --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua b/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua index 79a6c6bde9..42f4dd5aa5 100644 --- a/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua +++ b/test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua @@ -16,6 +16,8 @@ -- Expected result: -- a) RegisterAppInterface_response (, success: true) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/001_ATF_P_TC_LPT_Creation_PreloadedPT_without_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/001_ATF_P_TC_LPT_Creation_PreloadedPT_without_external_consent_status_groups_struct.lua index c2713e312a..53b365994f 100644 --- a/test_scripts/Policies/External_UCS/001_ATF_P_TC_LPT_Creation_PreloadedPT_without_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/001_ATF_P_TC_LPT_Creation_PreloadedPT_without_external_consent_status_groups_struct.lua @@ -24,6 +24,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/002_ATF_N_TC_LPT_Creation_PreloadedPT_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/002_ATF_N_TC_LPT_Creation_PreloadedPT_with_external_consent_status_groups_struct.lua index 12827c5903..149727fe9f 100644 --- a/test_scripts/Policies/External_UCS/002_ATF_N_TC_LPT_Creation_PreloadedPT_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/002_ATF_N_TC_LPT_Creation_PreloadedPT_with_external_consent_status_groups_struct.lua @@ -29,6 +29,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/External_UCS/003_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/003_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua index b322b68979..2db43ef3c8 100644 --- a/test_scripts/Policies/External_UCS/003_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/003_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua @@ -28,6 +28,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/004_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/004_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua index 5dce067ecb..c2fa0743d0 100644 --- a/test_scripts/Policies/External_UCS/004_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/004_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua @@ -28,6 +28,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/005_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/005_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua index 5c7fb93dcf..8f72f62a55 100644 --- a/test_scripts/Policies/External_UCS/005_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/005_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua @@ -28,6 +28,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/006_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/006_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua index 2be3f11a25..d5ae8905f8 100644 --- a/test_scripts/Policies/External_UCS/006_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/006_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua @@ -28,6 +28,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/007_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua b/test_scripts/Policies/External_UCS/007_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua index 68b0c6847b..5c32db896b 100644 --- a/test_scripts/Policies/External_UCS/007_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua +++ b/test_scripts/Policies/External_UCS/007_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua @@ -26,6 +26,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/External_UCS/008_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua b/test_scripts/Policies/External_UCS/008_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua index 97b3c21887..93b24d6af5 100644 --- a/test_scripts/Policies/External_UCS/008_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua +++ b/test_scripts/Policies/External_UCS/008_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua @@ -26,6 +26,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/External_UCS/009_ATF_P_TC_SnapshotPT_without_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/009_ATF_P_TC_SnapshotPT_without_external_consent_status_groups_struct.lua index b2ffa2fef8..b3e59378c9 100644 --- a/test_scripts/Policies/External_UCS/009_ATF_P_TC_SnapshotPT_without_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/009_ATF_P_TC_SnapshotPT_without_external_consent_status_groups_struct.lua @@ -26,6 +26,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua index 7c1ddb8902..1fc769e63b 100644 --- a/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua @@ -27,6 +27,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/011_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/011_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_off_struct.lua index c25c903972..97db0b6c60 100644 --- a/test_scripts/Policies/External_UCS/011_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/011_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_off_struct.lua @@ -25,6 +25,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/012_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/012_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_off_struct.lua index 695f256474..3cdc210fdf 100644 --- a/test_scripts/Policies/External_UCS/012_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/012_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_off_struct.lua @@ -27,6 +27,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/013_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/013_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_on_struct.lua index af1e0250dc..8c715b810e 100644 --- a/test_scripts/Policies/External_UCS/013_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/013_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_on_struct.lua @@ -25,6 +25,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/014_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/014_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_on_struct.lua index 6fec168313..b393848c94 100644 --- a/test_scripts/Policies/External_UCS/014_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/014_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_on_struct.lua @@ -27,6 +27,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/015_ATF_P_TC_PTU_without_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/015_ATF_P_TC_PTU_without_external_consent_status_groups_struct.lua index 9f8b80a56b..b8773f5c7b 100644 --- a/test_scripts/Policies/External_UCS/015_ATF_P_TC_PTU_without_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/015_ATF_P_TC_PTU_without_external_consent_status_groups_struct.lua @@ -27,6 +27,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua index 3dc5e73aa6..49629101ec 100644 --- a/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua @@ -24,6 +24,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/017_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/017_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_off_struct.lua index b9d4696cb6..279f56c67f 100644 --- a/test_scripts/Policies/External_UCS/017_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/017_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_off_struct.lua @@ -30,6 +30,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/018_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/018_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_off_struct.lua index cbd7c9c774..eeaead9222 100644 --- a/test_scripts/Policies/External_UCS/018_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/018_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_off_struct.lua @@ -31,6 +31,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/019_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/019_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_on_struct.lua index 1a4f4718a1..ad7f7ddf91 100644 --- a/test_scripts/Policies/External_UCS/019_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/019_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_on_struct.lua @@ -30,6 +30,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/020_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/020_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_on_struct.lua index 70910e5ab6..236c77b2a4 100644 --- a/test_scripts/Policies/External_UCS/020_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/020_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_on_struct.lua @@ -31,6 +31,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/021_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua b/test_scripts/Policies/External_UCS/021_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua index d5b8af354a..49483b4486 100644 --- a/test_scripts/Policies/External_UCS/021_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua +++ b/test_scripts/Policies/External_UCS/021_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua @@ -23,6 +23,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/022_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua b/test_scripts/Policies/External_UCS/022_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua index 0835e0d4c6..0add7287d8 100644 --- a/test_scripts/Policies/External_UCS/022_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua +++ b/test_scripts/Policies/External_UCS/022_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua @@ -23,6 +23,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/023_ATF_P_TC_LPT_Update_PreloadedPT_without_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/023_ATF_P_TC_LPT_Update_PreloadedPT_without_external_consent_status_groups_struct.lua index e7f1543896..076d71e466 100644 --- a/test_scripts/Policies/External_UCS/023_ATF_P_TC_LPT_Update_PreloadedPT_without_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/023_ATF_P_TC_LPT_Update_PreloadedPT_without_external_consent_status_groups_struct.lua @@ -25,6 +25,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/024_ATF_N_TC_LPT_Update_PreloadedPT_with_external_consent_status_groups_struct.lua b/test_scripts/Policies/External_UCS/024_ATF_N_TC_LPT_Update_PreloadedPT_with_external_consent_status_groups_struct.lua index f2c1fbd30f..b5f520af16 100644 --- a/test_scripts/Policies/External_UCS/024_ATF_N_TC_LPT_Update_PreloadedPT_with_external_consent_status_groups_struct.lua +++ b/test_scripts/Policies/External_UCS/024_ATF_N_TC_LPT_Update_PreloadedPT_with_external_consent_status_groups_struct.lua @@ -26,6 +26,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/External_UCS/025_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/025_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua index 63a6156821..412919e4b1 100644 --- a/test_scripts/Policies/External_UCS/025_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/025_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua @@ -30,6 +30,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/026_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua b/test_scripts/Policies/External_UCS/026_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua index 305569027e..0b95fb7321 100644 --- a/test_scripts/Policies/External_UCS/026_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua +++ b/test_scripts/Policies/External_UCS/026_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua @@ -29,6 +29,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/027_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/027_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua index bb9e115d75..952b3be4b0 100644 --- a/test_scripts/Policies/External_UCS/027_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/027_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua @@ -30,6 +30,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/028_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua b/test_scripts/Policies/External_UCS/028_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua index d5c57ee2ce..c708a7049c 100644 --- a/test_scripts/Policies/External_UCS/028_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua +++ b/test_scripts/Policies/External_UCS/028_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua @@ -29,6 +29,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/029_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua b/test_scripts/Policies/External_UCS/029_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua index 90c6572caa..d7e50af867 100644 --- a/test_scripts/Policies/External_UCS/029_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua +++ b/test_scripts/Policies/External_UCS/029_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua @@ -27,6 +27,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/External_UCS/030_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua b/test_scripts/Policies/External_UCS/030_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua index aa7083f2ff..93b8073459 100644 --- a/test_scripts/Policies/External_UCS/030_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua +++ b/test_scripts/Policies/External_UCS/030_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua @@ -27,6 +27,8 @@ -- -- Note: Script is designed for EXTERNAL_PROPRIETARY flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua index 727b784ce7..c28f2fb603 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" - allowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/002_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/002_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua index 44d243663f..c5d9ec49e9 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/002_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/002_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" - allowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/003_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/003_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_allowed.lua index ef89945ce8..f4f0ae9e95 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/003_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/003_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" - allowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/004_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/004_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua index a57a6b23cf..1e95a0c9bf 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/004_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/004_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" - userDisallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/005_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/005_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_allowed.lua index 72e0e3e2e1..678ea8c410 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/005_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/005_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" - userDisallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/006_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/006_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua index e991184805..9d3a384395 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/006_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/006_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" - userDisallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua index 70610c76cf..79902ad816 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/008_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/008_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua index d22e6069b2..c5a35ba145 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/008_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/008_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/009_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/009_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua index 80dc9dda28..6372bc9a28 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/009_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/009_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/010_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/010_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua index 8727f1c1ac..6c3a44d445 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/010_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/010_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/011_ATF_Policies_External_Consent_OFF_through_ignition_cycles.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/011_ATF_Policies_External_Consent_OFF_through_ignition_cycles.lua index 018e4f3f40..cda3002ae2 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/011_ATF_Policies_External_Consent_OFF_through_ignition_cycles.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/011_ATF_Policies_External_Consent_OFF_through_ignition_cycles.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" status between ignition cycles diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/012_ATF_Policies_External_Consent_OFF_through_ignition_cycles_user_disallowed_RPCs.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/012_ATF_Policies_External_Consent_OFF_through_ignition_cycles_user_disallowed_RPCs.lua index 3b1441fa19..b2e2ced50f 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/012_ATF_Policies_External_Consent_OFF_through_ignition_cycles_user_disallowed_RPCs.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/012_ATF_Policies_External_Consent_OFF_through_ignition_cycles_user_disallowed_RPCs.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" status between ignition cycles --[Policies] External UCS: "OFF" - userDisallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/013_ATF_Policies_External_Consent_OFF_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/013_ATF_Policies_External_Consent_OFF_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua index b31c81216d..b60bc3015e 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/013_ATF_Policies_External_Consent_OFF_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/013_ATF_Policies_External_Consent_OFF_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" status between ignition cycles --[Policies] External UCS: "OFF" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/014_ATF_Policies_External_Consent_OFF_disallowed_change_to_ON_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/014_ATF_Policies_External_Consent_OFF_disallowed_change_to_ON_allowed.lua index ef21282224..59c24953be 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/014_ATF_Policies_External_Consent_OFF_disallowed_change_to_ON_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/014_ATF_Policies_External_Consent_OFF_disallowed_change_to_ON_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when externalConsentStatus changes to "ON" --[Policies] External UCS: "OFF" OnPermissionsChange after externalConsentStatus changes to "ON" diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/015_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/015_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_allowed.lua index dab9fd8c1d..9b8310c96c 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/015_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/015_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" user enables "functional grouping" for specific app --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when SDL gets user consent for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/016_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/016_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_disallowed.lua index 03293848cc..7ecd75580f 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/016_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/016_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" user enables "functional grouping" for specific app --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when SDL gets user consent for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/017_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/017_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_omitted.lua index 9fac32e2e3..abc903249c 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/017_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/017_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" user enables "functional grouping" for specific app --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when SDL gets user consent for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/018_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/018_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_allowed.lua index 4d750c778a..c3e1d5c8cc 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/018_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/018_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" user disables "functional grouping" for specific app --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when user disables for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/019_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/019_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_disallowed.lua index 8ada80aaf5..6db7b9b8dc 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/019_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/019_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" user disables "functional grouping" for specific app --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when user disables for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/020_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/020_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_omitted.lua index f128a3cb9d..5c444a7785 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/020_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/020_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" user disables "functional grouping" for specific app --[Policies] External UCS: "OFF" updates in "consent_groups" and "external_consent_status_groups" when user disables for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/021_ATF_Policies_External_Consent_OFF_allowed_change_to_ON_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/021_ATF_Policies_External_Consent_OFF_allowed_change_to_ON_disallowed.lua index 1aa9997ace..d195adc0c4 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/021_ATF_Policies_External_Consent_OFF_allowed_change_to_ON_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/021_ATF_Policies_External_Consent_OFF_allowed_change_to_ON_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" OnPermissionsChange for allowed groupings after externalConsentStatus changes to "ON" diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/022_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_off.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/022_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_off.lua index 082d1e4929..c9ff41cba2 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/022_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_off.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/022_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_off.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: settings for all connected apps diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/023_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_on.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/023_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_on.lua index f9bba57a95..cf7dfaa2f1 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/023_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_on.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/023_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_on.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: settings for all connected apps diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/024_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_01.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/024_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_01.lua index ce8cb2121e..acc50fba32 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/024_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_01.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/024_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_01.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: externalConsentStatus change for the whole "functional_group" --[Policies] External UCS: "OFF" - userDisallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/025_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_02.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/025_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_02.lua index bb777a57cb..f53090c336 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/025_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_02.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/025_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_02.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: externalConsentStatus change for the whole "functional_group" --[Policies] External UCS: "ON" - user_disallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/026_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_03.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/026_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_03.lua index 9235b6262a..aae848cc90 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/026_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_03.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/026_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_03.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: externalConsentStatus change for the whole "functional_group" --[Policies] External UCS: "ON" - user_disallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/027_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_04.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/027_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_04.lua index 190bffa323..93ebb440ad 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/027_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_04.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/027_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_04.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: externalConsentStatus change for the whole "functional_group" --[Policies] External UCS: "ON" - user_disallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/028_ATF_Policies_External_Consent_OFF_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/028_ATF_Policies_External_Consent_OFF_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua index 206bfcd9d4..7fc4b96002 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/028_ATF_Policies_External_Consent_OFF_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/028_ATF_Policies_External_Consent_OFF_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- -- [Policies] External UCS: externalConsentStatus vs. consentedFunctions priority diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/029_ATF_Policies_External_Consent_OFF_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/029_ATF_Policies_External_Consent_OFF_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua index ab45799835..12738f5981 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/029_ATF_Policies_External_Consent_OFF_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/029_ATF_Policies_External_Consent_OFF_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- -- [Policies] External UCS: externalConsentStatus vs. consentedFunctions priority diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/030_ATF_Policies_External_Consent_OFF_empty_consent_groups.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/030_ATF_Policies_External_Consent_OFF_empty_consent_groups.lua index 2913d42c3b..81040da6f3 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/030_ATF_Policies_External_Consent_OFF_empty_consent_groups.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/030_ATF_Policies_External_Consent_OFF_empty_consent_groups.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- -- [Policies] External UCS: empty "consent_groups" changes after externalConsentStatus was received diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/031_ATF_Policies_External_Consent_missing.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/031_ATF_Policies_External_Consent_missing.lua index 281f594240..9b166eaa50 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/031_ATF_Policies_External_Consent_missing.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/031_ATF_Policies_External_Consent_missing.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "externalConsentStatus" was not received from HMI diff --git a/test_scripts/Policies/External_UCS/External_Consent_OFF/032_ATF_Policies_External_Consent_OFF_through_ignition_cycles_combo.lua b/test_scripts/Policies/External_UCS/External_Consent_OFF/032_ATF_Policies_External_Consent_OFF_through_ignition_cycles_combo.lua index 814e910062..88fb50e010 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_OFF/032_ATF_Policies_External_Consent_OFF_through_ignition_cycles_combo.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_OFF/032_ATF_Policies_External_Consent_OFF_through_ignition_cycles_combo.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --------------------------------------Requirement summary--------------------------------------------- --[Policies] External UCS: "OFF" status between ignition cycles diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/001_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/001_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua index 79aba9e70e..e5e1241dc9 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/001_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/001_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" - allowed RPCs -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/002_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/002_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_allowed.lua index 21f682ad6a..2e18474682 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/002_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/002_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" - allowed RPCs -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/003_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/003_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua index c534233796..f43347f5b5 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/003_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/003_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" - allowed RPCs -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/004_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/004_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua index 47ea6a2c92..2478b54e88 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/004_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/004_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" - user_disallowed RPCs -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/005_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/005_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_allowed.lua index af53221e69..598f80c366 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/005_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/005_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" - user_disallowed RPCs -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/006_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/006_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua index 039bc85310..45acefeb11 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/006_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/006_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" - user_disallowed RPCs -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/007_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/007_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua index 0fa29c52fd..c15386e0af 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/007_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/007_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/008_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/008_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua index 9ac8ff1fe5..06e5dfe1ed 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/008_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/008_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/009_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/009_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua index 4e3b0323b8..f9f681278d 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/009_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/009_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/010_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/010_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua index 9897e0f8c0..384f40486d 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/010_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/010_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/011_ATF_Policies_External_Consent_ON_through_ignition_cycles_allowed_RPCs.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/011_ATF_Policies_External_Consent_ON_through_ignition_cycles_allowed_RPCs.lua index c13d08bb74..2752584e9f 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/011_ATF_Policies_External_Consent_ON_through_ignition_cycles_allowed_RPCs.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/011_ATF_Policies_External_Consent_ON_through_ignition_cycles_allowed_RPCs.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" status between ignition cycles -- [Policies] External UCS: "ON" - allowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/012_ATF_Policies_External_Consent_ON_through_ignition_cycles_user_disallowed_RPCs.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/012_ATF_Policies_External_Consent_ON_through_ignition_cycles_user_disallowed_RPCs.lua index 274766b7ff..80362efe23 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/012_ATF_Policies_External_Consent_ON_through_ignition_cycles_user_disallowed_RPCs.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/012_ATF_Policies_External_Consent_ON_through_ignition_cycles_user_disallowed_RPCs.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" status between ignition cycles -- [Policies] External UCS: "ON" - user_disallowed RPCs diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/013_ATF_Policies_External_Consent_ON_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/013_ATF_Policies_External_Consent_ON_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua index c473f327f6..41066299ed 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/013_ATF_Policies_External_Consent_ON_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/013_ATF_Policies_External_Consent_ON_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" status between ignition cycles -- [Policies] External UCS: "ON" in case of omitted "disallowed_by_external_consent_entities" param in functional groupings diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/014_ATF_Policies_External_Consent_ON_disallowed_change_to_OFF_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/014_ATF_Policies_External_Consent_ON_disallowed_change_to_OFF_allowed.lua index e2e088ddd1..286afd2593 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/014_ATF_Policies_External_Consent_ON_disallowed_change_to_OFF_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/014_ATF_Policies_External_Consent_ON_disallowed_change_to_OFF_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" updates in userDisallowed "consent_groups" and "external_consent_status_groups" when externalConsentStatus changes to "OFF" -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/015_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/015_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_allowed.lua index c9048256d9..79c2d398e8 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/015_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/015_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" user enables "functional grouping" for specific app -- [Policies] External UCS: "ON" updates in "consent_groups" and "external_consent_status_groups" when SDL gets user consent for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/016_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/016_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_disallowed.lua index e2d193cecf..099444a2af 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/016_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/016_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" user enables "functional grouping" for specific app -- [Policies] External UCS: "ON" updates in "consent_groups" and "external_consent_status_groups" when SDL gets user consent for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/017_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/017_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_omitted.lua index d1ab213204..091f348b61 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/017_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/017_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" user enables "functional grouping" for specific app -- [Policies] External UCS: "ON" updates in "consent_groups" and "external_consent_status_groups" when SDL gets user consent for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/018_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/018_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_allowed.lua index 102e71fe2e..286ef63715 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/018_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/018_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" user disables "functional grouping" for specific app -- [Policies] External UCS: "ON" updates in "consent_groups" and "external_consent_status_groups" when user disables for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/019_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/019_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_disallowed.lua index 72b6ad5354..7454140375 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/019_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/019_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" user disables "functional grouping" for specific app -- [Policies] External UCS: "ON" updates in "consent_groups" and "external_consent_status_groups" when user disables for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/020_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_omitted.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/020_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_omitted.lua index 60cb2fe087..cb39a4e10f 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/020_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_omitted.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/020_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_omitted.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" user disables "functional grouping" for specific app -- [Policies] External UCS: "ON" updates in "consent_groups" and "external_consent_status_groups" when user disables for specific app diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/021_ATF_Policies_External_Consent_ON_allowed_change_to_OFF_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/021_ATF_Policies_External_Consent_ON_allowed_change_to_OFF_disallowed.lua index 80fc8d46d5..96a52c047d 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/021_ATF_Policies_External_Consent_ON_allowed_change_to_OFF_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/021_ATF_Policies_External_Consent_ON_allowed_change_to_OFF_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "ON" updates in allowed "consent_groups" and "external_consent_status_groups" when externalConsentStatus changes to "OFF" -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/022_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_off.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/022_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_off.lua index 2e9eea89b7..7b9124f2eb 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/022_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_off.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/022_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_off.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: settings for all connected apps -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/023_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_on.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/023_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_on.lua index eada72c700..67e7e9c637 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/023_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_on.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/023_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_on.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: settings for all connected apps -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/024_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_01.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/024_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_01.lua index ceac5140d1..5af7b75a7d 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/024_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_01.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/024_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_01.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus change for the whole "functional_group" -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/025_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_02.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/025_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_02.lua index a49b5e3967..d4d0c93e78 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/025_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_02.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/025_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_02.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus change for the whole "functional_group" -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/026_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_03.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/026_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_03.lua index d36905e427..191b45f074 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/026_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_03.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/026_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_03.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus change for the whole "functional_group" -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/027_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_04.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/027_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_04.lua index 5d45e801ff..ee7a1f2a8e 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/027_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_04.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/027_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_04.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus change for the whole "functional_group" -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/028_ATF_Policies_External_Consent_ON_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/028_ATF_Policies_External_Consent_ON_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua index e1eb7c8b92..7416b75ea7 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/028_ATF_Policies_External_Consent_ON_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/028_ATF_Policies_External_Consent_ON_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus vs. consentedFunctions priority -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/029_ATF_Policies_External_Consent_ON_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/029_ATF_Policies_External_Consent_ON_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua index 76b59e8534..fab947c303 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/029_ATF_Policies_External_Consent_ON_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/029_ATF_Policies_External_Consent_ON_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus vs. consentedFunctions priority -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/030_ATF_Policies_External_Consent_ON_empty_consent_groups.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/030_ATF_Policies_External_Consent_ON_empty_consent_groups.lua index 90014c266a..068344ea0e 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/030_ATF_Policies_External_Consent_ON_empty_consent_groups.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/030_ATF_Policies_External_Consent_ON_empty_consent_groups.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: empty "consent_groups" changes after externalConsentStatus was received -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/031_ATF_Policies_External_Consent_ON_externalConsentStatus_is_not_sent.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/031_ATF_Policies_External_Consent_ON_externalConsentStatus_is_not_sent.lua index 0aa9ba1940..b3d56ffbac 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/031_ATF_Policies_External_Consent_ON_externalConsentStatus_is_not_sent.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/031_ATF_Policies_External_Consent_ON_externalConsentStatus_is_not_sent.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: "externalConsentStatus" was not received from HMI -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/032_ATF_Policies_External_Consent_ON_OFF_without_user_consent_prompt.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/032_ATF_Policies_External_Consent_ON_OFF_without_user_consent_prompt.lua index 6a308bd9a0..f2e4d03e4d 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/032_ATF_Policies_External_Consent_ON_OFF_without_user_consent_prompt.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/032_ATF_Policies_External_Consent_ON_OFF_without_user_consent_prompt.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [HMI API] OnAppPermissionConsent notification -- diff --git a/test_scripts/Policies/External_UCS/External_Consent_ON/033_ATF_Policies_External_Consent_ON_OFF_combine.lua b/test_scripts/Policies/External_UCS/External_Consent_ON/033_ATF_Policies_External_Consent_ON_OFF_combine.lua index cf08f2ccf0..83b39b09ae 100644 --- a/test_scripts/Policies/External_UCS/External_Consent_ON/033_ATF_Policies_External_Consent_ON_OFF_combine.lua +++ b/test_scripts/Policies/External_UCS/External_Consent_ON/033_ATF_Policies_External_Consent_ON_OFF_combine.lua @@ -1,3 +1,4 @@ +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) -------------------------------------- Requirement summary ------------------------------------------- -- [Policies] External UCS: externalConsentStatus change for the whole "functional_group" -- diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/001_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_ON.lua b/test_scripts/Policies/External_UCS/Informing_HMI/001_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_ON.lua index 194880a01e..f597ab5b34 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/001_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_ON.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/001_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_ON.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends do HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/003_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_ON.lua b/test_scripts/Policies/External_UCS/Informing_HMI/003_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_ON.lua index 6bd3604d77..088c127525 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/003_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_ON.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/003_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_ON.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/004_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_ON.lua b/test_scripts/Policies/External_UCS/Informing_HMI/004_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_ON.lua index ebf992945b..b9c8dfe445 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/004_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_ON.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/004_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_ON.lua @@ -24,6 +24,8 @@ -- Expected result: -- SDL sends to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/005_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_OFF.lua b/test_scripts/Policies/External_UCS/Informing_HMI/005_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_OFF.lua index 48c7dd732f..7a50815486 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/005_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_OFF.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/005_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_OFF.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/006_ATF_P_GetListofPermissions_with_appID_all_ecs_lower_bound_EntitySatus_OFF.lua b/test_scripts/Policies/External_UCS/Informing_HMI/006_ATF_P_GetListofPermissions_with_appID_all_ecs_lower_bound_EntitySatus_OFF.lua index 719089679d..0659c6964a 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/006_ATF_P_GetListofPermissions_with_appID_all_ecs_lower_bound_EntitySatus_OFF.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/006_ATF_P_GetListofPermissions_with_appID_all_ecs_lower_bound_EntitySatus_OFF.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/007_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_OFF.lua b/test_scripts/Policies/External_UCS/Informing_HMI/007_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_OFF.lua index 7422453cd1..077e045a12 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/007_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_OFF.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/007_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_OFF.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/008_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_OFF.lua b/test_scripts/Policies/External_UCS/Informing_HMI/008_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_OFF.lua index 50cdb240e5..a819e2123d 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/008_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_OFF.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/008_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_OFF.lua @@ -24,6 +24,8 @@ -- Expected result: -- SDL sends to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/009_ATF_P_GetListofPermissions_with_appID_not_stored_ecs.lua b/test_scripts/Policies/External_UCS/Informing_HMI/009_ATF_P_GetListofPermissions_with_appID_not_stored_ecs.lua index e466d4f081..658c37161f 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/009_ATF_P_GetListofPermissions_with_appID_not_stored_ecs.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/009_ATF_P_GetListofPermissions_with_appID_not_stored_ecs.lua @@ -22,6 +22,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/010_ATF_P_GetListofPermissions_no_appID_stored_ecs_present.lua b/test_scripts/Policies/External_UCS/Informing_HMI/010_ATF_P_GetListofPermissions_no_appID_stored_ecs_present.lua index 7d1b434aff..cbd0c3badb 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/010_ATF_P_GetListofPermissions_no_appID_stored_ecs_present.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/010_ATF_P_GetListofPermissions_no_appID_stored_ecs_present.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/011_ATF_P_GetListofPermissions_no_appID_not_stored_ecs.lua b/test_scripts/Policies/External_UCS/Informing_HMI/011_ATF_P_GetListofPermissions_no_appID_not_stored_ecs.lua index 0ddfe7f3ec..d359b7ee3b 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/011_ATF_P_GetListofPermissions_no_appID_not_stored_ecs.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/011_ATF_P_GetListofPermissions_no_appID_not_stored_ecs.lua @@ -22,6 +22,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/012_ATF_N_GetListofPermissions_no_appID_no_app_registered_stored_ecs.lua b/test_scripts/Policies/External_UCS/Informing_HMI/012_ATF_N_GetListofPermissions_no_appID_no_app_registered_stored_ecs.lua index e15dcc6364..6218ddf47a 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/012_ATF_N_GetListofPermissions_no_appID_no_app_registered_stored_ecs.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/012_ATF_N_GetListofPermissions_no_appID_no_app_registered_stored_ecs.lua @@ -24,6 +24,8 @@ -- SDL invalidates the appID and cuts it off, the GetListOfPermissions request is treated as if sent without appID -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/013_ATF_N_GetListofPermissions_no_appID_no_app_registered_not_stored_ecs.lua b/test_scripts/Policies/External_UCS/Informing_HMI/013_ATF_N_GetListofPermissions_no_appID_no_app_registered_not_stored_ecs.lua index 6f3bace400..cc9d17b796 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/013_ATF_N_GetListofPermissions_no_appID_no_app_registered_not_stored_ecs.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/013_ATF_N_GetListofPermissions_no_appID_no_app_registered_not_stored_ecs.lua @@ -23,6 +23,8 @@ -- SDL invalidates the appID and cuts it off, the GetListOfPermissions request is treated as if sent without appID -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/014_ATF_N_GetListofPermissions_no_appID_app_unregistered_stored_ecs.lua b/test_scripts/Policies/External_UCS/Informing_HMI/014_ATF_N_GetListofPermissions_no_appID_app_unregistered_stored_ecs.lua index ba59810abe..f57542adc7 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/014_ATF_N_GetListofPermissions_no_appID_app_unregistered_stored_ecs.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/014_ATF_N_GetListofPermissions_no_appID_app_unregistered_stored_ecs.lua @@ -25,6 +25,8 @@ -- SDL invalidates the appID and cuts it off, the GetListOfPermissions request is treated as if sent without appID -- SDL sends to HMI received from HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/015_ATF_N_GetListofPermissions_no_appID_app_unregistered_not_stored_ecs.lua b/test_scripts/Policies/External_UCS/Informing_HMI/015_ATF_N_GetListofPermissions_no_appID_app_unregistered_not_stored_ecs.lua index 669b7df92e..4456f6940d 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/015_ATF_N_GetListofPermissions_no_appID_app_unregistered_not_stored_ecs.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/015_ATF_N_GetListofPermissions_no_appID_app_unregistered_not_stored_ecs.lua @@ -24,6 +24,8 @@ -- SDL invalidates the appID and cuts it off, the GetListOfPermissions request is treated as if sent without appID -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/016_ATF_N_GetListofPermissions_empty_due_to_missing_entity_type_OnAppPermissionChange.lua b/test_scripts/Policies/External_UCS/Informing_HMI/016_ATF_N_GetListofPermissions_empty_due_to_missing_entity_type_OnAppPermissionChange.lua index a146a313e6..fe3e752480 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/016_ATF_N_GetListofPermissions_empty_due_to_missing_entity_type_OnAppPermissionChange.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/016_ATF_N_GetListofPermissions_empty_due_to_missing_entity_type_OnAppPermissionChange.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] -- ToDo (vvvakulenko): remove after issue "ATF does not stop HB timers by closing session and connection" is resolved config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/017_ATF_N_GetListofPermissions_empty_due_to_missing_entityID_OnAppPermissionChange.lua b/test_scripts/Policies/External_UCS/Informing_HMI/017_ATF_N_GetListofPermissions_empty_due_to_missing_entityID_OnAppPermissionChange.lua index 99bac80da1..adbf5e942f 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/017_ATF_N_GetListofPermissions_empty_due_to_missing_entityID_OnAppPermissionChange.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/017_ATF_N_GetListofPermissions_empty_due_to_missing_entityID_OnAppPermissionChange.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] -- ToDo (vvvakulenko): remove after issue "ATF does not stop HB timers by closing session and connection" is resolved config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/018_ATF_N_GetListofPermissions_empty_due_to_missing_status_OnAppPermissionChange.lua b/test_scripts/Policies/External_UCS/Informing_HMI/018_ATF_N_GetListofPermissions_empty_due_to_missing_status_OnAppPermissionChange.lua index 1f43d297be..8404d865c3 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/018_ATF_N_GetListofPermissions_empty_due_to_missing_status_OnAppPermissionChange.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/018_ATF_N_GetListofPermissions_empty_due_to_missing_status_OnAppPermissionChange.lua @@ -23,6 +23,8 @@ -- Expected result: -- SDL sends to HMI empty array -----------------------------------------------------------------------------------------------[[ General configuration parameters ]] +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + -- ToDo (vvvakulenko): remove after issue "ATF does not stop HB timers by closing session and connection" is resolved config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/019_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityType_OnAppPermissionChange.lua b/test_scripts/Policies/External_UCS/Informing_HMI/019_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityType_OnAppPermissionChange.lua index dda91b0075..fcf47d21e2 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/019_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityType_OnAppPermissionChange.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/019_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityType_OnAppPermissionChange.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] -- ToDo (vvvakulenko): remove after issue "ATF does not stop HB timers by closing session and connection" is resolved config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/020_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityID_OnAppPermissionChange.lua b/test_scripts/Policies/External_UCS/Informing_HMI/020_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityID_OnAppPermissionChange.lua index 76f148206f..c7683961ca 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/020_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityID_OnAppPermissionChange.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/020_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityID_OnAppPermissionChange.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] -- ToDo (vvvakulenko): remove after issue "ATF does not stop HB timers by closing session and connection" is resolved config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/021_ATF_N_GetListofPermissions_empty_due_to_invalid_param_status_OnAppPermissionChange.lua b/test_scripts/Policies/External_UCS/Informing_HMI/021_ATF_N_GetListofPermissions_empty_due_to_invalid_param_status_OnAppPermissionChange.lua index 0506707797..c4fb5d00f6 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/021_ATF_N_GetListofPermissions_empty_due_to_invalid_param_status_OnAppPermissionChange.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/021_ATF_N_GetListofPermissions_empty_due_to_invalid_param_status_OnAppPermissionChange.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL sends to HMI empty array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] -- ToDo (vvvakulenko): remove after issue "ATF does not stop HB timers by closing session and connection" is resolved config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/External_UCS/Informing_HMI/022_ATF_N_OnAppPermissionConsent_not_sent_when_no_PTU.lua b/test_scripts/Policies/External_UCS/Informing_HMI/022_ATF_N_OnAppPermissionConsent_not_sent_when_no_PTU.lua index f84f561f48..b0523c55d4 100644 --- a/test_scripts/Policies/External_UCS/Informing_HMI/022_ATF_N_OnAppPermissionConsent_not_sent_when_no_PTU.lua +++ b/test_scripts/Policies/External_UCS/Informing_HMI/022_ATF_N_OnAppPermissionConsent_not_sent_when_no_PTU.lua @@ -22,6 +22,8 @@ -- PTU is triggered -- HMI notification SDL.OnAppPermissionChanged is not sent --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Policies_Security/119_ATF_P_Policies_Performance_Requirement.lua b/test_scripts/Policies/Policies_Security/119_ATF_P_Policies_Performance_Requirement.lua index 872dbc8663..27d0205d74 100644 --- a/test_scripts/Policies/Policies_Security/119_ATF_P_Policies_Performance_Requirement.lua +++ b/test_scripts/Policies/Policies_Security/119_ATF_P_Policies_Performance_Requirement.lua @@ -13,6 +13,8 @@ -- Expected result -- SDL must correctly finish the PTU --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policies_Security/120_ATF_PolicyTable_Certificate_EMPTY_value.lua b/test_scripts/Policies/Policies_Security/120_ATF_PolicyTable_Certificate_EMPTY_value.lua index 629b75178b..adb5447470 100644 --- a/test_scripts/Policies/Policies_Security/120_ATF_PolicyTable_Certificate_EMPTY_value.lua +++ b/test_scripts/Policies/Policies_Security/120_ATF_PolicyTable_Certificate_EMPTY_value.lua @@ -5,6 +5,8 @@ ----- Expected result------ ----- SDL must continue working as assigned. ------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/121_ATF_PTU_AppID_NotListed_PT_DeviceConsented_SecondApp.lua b/test_scripts/Policies/Policy_Table_Update/121_ATF_PTU_AppID_NotListed_PT_DeviceConsented_SecondApp.lua index 5c67b52275..4ba0d118d9 100644 --- a/test_scripts/Policies/Policy_Table_Update/121_ATF_PTU_AppID_NotListed_PT_DeviceConsented_SecondApp.lua +++ b/test_scripts/Policies/Policy_Table_Update/121_ATF_PTU_AppID_NotListed_PT_DeviceConsented_SecondApp.lua @@ -18,6 +18,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/122_ATF_PTU_NotSuccessful_AppID_ListedPT_NewIgnCycle.lua b/test_scripts/Policies/Policy_Table_Update/122_ATF_PTU_NotSuccessful_AppID_ListedPT_NewIgnCycle.lua index fa15f09b5c..5b7e608e61 100644 --- a/test_scripts/Policies/Policy_Table_Update/122_ATF_PTU_NotSuccessful_AppID_ListedPT_NewIgnCycle.lua +++ b/test_scripts/Policies/Policy_Table_Update/122_ATF_PTU_NotSuccessful_AppID_ListedPT_NewIgnCycle.lua @@ -20,6 +20,8 @@ -- PTU is requested. PTS is created. -- SDL-> HMI: SDL.PolicyUpdate() --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Policy_Table_Update/123_ATF_PTU_DeviceConsent_from_User.lua b/test_scripts/Policies/Policy_Table_Update/123_ATF_PTU_DeviceConsent_from_User.lua index 81df7d428b..6cb739af8f 100644 --- a/test_scripts/Policies/Policy_Table_Update/123_ATF_PTU_DeviceConsent_from_User.lua +++ b/test_scripts/Policies/Policy_Table_Update/123_ATF_PTU_DeviceConsent_from_User.lua @@ -16,6 +16,8 @@ -- PTU is requested. PTS is created. -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/124_ATF_User_requests_PTU.lua b/test_scripts/Policies/Policy_Table_Update/124_ATF_User_requests_PTU.lua index 2317bf1886..d8eafb96b4 100644 --- a/test_scripts/Policies/Policy_Table_Update/124_ATF_User_requests_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/124_ATF_User_requests_PTU.lua @@ -19,6 +19,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua b/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua index 2a233aa92d..f81cac1d2a 100644 --- a/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua @@ -18,6 +18,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local testCasesForPolicyTableSnapshot = require('user_modules/shared_testcases/testCasesForPolicyTableSnapshot') diff --git a/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua b/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua index 86c0bcbd2b..fb3e4d0571 100644 --- a/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua +++ b/test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua @@ -20,6 +20,8 @@ -- SDL->HMI: BasicCommunication.PolicyUpdate -- SDL->HMI: SDL.OnStatusUpdate(UPDATING) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/127_ATF_PTS_Creation_rule.lua b/test_scripts/Policies/Policy_Table_Update/127_ATF_PTS_Creation_rule.lua index 735e613c01..cd7b825522 100644 --- a/test_scripts/Policies/Policy_Table_Update/127_ATF_PTS_Creation_rule.lua +++ b/test_scripts/Policies/Policy_Table_Update/127_ATF_PTS_Creation_rule.lua @@ -14,6 +14,8 @@ -- Expected result: -- PTU is requested. PTS is created. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/128_ATF_PTU_GetURLs.lua b/test_scripts/Policies/Policy_Table_Update/128_ATF_PTU_GetURLs.lua index dd3a3d197b..5507e1a827 100644 --- a/test_scripts/Policies/Policy_Table_Update/128_ATF_PTU_GetURLs.lua +++ b/test_scripts/Policies/Policy_Table_Update/128_ATF_PTU_GetURLs.lua @@ -16,6 +16,8 @@ -- PTU is requested. PTS is created. -- SDL.GetPolicyConfigurationData({value = }) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/131_ATF_PTS_storage_on_file_system.lua b/test_scripts/Policies/Policy_Table_Update/131_ATF_PTS_storage_on_file_system.lua index f2c08f7dfa..495bd853f6 100644 --- a/test_scripts/Policies/Policy_Table_Update/131_ATF_PTS_storage_on_file_system.lua +++ b/test_scripts/Policies/Policy_Table_Update/131_ATF_PTS_storage_on_file_system.lua @@ -14,6 +14,8 @@ -- The policies manager must store the PT snapshot as a JSON file which filename and -- filepath are defined in "PathToSnapshot" parameter of smartDeviceLink.ini file. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/132_ATF_Timeout_to_wait_response_PTU.lua b/test_scripts/Policies/Policy_Table_Update/132_ATF_Timeout_to_wait_response_PTU.lua index efa5715336..02466d311b 100644 --- a/test_scripts/Policies/Policy_Table_Update/132_ATF_Timeout_to_wait_response_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/132_ATF_Timeout_to_wait_response_PTU.lua @@ -14,6 +14,8 @@ -- To define the timeout to wait a response on PTU, Policies manager must refer PTS -- "module_config" section, key . --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/133_ATF_PTU_retry_timeout_definition.lua b/test_scripts/Policies/Policy_Table_Update/133_ATF_PTU_retry_timeout_definition.lua index bc063d56a5..a3e16046e0 100644 --- a/test_scripts/Policies/Policy_Table_Update/133_ATF_PTU_retry_timeout_definition.lua +++ b/test_scripts/Policies/Policy_Table_Update/133_ATF_PTU_retry_timeout_definition.lua @@ -15,6 +15,8 @@ -- Number and values of the "retry" elements are provided as appropriate elements in -- "seconds_between_retries" section of Local PT. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/134_ATF_WiFi_one_application_registered.lua b/test_scripts/Policies/Policy_Table_Update/134_ATF_WiFi_one_application_registered.lua index d99d73aa4a..d000f548e3 100644 --- a/test_scripts/Policies/Policy_Table_Update/134_ATF_WiFi_one_application_registered.lua +++ b/test_scripts/Policies/Policy_Table_Update/134_ATF_WiFi_one_application_registered.lua @@ -19,6 +19,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL-> HMI: SDL.PolicyUpdate() --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/135_ATF_PM_sends_PTS_to_HMI.lua b/test_scripts/Policies/Policy_Table_Update/135_ATF_PM_sends_PTS_to_HMI.lua index b672dd8f41..d890a867f7 100644 --- a/test_scripts/Policies/Policy_Table_Update/135_ATF_PM_sends_PTS_to_HMI.lua +++ b/test_scripts/Policies/Policy_Table_Update/135_ATF_PM_sends_PTS_to_HMI.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL->HMI:SDL.PolicyUpdate(file, timeout, retry[]) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/136_ATF_Define_urls_PTS_will_sent_hmi.lua b/test_scripts/Policies/Policy_Table_Update/136_ATF_Define_urls_PTS_will_sent_hmi.lua index 23254f5d35..bcdbe7cd3c 100644 --- a/test_scripts/Policies/Policy_Table_Update/136_ATF_Define_urls_PTS_will_sent_hmi.lua +++ b/test_scripts/Policies/Policy_Table_Update/136_ATF_Define_urls_PTS_will_sent_hmi.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL.GetURLs({urls[] = default}, (, appID)) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/137_ATF_Sending_PTS_to_mobile_application.lua b/test_scripts/Policies/Policy_Table_Update/137_ATF_Sending_PTS_to_mobile_application.lua index 4cf947d108..40929afbc5 100644 --- a/test_scripts/Policies/Policy_Table_Update/137_ATF_Sending_PTS_to_mobile_application.lua +++ b/test_scripts/Policies/Policy_Table_Update/137_ATF_Sending_PTS_to_mobile_application.lua @@ -20,6 +20,8 @@ -- Expected result: -- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON", appID) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/138_ATF_Sending_PTS_to_app_OnSystemRequest_appID_default.lua b/test_scripts/Policies/Policy_Table_Update/138_ATF_Sending_PTS_to_app_OnSystemRequest_appID_default.lua index bc688227ba..3685d67157 100644 --- a/test_scripts/Policies/Policy_Table_Update/138_ATF_Sending_PTS_to_app_OnSystemRequest_appID_default.lua +++ b/test_scripts/Policies/Policy_Table_Update/138_ATF_Sending_PTS_to_app_OnSystemRequest_appID_default.lua @@ -24,6 +24,8 @@ -- -- SDL->: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua b/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua index 308d86456b..e498f36d0a 100644 --- a/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua +++ b/test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua @@ -22,6 +22,8 @@ -- SDL waits for SystemRequest response from within 'timeout' value, if no obtained, -- it starts retry sequence --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/141_ATF_Got_PTU_from_mobile_application.lua b/test_scripts/Policies/Policy_Table_Update/141_ATF_Got_PTU_from_mobile_application.lua index 6b6dd23374..d5f6bcbc2c 100644 --- a/test_scripts/Policies/Policy_Table_Update/141_ATF_Got_PTU_from_mobile_application.lua +++ b/test_scripts/Policies/Policy_Table_Update/141_ATF_Got_PTU_from_mobile_application.lua @@ -22,6 +22,8 @@ -- Expected result: -- SDL->HMI: SystemRequest(requestType=PROPRIETARY, fileName, appID) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/142_ATF_PoliciesManager_changes_status_to_UP_TO_DATE.lua b/test_scripts/Policies/Policy_Table_Update/142_ATF_PoliciesManager_changes_status_to_UP_TO_DATE.lua index 5f9d6954f5..813f59bc41 100644 --- a/test_scripts/Policies/Policy_Table_Update/142_ATF_PoliciesManager_changes_status_to_UP_TO_DATE.lua +++ b/test_scripts/Policies/Policy_Table_Update/142_ATF_PoliciesManager_changes_status_to_UP_TO_DATE.lua @@ -26,6 +26,8 @@ -- Expected result: -- SDL->HMI: OnStatusUpdate(UP_TO_DATE) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/143_ATF_PTU_validation_rules.lua b/test_scripts/Policies/Policy_Table_Update/143_ATF_PTU_validation_rules.lua index 9547cabd50..09db7c822c 100644 --- a/test_scripts/Policies/Policy_Table_Update/143_ATF_PTU_validation_rules.lua +++ b/test_scripts/Policies/Policy_Table_Update/143_ATF_PTU_validation_rules.lua @@ -27,6 +27,8 @@ -- SDL->HMI: OnStatusUpdate(UP_TO_DATE) -- SDL stops timeout started by OnSystemRequest. No other OnSystemRequest are received. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/144_ATF_PTU_validation_failure.lua b/test_scripts/Policies/Policy_Table_Update/144_ATF_PTU_validation_failure.lua index 4bdd38a755..665a3269fc 100644 --- a/test_scripts/Policies/Policy_Table_Update/144_ATF_PTU_validation_failure.lua +++ b/test_scripts/Policies/Policy_Table_Update/144_ATF_PTU_validation_failure.lua @@ -27,6 +27,8 @@ -- SDL->HMI: OnStatusUpdate(UPDATE_NEEDED) -- SDL removes 'policyfile' from the directory --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua b/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua index b826429f81..5dd75a472d 100644 --- a/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua +++ b/test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua @@ -19,6 +19,8 @@ -- Expected result: -- Previous version of sections in LPT are replaced by a new ones --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local json = require("modules/json") local mobileSession = require("mobile_session") diff --git a/test_scripts/Policies/Policy_Table_Update/146_ATF_HMILvl_on_PTU_affected_in_FULL_or_LIMITED.lua b/test_scripts/Policies/Policy_Table_Update/146_ATF_HMILvl_on_PTU_affected_in_FULL_or_LIMITED.lua index 71524760ce..2b79dd446e 100644 --- a/test_scripts/Policies/Policy_Table_Update/146_ATF_HMILvl_on_PTU_affected_in_FULL_or_LIMITED.lua +++ b/test_scripts/Policies/Policy_Table_Update/146_ATF_HMILvl_on_PTU_affected_in_FULL_or_LIMITED.lua @@ -18,6 +18,8 @@ -- 3) After PTU OnPermissionsChange is called for both applications. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/147_ATF_Policy_Table_Update_Trigger_After_N_Kilometers.lua b/test_scripts/Policies/Policy_Table_Update/147_ATF_Policy_Table_Update_Trigger_After_N_Kilometers.lua index b68e4a11d8..5ff403bbc4 100644 --- a/test_scripts/Policies/Policy_Table_Update/147_ATF_Policy_Table_Update_Trigger_After_N_Kilometers.lua +++ b/test_scripts/Policies/Policy_Table_Update/147_ATF_Policy_Table_Update_Trigger_After_N_Kilometers.lua @@ -21,6 +21,8 @@ -- PTS is created by SDL: -- SDL-> HMI: SDL.PolicyUpdate() //PTU sequence started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/148_ATF_HMILvl_on_PTU_affected_in_BACKGROUND_or_NONE.lua b/test_scripts/Policies/Policy_Table_Update/148_ATF_HMILvl_on_PTU_affected_in_BACKGROUND_or_NONE.lua index 4c87896803..0cf1bc5f44 100644 --- a/test_scripts/Policies/Policy_Table_Update/148_ATF_HMILvl_on_PTU_affected_in_BACKGROUND_or_NONE.lua +++ b/test_scripts/Policies/Policy_Table_Update/148_ATF_HMILvl_on_PTU_affected_in_BACKGROUND_or_NONE.lua @@ -19,6 +19,8 @@ -- 1) SDL->appID_2: OnHMIStatus(BACKGROUND) //as "default_hmi" from the newly assigned policies has value of BACKGROUND --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua b/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua index bd4e837fae..548f027b60 100644 --- a/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua +++ b/test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua @@ -18,6 +18,8 @@ -- PTS is created by SDL: -- SDL-> HMI: SDL.PolicyUpdate() //PTU sequence started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/150_ATF_Notifying_HMI_via_OnAppPermissionChanged.lua b/test_scripts/Policies/Policy_Table_Update/150_ATF_Notifying_HMI_via_OnAppPermissionChanged.lua index 88bd763e75..f838669486 100644 --- a/test_scripts/Policies/Policy_Table_Update/150_ATF_Notifying_HMI_via_OnAppPermissionChanged.lua +++ b/test_scripts/Policies/Policy_Table_Update/150_ATF_Notifying_HMI_via_OnAppPermissionChanged.lua @@ -27,6 +27,8 @@ -- 5.SDL->app: onPermissionChange() -- 6.SDL->HMI: SDL.OnAppPermissionChanged(, params) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/151_ATF_Apply_PTU_and_OnPermissionChange_notify.lua b/test_scripts/Policies/Policy_Table_Update/151_ATF_Apply_PTU_and_OnPermissionChange_notify.lua index 94235d5c55..82e6c1bfce 100644 --- a/test_scripts/Policies/Policy_Table_Update/151_ATF_Apply_PTU_and_OnPermissionChange_notify.lua +++ b/test_scripts/Policies/Policy_Table_Update/151_ATF_Apply_PTU_and_OnPermissionChange_notify.lua @@ -29,6 +29,8 @@ -- 5. SDL->appID_1: onPermissionChange(permisssions) -- 6. SDL->HMI: SDL.OnAppPermissionChanged(appID_1, permissions) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua b/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua index 66f830e280..89b6234a4a 100644 --- a/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua +++ b/test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua @@ -17,6 +17,8 @@ -- Expected result: -- Previous version of consumer_friendly_messages.messages section in LPT has to be replaced by a new one. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/Policy_Table_Update/153_ATF_PTU_Omit_Of_Consumer_Friendly_Messages.lua b/test_scripts/Policies/Policy_Table_Update/153_ATF_PTU_Omit_Of_Consumer_Friendly_Messages.lua index db68063c0c..a6a2d8df8f 100644 --- a/test_scripts/Policies/Policy_Table_Update/153_ATF_PTU_Omit_Of_Consumer_Friendly_Messages.lua +++ b/test_scripts/Policies/Policy_Table_Update/153_ATF_PTU_Omit_Of_Consumer_Friendly_Messages.lua @@ -18,6 +18,8 @@ -- Previous version of consumer_friendly_messages section is retained -- Number of records is not changed --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua b/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua index 6d1d4bcf6d..f438080deb 100644 --- a/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua +++ b/test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua @@ -19,6 +19,8 @@ -- Expected result: -- PTU file is deleted --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua b/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua index 1b1777eb00..c7183156de 100644 --- a/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua +++ b/test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua @@ -22,6 +22,8 @@ -- -- TODO: Reduce value of timeout_after_x_seconds parameter in LPT in order to make test faster --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua b/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua index 33d1081b34..d6bf1f6f32 100644 --- a/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua +++ b/test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua @@ -17,6 +17,8 @@ -- Status changes in a wollowing way: -- "UPDATE_NEEDED" -> "UPDATING" -> "UP_TO_DATE" -> "UPDATE_NEEDED" -> "UPDATING" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua b/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua index 7df59752ea..e3e2c35f6e 100644 --- a/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua +++ b/test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL.OnStatusUpdate(UP_TO_DATE) notification is send right after successful validation of received PTU --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/Policy_Table_Update/159_ATF_PTU_Requirements_For_HMILevel_Of_The_Application_Taking_Part_In_Policy_Update.lua b/test_scripts/Policies/Policy_Table_Update/159_ATF_PTU_Requirements_For_HMILevel_Of_The_Application_Taking_Part_In_Policy_Update.lua index 27663c12d4..579d3d3651 100644 --- a/test_scripts/Policies/Policy_Table_Update/159_ATF_PTU_Requirements_For_HMILevel_Of_The_Application_Taking_Part_In_Policy_Update.lua +++ b/test_scripts/Policies/Policy_Table_Update/159_ATF_PTU_Requirements_For_HMILevel_Of_The_Application_Taking_Part_In_Policy_Update.lua @@ -18,6 +18,8 @@ -- SDL choose between the app_2, app_3, app_4 randomly to send OnSystemRequest -- app_1 doesn't take part in PTU (except of the case when app_1 is the only application being run on SDL) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua b/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua index cbc5c7c017..ac48104560 100644 --- a/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua @@ -19,6 +19,8 @@ -- b) PTU successfully passed -- c) SDL respons SUCCESS for allowed RPC and DISALLOW for disallow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/161_ATF_User_Trigger_PTU_While_Another_Is_In_Progress.lua b/test_scripts/Policies/Policy_Table_Update/161_ATF_User_Trigger_PTU_While_Another_Is_In_Progress.lua index 0f9b82b42a..35686ad657 100644 --- a/test_scripts/Policies/Policy_Table_Update/161_ATF_User_Trigger_PTU_While_Another_Is_In_Progress.lua +++ b/test_scripts/Policies/Policy_Table_Update/161_ATF_User_Trigger_PTU_While_Another_Is_In_Progress.lua @@ -19,6 +19,8 @@ -- c) PoliciesManager starts the PTU sequence: -- d) PTS is created by SDL: SDL-> HMI: SDL.PolicyUpdate() //PTU sequence started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/162_ATF_Policies_UTF-8_Encoding.lua b/test_scripts/Policies/Policy_Table_Update/162_ATF_Policies_UTF-8_Encoding.lua index 2d6da9b650..4732fb3da0 100644 --- a/test_scripts/Policies/Policy_Table_Update/162_ATF_Policies_UTF-8_Encoding.lua +++ b/test_scripts/Policies/Policy_Table_Update/162_ATF_Policies_UTF-8_Encoding.lua @@ -16,6 +16,8 @@ -- Expected result: -- The texts in Russian & Chinese in appropriate are parsed correctly by SDL --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/Policy_Table_Update/163_P_ATF_Register_NewApp_not_exist_inLocalPT_PTU.lua b/test_scripts/Policies/Policy_Table_Update/163_P_ATF_Register_NewApp_not_exist_inLocalPT_PTU.lua index fbf11fa20b..919c2c7e00 100644 --- a/test_scripts/Policies/Policy_Table_Update/163_P_ATF_Register_NewApp_not_exist_inLocalPT_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/163_P_ATF_Register_NewApp_not_exist_inLocalPT_PTU.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL adds application with app_2 data into LocalPT according to general rules of adding app data into LocalPT ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua b/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua index 682fc7a83a..740d6541e3 100644 --- a/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua @@ -19,6 +19,8 @@ -- 3. SDL replaces the following sections of the Local Policy Table with the corresponding sections from PTU: module_config, functional_groupings, app_policies -- 4. app_2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua b/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua index d5af91eac8..27d6ba7b31 100644 --- a/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua +++ b/test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua @@ -20,6 +20,8 @@ -- 4. app_2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) -- 5. SDL creates the new snapshot and initiates the new PTU for the app_2 Policies obtaining: SDL-> HMI: SDL.PolicyUpdate()//new PTU sequence started ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } diff --git a/test_scripts/Policies/Policy_Table_Update/166_ATF_HMI_sends_GetPolicyConfigurationData_one_app_registered_urls_3default.lua b/test_scripts/Policies/Policy_Table_Update/166_ATF_HMI_sends_GetPolicyConfigurationData_one_app_registered_urls_3default.lua index c3250f198c..7781354438 100644 --- a/test_scripts/Policies/Policy_Table_Update/166_ATF_HMI_sends_GetPolicyConfigurationData_one_app_registered_urls_3default.lua +++ b/test_scripts/Policies/Policy_Table_Update/166_ATF_HMI_sends_GetPolicyConfigurationData_one_app_registered_urls_3default.lua @@ -17,6 +17,8 @@ -- PTU is requested. PTS is created. -- SDL.GetPolicyConfigurationData({value = }) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/169_ATF_HMILvl_on_PTU_affected_app_in_LIMITED.lua b/test_scripts/Policies/Policy_Table_Update/169_ATF_HMILvl_on_PTU_affected_app_in_LIMITED.lua index aea1390d5e..d687138b07 100644 --- a/test_scripts/Policies/Policy_Table_Update/169_ATF_HMILvl_on_PTU_affected_app_in_LIMITED.lua +++ b/test_scripts/Policies/Policy_Table_Update/169_ATF_HMILvl_on_PTU_affected_app_in_LIMITED.lua @@ -18,6 +18,8 @@ -- 3) After PTU OnPermissionsChange is called --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Policy_Table_Update/170_ATF_PTU_Trigger_On_Navi_App_Registration_And_No_Certificate.lua b/test_scripts/Policies/Policy_Table_Update/170_ATF_PTU_Trigger_On_Navi_App_Registration_And_No_Certificate.lua index 4be7511153..f3e6db4911 100644 --- a/test_scripts/Policies/Policy_Table_Update/170_ATF_PTU_Trigger_On_Navi_App_Registration_And_No_Certificate.lua +++ b/test_scripts/Policies/Policy_Table_Update/170_ATF_PTU_Trigger_On_Navi_App_Registration_And_No_Certificate.lua @@ -17,6 +17,8 @@ -- Expected result: -- a) SDL send SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Policy_Table_Update/171_ATF_Policies_Memory_Allocation_For_PTU.lua b/test_scripts/Policies/Policy_Table_Update/171_ATF_Policies_Memory_Allocation_For_PTU.lua index 5fb7fa9822..76a05d3cb8 100644 --- a/test_scripts/Policies/Policy_Table_Update/171_ATF_Policies_Memory_Allocation_For_PTU.lua +++ b/test_scripts/Policies/Policy_Table_Update/171_ATF_Policies_Memory_Allocation_For_PTU.lua @@ -17,6 +17,8 @@ -- Expected result: -- PTU finished successfully and LPT is updated --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/Policy_Table_Update/172_ATF_PTU_request_after_N_ignition_cycles.lua b/test_scripts/Policies/Policy_Table_Update/172_ATF_PTU_request_after_N_ignition_cycles.lua index 64000536a4..daee928585 100644 --- a/test_scripts/Policies/Policy_Table_Update/172_ATF_PTU_request_after_N_ignition_cycles.lua +++ b/test_scripts/Policies/Policy_Table_Update/172_ATF_PTU_request_after_N_ignition_cycles.lua @@ -19,6 +19,8 @@ -- HMI->SDL:BasicCommunication.OnIgnitionCycleOver-> -- SDL must trigger a PolicyTableUpdate sequence --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = {"DEFAULT"} --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" diff --git a/test_scripts/Policies/Related_HMI_API/173_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua b/test_scripts/Policies/Related_HMI_API/173_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua index 77ee176a1c..e66f6f2d46 100644 --- a/test_scripts/Policies/Related_HMI_API/173_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua +++ b/test_scripts/Policies/Related_HMI_API/173_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua @@ -11,6 +11,8 @@ -- device ('device' param) as NOT consented in Local PT ("user_consent_records"-> "device" sub-section) and send BasicCommunication.ActivateApp with -- 'level' param of the value from 'default_hmi' key of 'pre-DataConsent'section of Local PT to HMI. App should stay in NONE HMI level --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/174_ATF_OnAllowSDLFunctionality_allowed_false_without_device.lua b/test_scripts/Policies/Related_HMI_API/174_ATF_OnAllowSDLFunctionality_allowed_false_without_device.lua index 0e7668a651..23bfebe555 100644 --- a/test_scripts/Policies/Related_HMI_API/174_ATF_OnAllowSDLFunctionality_allowed_false_without_device.lua +++ b/test_scripts/Policies/Related_HMI_API/174_ATF_OnAllowSDLFunctionality_allowed_false_without_device.lua @@ -10,6 +10,8 @@ -- In case PoliciesManager receives SDL.OnAllowSDLFunctionality with 'allowed=false' and without 'device' param from HMI, PoliciesManager must record -- all of currently registered devices as NOT consented in Local PT ("device_data" - > "", "", etc. - >"user_consent_records"- > "device" sub-section). --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/175_ATF_OnAllowSDLFunctionality_allowed_true_without_device.lua b/test_scripts/Policies/Related_HMI_API/175_ATF_OnAllowSDLFunctionality_allowed_true_without_device.lua index 0816ad45fc..8e50553f10 100644 --- a/test_scripts/Policies/Related_HMI_API/175_ATF_OnAllowSDLFunctionality_allowed_true_without_device.lua +++ b/test_scripts/Policies/Related_HMI_API/175_ATF_OnAllowSDLFunctionality_allowed_true_without_device.lua @@ -11,6 +11,8 @@ -- SDL->HMI:BC.ActivateApp(params, level: <”default_hmi”-value-from-assigned-policies>) -- SDL->app: OnHMIStatus(params, level: <”default_hmi”-value-from-assigned-policies>) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/176_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua b/test_scripts/Policies/Related_HMI_API/176_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua index cdd0f0b110..58130b5e90 100644 --- a/test_scripts/Policies/Related_HMI_API/176_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua +++ b/test_scripts/Policies/Related_HMI_API/176_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua @@ -14,6 +14,8 @@ -- app stays in NONE level on HMI. -- HMI->SDL: BasicCommunication.ActivateApp_response --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/177_ATF_OnAllowSDLFunctionality_allowed_true_with_device.lua b/test_scripts/Policies/Related_HMI_API/177_ATF_OnAllowSDLFunctionality_allowed_true_with_device.lua index 857eff8706..8d1e83125f 100644 --- a/test_scripts/Policies/Related_HMI_API/177_ATF_OnAllowSDLFunctionality_allowed_true_with_device.lua +++ b/test_scripts/Policies/Related_HMI_API/177_ATF_OnAllowSDLFunctionality_allowed_true_with_device.lua @@ -17,6 +17,8 @@ -- HMI displays the device consent pormpt. User makes choice. -- HMI->SDL: OnAllowSDLFunctionality --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua b/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua index e70846cd50..4f90712850 100644 --- a/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua @@ -23,6 +23,8 @@ -- 9. HMI->SDL: OnAppPermissionConsent {params} -- 10. PoliciesManager: update "" subsection of "user_consent_records" subsection of "" section of "device_data" section in Local PT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua b/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua index decd638fc0..666c403e89 100644 --- a/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua @@ -23,6 +23,8 @@ -- 9. HMI->SDL: OnAppPermissionConsent {params} -- 10. PoliciesManager: update "" subsection of "user_consent_records" subsection of "" section of "device_data" section in Local PT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/180_ATF_GetUserFriendlyMessage_language_section_is_absent_in_LocalPT.lua b/test_scripts/Policies/Related_HMI_API/180_ATF_GetUserFriendlyMessage_language_section_is_absent_in_LocalPT.lua index e0d9b77681..0fd930d7ab 100644 --- a/test_scripts/Policies/Related_HMI_API/180_ATF_GetUserFriendlyMessage_language_section_is_absent_in_LocalPT.lua +++ b/test_scripts/Policies/Related_HMI_API/180_ATF_GetUserFriendlyMessage_language_section_is_absent_in_LocalPT.lua @@ -11,6 +11,8 @@ -- HMI->SDL: SDL.GetUserFriendlyMessage ("messageCodes": "AppPermissions") -- SDL->HMI: SDL.GetUserFriendlyMessage ("messages": {messageCode: "AppPermissions", ttsString: "%appName% is requesting the use of the following ....", line1: "Grant Requested", line2: "Permission(s)?"}) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/181_ATF_GetUserFriendlyMessage_Language_not_found_in_localPT.lua b/test_scripts/Policies/Related_HMI_API/181_ATF_GetUserFriendlyMessage_Language_not_found_in_localPT.lua index 507deb78af..35b1fe4985 100644 --- a/test_scripts/Policies/Related_HMI_API/181_ATF_GetUserFriendlyMessage_Language_not_found_in_localPT.lua +++ b/test_scripts/Policies/Related_HMI_API/181_ATF_GetUserFriendlyMessage_Language_not_found_in_localPT.lua @@ -11,6 +11,8 @@ -- HMI->SDL: SDL.GetUserFriendlyMessage ("messageCodes": "AppPermissions") -- SDL->HMI: SDL.GetUserFriendlyMessage ("messages": {messageCode: "AppPermissions", ttsString: "%appName% is requesting the use of the following ....", line1: "Grant Requested", line2: "Permission(s)?"}) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/182_ATF_GetUserFriendlyMessage_with_Language.lua b/test_scripts/Policies/Related_HMI_API/182_ATF_GetUserFriendlyMessage_with_Language.lua index 2d7348c3ff..9f5a2556e4 100644 --- a/test_scripts/Policies/Related_HMI_API/182_ATF_GetUserFriendlyMessage_with_Language.lua +++ b/test_scripts/Policies/Related_HMI_API/182_ATF_GetUserFriendlyMessage_with_Language.lua @@ -11,6 +11,8 @@ -- HMI->SDL: SDL.GetUserFriendlyMessage ("messageCodes": "AppPermissions") -- SDL->HMI: SDL.GetUserFriendlyMessage ("messages": {messageCode: "AppPermissions", ttsString: "%appName% is requesting the use of the following ....", line1: "Grant Requested", line2: "Permission(s)?"}) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua b/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua index 482e7dd8ad..44b3ce91d7 100644 --- a/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua +++ b/test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua @@ -22,6 +22,8 @@ -- SDL->HMI: SDL.GetUserFriendlyMessage ("messages": -- {messageCode: "AppPermissions", ttsString: "%appName% is requesting the use of the following ....", line1: "Grant Requested", line2: "Permission(s)?"} ring: "%appName% is requesting the use of the following ....", line1: "Grant Requested", line2: "Permission(s)?"}) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/184_ATF_GetListOfPermissions_without_appID.lua b/test_scripts/Policies/Related_HMI_API/184_ATF_GetListOfPermissions_without_appID.lua index 96dba34758..cb3755de55 100644 --- a/test_scripts/Policies/Related_HMI_API/184_ATF_GetListOfPermissions_without_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/184_ATF_GetListOfPermissions_without_appID.lua @@ -12,6 +12,8 @@ -- On getting SDL.GetListOfPermissions without appID parameter, PoliciesManager must respond with the list of s -- that have the field "user_consent_prompt" in corresponding and are assigned to the currently registered applications (section "" -> "groups") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/185_ATF_GetListOfPermissions_with_appID.lua b/test_scripts/Policies/Related_HMI_API/185_ATF_GetListOfPermissions_with_appID.lua index 5bfe0158c9..31f3f39283 100644 --- a/test_scripts/Policies/Related_HMI_API/185_ATF_GetListOfPermissions_with_appID.lua +++ b/test_scripts/Policies/Related_HMI_API/185_ATF_GetListOfPermissions_with_appID.lua @@ -12,6 +12,8 @@ -- On getting SDL.GetListOfPermissions with appID parameter, PoliciesManager must respond with the list of s -- that have the field "user_consent_prompt" in corresponding and are assigned to the currently registered applications (section "" -> "groups") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua b/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua index 6b2c600a68..be8d5fbc36 100644 --- a/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua +++ b/test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua @@ -10,6 +10,8 @@ -- Expected result: -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua b/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua index 9727fcfcbf..60e423fe37 100644 --- a/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua +++ b/test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua @@ -22,6 +22,8 @@ -- 4. Status: UPDATING -- 6. Status: UP_TO_DATE --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua b/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua index 69b289d211..a5ca710393 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua @@ -14,6 +14,7 @@ -- Expected result: -- SDL must check the 'preloaded_date' param in Preloaded PT on IVSU during every start of SDL --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --[[ General configuration parameters ]] Test = require('connecttest') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua b/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua index 3556763458..78c7a9bc57 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua @@ -18,6 +18,8 @@ -- a) assign "RequestType" field from "default" section of PolicyDataBase to such app -- b) copy "RequestType" field from "default" section to "" section of PolicyDataBase --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua b/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua index c1626bf471..0291fba97e 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL must: cut off the invalid value of "RequestType" array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua b/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua index cfdc5206e6..87899f9689 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua @@ -18,6 +18,8 @@ -- a) assign "RequestType" field from "default" section of PolicyDataBase to such app -- b) copy "RequestType" field from "default" section to "" section of PolicyDataBase --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua b/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua index dd1c655fa8..8403a89e06 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL must: increment "count_sync_out_of_memory" section value of Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua b/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua index 8d70da5a3c..1c0c63e0ea 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL must: increment "count_of_sync_reboots" section value of Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/229_ATF_usage_and_error_counts_update_count_of_iap_buffer_full.lua b/test_scripts/Policies/Validation_of_PolicyTables/229_ATF_usage_and_error_counts_update_count_of_iap_buffer_full.lua index 9fb58ce13e..66aafa50ec 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/229_ATF_usage_and_error_counts_update_count_of_iap_buffer_full.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/229_ATF_usage_and_error_counts_update_count_of_iap_buffer_full.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL must: increment "count_of_iap_buffer_full" section value of Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + config.defaultProtocolVersion = 2 --[[ Required Shared libraries ]] diff --git a/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua b/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua index 01a9736d18..6f16ee17ab 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL must: increment value of "minutes_in_hmi_none" for this minutes in Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua b/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua index c9653b1aaa..5ded695738 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL must: increment value of "minutes_in_hmi_limited" for this minutes in Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.isMediaApplication = true diff --git a/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua b/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua index dddafca461..cae5303d37 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua @@ -25,6 +25,7 @@ -- Expected result: -- SDL must: increment value of "minutes_in_hmi_full" for this minutes in Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) --[[ General configuration parameters ]] Test = require('connecttest') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua b/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua index 016505bf73..9cf1601b1b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL must: increment value of "minutes_in_hmi_none" for this minutes in Local Policy Table. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/234_ATF_preloaded_pt_validation_rules_for_omited_parameters_exist.lua b/test_scripts/Policies/Validation_of_PolicyTables/234_ATF_preloaded_pt_validation_rules_for_omited_parameters_exist.lua index a7e6a338e1..8a336f3dd1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/234_ATF_preloaded_pt_validation_rules_for_omited_parameters_exist.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/234_ATF_preloaded_pt_validation_rules_for_omited_parameters_exist.lua @@ -14,6 +14,8 @@ -- Expected result: -- PolicyManager shut SDL down --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/235_preloaded_pt_validation_rules_for_omited_parameters_absent.lua b/test_scripts/Policies/Validation_of_PolicyTables/235_preloaded_pt_validation_rules_for_omited_parameters_absent.lua index e20048dddd..672dd6ed1c 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/235_preloaded_pt_validation_rules_for_omited_parameters_absent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/235_preloaded_pt_validation_rules_for_omited_parameters_absent.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL continue working as assigned --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require ('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/236_preloaded_pt_validation_rules_for_optional_parameters.lua b/test_scripts/Policies/Validation_of_PolicyTables/236_preloaded_pt_validation_rules_for_optional_parameters.lua index d3887d85f7..b347a7c7ea 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/236_preloaded_pt_validation_rules_for_optional_parameters.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/236_preloaded_pt_validation_rules_for_optional_parameters.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL continue working as assigned --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/237_ATF_preloaded_pt_validation_rules_for_required_parameters.lua b/test_scripts/Policies/Validation_of_PolicyTables/237_ATF_preloaded_pt_validation_rules_for_required_parameters.lua index d26940543d..85bb58418b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/237_ATF_preloaded_pt_validation_rules_for_required_parameters.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/237_ATF_preloaded_pt_validation_rules_for_required_parameters.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL is shutdown --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/238_ATF_preloaded_pt_invalid_required_param.lua b/test_scripts/Policies/Validation_of_PolicyTables/238_ATF_preloaded_pt_invalid_required_param.lua index 9f89c8e581..ed0d87b7b7 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/238_ATF_preloaded_pt_invalid_required_param.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/238_ATF_preloaded_pt_invalid_required_param.lua @@ -14,6 +14,8 @@ -- Expected result: -- PolicyManager shut SDL down --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/239_ATF_preloaded_pt_invalid_optional_param.lua b/test_scripts/Policies/Validation_of_PolicyTables/239_ATF_preloaded_pt_invalid_optional_param.lua index a053832560..2b0905a912 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/239_ATF_preloaded_pt_invalid_optional_param.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/239_ATF_preloaded_pt_invalid_optional_param.lua @@ -14,6 +14,8 @@ -- Expected result: -- PolicyManager shut SDL down --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua b/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua index 7f1892583f..05de9851bf 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL started successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/241_ATF_preloaded_pt_exists_but_no_read_permissions.lua b/test_scripts/Policies/Validation_of_PolicyTables/241_ATF_preloaded_pt_exists_but_no_read_permissions.lua index 59e3c3a065..6fe697bc26 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/241_ATF_preloaded_pt_exists_but_no_read_permissions.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/241_ATF_preloaded_pt_exists_but_no_read_permissions.lua @@ -14,6 +14,8 @@ -- Expected result: -- PolicyManager shut SDL down --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/242_ATF_preloaded_pt_does_not_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/242_ATF_preloaded_pt_does_not_exists.lua index c74c152c57..30537960b9 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/242_ATF_preloaded_pt_does_not_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/242_ATF_preloaded_pt_does_not_exists.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL shutted down --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/243_ATF_preloaded_pt_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/243_ATF_preloaded_pt_exists.lua index 15f13496fa..13d58cf03d 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/243_ATF_preloaded_pt_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/243_ATF_preloaded_pt_exists.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL started successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/244_ATF_preloaded_pt_parameter_is_true_in_local_pt.lua b/test_scripts/Policies/Validation_of_PolicyTables/244_ATF_preloaded_pt_parameter_is_true_in_local_pt.lua index df43c093ce..cb4490fe6d 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/244_ATF_preloaded_pt_parameter_is_true_in_local_pt.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/244_ATF_preloaded_pt_parameter_is_true_in_local_pt.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL must consider LocalPT as PreloadedPolicyTable and start correctly --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require ('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua b/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua index e24560c654..ddb1e04a81 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL must change the value of "preloaded_pt" field to "false" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/246_ATF_preloaded_pt_requesttype_parameters_all_are_invalid.lua b/test_scripts/Policies/Validation_of_PolicyTables/246_ATF_preloaded_pt_requesttype_parameters_all_are_invalid.lua index 8f0aab1373..f22765f20b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/246_ATF_preloaded_pt_requesttype_parameters_all_are_invalid.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/246_ATF_preloaded_pt_requesttype_parameters_all_are_invalid.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL must shutdown --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua index 2e7fa03fd5..ac23626e95 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL must leave fields&values of "consumer_friendly_messages" section in LocalPT base without changes --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua index 049ba09ff9..8c9fcb4f05 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL must add fields&values of "consumer_friendly_messages" section to LocalPT based on updated PreloadedPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua b/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua index f46746407b..c6a65af97a 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL must overwrite fields&values of "consumer_friendly_messages" section at LocalPT based on updated PreloadedPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua index 3ae4037cf7..fded55d84d 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua @@ -16,6 +16,8 @@ -- leave the "" sub-section of "app_policies" section at LocalPT without changes -- overwrite fields&values of "default", "device", "pre_DataConsent" subsections based on updated PreloadedPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua b/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua index 15fccbda51..4f0fa965bc 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL must leave the "functional_group_name" sectionat LocalPT without changes (with all 3 groups) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua b/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua index 77a6071db1..3bf1ecf771 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL must add the "functional_group_name" sectionat LocalPT without changes (with all 4 groups) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/253_ATF_merge_preloaded_pt_into_local_pt_usage_and_error_counts.lua b/test_scripts/Policies/Validation_of_PolicyTables/253_ATF_merge_preloaded_pt_into_local_pt_usage_and_error_counts.lua index aff39422d5..7337ebb855 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/253_ATF_merge_preloaded_pt_into_local_pt_usage_and_error_counts.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/253_ATF_merge_preloaded_pt_into_local_pt_usage_and_error_counts.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL must leave all fields & their values of "usage_and_error_count" section as it was in the database without changes --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua b/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua index a49a6cd449..682734ac9f 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL must leave all fields & their values of "device_data" section as it was in the database without changes --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua b/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua index 487cfe3967..7278174e59 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL must merge all updates from PreloadedPT to existing database by rules --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua b/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua index 4a769ef8bb..82cf5ec475 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL must not update the created database --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua b/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua index 0bdcdfb664..7142c4d8d4 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua @@ -20,6 +20,8 @@ -- leave fields and values of "vehicle_make", “model”, “year” params as they were in the database without changes -- overwrite the values with the new ones from PreloadedPT for all other fields --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/258_ATF_pt_snapshot_path_is_correct.lua b/test_scripts/Policies/Validation_of_PolicyTables/258_ATF_pt_snapshot_path_is_correct.lua index 0a60a43a1c..36fa3a5595 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/258_ATF_pt_snapshot_path_is_correct.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/258_ATF_pt_snapshot_path_is_correct.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must continue working --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua b/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua index 92c9f7bd95..9ea9c7fce1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must shutdown --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --TODO(istoimenova): shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua b/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua index 7566b0acb1..e7bddecbbb 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL must populate the LocalPT with items from PreloadedPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/261_ATF_pt_snapshot_validation_rules_for_optional_parameters.lua b/test_scripts/Policies/Validation_of_PolicyTables/261_ATF_pt_snapshot_validation_rules_for_optional_parameters.lua index 07901cb804..d5a888aad2 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/261_ATF_pt_snapshot_validation_rules_for_optional_parameters.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/261_ATF_pt_snapshot_validation_rules_for_optional_parameters.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must store the PT snapshot with optional parameters and keep running --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/262_ATF_pt_snapshot_validation_rules_for_omitted_parameters.lua b/test_scripts/Policies/Validation_of_PolicyTables/262_ATF_pt_snapshot_validation_rules_for_omitted_parameters.lua index bd3f3201d3..9905995439 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/262_ATF_pt_snapshot_validation_rules_for_omitted_parameters.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/262_ATF_pt_snapshot_validation_rules_for_omitted_parameters.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must store the PT snapshot without omitted parameters and keep running --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/263_ATF_pt_snapshot_validation_rules_for_required_parameters.lua b/test_scripts/Policies/Validation_of_PolicyTables/263_ATF_pt_snapshot_validation_rules_for_required_parameters.lua index 9b771bfcc8..792f1c7167 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/263_ATF_pt_snapshot_validation_rules_for_required_parameters.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/263_ATF_pt_snapshot_validation_rules_for_required_parameters.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must store the PT snapshot without required parameters log the corresponding error internally and keep running --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua b/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua index 76a7ac4a8a..892fc062f8 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must copy the Local Policy Table into memory and remove "messages" sub-section from "consumer_friendly_messages" section and store information as PT snapshot --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local json = require("modules/json") local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua b/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua index 62049b1621..8cd40fd425 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must store the PT snapshot as a JSON file which filename and filepath are defined in "PathToSnapshot" parameter of smartDeviceLink.ini file. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') require('user_modules/AppTypes') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua b/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua index 246f530255..d29ca394f0 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL must invalidate this received PolicyTableUpdated and log corresponding error internally --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua b/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua index 1de7d4b824..59c5141ba7 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL must invalidate this received PolicyTableUpdated and log corresponding error internally --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local json = require("modules/json") local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua b/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua index 9b3f9ae03c..659d966dd3 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua @@ -18,6 +18,8 @@ --1) The validation should not reject tables that include fields with a status of ‘omitted,’ it will assume these are to be ignored. --2) Validation must reject a policy table update if it does not include fields with a status of ‘required.’ --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] -- local json = require("modules/json") local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua b/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua index cef9d9ab0b..4da02b16a3 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua @@ -16,6 +16,8 @@ -- Expected result: -- In case "en-us" sub-section for at least one is not found in PTUpdate , PoliciesManager must reject PTU and assume it as invalid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local json = require("modules/json") local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua index a520652ca6..ebf4d0c5e7 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua @@ -16,6 +16,8 @@ -- Expected result: -- PoliciesManager must validate "default_hmi" sub-section in "default" and treat it as valid -> PTU invalid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua index def747c286..9bb11e8e17 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "preconsented_groups" sub-section in "default" and treat it as valid -> PTU is valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua index f16cd28ef3..04b69fe1c2 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "groups" sub-section in "default" and treat it as valid -> PTU is valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua index 5498d915b3..536a6c3700 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua @@ -17,6 +17,8 @@ -- Expected result: -- PoliciesManager must validate "default_hmi" sub-section in "" and treat it as valid -> PTU valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/274_ATF_Validate_appID_and_steal_focus_false.lua b/test_scripts/Policies/Validation_of_PolicyTables/274_ATF_Validate_appID_and_steal_focus_false.lua index de85d5bfca..97c400e2a8 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/274_ATF_Validate_appID_and_steal_focus_false.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/274_ATF_Validate_appID_and_steal_focus_false.lua @@ -15,6 +15,8 @@ -- PoliciesManager must validate "steal_focus" section, SDL must reject RPC-> -- respond (resultCode:DISALLOWED, success:false) to mobile application --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/275_ATF_Validate_appID_and_steal_focus_true.lua b/test_scripts/Policies/Validation_of_PolicyTables/275_ATF_Validate_appID_and_steal_focus_true.lua index 07cf784da9..180c2ffaf1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/275_ATF_Validate_appID_and_steal_focus_true.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/275_ATF_Validate_appID_and_steal_focus_true.lua @@ -18,6 +18,8 @@ -- PoliciesManager must validate "steal_focus" section-> -- PoliciesManager must allow SDL to pass RPC --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/276_ATF_Validate_appID_and_keep_context_true.lua b/test_scripts/Policies/Validation_of_PolicyTables/276_ATF_Validate_appID_and_keep_context_true.lua index b939b3e956..5d0d6ea301 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/276_ATF_Validate_appID_and_keep_context_true.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/276_ATF_Validate_appID_and_keep_context_true.lua @@ -18,6 +18,8 @@ -- PoliciesManager must validate "keep_context" section-> -- PoliciesManager must allow SDL to pass RPC --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/277_ATF_Validate_appID_and_keep_context_false.lua b/test_scripts/Policies/Validation_of_PolicyTables/277_ATF_Validate_appID_and_keep_context_false.lua index af80b5cfe3..63c263d121 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/277_ATF_Validate_appID_and_keep_context_false.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/277_ATF_Validate_appID_and_keep_context_false.lua @@ -15,6 +15,8 @@ -- PoliciesManager must validate "keep_context" section, SDL must reject RPC-> -- respond (resultCode:DISALLOWED, success:false) to mobile application --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua index e653d543a4..021a75eb09 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua @@ -16,6 +16,8 @@ -- Expected result: -- PoliciesManager must validate "groups" sub-section in "" and treat it as valid -> PTU is valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/279_ATF_Store_vin_from_GetVehicleData_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/279_ATF_Store_vin_from_GetVehicleData_in_PT.lua index 748817ac0c..d2c8a6b912 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/279_ATF_Store_vin_from_GetVehicleData_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/279_ATF_Store_vin_from_GetVehicleData_in_PT.lua @@ -14,6 +14,8 @@ -- Policies Manager must request via VehicleInfo.GetVehicleData("vin") before LocalPT creation; -- PoliciesManager writes to "module_meta" section of created LocalPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua index 6a0fa2f6b7..30c23f0d66 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua @@ -18,6 +18,8 @@ -- Expected result: -- On successful PolicyTable exchange, Policies Manager must reset to "0" the value in 'ignition_cycles_since_last_exchange" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/281_ATF_Store_ignition_cycles_since_last_exchange_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/281_ATF_Store_ignition_cycles_since_last_exchange_in_PT.lua index a31eb8db13..b10658c775 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/281_ATF_Store_ignition_cycles_since_last_exchange_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/281_ATF_Store_ignition_cycles_since_last_exchange_in_PT.lua @@ -18,6 +18,8 @@ -- On getting BasicCommunication.OnIgnitionCycleOver from HMI, -- Pollicies Manager must increment the value in 'ignition_cycles_since_last_exchange' section of LocalPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/282_ATF_PT_Exchanged_X_Days_After_Epoch_In_PTS.lua b/test_scripts/Policies/Validation_of_PolicyTables/282_ATF_PT_Exchanged_X_Days_After_Epoch_In_PTS.lua index 3cfb6aa880..a1c40e0ace 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/282_ATF_PT_Exchanged_X_Days_After_Epoch_In_PTS.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/282_ATF_PT_Exchanged_X_Days_After_Epoch_In_PTS.lua @@ -14,6 +14,8 @@ -- Expected result: -- a) pt_exchanged_x_days_after_epoch value is equal to time of successfully updating --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua index ec045c0076..147e89777f 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua @@ -17,6 +17,8 @@ -- Pollicies Manager requests the value of 'pt_exchanged_at_odometer_x' via VehicleInfo.GetVehicleData ("odometer"); -- value must be stored in LocalPT in "pt_exchanged_at_odometer_x" of "meta_data" section --------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/284_ATF_Store_wers_country_code_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/284_ATF_Store_wers_country_code_in_PT.lua index 6e8029cb58..c8f5d373e1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/284_ATF_Store_wers_country_code_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/284_ATF_Store_wers_country_code_in_PT.lua @@ -16,6 +16,8 @@ -- SDL must send GetSystemInfo to HMI; -- SDL must set received value to "wers_country_code" section of "module_meta" section in PolicyTable --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/285_ATF_Store_language_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/285_ATF_Store_language_in_PT.lua index 02479ac53c..0b3362ee66 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/285_ATF_Store_language_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/285_ATF_Store_language_in_PT.lua @@ -16,6 +16,8 @@ -- SDL must send GetSystemInfo to HMI; -- SDL must set received value to "language" section of "module_meta" section in PolicyTable --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/286_ATF_RAI_ccpu_version_via_GetSystemInfo.lua b/test_scripts/Policies/Validation_of_PolicyTables/286_ATF_RAI_ccpu_version_via_GetSystemInfo.lua index 89bc898936..01ba1151b8 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/286_ATF_RAI_ccpu_version_via_GetSystemInfo.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/286_ATF_RAI_ccpu_version_via_GetSystemInfo.lua @@ -14,6 +14,8 @@ -- SDL must request 'ccpu_version' parameter from HMI via GetSystemInfo HMI API; -- SDL must request 'ccpu_version' ONLY once in ign cycle --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua b/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua index 390b15eb5e..353a46f8e2 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua @@ -16,6 +16,8 @@ -- Expected result: -- PoliciesManager must validate "appHMIType" sub-section in "" and treat it as valid -> PTU is valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/288_ATF_EmptyArray_preconsented_groups_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/288_ATF_EmptyArray_preconsented_groups_preDataConsent.lua index 084f3e8d5d..f2e9d241f5 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/288_ATF_EmptyArray_preconsented_groups_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/288_ATF_EmptyArray_preconsented_groups_preDataConsent.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "preconsented_groups" sub-section in "pre_DataConsent" and treat it as invalid -> PTU invalid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/289_ATF_EmptyValue_preconsented_groups_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/289_ATF_EmptyValue_preconsented_groups_preDataConsent.lua index e8c41d0cb7..5e1c7c21bd 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/289_ATF_EmptyValue_preconsented_groups_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/289_ATF_EmptyValue_preconsented_groups_preDataConsent.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "preconsented_groups" sub-section in "pre_DataConsent" and treat it as invalid -> PTU invalid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/290_ATF_Nonfunctional_preconsented_groups_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/290_ATF_Nonfunctional_preconsented_groups_preDataConsent.lua index b777edbf11..930cf233d5 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/290_ATF_Nonfunctional_preconsented_groups_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/290_ATF_Nonfunctional_preconsented_groups_preDataConsent.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "preconsented_groups" sub-section in "pre_DataConsent" and treat it as invalid -> PTU invalid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/291_ATF_Valid_preconsented_groups_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/291_ATF_Valid_preconsented_groups_preDataConsent.lua index 8e2fb83708..773912c5f6 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/291_ATF_Valid_preconsented_groups_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/291_ATF_Valid_preconsented_groups_preDataConsent.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "preconsented_groups" sub-section in "pre_DataConsent" and treat it as valid->PTU is valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/292_ATF_Valid_default_hmi_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/292_ATF_Valid_default_hmi_preDataConsent.lua index 26c03c00ea..d04a5242c0 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/292_ATF_Valid_default_hmi_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/292_ATF_Valid_default_hmi_preDataConsent.lua @@ -15,6 +15,8 @@ -- Expected result: -- PoliciesManager must validate "default_hmi"(BACKGROUND) sub-section in "pre_DataConsent" and treat it valid --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua index cb48b2f858..7a6ee7ec4b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua @@ -16,6 +16,8 @@ -- Expected result: -- PoliciesManager must not provide to HMI the app`s priority value --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua b/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua index d8d1542f82..f1c54b2fde 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua @@ -17,6 +17,8 @@ -- Expected result: -- PoliciesManager must not provide to HMI the app`s priority value --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/295_ATF_Validate_preDataConsent_and_stealFocus_false.lua b/test_scripts/Policies/Validation_of_PolicyTables/295_ATF_Validate_preDataConsent_and_stealFocus_false.lua index b27286fd46..97d257f08a 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/295_ATF_Validate_preDataConsent_and_stealFocus_false.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/295_ATF_Validate_preDataConsent_and_stealFocus_false.lua @@ -15,6 +15,8 @@ -- PoliciesManager must validate "steal_focus" section, SDL must reject RPC-> -- respond (resultCode:DISALLOWED, success:false) to mobile application --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/296_ATF_Validate_preDataConsent_and_stealFocus_true.lua b/test_scripts/Policies/Validation_of_PolicyTables/296_ATF_Validate_preDataConsent_and_stealFocus_true.lua index 7a0af50df7..5a4e74a2a1 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/296_ATF_Validate_preDataConsent_and_stealFocus_true.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/296_ATF_Validate_preDataConsent_and_stealFocus_true.lua @@ -15,6 +15,8 @@ -- PoliciesManager must validate "steal_focus" section-> -- PoliciesManager must allow SDL to pas RPC --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/297_ATF_Validate_preDataConsent_and_keepContext_false.lua b/test_scripts/Policies/Validation_of_PolicyTables/297_ATF_Validate_preDataConsent_and_keepContext_false.lua index bb54d76fb8..96b79dd3e2 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/297_ATF_Validate_preDataConsent_and_keepContext_false.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/297_ATF_Validate_preDataConsent_and_keepContext_false.lua @@ -15,6 +15,8 @@ -- PoliciesManager must validate "keep_context" section, SDL must reject RPC-> -- respond (resultCode:DISALLOWED, success:false) to mobile application --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General Settings for configuration ]] Test = require('connecttest') require('cardinalities') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/298_ATF_Validate_preDataConsent_and_keepContext_true.lua b/test_scripts/Policies/Validation_of_PolicyTables/298_ATF_Validate_preDataConsent_and_keepContext_true.lua index 91be927c4e..c2b8781076 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/298_ATF_Validate_preDataConsent_and_keepContext_true.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/298_ATF_Validate_preDataConsent_and_keepContext_true.lua @@ -15,6 +15,8 @@ -- PoliciesManager must validate "keep_context" section-> -- PoliciesManager must allow SDL to pass RPC --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua b/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua index 9ead07f99a..64ac2ec9d8 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua @@ -17,6 +17,8 @@ -- a) PutFile SUCCESS resultCode - memory_kb parameter is ignored for app -- b) PutFile OUT_OF_MEMORY resultCode - AppDirectoryQuota applies for app --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua index 80a6bf13a9..e2b8aca882 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua @@ -17,6 +17,8 @@ -- Expected result: -- a) SDL send HB with time specified in pre_DataConsent section (4000 ms) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua b/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua index 3bb4f6b6e8..98a9375b62 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua @@ -16,6 +16,8 @@ -- SDL must: must write "languageDesired" value received via RegisterAppInterface into Local Policy Table -- as "app_registration_language_vui" key value of "usage_and_error_counts"- >"app_level" - > section. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/302_ATF_HP_Applying_Heart_Beat_Timeout_Ms_After_PTU.lua b/test_scripts/Policies/Validation_of_PolicyTables/302_ATF_HP_Applying_Heart_Beat_Timeout_Ms_After_PTU.lua index 9dd96c6a93..cb10eee930 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/302_ATF_HP_Applying_Heart_Beat_Timeout_Ms_After_PTU.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/302_ATF_HP_Applying_Heart_Beat_Timeout_Ms_After_PTU.lua @@ -18,6 +18,8 @@ -- Expected result: -- a) SDL send HB with time specified in pre_DataConsent section (4000 ms) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/Validation_of_PolicyTables/303_ATF_HP_Usage_And_Error_Counts_For_AppID.lua b/test_scripts/Policies/Validation_of_PolicyTables/303_ATF_HP_Usage_And_Error_Counts_For_AppID.lua index d9394800c7..99bcadb22b 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/303_ATF_HP_Usage_And_Error_Counts_For_AppID.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/303_ATF_HP_Usage_And_Error_Counts_For_AppID.lua @@ -14,6 +14,8 @@ -- Expected result: -- a) App present in usage_and_error_counts section in PTS --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/304_ATF_HP_Validation_Count_Of_User_Selections.lua b/test_scripts/Policies/Validation_of_PolicyTables/304_ATF_HP_Validation_Count_Of_User_Selections.lua index 2782e63e8d..2e99310f57 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/304_ATF_HP_Validation_Count_Of_User_Selections.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/304_ATF_HP_Validation_Count_Of_User_Selections.lua @@ -17,6 +17,8 @@ -- Expected result: -- a) "count_of_user_selections" in PTS is equal actual numbers of app activation --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua index 554a74dbac..46bdab8d70 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua @@ -21,6 +21,8 @@ -- Expected result: -- PoliciesManager increments "count_of_run_attempts_while_revoked" at PolicyTable --------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/307_ATF_Validate_preDataConsent_RequestType_disallowed.lua b/test_scripts/Policies/Validation_of_PolicyTables/307_ATF_Validate_preDataConsent_RequestType_disallowed.lua index e67de731cb..5e424d88bb 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/307_ATF_Validate_preDataConsent_RequestType_disallowed.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/307_ATF_Validate_preDataConsent_RequestType_disallowed.lua @@ -17,6 +17,8 @@ -- Expected result: -- PoliciesManager must ignore RPC, SDL must respond (resultCode:DISALLOWED, success:false) to mobile application --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --[ToDo: should be removed when fixed: "ATF does not stop HB timers by closing session and connection" config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua index f90a07b7a1..e81781f59e 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua @@ -19,6 +19,8 @@ -- Expected: -- 4. PolciesManager writes to "app_registration_language_gui" field at LocalPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/309_ATF_Check_count_of_rejected_rpcs_calls.lua b/test_scripts/Policies/Validation_of_PolicyTables/309_ATF_Check_count_of_rejected_rpcs_calls.lua index ad3ad013c0..8ec21fda3c 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/309_ATF_Check_count_of_rejected_rpcs_calls.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/309_ATF_Check_count_of_rejected_rpcs_calls.lua @@ -19,6 +19,8 @@ -- Expected: -- PoliciesManager increments "count_of_rejected_rpcs_calls" field at PolicyTable --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/Validation_of_PolicyTables/310_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua b/test_scripts/Policies/Validation_of_PolicyTables/310_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua index aeb60e1cc0..09241e6bda 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/310_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/310_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua @@ -28,6 +28,8 @@ -- Thic --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/Validation_of_PolicyTables/311_ATF_Check_count_of_removals_for_bad_behavior_too_many_pending_requests.lua b/test_scripts/Policies/Validation_of_PolicyTables/311_ATF_Check_count_of_removals_for_bad_behavior_too_many_pending_requests.lua index 5c9fa5e924..7d3ea4264e 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/311_ATF_Check_count_of_removals_for_bad_behavior_too_many_pending_requests.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/311_ATF_Check_count_of_removals_for_bad_behavior_too_many_pending_requests.lua @@ -22,6 +22,8 @@ -- Application is unregistered: SDL->appID: OnAppUnregistered(TOO_MANY_REQUESTS) -- PoliciesManager increments value of --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/Validation_of_PolicyTables/312_ATF_Check_count_of_removals_for_bad_behavior_too_many_requests.lua b/test_scripts/Policies/Validation_of_PolicyTables/312_ATF_Check_count_of_removals_for_bad_behavior_too_many_requests.lua index 4e0037a3b0..06b347e6c6 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/312_ATF_Check_count_of_removals_for_bad_behavior_too_many_requests.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/312_ATF_Check_count_of_removals_for_bad_behavior_too_many_requests.lua @@ -24,6 +24,8 @@ -- Expected: -- 3. PoliciesManager increments value of --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/Validation_of_PolicyTables/313_ATF_Check_count_of_rpcs_sent_in_hmi_none.lua b/test_scripts/Policies/Validation_of_PolicyTables/313_ATF_Check_count_of_rpcs_sent_in_hmi_none.lua index b780e6d4a7..ec1d195b81 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/313_ATF_Check_count_of_rpcs_sent_in_hmi_none.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/313_ATF_Check_count_of_rpcs_sent_in_hmi_none.lua @@ -17,6 +17,8 @@ -- Expected: -- 2. PoliciesManager increment "count_of_rpcs_sent_in_hmi_none" at LocalPT for this app --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua b/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua index dd917eab13..4026c20534 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua @@ -17,6 +17,8 @@ -- Expected: -- 3. PoliciesMananger increments "count_of_rejections_duplicate_name" filed at PolicyTable --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/appID_Management/031_ATF_Register_App_Interface_App_Unauthorized.lua b/test_scripts/Policies/appID_Management/031_ATF_Register_App_Interface_App_Unauthorized.lua index 1c281e84dc..45cab52f0f 100644 --- a/test_scripts/Policies/appID_Management/031_ATF_Register_App_Interface_App_Unauthorized.lua +++ b/test_scripts/Policies/appID_Management/031_ATF_Register_App_Interface_App_Unauthorized.lua @@ -21,6 +21,8 @@ -- currently registered appName is different from value in policy table -> -- SDL->app: OnAppInterfaceUnregistered (APP_UNAUTHORIZED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/appID_Management/032_ATF_Register_App_Interface_Successful_Nickname_Validation.lua b/test_scripts/Policies/appID_Management/032_ATF_Register_App_Interface_Successful_Nickname_Validation.lua index d8fd79eb7b..884b25b6de 100644 --- a/test_scripts/Policies/appID_Management/032_ATF_Register_App_Interface_Successful_Nickname_Validation.lua +++ b/test_scripts/Policies/appID_Management/032_ATF_Register_App_Interface_Successful_Nickname_Validation.lua @@ -21,6 +21,8 @@ -- SDL must successfully register such application: -- RegisterAppInterface_response (, success: true) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/appID_Management/033_ATF_Register_App_Interface_Order_Of_Nickname_Validation.lua b/test_scripts/Policies/appID_Management/033_ATF_Register_App_Interface_Order_Of_Nickname_Validation.lua index 7b82d2675a..5c2c48c6c8 100644 --- a/test_scripts/Policies/appID_Management/033_ATF_Register_App_Interface_Order_Of_Nickname_Validation.lua +++ b/test_scripts/Policies/appID_Management/033_ATF_Register_App_Interface_Order_Of_Nickname_Validation.lua @@ -22,6 +22,8 @@ -- Expected result: -- SDL returns RegisterAppInterface's response (DISALLOWED, success: false) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") diff --git a/test_scripts/Policies/appID_Management/034_ATF_Register_App_Interface_Disallowed.lua b/test_scripts/Policies/appID_Management/034_ATF_Register_App_Interface_Disallowed.lua index 356b605b55..57551418ec 100644 --- a/test_scripts/Policies/appID_Management/034_ATF_Register_App_Interface_Disallowed.lua +++ b/test_scripts/Policies/appID_Management/034_ATF_Register_App_Interface_Disallowed.lua @@ -18,6 +18,8 @@ -- Expected result: -- SDL must respond with the following data: success = false, resultCode = "DISALLOWED" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") diff --git a/test_scripts/Policies/appID_Management/035_ATF_Register_App_Interface_Case-insensitivity_Of_AppName.lua b/test_scripts/Policies/appID_Management/035_ATF_Register_App_Interface_Case-insensitivity_Of_AppName.lua index 27d28db454..67ed147c30 100644 --- a/test_scripts/Policies/appID_Management/035_ATF_Register_App_Interface_Case-insensitivity_Of_AppName.lua +++ b/test_scripts/Policies/appID_Management/035_ATF_Register_App_Interface_Case-insensitivity_Of_AppName.lua @@ -19,6 +19,8 @@ -- Expected result: -- SDL must respond with the following data: success = true, resultCode = "SUCCESS" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") diff --git a/test_scripts/Policies/appID_Management/036_ATF_Change_Registration_Disallowed.lua b/test_scripts/Policies/appID_Management/036_ATF_Change_Registration_Disallowed.lua index ee418bbaaf..578d903bef 100644 --- a/test_scripts/Policies/appID_Management/036_ATF_Change_Registration_Disallowed.lua +++ b/test_scripts/Policies/appID_Management/036_ATF_Change_Registration_Disallowed.lua @@ -18,6 +18,8 @@ -- Expected result: -- Response has the following data: success = false, resultCode = "DISALLOWED" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") diff --git a/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua b/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua index 251d13dc88..83da2dcca3 100644 --- a/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua +++ b/test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua @@ -23,6 +23,8 @@ -- Status of response: sucess = false, resultCode = "DISALLOWED" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") diff --git a/test_scripts/Policies/appID_Management/038_ATF_Register_App_Interface_Without_Data_Consent_Assign_pre_DataConsent_Policies.lua b/test_scripts/Policies/appID_Management/038_ATF_Register_App_Interface_Without_Data_Consent_Assign_pre_DataConsent_Policies.lua index 9c3fbc3ec8..1618ec072a 100644 --- a/test_scripts/Policies/appID_Management/038_ATF_Register_App_Interface_Without_Data_Consent_Assign_pre_DataConsent_Policies.lua +++ b/test_scripts/Policies/appID_Management/038_ATF_Register_App_Interface_Without_Data_Consent_Assign_pre_DataConsent_Policies.lua @@ -18,6 +18,8 @@ -- 1. sdl_snapshot is created. -- 2. Application is added to policy and assigns pre_DataConsent group --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/appID_Management/039_ATF_Register_App_Interface_With_Data_Consent_Assign_Default_Policies.lua b/test_scripts/Policies/appID_Management/039_ATF_Register_App_Interface_With_Data_Consent_Assign_Default_Policies.lua index 274151146b..4301f8a510 100644 --- a/test_scripts/Policies/appID_Management/039_ATF_Register_App_Interface_With_Data_Consent_Assign_Default_Policies.lua +++ b/test_scripts/Policies/appID_Management/039_ATF_Register_App_Interface_With_Data_Consent_Assign_Default_Policies.lua @@ -24,6 +24,8 @@ -- Status of response: success = true, resultCode = "SUCCESS" for PutFile -- Status of response: success = false, resultCode = "DISALLOWED" for GetVehicleData --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/appID_Management/040_ATF_Register_App_Interface_Case-insensitivity_Of_AppId.lua b/test_scripts/Policies/appID_Management/040_ATF_Register_App_Interface_Case-insensitivity_Of_AppId.lua index 86a9a08789..f0ba7ab837 100644 --- a/test_scripts/Policies/appID_Management/040_ATF_Register_App_Interface_Case-insensitivity_Of_AppId.lua +++ b/test_scripts/Policies/appID_Management/040_ATF_Register_App_Interface_Case-insensitivity_Of_AppId.lua @@ -19,6 +19,8 @@ -- SDL must allow application registration, not considering the case letters when comparing -- with appID from policies: SDL->appID: SUCCESS: RegisterAppInterface() --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local testCasesForPolicyAppIdManagament = require("user_modules/shared_testcases/testCasesForPolicyAppIdManagament") diff --git a/test_scripts/Policies/appID_Management/041_ATF_OnAppPermissionChanged_appRevoked_true.lua b/test_scripts/Policies/appID_Management/041_ATF_OnAppPermissionChanged_appRevoked_true.lua index c8445d8bb8..54e5eebe04 100644 --- a/test_scripts/Policies/appID_Management/041_ATF_OnAppPermissionChanged_appRevoked_true.lua +++ b/test_scripts/Policies/appID_Management/041_ATF_OnAppPermissionChanged_appRevoked_true.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL -> HMI: OnAppPermissionChanged (, appRevoked=true, params) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/appID_Management/042_ATF_PolicyTable_RAI_with_NULL_policies_RPCs_DISALLOWED.lua b/test_scripts/Policies/appID_Management/042_ATF_PolicyTable_RAI_with_NULL_policies_RPCs_DISALLOWED.lua index d57042157a..fe51616bce 100644 --- a/test_scripts/Policies/appID_Management/042_ATF_PolicyTable_RAI_with_NULL_policies_RPCs_DISALLOWED.lua +++ b/test_scripts/Policies/appID_Management/042_ATF_PolicyTable_RAI_with_NULL_policies_RPCs_DISALLOWED.lua @@ -12,6 +12,8 @@ -- 2. MOB-SDL - send the list of RPCs -- 3. SDL responce, success = false, resultCode = "DISALLOWED" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/appID_Management/043_ATF_HMI_Status_Appid_Gets_Null_In_Case_Of_PTU.lua b/test_scripts/Policies/appID_Management/043_ATF_HMI_Status_Appid_Gets_Null_In_Case_Of_PTU.lua index f09d2e95c1..10aff29d9d 100644 --- a/test_scripts/Policies/appID_Management/043_ATF_HMI_Status_Appid_Gets_Null_In_Case_Of_PTU.lua +++ b/test_scripts/Policies/appID_Management/043_ATF_HMI_Status_Appid_Gets_Null_In_Case_Of_PTU.lua @@ -20,6 +20,8 @@ -- OnHMIStatus: hmiLevel="NONE", systemContext="MAIN", audioStreamingState="NOT_AUDIBLE" -- --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appName = "App1" config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } diff --git a/test_scripts/Policies/appID_Management/044_ATF_HMI_Status_Value_Of_AppId_In_PT_Is_Null.lua b/test_scripts/Policies/appID_Management/044_ATF_HMI_Status_Value_Of_AppId_In_PT_Is_Null.lua index f34321f3d7..8f716a56f1 100644 --- a/test_scripts/Policies/appID_Management/044_ATF_HMI_Status_Value_Of_AppId_In_PT_Is_Null.lua +++ b/test_scripts/Policies/appID_Management/044_ATF_HMI_Status_Value_Of_AppId_In_PT_Is_Null.lua @@ -18,6 +18,8 @@ -- 1. status = "REJECTED" -- 2. hmiLevel = "NONE" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appName = "App1" config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } diff --git a/test_scripts/Policies/appID_Management/045_ATF_Register_App_Interface_Assign_Default_Policies_To_Application_Which_Appid_Does_Not_Exist_In_LPT.lua b/test_scripts/Policies/appID_Management/045_ATF_Register_App_Interface_Assign_Default_Policies_To_Application_Which_Appid_Does_Not_Exist_In_LPT.lua index e36ab81985..7d0be2af39 100644 --- a/test_scripts/Policies/appID_Management/045_ATF_Register_App_Interface_Assign_Default_Policies_To_Application_Which_Appid_Does_Not_Exist_In_LPT.lua +++ b/test_scripts/Policies/appID_Management/045_ATF_Register_App_Interface_Assign_Default_Policies_To_Application_Which_Appid_Does_Not_Exist_In_LPT.lua @@ -17,6 +17,8 @@ -- Expected result: -- Default permissions is assigned for app --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/appID_Management/046_ATF_Register_App_Interface_Assign_Existing_Policies_To_Application_Which_Appid_Exists_In_LPT.lua b/test_scripts/Policies/appID_Management/046_ATF_Register_App_Interface_Assign_Existing_Policies_To_Application_Which_Appid_Exists_In_LPT.lua index e2f35ec422..50a6a943c2 100644 --- a/test_scripts/Policies/appID_Management/046_ATF_Register_App_Interface_Assign_Existing_Policies_To_Application_Which_Appid_Exists_In_LPT.lua +++ b/test_scripts/Policies/appID_Management/046_ATF_Register_App_Interface_Assign_Existing_Policies_To_Application_Which_Appid_Exists_In_LPT.lua @@ -18,6 +18,8 @@ -- Expected result: -- Permissions in payload of OnPermissionsChange() notification is the same as defined in LPT (specific) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/047_ATF_SDL_Build_DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua b/test_scripts/Policies/build_options/047_ATF_SDL_Build_DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua index fc54cc2a2b..4e1abde636 100644 --- a/test_scripts/Policies/build_options/047_ATF_SDL_Build_DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/047_ATF_SDL_Build_DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua @@ -15,6 +15,8 @@ -- PTU passes successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/048_ATF_SDL_Build_Flag_DEXTENDED_POLICY_PROPRIETARY.lua b/test_scripts/Policies/build_options/048_ATF_SDL_Build_Flag_DEXTENDED_POLICY_PROPRIETARY.lua index ec1831c380..f7f8eeabac 100644 --- a/test_scripts/Policies/build_options/048_ATF_SDL_Build_Flag_DEXTENDED_POLICY_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/048_ATF_SDL_Build_Flag_DEXTENDED_POLICY_PROPRIETARY.lua @@ -15,6 +15,8 @@ -- PTU passes successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/050_ATF_Request_PTU_Trigger_PTU_failed_previous_IGN_ON_HTTP.lua b/test_scripts/Policies/build_options/050_ATF_Request_PTU_Trigger_PTU_failed_previous_IGN_ON_HTTP.lua index ebd8a953af..495c8b7b4f 100644 --- a/test_scripts/Policies/build_options/050_ATF_Request_PTU_Trigger_PTU_failed_previous_IGN_ON_HTTP.lua +++ b/test_scripts/Policies/build_options/050_ATF_Request_PTU_Trigger_PTU_failed_previous_IGN_ON_HTTP.lua @@ -21,6 +21,8 @@ -- PTU is requested. PTS is created. -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } config.ExitOnCrash = false diff --git a/test_scripts/Policies/build_options/051_ATF_Policy_Table_Update_Trigger_After_N_Kilometers_HTTP.lua b/test_scripts/Policies/build_options/051_ATF_Policy_Table_Update_Trigger_After_N_Kilometers_HTTP.lua index 52090230b6..bc4378f7d5 100644 --- a/test_scripts/Policies/build_options/051_ATF_Policy_Table_Update_Trigger_After_N_Kilometers_HTTP.lua +++ b/test_scripts/Policies/build_options/051_ATF_Policy_Table_Update_Trigger_After_N_Kilometers_HTTP.lua @@ -25,6 +25,8 @@ -- Expected result: -- PTU flow started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] --ToDo: Should be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua b/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua index a367a75242..425e447e38 100644 --- a/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua +++ b/test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua @@ -18,6 +18,8 @@ -- gets equal to the value of field "exchange_after_x_ignition_cycles" ("module_config" section) ----PTU sequence is triggered and SDL sends to HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] Test = require('connecttest') diff --git a/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua b/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua index adbcd44527..8d91ca6381 100644 --- a/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua +++ b/test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua @@ -18,6 +18,8 @@ -- SDL initiates PTU: SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- PTS is created by SDL: SDL-> HMI: SDL.PolicyUpdate() //PTU sequence started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/054_ATF_Request_PTU_UPDATE_NEEDED_new_PTU_Request_HTTP.lua b/test_scripts/Policies/build_options/054_ATF_Request_PTU_UPDATE_NEEDED_new_PTU_Request_HTTP.lua index fd526b008a..286b665a7a 100644 --- a/test_scripts/Policies/build_options/054_ATF_Request_PTU_UPDATE_NEEDED_new_PTU_Request_HTTP.lua +++ b/test_scripts/Policies/build_options/054_ATF_Request_PTU_UPDATE_NEEDED_new_PTU_Request_HTTP.lua @@ -17,6 +17,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/055_ATF_Policy_Table_Snapshot_Creation_HTTP.lua b/test_scripts/Policies/build_options/055_ATF_Policy_Table_Snapshot_Creation_HTTP.lua index bd845b99fc..8962f03121 100644 --- a/test_scripts/Policies/build_options/055_ATF_Policy_Table_Snapshot_Creation_HTTP.lua +++ b/test_scripts/Policies/build_options/055_ATF_Policy_Table_Snapshot_Creation_HTTP.lua @@ -14,6 +14,8 @@ -- PTU is requested. PTS is created. -- For HTTP sdl_snapshot.json is not saved to file system. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/056_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_HTTP.lua b/test_scripts/Policies/build_options/056_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_HTTP.lua index d7049ba0b4..614cb91acf 100644 --- a/test_scripts/Policies/build_options/056_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_HTTP.lua +++ b/test_scripts/Policies/build_options/056_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_HTTP.lua @@ -20,6 +20,8 @@ -- SDL chooses randomly between the app_2, app_3, app_4 to send OnSystemRequest -- app_1 doesn't take part in PTU (except of the case when app_1 is the only application being run on SDL) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/057_ATF_PTS_Define_URL_to_send_PTS_HTTP.lua b/test_scripts/Policies/build_options/057_ATF_PTS_Define_URL_to_send_PTS_HTTP.lua index 707bdde61e..04ee3b766a 100644 --- a/test_scripts/Policies/build_options/057_ATF_PTS_Define_URL_to_send_PTS_HTTP.lua +++ b/test_scripts/Policies/build_options/057_ATF_PTS_Define_URL_to_send_PTS_HTTP.lua @@ -18,6 +18,8 @@ -- SDL.GetURLs({urls[] = default}, (, appID)) -- SDL-> ->OnSystemRequest(params, url, timeout) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/058_ATF_HMI_gets_URLs_via_GetPolicyConfigurationData_HTTP.lua b/test_scripts/Policies/build_options/058_ATF_HMI_gets_URLs_via_GetPolicyConfigurationData_HTTP.lua index 7ed9b95da2..9bf8fd8bb0 100644 --- a/test_scripts/Policies/build_options/058_ATF_HMI_gets_URLs_via_GetPolicyConfigurationData_HTTP.lua +++ b/test_scripts/Policies/build_options/058_ATF_HMI_gets_URLs_via_GetPolicyConfigurationData_HTTP.lua @@ -19,6 +19,8 @@ -- PTU is requested. PTS is created. -- SDL.GetPolicyConfigurationData({value = }) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/060_ATF_Timeout_to_wait_response_PTU_HTTP.lua b/test_scripts/Policies/build_options/060_ATF_Timeout_to_wait_response_PTU_HTTP.lua index f6544ac995..036e9d2666 100644 --- a/test_scripts/Policies/build_options/060_ATF_Timeout_to_wait_response_PTU_HTTP.lua +++ b/test_scripts/Policies/build_options/060_ATF_Timeout_to_wait_response_PTU_HTTP.lua @@ -15,6 +15,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI:BC.PolicyUpdate(file, timeout, retry[]) where --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua b/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua index 632ff3b984..42cdb6af5f 100644 --- a/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua +++ b/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua @@ -19,6 +19,8 @@ -- Expected result: -- SDL->app: OnSystemRequest ('url', requestType:HTTP, fileType="JSON", appID) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/062_ATF_Timeout_Countdown_Start_PTU_Response_HTTP.lua b/test_scripts/Policies/build_options/062_ATF_Timeout_Countdown_Start_PTU_Response_HTTP.lua index bcb70eac89..a3fc3edac7 100644 --- a/test_scripts/Policies/build_options/062_ATF_Timeout_Countdown_Start_PTU_Response_HTTP.lua +++ b/test_scripts/Policies/build_options/062_ATF_Timeout_Countdown_Start_PTU_Response_HTTP.lua @@ -22,6 +22,8 @@ --SDL waits for SystemRequest response from within 'timeout' value, --if no obtained, it starts retry sequence --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua b/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua index 1e82ad407f..019656a4b1 100644 --- a/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua +++ b/test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua @@ -21,6 +21,8 @@ -- Expected result: -- SDL->HMI: SDL.OnStatusUpdate(UPDATING) right after SDL->app: OnSystemRequest --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/064_ATF_Received_PTU_From_Mobile_Application_HTTP.lua b/test_scripts/Policies/build_options/064_ATF_Received_PTU_From_Mobile_Application_HTTP.lua index 8e9a24e851..ddca9f2b18 100644 --- a/test_scripts/Policies/build_options/064_ATF_Received_PTU_From_Mobile_Application_HTTP.lua +++ b/test_scripts/Policies/build_options/064_ATF_Received_PTU_From_Mobile_Application_HTTP.lua @@ -20,6 +20,8 @@ -- Expected result: -- LPT is updated successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua b/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua index 0101f9ed34..71b997bb43 100644 --- a/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua +++ b/test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua @@ -20,6 +20,8 @@ -- Expected result: -- SDL->HMI: OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/067_ATF_PoliciesManager_Sets_Status_to_UP_TO_DATE_HTTP.lua b/test_scripts/Policies/build_options/067_ATF_PoliciesManager_Sets_Status_to_UP_TO_DATE_HTTP.lua index c50971385f..a1b38d34a6 100644 --- a/test_scripts/Policies/build_options/067_ATF_PoliciesManager_Sets_Status_to_UP_TO_DATE_HTTP.lua +++ b/test_scripts/Policies/build_options/067_ATF_PoliciesManager_Sets_Status_to_UP_TO_DATE_HTTP.lua @@ -25,6 +25,8 @@ -- Expected result: -- SDL->HMI: OnStatusUpdate(UP_TO_DATE) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua b/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua index 257904dbca..c82e39d050 100644 --- a/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua +++ b/test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua @@ -27,6 +27,8 @@ -- SDL replaces the following sections of the Local Policy Table with the --corresponding sections from PTU: module_config, functional_groupings and app_policies --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } config.application2.registerAppInterfaceParams.appHMIType = { "DEFAULT" } diff --git a/test_scripts/Policies/build_options/069_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_HTTP.lua b/test_scripts/Policies/build_options/069_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_HTTP.lua index ed2660e500..492759a490 100644 --- a/test_scripts/Policies/build_options/069_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_HTTP.lua +++ b/test_scripts/Policies/build_options/069_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_HTTP.lua @@ -28,6 +28,8 @@ --corresponding sections from PTU: module_config, functional_groupings, app_policies --and consumer_friendly_messages->'messages' --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua b/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua index cb63b04aea..42e5d66ef9 100644 --- a/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua +++ b/test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua @@ -28,6 +28,8 @@ -- SDL replaces the following sections of the Local Policy Table with the --corresponding sections from PTU: module_config, functional_groupings and app_policies --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General Settings for configuration ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/071_ATF_PTU_Local_PT_Start_Retry_Sequence_HTTP.lua b/test_scripts/Policies/build_options/071_ATF_PTU_Local_PT_Start_Retry_Sequence_HTTP.lua index 9617f5e6cc..77b0b76170 100644 --- a/test_scripts/Policies/build_options/071_ATF_PTU_Local_PT_Start_Retry_Sequence_HTTP.lua +++ b/test_scripts/Policies/build_options/071_ATF_PTU_Local_PT_Start_Retry_Sequence_HTTP.lua @@ -22,6 +22,8 @@ -- Timeout expires and retry sequence started -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local mobile_session = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/build_options/072_ATF_PTU_PM_Sets_Status_UPDATE_NEEDED_HTTP.lua b/test_scripts/Policies/build_options/072_ATF_PTU_PM_Sets_Status_UPDATE_NEEDED_HTTP.lua index 893697b8f4..2cc8b01219 100644 --- a/test_scripts/Policies/build_options/072_ATF_PTU_PM_Sets_Status_UPDATE_NEEDED_HTTP.lua +++ b/test_scripts/Policies/build_options/072_ATF_PTU_PM_Sets_Status_UPDATE_NEEDED_HTTP.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua b/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua index 9b435a1a02..2bca88d846 100644 --- a/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua +++ b/test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua @@ -29,6 +29,8 @@ -- t[4] = timeout_after_x_seconds + seconds_between_retries[4] + t[3] -- t[5] = timeout_after_x_seconds + seconds_between_retries[5] + t[4] --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua b/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua index c184294e40..b86b974fca 100644 --- a/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua +++ b/test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua @@ -21,6 +21,8 @@ -- SDL->app: OnSystemRequest() --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua b/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua index f4685e45d2..ab92d8d4c0 100644 --- a/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua +++ b/test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua @@ -24,6 +24,8 @@ -- Expected result: -- Number of retries corresponds to number of elements in 'seconds_between_retries' array --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua b/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua index b16633cb82..6c07c1d2ff 100644 --- a/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua +++ b/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua @@ -19,6 +19,8 @@ -- SDL->HMI:OnStatusUpdate("UP_TO_DATE") -- SDL->app: onPermissionChange(permisssions) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General Settings for configuration ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua b/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua index b77f805616..47cfbbc62f 100644 --- a/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua +++ b/test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua @@ -21,6 +21,8 @@ -- SDL->app: onPermissionChange() -- SDL->HMI: SDL.OnAppPermissionChanged(appID, params) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua b/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua index 829ab3b149..21bf50263f 100644 --- a/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua +++ b/test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua @@ -19,6 +19,8 @@ -- 1) Mobile application 1 remains in FULL -- 2) Mobile application 2 remains in LIMITED --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.isMediaApplication = true config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } diff --git a/test_scripts/Policies/build_options/079_ATF_PTU_HMI_Level_Affected_Apps_NONE_BACKGROUND_HTTP.lua b/test_scripts/Policies/build_options/079_ATF_PTU_HMI_Level_Affected_Apps_NONE_BACKGROUND_HTTP.lua index f248fdacb3..42c4fbc401 100644 --- a/test_scripts/Policies/build_options/079_ATF_PTU_HMI_Level_Affected_Apps_NONE_BACKGROUND_HTTP.lua +++ b/test_scripts/Policies/build_options/079_ATF_PTU_HMI_Level_Affected_Apps_NONE_BACKGROUND_HTTP.lua @@ -20,6 +20,8 @@ -- 1) SDL->appID_1: NONE OnHMIStatus -- should keep last value BACKGROUND -- 1) SDL->appID_2: NONE OnHMIStatus -- should keep last value NONE --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } config.application1.registerAppInterfaceParams.isMediaApplication = false diff --git a/test_scripts/Policies/build_options/080_ATF_PTU_OnStatsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua b/test_scripts/Policies/build_options/080_ATF_PTU_OnStatsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua index 3c97e7cf3b..4ca8e51632 100644 --- a/test_scripts/Policies/build_options/080_ATF_PTU_OnStatsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua +++ b/test_scripts/Policies/build_options/080_ATF_PTU_OnStatsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua @@ -15,6 +15,8 @@ -- Expected result: --SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/081_ATF_PTU_OnStatsusUpdate_Trigger_UPDATING_HTTP.lua b/test_scripts/Policies/build_options/081_ATF_PTU_OnStatsusUpdate_Trigger_UPDATING_HTTP.lua index 8b4930d4fb..5f42810123 100644 --- a/test_scripts/Policies/build_options/081_ATF_PTU_OnStatsusUpdate_Trigger_UPDATING_HTTP.lua +++ b/test_scripts/Policies/build_options/081_ATF_PTU_OnStatsusUpdate_Trigger_UPDATING_HTTP.lua @@ -20,6 +20,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: SDL.OnStatusUpdate(UPDATING) right after SDL->app: OnSystemRequest --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/082_ATF_PTU_OnStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua b/test_scripts/Policies/build_options/082_ATF_PTU_OnStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua index 5acac29e03..18f4cd178c 100644 --- a/test_scripts/Policies/build_options/082_ATF_PTU_OnStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua +++ b/test_scripts/Policies/build_options/082_ATF_PTU_OnStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua @@ -26,6 +26,8 @@ -- Expected result: -- SDL->HMI: OnStatusUpdate(UP_TO_DATE) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua b/test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua index 70688ee91f..e8d28a4293 100644 --- a/test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua +++ b/test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua @@ -17,6 +17,8 @@ -- Expected result: -- The texts in Russian & Chinese in appropriate are parsed correctly by SDL --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/build_options/084_ATF_Default_Policy_For_The_App_After_PTU_HTTP.lua b/test_scripts/Policies/build_options/084_ATF_Default_Policy_For_The_App_After_PTU_HTTP.lua index b2e60238c6..3745bfd7e5 100644 --- a/test_scripts/Policies/build_options/084_ATF_Default_Policy_For_The_App_After_PTU_HTTP.lua +++ b/test_scripts/Policies/build_options/084_ATF_Default_Policy_For_The_App_After_PTU_HTTP.lua @@ -7,6 +7,8 @@ -- re-assign updated "default" policies to this app -- In case Policies Manager assigns the "default" policies to app AND the value of "default" policies was updated in case of PolicyTable update --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/085_ATF_PTU_In_Progress_New_App_Registers_HTTP.lua b/test_scripts/Policies/build_options/085_ATF_PTU_In_Progress_New_App_Registers_HTTP.lua index e67239e006..0bcd21561f 100644 --- a/test_scripts/Policies/build_options/085_ATF_PTU_In_Progress_New_App_Registers_HTTP.lua +++ b/test_scripts/Policies/build_options/085_ATF_PTU_In_Progress_New_App_Registers_HTTP.lua @@ -22,6 +22,8 @@ -- SDL adds application with App 2 data into LocalPT according to general rules -- of adding app data into LocalPT --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/086_ATF_PTU_Merging_wtih_LPT_HTTP.lua b/test_scripts/Policies/build_options/086_ATF_PTU_Merging_wtih_LPT_HTTP.lua index b296f9d7cc..ceb1e6e08f 100644 --- a/test_scripts/Policies/build_options/086_ATF_PTU_Merging_wtih_LPT_HTTP.lua +++ b/test_scripts/Policies/build_options/086_ATF_PTU_Merging_wtih_LPT_HTTP.lua @@ -24,6 +24,8 @@ --module_config, functional_groupings and app_policies --App 2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/087_ATF_New_PTU_Sequence_AppRegistered_PTU_Progress_HTTP.lua b/test_scripts/Policies/build_options/087_ATF_New_PTU_Sequence_AppRegistered_PTU_Progress_HTTP.lua index 2706ddfdc6..b988845d98 100644 --- a/test_scripts/Policies/build_options/087_ATF_New_PTU_Sequence_AppRegistered_PTU_Progress_HTTP.lua +++ b/test_scripts/Policies/build_options/087_ATF_New_PTU_Sequence_AppRegistered_PTU_Progress_HTTP.lua @@ -22,6 +22,8 @@ -- 4. app_2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) -- 5. SDL creates the new snapshot and initiates the new PTU for the app_2 Policies obtaining: SDL-> HMI: SDL.PolicyUpdate()//new PTU sequence started ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/088_ATF_Apply_UpdatedPT_after_OnReceivedPolicyUpdate_from_HMI_PROPRIETARY.lua b/test_scripts/Policies/build_options/088_ATF_Apply_UpdatedPT_after_OnReceivedPolicyUpdate_from_HMI_PROPRIETARY.lua index 5b17db6de0..4f316e8d22 100644 --- a/test_scripts/Policies/build_options/088_ATF_Apply_UpdatedPT_after_OnReceivedPolicyUpdate_from_HMI_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/088_ATF_Apply_UpdatedPT_after_OnReceivedPolicyUpdate_from_HMI_PROPRIETARY.lua @@ -12,6 +12,8 @@ -- Expected result: -- SDL->MOB: BasicCommunication.SystemRequest ( + )) to HMI --------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua b/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua index 1b4bf3dde8..04f51a61b9 100644 --- a/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua +++ b/test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua @@ -16,6 +16,8 @@ -- PoliciesManager must initiate the PT Update through the app from consented device, -- second(non-consented) device should not be used e.i. no second query for user consent should be sent to HMI --------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General Settings for configuration ]] Test = require('user_modules/connecttest_resumption') require('cardinalities') diff --git a/test_scripts/Policies/build_options/091_ATF_Check_STATUS_UPDATE_NEEDED_PROPRIETARY.lua b/test_scripts/Policies/build_options/091_ATF_Check_STATUS_UPDATE_NEEDED_PROPRIETARY.lua index 802a507539..8411625a13 100644 --- a/test_scripts/Policies/build_options/091_ATF_Check_STATUS_UPDATE_NEEDED_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/091_ATF_Check_STATUS_UPDATE_NEEDED_PROPRIETARY.lua @@ -16,6 +16,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua b/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua index 01835955e4..591a8b7fc9 100644 --- a/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua @@ -18,6 +18,8 @@ -- Status changes in a following way: -- "UPDATE_NEEDED" -> "UPDATING" -> "UP_TO_DATE" -> "UPDATE_NEEDED" -> "UPDATING" --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/094_ATF_PTS_creation_rule_PROPRIETARY.lua b/test_scripts/Policies/build_options/094_ATF_PTS_creation_rule_PROPRIETARY.lua index 4ae1d4ddb1..ff16eecac5 100644 --- a/test_scripts/Policies/build_options/094_ATF_PTS_creation_rule_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/094_ATF_PTS_creation_rule_PROPRIETARY.lua @@ -14,6 +14,8 @@ -- Expected result: -- PTU is requested. PTS is created. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua b/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua index 2d98c504a7..e10e469157 100644 --- a/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua @@ -19,6 +19,8 @@ -- 3. SDL replaces the following sections of the Local Policy Table with the corresponding sections from PTU: module_config, functional_groupings, app_policies -- 4. app_2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua b/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua index 05526e283b..7eddbb1456 100644 --- a/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua @@ -15,6 +15,8 @@ -- Expected result: -- a) SDL send BasicCommunication.PolicyUpdate ( , , ) to HMI. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua b/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua index ce9d244b97..b54f70df03 100644 --- a/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua +++ b/test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua @@ -18,6 +18,8 @@ -- Expected result: -- Url parameter is taken cyclically from list of available URLs --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local mobileSession = require("mobile_session") local commonFunctions = require("user_modules/shared_testcases/commonFunctions") diff --git a/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua b/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua index f55a6e6f5f..15b5ed4aa5 100644 --- a/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua +++ b/test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua @@ -23,6 +23,8 @@ -- Expected result: -- Status is UPDATE_NEEDED and PTS is sent as binary data of OnSystemRequest to Mobile --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua b/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua index 7bbcd05bc4..f44220f15f 100644 --- a/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua @@ -20,6 +20,8 @@ -- 2. Parameters (retry, timeout, file) are defined -- 3. Status changed to 'UPDATING' --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/build_options/100_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_PROPRIETARY.lua b/test_scripts/Policies/build_options/100_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_PROPRIETARY.lua index 76dcbe2a8e..d255c7c0d4 100644 --- a/test_scripts/Policies/build_options/100_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/100_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_PROPRIETARY.lua @@ -19,6 +19,8 @@ -- SDL choose between the app_2, app_3, app_4 randomly to send OnSystemRequest -- app_1 doesn't take part in PTU (except of the case when app_1 is the only application being run on SDL) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua b/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua index 7ff206b26d..8e4b3879fa 100644 --- a/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua +++ b/test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua @@ -13,6 +13,8 @@ -- The flag EXTENDED_POLICY is set to HTTP -- PTU passes successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua b/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua index 45767c5d66..2fb2e96a18 100644 --- a/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua @@ -14,6 +14,8 @@ -- To define the timeout to wait a response on PTU, Policies manager must refer PTS -- "module_config" section, key . --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/build_options/104_ATF_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua b/test_scripts/Policies/build_options/104_ATF_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua index 478a8a5769..05f5818c2d 100644 --- a/test_scripts/Policies/build_options/104_ATF_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/104_ATF_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua @@ -13,6 +13,8 @@ -- Expected result: -- Payload (Snapshot and Binary Header) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua b/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua index 8a49fe0544..ff95c7622d 100644 --- a/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua @@ -15,6 +15,8 @@ -- Expected result: --SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua b/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua index 55d3909012..9128ac1e10 100644 --- a/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua @@ -16,6 +16,8 @@ -- Expected result: -- SDL.OnStatusUpdate(UPDATING) notification is send right after SDL->MOB: OnSystemRequest --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua b/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua index 6fc24d93f4..6d3f507cbf 100644 --- a/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua @@ -17,6 +17,8 @@ -- 3. PTU sequence started: *SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED)* -- 4. PTS is created by SDL.....//PTU started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = {"DEFAULT"} diff --git a/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua b/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua index 0c975640b7..e96feac7ef 100644 --- a/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua @@ -17,6 +17,8 @@ -- Expected result: -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) //start PTU flow --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua b/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua index 11a7417bf2..088dabc385 100644 --- a/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua @@ -13,6 +13,8 @@ -- When amount of ignition cycles notified by HMI via BasicCommunication.OnIgnitionCycleOver gets equal to the value of "exchange_after_x_ignition_cycles" -- field ("module_config" section) of policies database, SDL must trigger a PolicyTableUpdate sequence --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.fullAppID = "123456" config.application1.registerAppInterfaceParams.appHMIType = { "DEFAULT" } diff --git a/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua b/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua index c87d9b212e..23c28ec125 100644 --- a/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua @@ -19,6 +19,8 @@ -- Expected result: -- PTU flow started --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua b/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua index 7d9f0c07ce..beb565c292 100644 --- a/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua @@ -20,6 +20,8 @@ -- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON") -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/112_ATF_transfer_SystemRequest_from_app_to_HMI_PROPRIETARY.lua b/test_scripts/Policies/build_options/112_ATF_transfer_SystemRequest_from_app_to_HMI_PROPRIETARY.lua index f22958fa30..5a75019896 100644 --- a/test_scripts/Policies/build_options/112_ATF_transfer_SystemRequest_from_app_to_HMI_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/112_ATF_transfer_SystemRequest_from_app_to_HMI_PROPRIETARY.lua @@ -11,6 +11,8 @@ -- Expected result: -- SDL must send BasicCommunication.SystemRequest (, PROPRIETARY, params) to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/113_ATF_transfer_SystemRequest_from_HMI_to_app_PROPRIETARY.lua b/test_scripts/Policies/build_options/113_ATF_transfer_SystemRequest_from_HMI_to_app_PROPRIETARY.lua index b536db24ee..318ab68340 100644 --- a/test_scripts/Policies/build_options/113_ATF_transfer_SystemRequest_from_HMI_to_app_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/113_ATF_transfer_SystemRequest_from_HMI_to_app_PROPRIETARY.lua @@ -11,6 +11,8 @@ -- Expected result: -- SDL->MOB: SystemRequest (result code from HMI response) --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua b/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua index d0ccfe2c04..3996c381b1 100644 --- a/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua @@ -20,6 +20,8 @@ -- 3. SDL replaces the following sections of the Local Policy Table with the corresponding sections from PTU: module_config, functional_groupings, app_policies -- 4. app_2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/build_options/115_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp_PROPRIETARY.lua b/test_scripts/Policies/build_options/115_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp_PROPRIETARY.lua index 18cb499335..440b19cac2 100644 --- a/test_scripts/Policies/build_options/115_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/115_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp_PROPRIETARY.lua @@ -19,6 +19,8 @@ -- 4. app_2 added to Local PT during PT Exchange process left after merge in LocalPT (not being lost on merge) -- 5. SDL creates the new snapshot and initiates the new PTU for the app_2 Policies obtaining: SDL-> HMI: SDL.PolicyUpdate()//new PTU sequence started ------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } diff --git a/test_scripts/Policies/build_options/116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua b/test_scripts/Policies/build_options/116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua index ad32737e04..6edf35e94a 100644 --- a/test_scripts/Policies/build_options/116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua +++ b/test_scripts/Policies/build_options/116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua @@ -12,6 +12,8 @@ -- The flag EXTENDED_POLICY is set to HTTP -- PTU passes successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua b/test_scripts/Policies/build_options/117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua index 5a64b03d19..3f783b664e 100644 --- a/test_scripts/Policies/build_options/117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua +++ b/test_scripts/Policies/build_options/117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua @@ -14,6 +14,8 @@ -- The flag -DEXTENDED_POLICY: is set to HTTP -- PTU passes successfully --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua b/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua index df5e37f10d..5dd6bf3e56 100644 --- a/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua +++ b/test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua @@ -19,6 +19,8 @@ -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) -- SDL->HMI: BasicCommunication.PolicyUpdate --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "HTTP" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua b/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua index 1a4dd36cfe..e2198924c2 100644 --- a/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua +++ b/test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua @@ -33,6 +33,8 @@ -- Expected result: -- a) PTS has correct values. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua b/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua index 06a90005fe..a1ec12aefa 100644 --- a/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua @@ -22,6 +22,8 @@ -- Expected result: -- PoliciesManager must respond with "isAppPermissionRevoked:true" and "AppRevokedPermissions" param containing the list of revoked permissions to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/190_ATF_Device_treated_as_consented.lua b/test_scripts/Policies/user_consent_of_Policies/190_ATF_Device_treated_as_consented.lua index 85e0df4eb3..35c5d54890 100644 --- a/test_scripts/Policies/user_consent_of_Policies/190_ATF_Device_treated_as_consented.lua +++ b/test_scripts/Policies/user_consent_of_Policies/190_ATF_Device_treated_as_consented.lua @@ -15,6 +15,8 @@ -- Expected result: -- Policies Manager must treat the device as consented If "device" sub-section of "app_policies" has its group listed in "preconsented_groups". --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua b/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua index 07dadcf674..09901e4f39 100644 --- a/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua +++ b/test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua @@ -14,6 +14,8 @@ -- Expected result: -- SDL sends UpdateDeviceList to HMI right after new device connects over WiFi --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require ('user_modules/shared_testcases/commonSteps') local commonTestCases = require ('user_modules/shared_testcases/commonTestCases') diff --git a/test_scripts/Policies/user_consent_of_Policies/192_ATF_isPermissionsConsentNeeded_false.lua b/test_scripts/Policies/user_consent_of_Policies/192_ATF_isPermissionsConsentNeeded_false.lua index dcae207fb3..5952a074f7 100644 --- a/test_scripts/Policies/user_consent_of_Policies/192_ATF_isPermissionsConsentNeeded_false.lua +++ b/test_scripts/Policies/user_consent_of_Policies/192_ATF_isPermissionsConsentNeeded_false.lua @@ -15,6 +15,8 @@ -- On receiving SDL.ActivateApp PoliciesManager must respond with "isPermissionsConsentNeeded:false" -- to HMI, consent for custom permissions is not appeared --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/193_ATF_isPermissionsConsentNeeded_true.lua b/test_scripts/Policies/user_consent_of_Policies/193_ATF_isPermissionsConsentNeeded_true.lua index 962d729244..8619bf4aca 100644 --- a/test_scripts/Policies/user_consent_of_Policies/193_ATF_isPermissionsConsentNeeded_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/193_ATF_isPermissionsConsentNeeded_true.lua @@ -19,6 +19,8 @@ -- On receiving SDL.ActivateApp PoliciesManager must respond with "isPermissionsConsentNeeded:true" to HMI, -- consent for custom permissions should appeared --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/194_ATF_ActivateApp_isSDLAllowed_true.lua b/test_scripts/Policies/user_consent_of_Policies/194_ATF_ActivateApp_isSDLAllowed_true.lua index eed9b4c07b..65c20a918d 100644 --- a/test_scripts/Policies/user_consent_of_Policies/194_ATF_ActivateApp_isSDLAllowed_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/194_ATF_ActivateApp_isSDLAllowed_true.lua @@ -18,6 +18,8 @@ -- Expected result: -- PoliciesManager must respond with "isSDLAllowed: true" in the response to HMI without consent request --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua b/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua index 4bc84810d5..468a5058b3 100644 --- a/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua +++ b/test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua @@ -17,6 +17,8 @@ -- PoliciesManager must respond with 1)"isSDLAllowed:false", 2) "device" param containing the device`s name and ID previously sent by SDL via UpdateDeviceList -- in the response to HMI without consent request --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require ('user_modules/shared_testcases/commonSteps') local commonTestCases = require ('user_modules/shared_testcases/commonTestCases') diff --git a/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua b/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua index 20f075e032..05eb086ece 100644 --- a/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua +++ b/test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua @@ -14,6 +14,8 @@ -- Expected result: -- PoliciesManager must provide "isSDLAllowed:false" param of "DeviceInfo" struct ONLY when sending "UpdateDeviceList" RPC to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] Test = require('user_modules/dummy_connecttest') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/197_ATF_ActivateApp_isSDLAllowed_true.lua b/test_scripts/Policies/user_consent_of_Policies/197_ATF_ActivateApp_isSDLAllowed_true.lua index 9b4266621b..1fc6037280 100644 --- a/test_scripts/Policies/user_consent_of_Policies/197_ATF_ActivateApp_isSDLAllowed_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/197_ATF_ActivateApp_isSDLAllowed_true.lua @@ -21,6 +21,8 @@ -- Expected result: -- PoliciesManager must respond with "isSDLAllowed: true" in the response to HMI without consent request --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/user_consent_of_Policies/198_ATF_GetUserFriendlyMessage_language_missed.lua b/test_scripts/Policies/user_consent_of_Policies/198_ATF_GetUserFriendlyMessage_language_missed.lua index 953c951d93..65441dc2aa 100644 --- a/test_scripts/Policies/user_consent_of_Policies/198_ATF_GetUserFriendlyMessage_language_missed.lua +++ b/test_scripts/Policies/user_consent_of_Policies/198_ATF_GetUserFriendlyMessage_language_missed.lua @@ -16,6 +16,8 @@ -- Expected result: -- English ("en-us") prompt must be returned to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua b/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua index 2fd3840a0c..86a19eff96 100644 --- a/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua +++ b/test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua @@ -20,6 +20,8 @@ -- PoliciesManager must respond with the list of s that have the field "user_consent_prompt" in corresponding and -- are assigned to the specified application (section "" -> "groups") --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/200_ATF_Data_consent_prompt.lua b/test_scripts/Policies/user_consent_of_Policies/200_ATF_Data_consent_prompt.lua index f065cadffa..6a9222c262 100644 --- a/test_scripts/Policies/user_consent_of_Policies/200_ATF_Data_consent_prompt.lua +++ b/test_scripts/Policies/user_consent_of_Policies/200_ATF_Data_consent_prompt.lua @@ -16,6 +16,8 @@ -- sub-sections of section which name corresponds to the value of messageCodes param of -- SDL.GetUserFriendlyMessage request --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/201_ATF_User_consents_permissions.lua b/test_scripts/Policies/user_consent_of_Policies/201_ATF_User_consents_permissions.lua index 93b286d9e9..cf81dedd81 100644 --- a/test_scripts/Policies/user_consent_of_Policies/201_ATF_User_consents_permissions.lua +++ b/test_scripts/Policies/user_consent_of_Policies/201_ATF_User_consents_permissions.lua @@ -20,6 +20,8 @@ -- Expected result: -- SDL must notify an application about the current permissions active on HMI via onPermissionsChange() notification --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua b/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua index d6a608ce90..c94e460686 100644 --- a/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua +++ b/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua @@ -22,6 +22,8 @@ -- SDL must NOT send the PoliciesSnapshot over OnSystemRequest to any of the apps, -- SDL must NOT send the OnSDLConsentNeeded to HMI --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } diff --git a/test_scripts/Policies/user_consent_of_Policies/203_ATF_Master_reset.lua b/test_scripts/Policies/user_consent_of_Policies/203_ATF_Master_reset.lua index f211c032f3..c5c32a0f75 100644 --- a/test_scripts/Policies/user_consent_of_Policies/203_ATF_Master_reset.lua +++ b/test_scripts/Policies/user_consent_of_Policies/203_ATF_Master_reset.lua @@ -15,6 +15,8 @@ -- Expected result: -- Policy Manager must revert Local Policy Table to the Preload Policy Table --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua b/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua index 9b97631ee8..30f000746f 100644 --- a/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua +++ b/test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua @@ -15,6 +15,8 @@ -- Expected result: -- App should have only "pre_DataConsent" groups allowed --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/205_ATF_Consent_timestamp.lua b/test_scripts/Policies/user_consent_of_Policies/205_ATF_Consent_timestamp.lua index 1739b7bb51..6cff1703be 100644 --- a/test_scripts/Policies/user_consent_of_Policies/205_ATF_Consent_timestamp.lua +++ b/test_scripts/Policies/user_consent_of_Policies/205_ATF_Consent_timestamp.lua @@ -17,6 +17,8 @@ -- Expected result: -- PoliciesManager must add a timestamp of user consent for the current mobile device into “time_stamp” field in the format of "TZ". --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonSteps = require('user_modules/shared_testcases/commonSteps') local commonFunctions = require('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/user_consent_of_Policies/206_ATF_Permissions_before_device_consented.lua b/test_scripts/Policies/user_consent_of_Policies/206_ATF_Permissions_before_device_consented.lua index 69bc95a8b0..0add053935 100644 --- a/test_scripts/Policies/user_consent_of_Policies/206_ATF_Permissions_before_device_consented.lua +++ b/test_scripts/Policies/user_consent_of_Policies/206_ATF_Permissions_before_device_consented.lua @@ -29,6 +29,8 @@ -- HMI->SDL: SDL.ActivateApp{appID} -- SDL->HMI: SDL.ActivateApp_response{isSDLAllowed: false, params} ------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/207_ATF_HMILevel_before_data_consented.lua b/test_scripts/Policies/user_consent_of_Policies/207_ATF_HMILevel_before_data_consented.lua index 102abc4889..2a4294c487 100644 --- a/test_scripts/Policies/user_consent_of_Policies/207_ATF_HMILevel_before_data_consented.lua +++ b/test_scripts/Policies/user_consent_of_Policies/207_ATF_HMILevel_before_data_consented.lua @@ -27,6 +27,8 @@ -- HMI->SDL: OnAllowSDLFunctionality {allowed: false, params} -- SDL->app: OnPermissionChanged{params}// "pre_DataConsent" sub-section of "app_policies" section of PT, app`s HMI level corresponds to one from "default_hmi" field ------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/208_ATF_No_consent_for_default_policies.lua b/test_scripts/Policies/user_consent_of_Policies/208_ATF_No_consent_for_default_policies.lua index f4590ff092..ba001c2184 100644 --- a/test_scripts/Policies/user_consent_of_Policies/208_ATF_No_consent_for_default_policies.lua +++ b/test_scripts/Policies/user_consent_of_Policies/208_ATF_No_consent_for_default_policies.lua @@ -17,6 +17,8 @@ -- Expected result: -- PoliciesManager must not ask the User for consent for "default" permissions --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/user_consent_of_Policies/209_ATF_Device_user_disallowed_after_consent.lua b/test_scripts/Policies/user_consent_of_Policies/209_ATF_Device_user_disallowed_after_consent.lua index 4b714c6e34..fc10b1513f 100644 --- a/test_scripts/Policies/user_consent_of_Policies/209_ATF_Device_user_disallowed_after_consent.lua +++ b/test_scripts/Policies/user_consent_of_Policies/209_ATF_Device_user_disallowed_after_consent.lua @@ -19,6 +19,8 @@ -- App must be rolled back to default group -- RPC from defult should be allowed --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require("user_modules/shared_testcases/commonFunctions") local commonSteps = require("user_modules/shared_testcases/commonSteps") diff --git a/test_scripts/Policies/user_consent_of_Policies/210_ATF_User_consent_initing_after_PTU_FULL.lua b/test_scripts/Policies/user_consent_of_Policies/210_ATF_User_consent_initing_after_PTU_FULL.lua index da95deeb35..230bb50d8a 100644 --- a/test_scripts/Policies/user_consent_of_Policies/210_ATF_User_consent_initing_after_PTU_FULL.lua +++ b/test_scripts/Policies/user_consent_of_Policies/210_ATF_User_consent_initing_after_PTU_FULL.lua @@ -13,6 +13,8 @@ -- Policies Manager must notify HMI about 'user-consent-required' via SDL.OnAppPermissionChanged{appID, appPermissionsConsentNeeded: true} per application in FULL, -- that lacks the User`s permissions right after Policies Manager detects the user-unconsented permissions in Local PT --------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/211_ATF_User_consent_initing_after_PTU_LIMITED.lua b/test_scripts/Policies/user_consent_of_Policies/211_ATF_User_consent_initing_after_PTU_LIMITED.lua index 3c1d2c903d..fb499e3288 100644 --- a/test_scripts/Policies/user_consent_of_Policies/211_ATF_User_consent_initing_after_PTU_LIMITED.lua +++ b/test_scripts/Policies/user_consent_of_Policies/211_ATF_User_consent_initing_after_PTU_LIMITED.lua @@ -15,6 +15,8 @@ -- Policies Manager must notify HMI about 'user-consent-required' via SDL.OnAppPermissionChanged{appID, appPermissionsConsentNeeded: true} per application in FULL, -- that lacks the User`s permissions right after Policies Manager detects the user-unconsented permissions in Local PT --------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/212_ATF_Data_consent_device_not_in_LPT.lua b/test_scripts/Policies/user_consent_of_Policies/212_ATF_Data_consent_device_not_in_LPT.lua index 074b4629a4..e17ce6976c 100644 --- a/test_scripts/Policies/user_consent_of_Policies/212_ATF_Data_consent_device_not_in_LPT.lua +++ b/test_scripts/Policies/user_consent_of_Policies/212_ATF_Data_consent_device_not_in_LPT.lua @@ -14,6 +14,8 @@ -- Expected result: -- PoliciesManager must initiate getting User`s data consent (that is, User`s permission for using the mobile device`s connection for Policy Table exchange) ---------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/213_ATF_No_user_consent_prompt_in_group.lua b/test_scripts/Policies/user_consent_of_Policies/213_ATF_No_user_consent_prompt_in_group.lua index aa5d8d1c97..6acbfc78ad 100644 --- a/test_scripts/Policies/user_consent_of_Policies/213_ATF_No_user_consent_prompt_in_group.lua +++ b/test_scripts/Policies/user_consent_of_Policies/213_ATF_No_user_consent_prompt_in_group.lua @@ -19,6 +19,8 @@ -- Expected result: -- PoliciesManager must apply such without asking User`s consent for it --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/user_consent_of_Policies/214_ATF_User_consent_prompt_persists.lua b/test_scripts/Policies/user_consent_of_Policies/214_ATF_User_consent_prompt_persists.lua index 49059150e6..c73a553ece 100644 --- a/test_scripts/Policies/user_consent_of_Policies/214_ATF_User_consent_prompt_persists.lua +++ b/test_scripts/Policies/user_consent_of_Policies/214_ATF_User_consent_prompt_persists.lua @@ -19,6 +19,8 @@ -- Expected result: -- PoliciesManager must apply only after the User has consented it -> RPC should be allowed --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + ---[[ General configuration parameters ]] config.defaultProtocolVersion = 2 diff --git a/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua b/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua index ad0bd88229..1fa3d2e4db 100644 --- a/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua +++ b/test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua @@ -20,6 +20,8 @@ -- SDL->HMI: BC.UpdateDeviceList(device1, device2) -- HMI->SDL: BC.UpdateDeviceList(SUCCESS) -------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/216_ATF_User_consent_storage_in_LPT.lua b/test_scripts/Policies/user_consent_of_Policies/216_ATF_User_consent_storage_in_LPT.lua index aeca9ac0a4..6f2fbca156 100644 --- a/test_scripts/Policies/user_consent_of_Policies/216_ATF_User_consent_storage_in_LPT.lua +++ b/test_scripts/Policies/user_consent_of_Policies/216_ATF_User_consent_storage_in_LPT.lua @@ -27,6 +27,8 @@ -- PoliciesManager records the consent-related information in "device" subsection of "user_consent_records" subsection -- of "" section of "device_data" section in Local PT. --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua b/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua index bc9edf2e81..494550999c 100644 --- a/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua +++ b/test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua @@ -14,6 +14,8 @@ -- SDL/PoliciesManager must provide the device`s DataConsent status (allowed) to HMI upon device`s connection-> -- SDL must request DataConsent status of the corresponding device from the PoliciesManager ------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] Test = require('user_modules/dummy_connecttest') local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') diff --git a/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua b/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua index 04dae6839e..58e584d4d0 100644 --- a/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua +++ b/test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua @@ -13,6 +13,8 @@ -- SDL/PoliciesManager must provide the device`s DataConsent status (not allowed) to HMI upon device`s connection-> -- SDL must request DataConsent status of the corresponding device from the PoliciesManager ------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General Settings for configuration ]] Test = require('user_modules/dummy_connecttest') diff --git a/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua b/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua index 19ceffb83d..8fa919bdf0 100644 --- a/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua +++ b/test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua @@ -13,6 +13,8 @@ -- Expected result: -- SDL must add new device in deviceList of BasicCommunication.UpdateDeviceList --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General Settings for configuration ]] Test = require('user_modules/dummy_connecttest') diff --git a/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua b/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua index 6096e832b9..8139985d3e 100644 --- a/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua +++ b/test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua @@ -15,6 +15,8 @@ -- Expected result: -- SDL must add new section in "device_data" section --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ Required Shared libraries ]] local commonFunctions = require ('user_modules/shared_testcases/commonFunctions') local commonSteps = require('user_modules/shared_testcases/commonSteps') diff --git a/test_scripts/Policies/user_consent_of_Policies/221_ATF_Factory_reset.lua b/test_scripts/Policies/user_consent_of_Policies/221_ATF_Factory_reset.lua index 491ea12967..803fc55372 100644 --- a/test_scripts/Policies/user_consent_of_Policies/221_ATF_Factory_reset.lua +++ b/test_scripts/Policies/user_consent_of_Policies/221_ATF_Factory_reset.lua @@ -14,6 +14,8 @@ -- Expected result: -- Policy Manager must clear all user consent records in "user_consent_records" section of the LocalPT, other content of the LocalPT must be unchanged --------------------------------------------------------------------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.ExitOnCrash = false diff --git a/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua b/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua index c4346fb56e..be1f1329b2 100644 --- a/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua +++ b/test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua @@ -13,6 +13,8 @@ -- Expected result: -- a) Hash of device is present in snapshot --------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } }) + --[[ General configuration parameters ]] --ToDo: shall be removed when issue: "ATF does not stop HB timers by closing session and connection" is fixed config.defaultProtocolVersion = 2 diff --git a/test_sets/policies_all_flows.txt b/test_sets/policies_all_flows.txt new file mode 100644 index 0000000000..a99eef8a35 --- /dev/null +++ b/test_sets/policies_all_flows.txt @@ -0,0 +1,418 @@ +./test_scripts/Policies/build_options/047_ATF_SDL_Build_DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua +./test_scripts/Policies/build_options/048_ATF_SDL_Build_Flag_DEXTENDED_POLICY_PROPRIETARY.lua +./test_scripts/Policies/build_options/050_ATF_Request_PTU_Trigger_PTU_failed_previous_IGN_ON_HTTP.lua +./test_scripts/Policies/build_options/051_ATF_Policy_Table_Update_Trigger_After_N_Kilometers_HTTP.lua +./test_scripts/Policies/build_options/052_ATF_PTU_Trigger_IGN_Cycles_HTTP.lua +./test_scripts/Policies/build_options/053_ATF_Policy_Table_Update_Trigger_After_N_Days_HTTP.lua +./test_scripts/Policies/build_options/054_ATF_Request_PTU_UPDATE_NEEDED_new_PTU_Request_HTTP.lua +./test_scripts/Policies/build_options/055_ATF_Policy_Table_Snapshot_Creation_HTTP.lua +./test_scripts/Policies/build_options/056_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_HTTP.lua +;./test_scripts/Policies/build_options/057_ATF_PTS_Define_URL_to_send_PTS_HTTP.lua 1219 +./test_scripts/Policies/build_options/058_ATF_HMI_gets_URLs_via_GetPolicyConfigurationData_HTTP.lua +./test_scripts/Policies/build_options/060_ATF_Timeout_to_wait_response_PTU_HTTP.lua +./test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua +./test_scripts/Policies/build_options/062_ATF_Timeout_Countdown_Start_PTU_Response_HTTP.lua +./test_scripts/Policies/build_options/063_ATF_PoliciesManager_Sets_Status_UPDATING_HTTP.lua +./test_scripts/Policies/build_options/064_ATF_Received_PTU_From_Mobile_Application_HTTP.lua +./test_scripts/Policies/build_options/066_ATF_PTU_Validation_Failure_HTTP.lua +./test_scripts/Policies/build_options/067_ATF_PoliciesManager_Sets_Status_to_UP_TO_DATE_HTTP.lua +./test_scripts/Policies/build_options/068_ATF_PTU_Merge_Into_Local_PT_HTTP.lua +./test_scripts/Policies/build_options/069_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_HTTP.lua +./test_scripts/Policies/build_options/070_ATF_PTU_Merge_Into_Local_PT_ConsumerFriendlyMessages_Omitted_HTTP.lua +./test_scripts/Policies/build_options/071_ATF_PTU_Local_PT_Start_Retry_Sequence_HTTP.lua +./test_scripts/Policies/build_options/072_ATF_PTU_PM_Sets_Status_UPDATE_NEEDED_HTTP.lua +./test_scripts/Policies/build_options/073_ATF_PTU_Retry_Sequence_Retry_Timeout_Computation_HTTP.lua +./test_scripts/Policies/build_options/074_ATF_PTU_Restarting_Policy_Table_Exchange_HTTP.lua +./test_scripts/Policies/build_options/075_ATF_PTU_Retry_Sequence_Retry_Timeout_Expiration_HTTP.lua +./test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua +./test_scripts/Policies/build_options/077_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_HMI_HTTP.lua +./test_scripts/Policies/build_options/078_ATF_PTU_HMI_Level_Affected_Apps_FULL_LIMITED_HTTP.lua +./test_scripts/Policies/build_options/079_ATF_PTU_HMI_Level_Affected_Apps_NONE_BACKGROUND_HTTP.lua +./test_scripts/Policies/build_options/080_ATF_PTU_OnStatsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua +./test_scripts/Policies/build_options/081_ATF_PTU_OnStatsusUpdate_Trigger_UPDATING_HTTP.lua +./test_scripts/Policies/build_options/082_ATF_PTU_OnStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua +./test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua +./test_scripts/Policies/build_options/084_ATF_Default_Policy_For_The_App_After_PTU_HTTP.lua +./test_scripts/Policies/build_options/085_ATF_PTU_In_Progress_New_App_Registers_HTTP.lua +./test_scripts/Policies/build_options/086_ATF_PTU_Merging_wtih_LPT_HTTP.lua +./test_scripts/Policies/build_options/087_ATF_New_PTU_Sequence_AppRegistered_PTU_Progress_HTTP.lua +./test_scripts/Policies/build_options/088_ATF_Apply_UpdatedPT_after_OnReceivedPolicyUpdate_from_HMI_PROPRIETARY.lua +./test_scripts/Policies/build_options/089_ATF_Check_SDL_respond_GetURLs_Request_fromHMI_PROPRIETARY.lua +;./test_scripts/Policies/build_options/090_ATF_For_PTU_use_consented_device_only.lua +./test_scripts/Policies/build_options/091_ATF_Check_STATUS_UPDATE_NEEDED_PROPRIETARY.lua +./test_scripts/Policies/build_options/093_ATF_OnStatusUpdate_Trigger_PROPRIETARY.lua +./test_scripts/Policies/build_options/094_ATF_PTS_creation_rule_PROPRIETARY.lua +./test_scripts/Policies/build_options/095_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua +./test_scripts/Policies/build_options/096_ATF_SDL_Send_PolicyUpdat_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua +./test_scripts/Policies/build_options/097_ATF_PTU_Cycleing_Through_The_URLs_During_Retry_Sequence_HTTP.lua +./test_scripts/Policies/build_options/098_ATF_PTU_Unsuccessful_Even_After_Retry_Strategy_HTTP.lua +./test_scripts/Policies/build_options/099_ATF_SDL_Send_BC_PolicyUpdate_To_HMI_In_Case_PTU_Is_Triggered_PROPRIETARY.lua +./test_scripts/Policies/build_options/100_ATF_PTU_Transfer_Several_Apps_Different_HMI_Levels_PROPRIETARY.lua +./test_scripts/Policies/build_options/101_ATF_SDL_Build_EXTENDED_POLICY_HTTP.lua +./test_scripts/Policies/build_options/103_ATF_Timeout_wait_response_PTU_PROPRIETARY.lua +./test_scripts/Policies/build_options/104_ATF_Transfer_OnSystemRequest_toApp_PROPRIETARY.lua +./test_scripts/Policies/build_options/105_ATF_PM_change_status_UPDATE_NEEDED_after_timeout_expired_PROPRIETARY.lua +./test_scripts/Policies/build_options/106_ATF_PolicyManager_changes_status_to_UPDATING_PROPRIETARY.lua +./test_scripts/Policies/build_options/107_ATF_PTU_in_case_of_failed_retry_strategy_during_previous_IGN_ON_PROPRIETARY.lua +./test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua +./test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua +./test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua +./test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua +./test_scripts/Policies/build_options/112_ATF_transfer_SystemRequest_from_app_to_HMI_PROPRIETARY.lua +./test_scripts/Policies/build_options/113_ATF_transfer_SystemRequest_from_HMI_to_app_PROPRIETARY.lua +./test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua +./test_scripts/Policies/build_options/115_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp_PROPRIETARY.lua +./test_scripts/Policies/build_options/116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua +./test_scripts/Policies/build_options/117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua +./test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua +./test_scripts/Policies/appID_Management/031_ATF_Register_App_Interface_App_Unauthorized.lua +./test_scripts/Policies/appID_Management/032_ATF_Register_App_Interface_Successful_Nickname_Validation.lua +./test_scripts/Policies/appID_Management/033_ATF_Register_App_Interface_Order_Of_Nickname_Validation.lua +./test_scripts/Policies/appID_Management/034_ATF_Register_App_Interface_Disallowed.lua +./test_scripts/Policies/appID_Management/035_ATF_Register_App_Interface_Case-insensitivity_Of_AppName.lua +./test_scripts/Policies/appID_Management/036_ATF_Change_Registration_Disallowed.lua +./test_scripts/Policies/appID_Management/037_ATF_Register_App_Interface_Assign_Existing_Policies.lua +./test_scripts/Policies/appID_Management/038_ATF_Register_App_Interface_Without_Data_Consent_Assign_pre_DataConsent_Policies.lua +./test_scripts/Policies/appID_Management/039_ATF_Register_App_Interface_With_Data_Consent_Assign_Default_Policies.lua +./test_scripts/Policies/appID_Management/040_ATF_Register_App_Interface_Case-insensitivity_Of_AppId.lua +./test_scripts/Policies/appID_Management/041_ATF_OnAppPermissionChanged_appRevoked_true.lua +./test_scripts/Policies/appID_Management/042_ATF_PolicyTable_RAI_with_NULL_policies_RPCs_DISALLOWED.lua +./test_scripts/Policies/appID_Management/043_ATF_HMI_Status_Appid_Gets_Null_In_Case_Of_PTU.lua +./test_scripts/Policies/appID_Management/044_ATF_HMI_Status_Value_Of_AppId_In_PT_Is_Null.lua +./test_scripts/Policies/appID_Management/045_ATF_Register_App_Interface_Assign_Default_Policies_To_Application_Which_Appid_Does_Not_Exist_In_LPT.lua +./test_scripts/Policies/appID_Management/046_ATF_Register_App_Interface_Assign_Existing_Policies_To_Application_Which_Appid_Exists_In_LPT.lua +./test_scripts/Policies/App_Permissions/001_ATF_HP_Order_Of_Request_Response_Notification_On_Registering_App.lua +./test_scripts/Policies/App_Permissions/002_ATF_HP_OnPermissionsChange_With_Assigned_Policy_After_App_Registration.lua +./test_scripts/Policies/App_Permissions/003_ATF_HP_User_Consent_Yes.lua +./test_scripts/Policies/App_Permissions/004_ATF_HP_User_Consent_NO.lua +./test_scripts/Policies/App_Permissions/005_ATF_DISALLOWED_app_Id_policies_And_RequestType_Validation.lua +./test_scripts/Policies/App_Permissions/006_ATF_Steal_focus_validation_false_PTU.lua +./test_scripts/Policies/App_Permissions/007_ATF_StealFocus_validation_true_PTU.lua +./test_scripts/Policies/App_Permissions/008_ATF_DISALLOWED_default_policies_And_RequestType_Validation.lua +./test_scripts/Policies/App_Permissions/009_ATF_Steal_Focus_Validation_False.lua +./test_scripts/Policies/App_Permissions/010_ATF_StealFocus_validation_true_app_id.lua +./test_scripts/Policies/App_Permissions/011_ATF_KeepContext_Validation_false.lua +./test_scripts/Policies/App_Permissions/012_ATF_KeepContext_Validation_true.lua +./test_scripts/Policies/App_Permissions/013_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table_Default_Group.lua +./test_scripts/Policies/App_Permissions/014_ATF_Unsubscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua +./test_scripts/Policies/App_Permissions/015_ATF_Subscribe_Vehicle_Data_Disallowed_Response_When_All_Parameters_Are_Not_Allowed_In_The_Request.lua +./test_scripts/Policies/App_Permissions/016_ATF_Subscribe_Vehicle_Data_General_Resultcode_And_The_Individual_Result_Codes_For_A_Part_Of_Parameters_Disallowed_By_Policies.lua +./test_scripts/Policies/App_Permissions/017_ATF_Get_Vehicle_Data_App_Sends_Not-allowed_Parameters_By_Policies_Only.lua +./test_scripts/Policies/App_Permissions/018_ATF_Get_Vehicle_Data_App_Sends_Allowed_Parameters_And_Not-allowed_By_Policies_Parameters.lua +./test_scripts/Policies/App_Permissions/019_ATF_General_Result_Codes_Disallowed_Rpc_Is_Omitted_In_The_Policy_Table.lua +./test_scripts/Policies/App_Permissions/020_ATF_General_Result_Codes_Disallowed_In_Case_App_Current_Hmi_Level_Is_Not_Listed_In_Assigned_Policies.lua +./test_scripts/Policies/App_Permissions/021_ATF_HMI_Levels_The_Notification_Is_Allowed_To_Be_Processed_In.lua +./test_scripts/Policies/App_Permissions/022_ATF_No_Permission_Notification_To_HMI_In_First_App_Registration.lua +./test_scripts/Policies/App_Permissions/023_ATF_Default_Priority_Value_Assigned_To_App.lua +./test_scripts/Policies/App_Permissions/024_ATF_APP_UNAUTHORIZED_If_Failed_Nickname_Validation_After_PTU.lua +./test_scripts/Policies/App_Permissions/025_ATF_ChangeRegistration_With_AppName_Not_Listed_In_NickNames.lua +./test_scripts/Policies/App_Permissions/026_ATF_DISALLOWED_App_Which_Name_Does_Not_Match_With_Nickname_In_PT.lua +./test_scripts/Policies/App_Permissions/027_ATF_NickName_Case_Insensitivity.lua +./test_scripts/Policies/App_Permissions/028_ATF_Nickname_Validation_Before_Duplicate_Name_Validation.lua +./test_scripts/Policies/App_Permissions/029_ATF_OnPermissionsChange_After_PTU.lua +./test_scripts/Policies/App_Permissions/030_ATF_Successful_Nickname_Validation.lua +./test_scripts/Policies/External_UCS/001_ATF_P_TC_LPT_Creation_PreloadedPT_without_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/002_ATF_N_TC_LPT_Creation_PreloadedPT_with_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/003_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/004_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/005_ATF_P_TC_LPT_Creation_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/006_ATF_P_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/007_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua +./test_scripts/Policies/External_UCS/008_ATF_N_TC_LPT_Creation_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua +./test_scripts/Policies/External_UCS/009_ATF_P_TC_SnapshotPT_without_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/010_ATF_P_TC_SnapshotPT_with_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/011_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/012_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/013_ATF_P_TC_SnapshotPT_without_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/014_ATF_P_TC_SnapshotPT_with_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/015_ATF_P_TC_PTU_without_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/016_ATF_N_TC_PTU_with_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/017_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/018_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/019_ATF_P_TC_PTU_without_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/020_ATF_P_TC_PTU_with_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/021_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua +./test_scripts/Policies/External_UCS/022_ATF_N_TC_PTU_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua +./test_scripts/Policies/External_UCS/023_ATF_P_TC_LPT_Update_PreloadedPT_without_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/024_ATF_N_TC_LPT_Update_PreloadedPT_with_external_consent_status_groups_struct.lua +./test_scripts/Policies/External_UCS/025_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/026_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct.lua +./test_scripts/Policies/External_UCS/027_ATF_P_TC_LPT_Update_PreloadedPT_without_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/028_ATF_P_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct.lua +./test_scripts/Policies/External_UCS/029_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_off_struct_with_invalid_type_of_params.lua +./test_scripts/Policies/External_UCS/030_ATF_N_TC_LPT_Update_PreloadedPT_with_disallowed_by_external_consent_entities_on_struct_with_invalid_type_of_params.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/001_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/002_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/003_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_on_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/004_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/005_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/006_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/007_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/008_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/009_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/010_ATF_Policies_External_Consent_OFF_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/011_ATF_Policies_External_Consent_OFF_through_ignition_cycles.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/012_ATF_Policies_External_Consent_OFF_through_ignition_cycles_user_disallowed_RPCs.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/013_ATF_Policies_External_Consent_OFF_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/014_ATF_Policies_External_Consent_OFF_disallowed_change_to_ON_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/015_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/016_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/017_ATF_Policies_External_Consent_OFF_external_consent_disallowed_user_consent_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/018_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/019_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/020_ATF_Policies_External_Consent_OFF_external_consent_allowed_user_consent_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/021_ATF_Policies_External_Consent_OFF_allowed_change_to_ON_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/022_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_off.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/023_ATF_Policies_External_Consent_OFF_regist_new_app_disallowed_by_external_consent_entities_on.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/024_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_01.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/025_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_02.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/026_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_03.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/027_ATF_Policies_External_Consent_OFF_many_entities_pairs_in_one_group_04.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/028_ATF_Policies_External_Consent_OFF_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/029_ATF_Policies_External_Consent_OFF_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/030_ATF_Policies_External_Consent_OFF_empty_consent_groups.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/031_ATF_Policies_External_Consent_missing.lua +./test_scripts/Policies/External_UCS/External_Consent_OFF/032_ATF_Policies_External_Consent_OFF_through_ignition_cycles_combo.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/001_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_data_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/002_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/003_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_off_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/004_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_data_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/005_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/006_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_on_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/007_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_data_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/008_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/009_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/010_ATF_Policies_External_Consent_ON_disallowed_by_external_consent_entities_omitted_user_consent_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/011_ATF_Policies_External_Consent_ON_through_ignition_cycles_allowed_RPCs.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/012_ATF_Policies_External_Consent_ON_through_ignition_cycles_user_disallowed_RPCs.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/013_ATF_Policies_External_Consent_ON_through_ignition_cycles_disallowed_by_external_consent_entities_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/014_ATF_Policies_External_Consent_ON_disallowed_change_to_OFF_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/015_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/016_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/017_ATF_Policies_External_Consent_ON_external_consent_disallowed_user_consent_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/018_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/019_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/020_ATF_Policies_External_Consent_ON_external_consent_allowed_user_consent_omitted.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/021_ATF_Policies_External_Consent_ON_allowed_change_to_OFF_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/022_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_off.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/023_ATF_Policies_External_Consent_ON_regist_new_app_disallowed_by_external_consent_entities_on.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/024_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_01.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/025_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_02.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/026_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_03.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/027_ATF_Policies_External_Consent_ON_many_entities_pairs_in_one_group_04.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/028_ATF_Policies_External_Consent_ON_same_notification_user_consent_allowed_externalConsentStatus_disallowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/029_ATF_Policies_External_Consent_ON_same_notification_user_consent_disallowed_externalConsentStatus_allowed.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/030_ATF_Policies_External_Consent_ON_empty_consent_groups.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/031_ATF_Policies_External_Consent_ON_externalConsentStatus_is_not_sent.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/032_ATF_Policies_External_Consent_ON_OFF_without_user_consent_prompt.lua +./test_scripts/Policies/External_UCS/External_Consent_ON/033_ATF_Policies_External_Consent_ON_OFF_combine.lua +./test_scripts/Policies/External_UCS/Informing_HMI/001_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_ON.lua +./test_scripts/Policies/External_UCS/Informing_HMI/003_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_ON.lua +./test_scripts/Policies/External_UCS/Informing_HMI/004_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_ON.lua +./test_scripts/Policies/External_UCS/Informing_HMI/005_ATF_P_GetListofPermissions_with_appID_all_ecs_in_bound_EntitySatus_OFF.lua +./test_scripts/Policies/External_UCS/Informing_HMI/006_ATF_P_GetListofPermissions_with_appID_all_ecs_lower_bound_EntitySatus_OFF.lua +./test_scripts/Policies/External_UCS/Informing_HMI/007_ATF_P_GetListofPermissions_with_appID_all_ecs_upper_bound_EntitySatus_OFF.lua +./test_scripts/Policies/External_UCS/Informing_HMI/008_ATF_P_GetListofPermissions_with_appID_fake_param_cut_EntitySatus_OFF.lua +./test_scripts/Policies/External_UCS/Informing_HMI/009_ATF_P_GetListofPermissions_with_appID_not_stored_ecs.lua +./test_scripts/Policies/External_UCS/Informing_HMI/010_ATF_P_GetListofPermissions_no_appID_stored_ecs_present.lua +./test_scripts/Policies/External_UCS/Informing_HMI/011_ATF_P_GetListofPermissions_no_appID_not_stored_ecs.lua +./test_scripts/Policies/External_UCS/Informing_HMI/012_ATF_N_GetListofPermissions_no_appID_no_app_registered_stored_ecs.lua +./test_scripts/Policies/External_UCS/Informing_HMI/013_ATF_N_GetListofPermissions_no_appID_no_app_registered_not_stored_ecs.lua +./test_scripts/Policies/External_UCS/Informing_HMI/014_ATF_N_GetListofPermissions_no_appID_app_unregistered_stored_ecs.lua +./test_scripts/Policies/External_UCS/Informing_HMI/015_ATF_N_GetListofPermissions_no_appID_app_unregistered_not_stored_ecs.lua +./test_scripts/Policies/External_UCS/Informing_HMI/016_ATF_N_GetListofPermissions_empty_due_to_missing_entity_type_OnAppPermissionChange.lua +./test_scripts/Policies/External_UCS/Informing_HMI/017_ATF_N_GetListofPermissions_empty_due_to_missing_entityID_OnAppPermissionChange.lua +./test_scripts/Policies/External_UCS/Informing_HMI/018_ATF_N_GetListofPermissions_empty_due_to_missing_status_OnAppPermissionChange.lua +./test_scripts/Policies/External_UCS/Informing_HMI/019_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityType_OnAppPermissionChange.lua +./test_scripts/Policies/External_UCS/Informing_HMI/020_ATF_N_GetListofPermissions_empty_due_to_invalid_param_entityID_OnAppPermissionChange.lua +./test_scripts/Policies/External_UCS/Informing_HMI/021_ATF_N_GetListofPermissions_empty_due_to_invalid_param_status_OnAppPermissionChange.lua +./test_scripts/Policies/External_UCS/Informing_HMI/022_ATF_N_OnAppPermissionConsent_not_sent_when_no_PTU.lua +./test_scripts/Policies/Policies_Security/119_ATF_P_Policies_Performance_Requirement.lua +./test_scripts/Policies/Policies_Security/120_ATF_PolicyTable_Certificate_EMPTY_value.lua +./test_scripts/Policies/Policy_Table_Update/121_ATF_PTU_AppID_NotListed_PT_DeviceConsented_SecondApp.lua +./test_scripts/Policies/Policy_Table_Update/122_ATF_PTU_NotSuccessful_AppID_ListedPT_NewIgnCycle.lua +./test_scripts/Policies/Policy_Table_Update/123_ATF_PTU_DeviceConsent_from_User.lua +./test_scripts/Policies/Policy_Table_Update/124_ATF_User_requests_PTU.lua +./test_scripts/Policies/Policy_Table_Update/125_ATF_User_PressButton_HMI_PTU.lua +./test_scripts/Policies/Policy_Table_Update/126_ATF_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request.lua +./test_scripts/Policies/Policy_Table_Update/127_ATF_PTS_Creation_rule.lua +./test_scripts/Policies/Policy_Table_Update/128_ATF_PTU_GetURLs.lua +./test_scripts/Policies/Policy_Table_Update/131_ATF_PTS_storage_on_file_system.lua +./test_scripts/Policies/Policy_Table_Update/132_ATF_Timeout_to_wait_response_PTU.lua +./test_scripts/Policies/Policy_Table_Update/133_ATF_PTU_retry_timeout_definition.lua +./test_scripts/Policies/Policy_Table_Update/134_ATF_WiFi_one_application_registered.lua +./test_scripts/Policies/Policy_Table_Update/135_ATF_PM_sends_PTS_to_HMI.lua +./test_scripts/Policies/Policy_Table_Update/136_ATF_Define_urls_PTS_will_sent_hmi.lua +./test_scripts/Policies/Policy_Table_Update/137_ATF_Sending_PTS_to_mobile_application.lua +./test_scripts/Policies/Policy_Table_Update/138_ATF_Sending_PTS_to_app_OnSystemRequest_appID_default.lua +./test_scripts/Policies/Policy_Table_Update/140_ATF_timeout_countdown_start.lua +./test_scripts/Policies/Policy_Table_Update/141_ATF_Got_PTU_from_mobile_application.lua +./test_scripts/Policies/Policy_Table_Update/142_ATF_PoliciesManager_changes_status_to_UP_TO_DATE.lua +./test_scripts/Policies/Policy_Table_Update/143_ATF_PTU_validation_rules.lua +./test_scripts/Policies/Policy_Table_Update/144_ATF_PTU_validation_failure.lua +./test_scripts/Policies/Policy_Table_Update/145_ATF_PTU_Merge_Into_LPT.lua +./test_scripts/Policies/Policy_Table_Update/146_ATF_HMILvl_on_PTU_affected_in_FULL_or_LIMITED.lua +./test_scripts/Policies/Policy_Table_Update/147_ATF_Policy_Table_Update_Trigger_After_N_Kilometers.lua +./test_scripts/Policies/Policy_Table_Update/148_ATF_HMILvl_on_PTU_affected_in_BACKGROUND_or_NONE.lua +./test_scripts/Policies/Policy_Table_Update/149_ATF_Policy_Table_Update_Trigger_After_N_Days.lua +./test_scripts/Policies/Policy_Table_Update/150_ATF_Notifying_HMI_via_OnAppPermissionChanged.lua +./test_scripts/Policies/Policy_Table_Update/151_ATF_Apply_PTU_and_OnPermissionChange_notify.lua +./test_scripts/Policies/Policy_Table_Update/152_ATF_PTU_Merge_Of_Consumer_Friendly_Messages.lua +./test_scripts/Policies/Policy_Table_Update/153_ATF_PTU_Omit_Of_Consumer_Friendly_Messages.lua +./test_scripts/Policies/Policy_Table_Update/154_ATF_PTU_SDL_Must_Remove_PTU_File_Got_From_Sync_After_Getting_The_Updates.lua +./test_scripts/Policies/Policy_Table_Update/155_ATF_PTU_Policies_Manager_Changes_Status_To_UPDATE_NEEDED.lua +./test_scripts/Policies/Policy_Table_Update/156_ATF_PTU_OnStatusUpdate_Trigger.lua +./test_scripts/Policies/Policy_Table_Update/158_ATF_PTU_Policies_Manager_Changes_Status_To_UP_TO_DATE.lua +./test_scripts/Policies/Policy_Table_Update/159_ATF_PTU_Requirements_For_HMILevel_Of_The_Application_Taking_Part_In_Policy_Update.lua +./test_scripts/Policies/Policy_Table_Update/160_ATF_Default_Policy_For_The_App_After_PTU.lua +./test_scripts/Policies/Policy_Table_Update/161_ATF_User_Trigger_PTU_While_Another_Is_In_Progress.lua +./test_scripts/Policies/Policy_Table_Update/162_ATF_Policies_UTF-8_Encoding.lua +./test_scripts/Policies/Policy_Table_Update/163_P_ATF_Register_NewApp_not_exist_inLocalPT_PTU.lua +./test_scripts/Policies/Policy_Table_Update/164_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU.lua +./test_scripts/Policies/Policy_Table_Update/165_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp.lua +./test_scripts/Policies/Policy_Table_Update/166_ATF_HMI_sends_GetPolicyConfigurationData_one_app_registered_urls_3default.lua +./test_scripts/Policies/Policy_Table_Update/169_ATF_HMILvl_on_PTU_affected_app_in_LIMITED.lua +./test_scripts/Policies/Policy_Table_Update/170_ATF_PTU_Trigger_On_Navi_App_Registration_And_No_Certificate.lua +./test_scripts/Policies/Policy_Table_Update/171_ATF_Policies_Memory_Allocation_For_PTU.lua +./test_scripts/Policies/Policy_Table_Update/172_ATF_PTU_request_after_N_ignition_cycles.lua +./test_scripts/Policies/Related_HMI_API/173_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua +./test_scripts/Policies/Related_HMI_API/174_ATF_OnAllowSDLFunctionality_allowed_false_without_device.lua +./test_scripts/Policies/Related_HMI_API/175_ATF_OnAllowSDLFunctionality_allowed_true_without_device.lua +./test_scripts/Policies/Related_HMI_API/176_ATF_OnAllowSDLFunctionality_allowed_false_with_device.lua +./test_scripts/Policies/Related_HMI_API/177_ATF_OnAllowSDLFunctionality_allowed_true_with_device.lua +./test_scripts/Policies/Related_HMI_API/178_ATF_OnAppPermissionConsent_without_appID.lua +./test_scripts/Policies/Related_HMI_API/179_ATF_OnAppPermissionConsent_with_appID.lua +./test_scripts/Policies/Related_HMI_API/180_ATF_GetUserFriendlyMessage_language_section_is_absent_in_LocalPT.lua +./test_scripts/Policies/Related_HMI_API/181_ATF_GetUserFriendlyMessage_Language_not_found_in_localPT.lua +./test_scripts/Policies/Related_HMI_API/182_ATF_GetUserFriendlyMessage_with_Language.lua +./test_scripts/Policies/Related_HMI_API/183_ATF_PolManager_provides_data_consent_prompt_on_HMI_request.lua +./test_scripts/Policies/Related_HMI_API/184_ATF_GetListOfPermissions_without_appID.lua +./test_scripts/Policies/Related_HMI_API/185_ATF_GetListOfPermissions_with_appID.lua +./test_scripts/Policies/Related_HMI_API/186_ATF_OnPolicyUpdate_initiation_of_PTU.lua +./test_scripts/Policies/Related_HMI_API/187_ATF_Get_Status_Update_Request_from_HMI.lua +./test_scripts/Policies/user_consent_of_Policies/188_ATF_HP_Device_Data_Section_Validation.lua +./test_scripts/Policies/user_consent_of_Policies/189_ATF_isAppPermissionsRevoked_true.lua +./test_scripts/Policies/user_consent_of_Policies/190_ATF_Device_treated_as_consented.lua +./test_scripts/Policies/user_consent_of_Policies/191_ATF_UpdateDeviceList_on_device_connect.lua +./test_scripts/Policies/user_consent_of_Policies/192_ATF_isPermissionsConsentNeeded_false.lua +./test_scripts/Policies/user_consent_of_Policies/193_ATF_isPermissionsConsentNeeded_true.lua +./test_scripts/Policies/user_consent_of_Policies/194_ATF_ActivateApp_isSDLAllowed_true.lua +./test_scripts/Policies/user_consent_of_Policies/195_ATF_ActivateApp_isSDLAllowed_false.lua +./test_scripts/Policies/user_consent_of_Policies/196_ATF_UpdateDeviceList_isSDLAllowed_false.lua +./test_scripts/Policies/user_consent_of_Policies/197_ATF_ActivateApp_isSDLAllowed_true.lua +./test_scripts/Policies/user_consent_of_Policies/198_ATF_GetUserFriendlyMessage_language_missed.lua +./test_scripts/Policies/user_consent_of_Policies/199_ATF_appPermissionsConsentNeeded_true.lua +./test_scripts/Policies/user_consent_of_Policies/200_ATF_Data_consent_prompt.lua +./test_scripts/Policies/user_consent_of_Policies/201_ATF_User_consents_permissions.lua +./test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua +./test_scripts/Policies/user_consent_of_Policies/203_ATF_Master_reset.lua +./test_scripts/Policies/user_consent_of_Policies/204_ATF_App_group_order_preconsented.lua +./test_scripts/Policies/user_consent_of_Policies/205_ATF_Consent_timestamp.lua +./test_scripts/Policies/user_consent_of_Policies/206_ATF_Permissions_before_device_consented.lua +./test_scripts/Policies/user_consent_of_Policies/207_ATF_HMILevel_before_data_consented.lua +./test_scripts/Policies/user_consent_of_Policies/208_ATF_No_consent_for_default_policies.lua +./test_scripts/Policies/user_consent_of_Policies/209_ATF_Device_user_disallowed_after_consent.lua +./test_scripts/Policies/user_consent_of_Policies/210_ATF_User_consent_initing_after_PTU_FULL.lua +./test_scripts/Policies/user_consent_of_Policies/211_ATF_User_consent_initing_after_PTU_LIMITED.lua +./test_scripts/Policies/user_consent_of_Policies/212_ATF_Data_consent_device_not_in_LPT.lua +./test_scripts/Policies/user_consent_of_Policies/213_ATF_No_user_consent_prompt_in_group.lua +./test_scripts/Policies/user_consent_of_Policies/214_ATF_User_consent_prompt_persists.lua +;./test_scripts/Policies/user_consent_of_Policies/215_ATF_User_clears_all_applications.lua +./test_scripts/Policies/user_consent_of_Policies/216_ATF_User_consent_storage_in_LPT.lua +./test_scripts/Policies/user_consent_of_Policies/217_ATF_Consent_status_allowed_on_device_connect.lua +./test_scripts/Policies/user_consent_of_Policies/218_ATF_Consent_status_not_allowed_on_device_connect.lua +./test_scripts/Policies/user_consent_of_Policies/219_ATF_Device_identifier_creation_upon_connect_no_apps.lua +./test_scripts/Policies/user_consent_of_Policies/220_ATF_Device_identifier_creation_upon_connect_with_apps.lua +./test_scripts/Policies/user_consent_of_Policies/221_ATF_Factory_reset.lua +./test_scripts/Policies/user_consent_of_Policies/222_ATF_Device_HashID_In_LPT.lua +./test_scripts/Policies/Validation_of_PolicyTables/223_ATF_merge_preloaded_pt_into_local_pt_launch_on_each_sdl_start.lua +./test_scripts/Policies/Validation_of_PolicyTables/224_ATF_pt_update_validation_rules_request_type_array_omitted.lua +./test_scripts/Policies/Validation_of_PolicyTables/225_ATF_pt_update_validation_rules_request_type_array_has_one_invalid_value.lua +./test_scripts/Policies/Validation_of_PolicyTables/226_ATF_pt_update_validation_rules_request_type_array_has_only_one_value_is_invalid.lua +./test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua +./test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua +./test_scripts/Policies/Validation_of_PolicyTables/229_ATF_usage_and_error_counts_update_count_of_iap_buffer_full.lua +./test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua +./test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua +./test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua +./test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua +./test_scripts/Policies/Validation_of_PolicyTables/234_ATF_preloaded_pt_validation_rules_for_omited_parameters_exist.lua +./test_scripts/Policies/Validation_of_PolicyTables/235_preloaded_pt_validation_rules_for_omited_parameters_absent.lua +./test_scripts/Policies/Validation_of_PolicyTables/236_preloaded_pt_validation_rules_for_optional_parameters.lua +./test_scripts/Policies/Validation_of_PolicyTables/237_ATF_preloaded_pt_validation_rules_for_required_parameters.lua +./test_scripts/Policies/Validation_of_PolicyTables/238_ATF_preloaded_pt_invalid_required_param.lua +./test_scripts/Policies/Validation_of_PolicyTables/239_ATF_preloaded_pt_invalid_optional_param.lua +./test_scripts/Policies/Validation_of_PolicyTables/240_ATF_preloaded_pt_exists_with_read_permissions.lua +./test_scripts/Policies/Validation_of_PolicyTables/241_ATF_preloaded_pt_exists_but_no_read_permissions.lua +./test_scripts/Policies/Validation_of_PolicyTables/242_ATF_preloaded_pt_does_not_exists.lua +./test_scripts/Policies/Validation_of_PolicyTables/243_ATF_preloaded_pt_exists.lua +./test_scripts/Policies/Validation_of_PolicyTables/244_ATF_preloaded_pt_parameter_is_true_in_local_pt.lua +./test_scripts/Policies/Validation_of_PolicyTables/245_ATF_preloaded_pt_parameter_trigger_in_local_pt.lua +./test_scripts/Policies/Validation_of_PolicyTables/246_ATF_preloaded_pt_requesttype_parameters_all_are_invalid.lua +./test_scripts/Policies/Validation_of_PolicyTables/247_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists.lua +./test_scripts/Policies/Validation_of_PolicyTables/248_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_do_not_exists.lua +./test_scripts/Policies/Validation_of_PolicyTables/249_ATF_merge_preloaded_pt_into_local_pt_consumer_frendly_messages_exists_in_both.lua +./test_scripts/Policies/Validation_of_PolicyTables/250_ATF_merge_preloaded_pt_into_local_pt_app_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/251_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_exists.lua +./test_scripts/Policies/Validation_of_PolicyTables/252_ATF_merge_preloaded_pt_into_local_pt_functional_groupings_does_not_exist.lua +./test_scripts/Policies/Validation_of_PolicyTables/253_ATF_merge_preloaded_pt_into_local_pt_usage_and_error_counts.lua +./test_scripts/Policies/Validation_of_PolicyTables/254_ATF_merge_preloaded_pt_into_local_pt_device_data.lua +./test_scripts/Policies/Validation_of_PolicyTables/255_ATF_merge_preloaded_pt_into_local_pt_launch.lua +./test_scripts/Policies/Validation_of_PolicyTables/256_ATF_merge_preloaded_pt_into_local_pt_launch_does_not_changed.lua +./test_scripts/Policies/Validation_of_PolicyTables/257_ATF_merge_preloaded_pt_into_local_pt_module_config.lua +./test_scripts/Policies/Validation_of_PolicyTables/258_ATF_pt_snapshot_path_is_correct.lua +./test_scripts/Policies/Validation_of_PolicyTables/259_ATF_pt_snapshot_path_is_incorrect.lua +./test_scripts/Policies/Validation_of_PolicyTables/260_ATF_local_pt_from_preloaded_pt_master_reset.lua +./test_scripts/Policies/Validation_of_PolicyTables/261_ATF_pt_snapshot_validation_rules_for_optional_parameters.lua +./test_scripts/Policies/Validation_of_PolicyTables/262_ATF_pt_snapshot_validation_rules_for_omitted_parameters.lua +./test_scripts/Policies/Validation_of_PolicyTables/263_ATF_pt_snapshot_validation_rules_for_required_parameters.lua +./test_scripts/Policies/Validation_of_PolicyTables/264_ATF_pt_snapshot_creation_rule.lua +./test_scripts/Policies/Validation_of_PolicyTables/265_ATF_pt_snapshot_storage_on_file_system.lua +./test_scripts/Policies/Validation_of_PolicyTables/266_ATF_pt_update_validation_rules_optional_parameters_type.lua +./test_scripts/Policies/Validation_of_PolicyTables/267_ATF_pt_update_validation_rules_required_parameters_type.lua +./test_scripts/Policies/Validation_of_PolicyTables/268_ATF_pt_update_validation_rules_general.lua +./test_scripts/Policies/Validation_of_PolicyTables/269_ATF_pt_update_validation_rules_consumer_friendly_message.lua +./test_scripts/Policies/Validation_of_PolicyTables/270_ATF_Validate_default_hmi_default_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/271_ATF_Validate_preconsented_groups_default_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/272_ATF_Validate_groups_default_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/273_ATF_Validate_default_hmi_appId_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/274_ATF_Validate_appID_and_steal_focus_false.lua +./test_scripts/Policies/Validation_of_PolicyTables/275_ATF_Validate_appID_and_steal_focus_true.lua +./test_scripts/Policies/Validation_of_PolicyTables/276_ATF_Validate_appID_and_keep_context_true.lua +./test_scripts/Policies/Validation_of_PolicyTables/277_ATF_Validate_appID_and_keep_context_false.lua +./test_scripts/Policies/Validation_of_PolicyTables/278_ATF_Validate_groups_appID_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/279_ATF_Store_vin_from_GetVehicleData_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/281_ATF_Store_ignition_cycles_since_last_exchange_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/282_ATF_PT_Exchanged_X_Days_After_Epoch_In_PTS.lua +./test_scripts/Policies/Validation_of_PolicyTables/283_ATF_Store_pt_exchanged_at_odometer_x_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/284_ATF_Store_wers_country_code_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/285_ATF_Store_language_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/286_ATF_RAI_ccpu_version_via_GetSystemInfo.lua +./test_scripts/Policies/Validation_of_PolicyTables/287_ATF_Validate_appHMIType_appID_policies.lua +./test_scripts/Policies/Validation_of_PolicyTables/288_ATF_EmptyArray_preconsented_groups_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/289_ATF_EmptyValue_preconsented_groups_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/290_ATF_Nonfunctional_preconsented_groups_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/291_ATF_Valid_preconsented_groups_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/292_ATF_Valid_default_hmi_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/293_ATF_Validate_default_priority_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/294_ATF_Validate_nondefault_priority_preDataConsent.lua +./test_scripts/Policies/Validation_of_PolicyTables/295_ATF_Validate_preDataConsent_and_stealFocus_false.lua +./test_scripts/Policies/Validation_of_PolicyTables/296_ATF_Validate_preDataConsent_and_stealFocus_true.lua +./test_scripts/Policies/Validation_of_PolicyTables/297_ATF_Validate_preDataConsent_and_keepContext_false.lua +./test_scripts/Policies/Validation_of_PolicyTables/298_ATF_Validate_preDataConsent_and_keepContext_true.lua +./test_scripts/Policies/Validation_of_PolicyTables/299_ATF_Memory_Kb_Constraints_Ignoring.lua +./test_scripts/Policies/Validation_of_PolicyTables/300_ATF_HP_Applying_Heart_Beat_Timeout_Ms_From_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/301_ATF_usage_and_error_counts_update_app_registration_language_vui.lua +;./test_scripts/Policies/Validation_of_PolicyTables/302_ATF_HP_Applying_Heart_Beat_Timeout_Ms_After_PTU.lua 2550 +./test_scripts/Policies/Validation_of_PolicyTables/303_ATF_HP_Usage_And_Error_Counts_For_AppID.lua +./test_scripts/Policies/Validation_of_PolicyTables/304_ATF_HP_Validation_Count_Of_User_Selections.lua +./test_scripts/Policies/Validation_of_PolicyTables/306_ATF_Update_count_of_run_attempts_while_revoked_in_PT.lua +./test_scripts/Policies/Validation_of_PolicyTables/307_ATF_Validate_preDataConsent_RequestType_disallowed.lua +./test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua +./test_scripts/Policies/Validation_of_PolicyTables/309_ATF_Check_count_of_rejected_rpcs_calls.lua +./test_scripts/Policies/Validation_of_PolicyTables/310_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua +./test_scripts/Policies/Validation_of_PolicyTables/311_ATF_Check_count_of_removals_for_bad_behavior_too_many_pending_requests.lua +./test_scripts/Policies/Validation_of_PolicyTables/312_ATF_Check_count_of_removals_for_bad_behavior_too_many_requests.lua +./test_scripts/Policies/Validation_of_PolicyTables/313_ATF_Check_count_of_rpcs_sent_in_hmi_none.lua +./test_scripts/Policies/Validation_of_PolicyTables/314_ATF_Check_count_of_user_selections.lua diff --git a/test_sets/policies_happy_paths_HTTP.txt b/test_sets/policies_happy_paths_HTTP.txt index 79c085ec58..82909e7d95 100644 --- a/test_sets/policies_happy_paths_HTTP.txt +++ b/test_sets/policies_happy_paths_HTTP.txt @@ -29,7 +29,7 @@ ./test_scripts/Policies/build_options/080_ATF_PTU_OnStatsusUpdate_Trigger_UPDATE_NEEDED_HTTP.lua ./test_scripts/Policies/build_options/081_ATF_PTU_OnStatsusUpdate_Trigger_UPDATING_HTTP.lua ./test_scripts/Policies/build_options/082_ATF_PTU_OnStatsusUpdate_Trigger_UP_TO_DATE_HTTP.lua -;./test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua 1222 +./test_scripts/Policies/build_options/083_ATF_PTU_UTF8_Encoding_Check_HTTP.lua ./test_scripts/Policies/build_options/084_ATF_Default_Policy_For_The_App_After_PTU_HTTP.lua ./test_scripts/Policies/build_options/085_ATF_PTU_In_Progress_New_App_Registers_HTTP.lua ./test_scripts/Policies/build_options/086_ATF_PTU_Merging_wtih_LPT_HTTP.lua diff --git a/user_modules/script_runner.lua b/user_modules/script_runner.lua index 5f51ff4718..cdeaecac38 100644 --- a/user_modules/script_runner.lua +++ b/user_modules/script_runner.lua @@ -179,4 +179,9 @@ function runner.skipTest(message) skipReason = message end +function runner.isTestApplicable(pSdlBuildOptions) + runner.testSettings.restrictions.sdlBuildOptions = pSdlBuildOptions + runner.Step("Check SDL policy mode", function() end) +end + return runner From a75c4d4ee35c4687edf7004ecae0d11436934321 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 10 Mar 2020 09:45:15 -0400 Subject: [PATCH 34/64] Script for issue 3113 (#2347) --- ...parameters_are_present_in_RAI_response.lua | 70 +++++++++++++++++++ test_sets/Defects/6_1/3113.txt | 1 + 2 files changed, 71 insertions(+) create mode 100644 test_scripts/Defects/6_1/3113_Deprecated_parameters_are_present_in_RAI_response.lua create mode 100644 test_sets/Defects/6_1/3113.txt diff --git a/test_scripts/Defects/6_1/3113_Deprecated_parameters_are_present_in_RAI_response.lua b/test_scripts/Defects/6_1/3113_Deprecated_parameters_are_present_in_RAI_response.lua new file mode 100644 index 0000000000..f373931f29 --- /dev/null +++ b/test_scripts/Defects/6_1/3113_Deprecated_parameters_are_present_in_RAI_response.lua @@ -0,0 +1,70 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0216-widget-support.md +-- +-- Description: Check deprecated parameters are present in response of RegisterAppInterface for a new apps (6.0) +-- +-- Preconditions: +-- 1) SDL and HMI are started (HMI doesn't provide UI.GetCapabilities) +-- Steps: +-- 1) New app tries to register with 'syncMsgVersion' = 6.0 +-- SDL does: +-- 1) Proceed with 'RegisterAppInterface' request +-- 2) Respond to app with deprecated parameters +-- - displayCapabilities +-- - buttonCapabilities +-- - softButtonCapabilities +-- - presetBankCapabilities +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WidgetSupport/common') +local hmi_values = require('user_modules/hmi_values') + +--[[ Test Configuration ]] +common.getConfigAppParams().syncMsgVersion.majorVersion = 6 +common.getConfigAppParams().syncMsgVersion.minorVersion = 0 + +--[[ Local Functions ]] +local function getHMIParams() + local params = hmi_values.getDefaultHMITable() + params.UI.IsReady.params.available = true + params.UI.GetCapabilities = nil + return params +end + +local function sendRegisterApp() + common.getMobileSession():StartService(7) + :Do(function() + local corId = common.getMobileSession():SendRPC("RegisterAppInterface", common.getConfigAppParams()) + common.getMobileSession():ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :ValidIf(function(_, data) + local msg = "" + if not data.payload.displayCapabilities then + msg = msg .. "'displayCapabilities', " + end + if not data.payload.buttonCapabilities then + msg = msg .. "'buttonCapabilities', " + end + if not data.payload.softButtonCapabilities then + msg = msg .. "'softButtonCapabilities', " + end + if not data.payload.presetBankCapabilities then + msg = msg .. "'presetBankCapabilities', " + end + if string.len(msg) > 0 then + return false, "There are no expected parameters in response:\n" .. string.sub(msg, 1, -3) + end + return true + end) + end) +end + +--[[ Scenario ]] +common.Title("Precondition") +common.Step("Clean environment and Back-up/update PPT", common.precondition) +common.Step("Start SDL, HMI, connect Mobile, start Session", common.start, { getHMIParams() }) + +common.Title("Test") +common.Step("App sends RAI RPC - there are deprecated parameters", sendRegisterApp) + +common.Title("Postconditions") +common.Step("Stop SDL, restore SDL settings and PPT", common.postcondition) diff --git a/test_sets/Defects/6_1/3113.txt b/test_sets/Defects/6_1/3113.txt new file mode 100644 index 0000000000..4ff2045f54 --- /dev/null +++ b/test_sets/Defects/6_1/3113.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/3113_Deprecated_parameters_are_present_in_RAI_response.lua From ad6d239c04a0006ab18f286725b55063e888c3df Mon Sep 17 00:00:00 2001 From: "Taras Myza (GitHub)" <40491384+TMyza@users.noreply.github.com> Date: Tue, 10 Mar 2020 16:45:38 +0300 Subject: [PATCH 35/64] Script for 2966 issue (#2356) Co-authored-by: Myza Taras --- ...correctly_assigned_default_permissions.lua | 58 +++++++++++++++++++ test_sets/Defects/6_1/2966.txt | 1 + 2 files changed, 59 insertions(+) create mode 100644 test_scripts/Defects/6_1/2966_SDL_incorrectly_assigned_default_permissions.lua create mode 100644 test_sets/Defects/6_1/2966.txt diff --git a/test_scripts/Defects/6_1/2966_SDL_incorrectly_assigned_default_permissions.lua b/test_scripts/Defects/6_1/2966_SDL_incorrectly_assigned_default_permissions.lua new file mode 100644 index 0000000000..3df8b67366 --- /dev/null +++ b/test_scripts/Defects/6_1/2966_SDL_incorrectly_assigned_default_permissions.lua @@ -0,0 +1,58 @@ +--------------------------------------------------------------------------------------------------- +-- User story: https://github.com/smartdevicelink/sdl_core/issues/2966 +-- +-- Description: +-- SDL incorrectly assigned default permissions for an app if they were defined in preloaded +-- Steps to reproduce: +-- 1) Update SDL preloaded_pt file and add default permissions +-- 2) SDL and HMI are started +-- 3) App is registered +-- SDL does: +-- - a) SDL->HMI: OnAppRegistered(params) +-- - b) SDL->App: SUCCESS, success:"true":RegisterAppInterface() +-- - c) SDL->App: OnHMIStatus(HMlLevel, audioStreamingState, systemContext) +-- - d) SDL->App: OnPermissionsChange(permissionItem) +-- - e) SDL->App: OnSystemRequest(LOCK_SCREEN_ICON_URL) +--------------------------------------------------------------------------------------------------- +-- [[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('user_modules/sequences/actions') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Functions ]] +local function updatePreloadedPT() + local pt = common.sdl.getPreloadedPT() + pt.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + pt.policy_table.app_policies[common.getConfigAppParams().fullAppID] = "default" + common.sdl.setPreloadedPT(pt) +end + +local function registerAppWOPTU() + local mobileSession = common.getMobileSession(1) + mobileSession:StartService(7) + :Do(function() + local corId = mobileSession:SendRPC("RegisterAppInterface", common.app.getParams(1)) + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppRegistered") + mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :Do(function() + mobileSession:ExpectNotification("OnHMIStatus", + { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) + mobileSession:ExpectNotification("OnPermissionsChange") + mobileSession:ExpectNotification("OnSystemRequest", { requestType = "LOCK_SCREEN_ICON_URL" }) + end) + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Add app to SDL preloaded", updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("RAI", registerAppWOPTU) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/2966.txt b/test_sets/Defects/6_1/2966.txt new file mode 100644 index 0000000000..8071dc01d5 --- /dev/null +++ b/test_sets/Defects/6_1/2966.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/2966_SDL_incorrectly_assigned_default_permissions.lua From 88db59965704b06446f883f99380e964711235ea Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 10 Mar 2020 09:57:30 -0400 Subject: [PATCH 36/64] Test sets updates in scope of 6.1 release (#2360) * Move test set for VD versioning * Add test set for 2442 issue --- test_sets/Defects/6_1/2442.txt | 1 + test_sets/{vehicle_data_versioning.txt => Defects/6_1/2997.txt} | 0 2 files changed, 1 insertion(+) create mode 100644 test_sets/Defects/6_1/2442.txt rename test_sets/{vehicle_data_versioning.txt => Defects/6_1/2997.txt} (100%) diff --git a/test_sets/Defects/6_1/2442.txt b/test_sets/Defects/6_1/2442.txt new file mode 100644 index 0000000000..014b6792eb --- /dev/null +++ b/test_sets/Defects/6_1/2442.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/2442_Fix_mem_seg_fault_error_in_jsoncpp.lua diff --git a/test_sets/vehicle_data_versioning.txt b/test_sets/Defects/6_1/2997.txt similarity index 100% rename from test_sets/vehicle_data_versioning.txt rename to test_sets/Defects/6_1/2997.txt From f68a9c91f7e388b6b3ec6c3dbb30b6c3bb159e15 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 10 Mar 2020 10:28:13 -0400 Subject: [PATCH 37/64] Script for issue 2990 (#2348) --- .../2990_PerfomInteraction_with_choiceID.lua | 222 ++++++++++++++++++ test_sets/Defects/6_1/2990.txt | 1 + 2 files changed, 223 insertions(+) create mode 100644 test_scripts/Defects/6_1/2990_PerfomInteraction_with_choiceID.lua create mode 100644 test_sets/Defects/6_1/2990.txt diff --git a/test_scripts/Defects/6_1/2990_PerfomInteraction_with_choiceID.lua b/test_scripts/Defects/6_1/2990_PerfomInteraction_with_choiceID.lua new file mode 100644 index 0000000000..ac2320b87a --- /dev/null +++ b/test_scripts/Defects/6_1/2990_PerfomInteraction_with_choiceID.lua @@ -0,0 +1,222 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2990 +-- +-- Steps: +-- 1. Start SDL, HMI, connect Mobile device +-- 2. Register mobile application +-- 3. Activate application +-- 4. App creates a few interaction choice sets +-- 5. App tries to do PerformInteraction in BOTH mode +-- SDL does: +-- - forwards VR.PerformInteraction and UI.PerformInteraction requests to HMI +-- 5. HMI replies with one of the following: +-- a) different ChoiceID from UI and VR +-- b) the same ChoiceID from UI and VR +-- c) some ChoiceID from VR only +-- d) some ChoiceID from UI only +-- SDL does respond to the App with one of the following: +-- a) success = false, resultCode = "GENERIC_ERROR", choiceID = nil +-- b) success = true, resultCode = "SUCCESS", choiceID = or +-- c) success = true, resultCode = "SUCCESS", choiceID = +-- d) success = true, resultCode = "SUCCESS", choiceID = +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Smoke/commonSmoke') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local putFileParams = { + requestParams = { + syncFileName = 'icon.png', + fileType = "GRAPHIC_PNG", + persistentFile = false, + systemFile = false + }, + filePath = "files/icon.png" +} + +local ImageValue = { + value = common.getPathToFileInAppStorage("icon.png"), + imageType = "DYNAMIC", +} + +local function getPromptValue(pText) + return { + { + text = pText, + type = "TEXT" + } + } +end + +local initialPromptValue = getPromptValue(" Make your choice ") + +local helpPromptValue = getPromptValue(" Help Prompt ") + +local timeoutPromptValue = getPromptValue(" Time out ") + +local vrHelpvalue = { + { + text = " New VRHelp ", + position = 1, + image = ImageValue + } +} + +local requestParams = { + initialText = "StartPerformInteraction", + initialPrompt = initialPromptValue, + interactionMode = "BOTH", + interactionChoiceSetIDList = { + 100, 200, 300 + }, + helpPrompt = helpPromptValue, + timeoutPrompt = timeoutPromptValue, + timeout = 5000, + vrHelp = vrHelpvalue, + interactionLayout = "ICON_ONLY", +} + +--[[ Local Functions ]] +local function setChoiceSet(pChoiceIDValue) + local temp = { + { + choiceID = pChoiceIDValue, + menuName ="Choice" .. tostring(pChoiceIDValue), + vrCommands = { + "VrChoice" .. tostring(pChoiceIDValue), + }, + image = { + value ="icon.png", + imageType ="STATIC", + } + } + } + return temp +end + +local function sendOnSystemContext(pCtx) + common.getHMIConnection():SendNotification("UI.OnSystemContext", { + appID = common.getHMIAppId(), + systemContext = pCtx + }) +end + +local function setExChoiceSet(pChoiceIDValues) + local exChoiceSet = { } + for i = 1, #pChoiceIDValues do + exChoiceSet[i] = { + choiceID = pChoiceIDValues[i], + image = { + value = "icon.png", + imageType = "STATIC", + }, + menuName = "Choice" .. pChoiceIDValues[i] + } + end + return exChoiceSet +end + +local function createInteractionChoiceSet(pChoiceSetID) + local choiceID = pChoiceSetID + local cid = common.getMobileSession():SendRPC("CreateInteractionChoiceSet", { + interactionChoiceSetID = pChoiceSetID, + choiceSet = setChoiceSet(choiceID), + }) + common.getHMIConnection():ExpectRequest("VR.AddCommand", { + cmdID = choiceID, + type = "Choice", + vrCommands = { "VrChoice" .. tostring(choiceID) } + }) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + common.getMobileSession():ExpectResponse(cid, { resultCode = "SUCCESS", success = true }) +end + +local function PI_ViaBOTH(pVRChoiceID, pUIhoiceID) + local pParams = requestParams + local appChoiceID = pVRChoiceID or pUIhoiceID + local appExp = { success = true, resultCode = "SUCCESS", choiceID = appChoiceID } + if pVRChoiceID ~= nil and pUIhoiceID ~= nil and pVRChoiceID ~= pUIhoiceID then + appExp = { success = false, resultCode = "GENERIC_ERROR", choiceID = nil } + end + local cid = common.getMobileSession():SendRPC("PerformInteraction",pParams) + common.getHMIConnection():ExpectRequest("VR.PerformInteraction", { + helpPrompt = pParams.helpPrompt, + initialPrompt = pParams.initialPrompt, + timeout = pParams.timeout, + timeoutPrompt = pParams.timeoutPrompt + }) + :Do(function(_,data) + common.getHMIConnection():SendNotification("TTS.Started") + common.getHMIConnection():SendNotification("VR.Started") + sendOnSystemContext("VRSESSION") + local function firstSpeakTimeOut() + common.getHMIConnection():SendNotification("TTS.Stopped") + end + common.runAfter(firstSpeakTimeOut, 1000) + local function vrResponse() + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { choiceID = pVRChoiceID }) + common.getHMIConnection():SendNotification("VR.Stopped") + sendOnSystemContext("MAIN") + end + common.runAfter(vrResponse, 2000) + end) + + common.getHMIConnection():ExpectRequest("UI.PerformInteraction", { + timeout = pParams.timeout, + choiceSet = setExChoiceSet(pParams.interactionChoiceSetIDList), + initialText = { + fieldName = "initialInteractionText", + fieldText = pParams.initialText + }, + vrHelp = pParams.vrHelp, + vrHelpTitle = pParams.initialText + }) + :Do(function(_,data) + local function choiceIconDisplayed() + sendOnSystemContext("HMI_OBSCURED") + end + common.runAfter(choiceIconDisplayed, 2050) + local function uiResponse() + common.getHMIConnection():SendNotification("TTS.Stopped") + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { choiceID = pUIhoiceID }) + sendOnSystemContext("MAIN") + end + common.runAfter(uiResponse, 3000) + end) + + common.getMobileSession():ExpectResponse(cid, appExp) + :ValidIf(function(_, data) + if data.payload.choiceID ~= appExp.choiceID then + return false, "Expected choiceID:'" .. tostring(appExp.choiceID) + .. "', actual: '" .. tostring(data.payload.choiceID) .. "'" + end + return true + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Update Preloaded PT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Activate App", common.activateApp) +runner.Step("Upload icon file", common.putFile, { putFileParams }) +runner.Step("CreateInteractionChoiceSet with id 100", createInteractionChoiceSet, { 100 }) +runner.Step("CreateInteractionChoiceSet with id 200", createInteractionChoiceSet, { 200 }) +runner.Step("CreateInteractionChoiceSet with id 300", createInteractionChoiceSet, { 300 }) + +runner.Title("Test") +runner.Step("PerformInteraction with different ChoiceID from UI and VR", PI_ViaBOTH, { 100, 200 }) +runner.Step("PerformInteraction with the same ChoiceID from UI and VR", PI_ViaBOTH, { 100, 100 }) +runner.Step("PerformInteraction with ChoiceID from VR only", PI_ViaBOTH, { 100, nil }) +runner.Step("PerformInteraction with ChoiceID from UI only", PI_ViaBOTH, { nil, 100 }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/2990.txt b/test_sets/Defects/6_1/2990.txt new file mode 100644 index 0000000000..cf2e0902e3 --- /dev/null +++ b/test_sets/Defects/6_1/2990.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/2990_PerfomInteraction_with_choiceID.lua From 0e9450df1d69356fbfe40fa496621b933891597f Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Fri, 13 Mar 2020 11:34:22 -0400 Subject: [PATCH 38/64] Scripts for 3267 issue (#2357) * Add scripts for 3267 issue * Update test_scripts/Defects/6_1/3267_2_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL_app_specific.lua Co-Authored-By: Getmanets Irina (GitHub) <11210973+GetmanetsIrina@users.noreply.github.com> Co-authored-by: Getmanets Irina (GitHub) <11210973+GetmanetsIrina@users.noreply.github.com> --- ...I_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua | 53 ++++++++++++++++ ...uest_LOCK_SCREEN_ICON_URL_app_specific.lua | 60 +++++++++++++++++++ test_sets/Defects/6_1/3267.txt | 11 ++++ 3 files changed, 124 insertions(+) create mode 100644 test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua create mode 100644 test_scripts/Defects/6_1/3267_2_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL_app_specific.lua create mode 100644 test_sets/Defects/6_1/3267.txt diff --git a/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua b/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua new file mode 100644 index 0000000000..a95c2000ea --- /dev/null +++ b/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua @@ -0,0 +1,53 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3267 +-- +-- Steps: +-- 1. Make sure 'url' is defined in PT in 'endpoints' section +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register mobile application +-- SDL does: +-- - send 'OnSystemRequest(LOCK_SCREEN_ICON_URL)' notification +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local numOfApps = 200 +local appParams = utils.cloneTable(common.app.getParams(1)) + +--[[ Local Functions ]] +local function registerAppWOPTU(pAppId) + appParams.appName = "App_" .. pAppId + appParams.appID = "000" .. pAppId + appParams.fullAppID = "000000" .. pAppId + config["application" .. pAppId] = { registerAppInterfaceParams = appParams } + local mobileSession = common.getMobileSession(pAppId) + mobileSession:StartService(7) + :Do(function() + local corId = mobileSession:SendRPC("RegisterAppInterface", appParams) + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppRegistered") + mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :Do(function() + mobileSession:ExpectNotification("OnSystemRequest", { requestType = "LOCK_SCREEN_ICON_URL" }) + end) + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +for i = 1, numOfApps do + runner.Step("Register App " .. i, registerAppWOPTU, { i }) + runner.Step("Unregister App " .. i, common.app.unRegister, { i }) +end + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3267_2_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL_app_specific.lua b/test_scripts/Defects/6_1/3267_2_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL_app_specific.lua new file mode 100644 index 0000000000..ce450dcc73 --- /dev/null +++ b/test_scripts/Defects/6_1/3267_2_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL_app_specific.lua @@ -0,0 +1,60 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3267 +-- +-- Steps: +-- 1. Make sure specific 'url' is defined in PT in 'endpoints' section for an application +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register mobile application +-- SDL does: +-- - send 'OnSystemRequest(LOCK_SCREEN_ICON_URL)' notification with app specific 'url' +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Variables ]] +local urls = { + default = "http://i.imgur.com/default.png", + [1] = "http://i.imgur.com/0000001.png" +} + +--[[ Local Functions ]] +local function updatePreloadedPT() + local pt = common.sdl.getPreloadedPT() + pt.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + local lockData = pt.policy_table.module_config.endpoints.lock_screen_icon_url + lockData["default"] = { urls["default"] } + lockData[common.app.getParams(1).fullAppID] = { urls[1] } + common.sdl.setPreloadedPT(pt) +end + +local function registerAppWOPTU(pAppId) + local mobileSession = common.getMobileSession(pAppId) + mobileSession:StartService(7) + :Do(function() + local corId = mobileSession:SendRPC("RegisterAppInterface", common.app.getParams(pAppId)) + common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppRegistered") + mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :Do(function() + local exp = urls["default"] + if pAppId == 1 then exp = urls[1] end + mobileSession:ExpectNotification("OnSystemRequest", { requestType = "LOCK_SCREEN_ICON_URL", url = exp }) + end) + end) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Update SDL preloaded", updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App 1", registerAppWOPTU, { 1 }) +runner.Step("Register App 2", registerAppWOPTU, { 2 }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3267.txt b/test_sets/Defects/6_1/3267.txt new file mode 100644 index 0000000000..5ebaf49b42 --- /dev/null +++ b/test_sets/Defects/6_1/3267.txt @@ -0,0 +1,11 @@ +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +./test_scripts/Defects/6_1/3267_2_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL_app_specific.lua From 9bfd392e4f14102de12902564d87f406e8822672 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Tue, 17 Mar 2020 22:18:28 +0200 Subject: [PATCH 39/64] Set/GetAppProperites response update (#2369) --- test_scripts/WebEngine/015_GetAppProperties_success_flow.lua | 3 +-- .../WebEngine/016_GetAppProperties_unknown_parmeter.lua | 3 +-- test_scripts/WebEngine/026_PTU_snapshot_validation.lua | 2 +- test_scripts/WebEngine/commonWebEngine.lua | 5 ++--- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua b/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua index 3d129eaf7c..56f237a9b4 100644 --- a/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua +++ b/test_scripts/WebEngine/015_GetAppProperties_success_flow.lua @@ -42,8 +42,7 @@ local appProperties2 = { --[[ Local Functions ]] local function getAppPropertiesAll(pData) local sdlResponseDataResult = {} - sdlResponseDataResult.success = true - sdlResponseDataResult.resultCode = "SUCCESS" + sdlResponseDataResult.code = 0 sdlResponseDataResult.properties = pData local corId = common.getHMIConnection():SendRequest("BasicCommunication.GetAppProperties", {}) common.getHMIConnection():ExpectResponse(corId, { result = sdlResponseDataResult }) diff --git a/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua b/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua index a26975f859..510aeef13e 100644 --- a/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua +++ b/test_scripts/WebEngine/016_GetAppProperties_unknown_parmeter.lua @@ -21,8 +21,7 @@ local common = require('test_scripts/WebEngine/commonWebEngine') --[[ Local Functions ]] local function getAppPropertiesUnknownParameter(pData) local hmiResponseDataResult = {} - hmiResponseDataResult.success = true - hmiResponseDataResult.resultCode = "SUCCESS" + hmiResponseDataResult.code = 0 hmiResponseDataResult.properties = { pData } local corId = common.getHMIConnection():SendRequest("BasicCommunication.GetAppProperties", { unknownParameter = "unknownParameter" }) diff --git a/test_scripts/WebEngine/026_PTU_snapshot_validation.lua b/test_scripts/WebEngine/026_PTU_snapshot_validation.lua index 037216fee1..2386a38257 100644 --- a/test_scripts/WebEngine/026_PTU_snapshot_validation.lua +++ b/test_scripts/WebEngine/026_PTU_snapshot_validation.lua @@ -51,7 +51,7 @@ local function setAppProperties(pData) local corId = common.getHMIConnection():SendRequest("BasicCommunication.SetAppProperties", { properties = pData }) common.getHMIConnection():ExpectResponse(corId, - { result = { success = true, resultCode = "SUCCESS" }}) + { result = { code = 0 }}) common.isPTUStarted() common.wait(1000) end diff --git a/test_scripts/WebEngine/commonWebEngine.lua b/test_scripts/WebEngine/commonWebEngine.lua index 0c6447d797..6a9cddec18 100644 --- a/test_scripts/WebEngine/commonWebEngine.lua +++ b/test_scripts/WebEngine/commonWebEngine.lua @@ -95,13 +95,12 @@ function common.setAppProperties(pData) local corId = common.getHMIConnection():SendRequest("BasicCommunication.SetAppProperties", { properties = pData }) common.getHMIConnection():ExpectResponse(corId, - { result = { success = true, resultCode = "SUCCESS" }}) + { result = { code = 0 }}) end function common.getAppProperties(pData) local sdlResponseDataResult = {} - sdlResponseDataResult.success = true - sdlResponseDataResult.resultCode = "SUCCESS" + sdlResponseDataResult.code = 0 sdlResponseDataResult.properties = { pData } local corId = common.getHMIConnection():SendRequest("BasicCommunication.GetAppProperties", { policyAppID = pData.policyAppID }) From 1ab131a659ebecfcf84fa511fe26900047578cbc Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 17 Mar 2020 16:21:40 -0400 Subject: [PATCH 40/64] Add script for 3278 issue (#2361) --- ...-V_services_protected_at_the_same_time.lua | 53 +++++++++++++++++++ test_sets/Defects/6_1/3278.txt | 10 ++++ 2 files changed, 63 insertions(+) create mode 100644 test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua create mode 100644 test_sets/Defects/6_1/3278.txt diff --git a/test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua b/test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua new file mode 100644 index 0000000000..e8a0e8d905 --- /dev/null +++ b/test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua @@ -0,0 +1,53 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3278 +-- +-- Steps: +-- 1. Set up all required certificates to for protected mode +-- 2. Start SDL, HMI, connect Mobile device +-- 3. Register NAVIGATION application +-- 4. Activate application +-- 5. Start Audio service in protected mode +-- SDL does: +-- - start SSL handshake procedure +-- 6. Start Video service in protected mode while handshake is in progress +-- SDL does: +-- - finish SSL handshake successfully +-- - start Audio/Video services in protected mode +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("test_scripts/Security/SSLHandshakeFlow/common") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.application1.registerAppInterfaceParams.appHMIType = { "NAVIGATION" } + +local function startServiceProtectedACK(pServiceId) + local serviceId = pServiceId + common.getMobileSession():StartSecureService(serviceId) + common.getMobileSession():ExpectControlMessage(serviceId, { + frameInfo = common.frameInfo.START_SERVICE_ACK, + encryption = true + }) +end + +local function startServicesProtected() + startServiceProtectedACK(10) + RUN_AFTER(function() startServiceProtectedACK(11) end, 25) + common.getMobileSession():ExpectHandshakeMessage() +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Init SDL certificates", common.initSDLCertificates, { "./files/Security/client_credential.pem" }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) + +runner.Title("Test") +runner.Step("Register App", common.registerApp) +runner.Step("Register App", common.activateApp) +runner.Step("PolicyTableUpdate", common.policyTableUpdate) +runner.Step("Start A/V services simultaneously", startServicesProtected) + +runner.Title("Postconditions") +runner.Step("Stop SDL, clean-up certificates", common.postconditions) diff --git a/test_sets/Defects/6_1/3278.txt b/test_sets/Defects/6_1/3278.txt new file mode 100644 index 0000000000..c75bb08b99 --- /dev/null +++ b/test_sets/Defects/6_1/3278.txt @@ -0,0 +1,10 @@ +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua +./test_scripts/Defects/6_1/3278_Start_A-V_services_protected_at_the_same_time.lua From f199e0c782572ad81a2e164d3cd49b88016fca1b Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Tue, 17 Mar 2020 23:55:03 +0200 Subject: [PATCH 41/64] Scripts for 3148 issue (#2351) --- .../Defects/6_1/3148_1_video_streaming.lua | 99 +++++++++++++++++++ .../Defects/6_1/3148_2_audio_streaming.lua | 98 ++++++++++++++++++ test_sets/Defects/6_1/3148.txt | 10 ++ 3 files changed, 207 insertions(+) create mode 100644 test_scripts/Defects/6_1/3148_1_video_streaming.lua create mode 100644 test_scripts/Defects/6_1/3148_2_audio_streaming.lua create mode 100644 test_sets/Defects/6_1/3148.txt diff --git a/test_scripts/Defects/6_1/3148_1_video_streaming.lua b/test_scripts/Defects/6_1/3148_1_video_streaming.lua new file mode 100644 index 0000000000..3bd16616c7 --- /dev/null +++ b/test_scripts/Defects/6_1/3148_1_video_streaming.lua @@ -0,0 +1,99 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3148 + +-- In case: +-- 1. Navigation app is registered and activated +-- 2. Video streaming is started +-- 3. Wait some time +-- 4. Video streaming is restarted +-- SDL does: +-- a) send Navigation.OnVideoDataStreaming(available=false) by streaming finish +-- b) send Navigation.OnVideoDataStreaming(available=true) by streaming start +-- 5. Mobile app adds AddSubMenu +-- SDL does: +-- a) send UI.AddSubMenu request to HMI +-- b) resend UI.AddSubMenu response from HMI to mobile app +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('user_modules/sequences/actions') +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local timeToWait = 30 -- in sec. +local videoStreamServiceId = 11 +local videoDataStoppedTimeout = 500 + +--[[ Local Functions ]] +local function startStreaming(pServiceId) + local msg = { + frameInfo = 0, + frameType = 1, + serviceType = pServiceId, + binaryData = "123" + } + local function sendStreamData() + common.getMobileSession():Send(msg) + end + sendStreamData() + common.getHMIConnection():ExpectNotification("Navigation.OnVideoDataStreaming") + :Do(function(_, data) + if data.params.available == false then + sendStreamData() + RUN_AFTER(sendStreamData, videoDataStoppedTimeout) + end + end) + :Times(AnyNumber()) + utils.cprint(35, "Wait " .. timeToWait .. " seconds...") + utils.wait(timeToWait * 1000 + 1000) +end + +local function startService(pServiceId) + common.getMobileSession():StartService(pServiceId) + common.getHMIConnection():ExpectRequest("Navigation.StartStream") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + startStreaming(pServiceId) + end) +end + +local function sendAddSubMenu() + local requestParams = { + menuID = 1000, + position = 500, + menuName ="SubMenupositive" + } + local corId = common.getMobileSession():SendRPC("AddSubMenu", requestParams) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + common.getMobileSession():ExpectResponse(corId, { success = true, resultCode = "SUCCESS"}) + common.getMobileSession():ExpectNotification("OnHashChange") +end + + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Set VideoDataStoppedTimeout=500 in ini file", common.setSDLIniParameter, + { "VideoDataStoppedTimeout", videoDataStoppedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Policy Table Update", common.policyTableUpdate) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("Start video service", startService, { videoStreamServiceId }) +runner.Step("AddSubMenu", sendAddSubMenu) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Defects/6_1/3148_2_audio_streaming.lua b/test_scripts/Defects/6_1/3148_2_audio_streaming.lua new file mode 100644 index 0000000000..ca4efa4a4f --- /dev/null +++ b/test_scripts/Defects/6_1/3148_2_audio_streaming.lua @@ -0,0 +1,98 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3148 + +-- In case: +-- 1. Navigation app is registered and activated +-- 2. Audio streaming is started +-- 3. Wait some time +-- 4. Audio streaming is restarted +-- SDL does: +-- a) send Navigation.OnAudioDataStreaming(available=false) by streaming finish +-- b) send Navigation.OnAudioDataStreaming(available=true) by streaming start +-- 5. Mobile app adds AddSubMenu +-- SDL does: +-- a) send UI.AddSubMenu request to HMI +-- b) resend UI.AddSubMenu response from HMI to mobile app +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('user_modules/sequences/actions') +local utils = require("user_modules/utils") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Apps Configuration ]] +common.app.getParams(1).appHMIType = { "NAVIGATION" } + +--[[ Local Variables ]] +local timeToWait = 30 -- in sec. +local audioStreamServiceId = 10 +local audioDataStoppedTimeout = 500 + +--[[ Local Functions ]] +local function startStreaming(pServiceId) + local msg = { + frameInfo = 0, + frameType = 1, + serviceType = pServiceId, + binaryData = "123" + } + local function sendStreamData() + common.getMobileSession():Send(msg) + end + sendStreamData() + common.getHMIConnection():ExpectNotification("Navigation.OnAudioDataStreaming") + :Do(function(_, data) + if data.params.available == false then + sendStreamData() + RUN_AFTER(sendStreamData, audioDataStoppedTimeout) + end + end) + :Times(AnyNumber()) + utils.cprint(35, "Wait " .. timeToWait .. " seconds...") + utils.wait(timeToWait * 1000 + 1000) +end + +local function startService(pServiceId) + common.getMobileSession():StartService(pServiceId) + common.getHMIConnection():ExpectRequest("Navigation.StartAudioStream") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + startStreaming(pServiceId) + end) +end + +local function sendAddSubMenu() + local requestParams = { + menuID = 1000, + position = 500, + menuName ="SubMenupositive" + } + local corId = common.getMobileSession():SendRPC("AddSubMenu", requestParams) + common.getHMIConnection():ExpectRequest("UI.AddSubMenu") + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", {}) + end) + + common.getMobileSession():ExpectResponse(corId, { success = true, resultCode = "SUCCESS"}) + common.getMobileSession():ExpectNotification("OnHashChange") +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Set AudioDataStoppedTimeout=500 in ini file", common.setSDLIniParameter, + { "AudioDataStoppedTimeout", audioDataStoppedTimeout }) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("Register App", common.registerApp) +runner.Step("Policy Table Update", common.policyTableUpdate) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("Start audio service", startService, { audioStreamServiceId }) +runner.Step("AddSubMenu", sendAddSubMenu) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3148.txt b/test_sets/Defects/6_1/3148.txt new file mode 100644 index 0000000000..d4efa039e1 --- /dev/null +++ b/test_sets/Defects/6_1/3148.txt @@ -0,0 +1,10 @@ +./test_scripts/Defects/6_1/3148_1_video_streaming.lua +./test_scripts/Defects/6_1/3148_1_video_streaming.lua +./test_scripts/Defects/6_1/3148_1_video_streaming.lua +./test_scripts/Defects/6_1/3148_1_video_streaming.lua +./test_scripts/Defects/6_1/3148_1_video_streaming.lua +./test_scripts/Defects/6_1/3148_2_audio_streaming.lua +./test_scripts/Defects/6_1/3148_2_audio_streaming.lua +./test_scripts/Defects/6_1/3148_2_audio_streaming.lua +./test_scripts/Defects/6_1/3148_2_audio_streaming.lua +./test_scripts/Defects/6_1/3148_2_audio_streaming.lua From b459d040fd031293c3ab60b8c6c6754f18c2891c Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Wed, 18 Mar 2020 09:40:55 -0400 Subject: [PATCH 42/64] Add delay to unexpected disconnect functions (#2371) --- .../GenericNetworkSignalData/commonGenericNetSignalData.lua | 1 + .../001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua | 1 + .../RC/InteriorVehicleData_cache/common_interiorVDcache.lua | 1 + test_scripts/Resumption/HMI_Level/common.lua | 1 + test_scripts/SDL5_0/LowVoltage/common.lua | 1 + test_scripts/Smoke/commonSmoke.lua | 1 + test_scripts/TheSameApp/commonTheSameApp.lua | 1 + test_scripts/WidgetSupport/common.lua | 1 + 8 files changed, 8 insertions(+) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua index 4c56917e6c..d42ae6d409 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua @@ -864,6 +864,7 @@ function common.unexpectedDisconnect() common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) :Times(actions.mobile.getAppsCount()) actions.mobile.disconnect() + utils.wait(1000) end function common.connectMobile() diff --git a/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua b/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua index 5506695449..c56e5b398b 100644 --- a/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua +++ b/test_scripts/AppServices/Resumption/001_Resumption_GetAppServiceData_Unexpected_Disconnect.lua @@ -111,6 +111,7 @@ end local function unexpectedDisconnect() common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) common.mobile.disconnect() + utils.wait(1000) end local function connectMobile() diff --git a/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua b/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua index c46c6e52b8..0d5c00728b 100644 --- a/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua +++ b/test_scripts/RC/InteriorVehicleData_cache/common_interiorVDcache.lua @@ -105,6 +105,7 @@ function commonRC.unexpectedDisconnect(pAppId, isHMIreqExpect, pModuleType) end) :Times(HMIrequestsNumber) commonRC.getMobileSession(pAppId):Stop() + commonRC.wait(1000) end function commonRC.moduleDataUpdate(pModuleType) diff --git a/test_scripts/Resumption/HMI_Level/common.lua b/test_scripts/Resumption/HMI_Level/common.lua index 6a160a14e2..8225afa303 100644 --- a/test_scripts/Resumption/HMI_Level/common.lua +++ b/test_scripts/Resumption/HMI_Level/common.lua @@ -38,6 +38,7 @@ m.runAfter = actions.run.runAfter function m.unexpectedDisconnect() m.mobile.closeSession() m.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) + utils.wait(1000) end function m.setAppHMILevel(pHMILevel, pAppId) diff --git a/test_scripts/SDL5_0/LowVoltage/common.lua b/test_scripts/SDL5_0/LowVoltage/common.lua index feb0817f3f..082a2ecd8b 100644 --- a/test_scripts/SDL5_0/LowVoltage/common.lua +++ b/test_scripts/SDL5_0/LowVoltage/common.lua @@ -142,6 +142,7 @@ function m.unexpectedDisconnect(pAppId) appID = m.getHMIAppId(pAppId) }) m.getMobileSession(pAppId):Stop() + utils.wait(1000) end --[[ @unregisterApp: unregister application sequence diff --git a/test_scripts/Smoke/commonSmoke.lua b/test_scripts/Smoke/commonSmoke.lua index 32fe6c26bc..5883652f04 100644 --- a/test_scripts/Smoke/commonSmoke.lua +++ b/test_scripts/Smoke/commonSmoke.lua @@ -302,6 +302,7 @@ function common.unexpectedDisconnect(pAppId) common.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true, appID = common.getHMIAppId(pAppId) }) common.deleteMobileSession(pAppId) + utils.wait(1000) end function common.createEvent(pMatchFunc) diff --git a/test_scripts/TheSameApp/commonTheSameApp.lua b/test_scripts/TheSameApp/commonTheSameApp.lua index 506ed0cb25..3fb42fae98 100644 --- a/test_scripts/TheSameApp/commonTheSameApp.lua +++ b/test_scripts/TheSameApp/commonTheSameApp.lua @@ -699,6 +699,7 @@ function common.unexpectedDisconnect(pAppId) common.hmi.getConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true, appID = common.app.getHMIId(pAppId) }) common.mobile.closeSession(pAppId) + utils.wait(1000) end function common.triggerPTUtoGetPTS() diff --git a/test_scripts/WidgetSupport/common.lua b/test_scripts/WidgetSupport/common.lua index 08d443ab14..1dd2e55962 100644 --- a/test_scripts/WidgetSupport/common.lua +++ b/test_scripts/WidgetSupport/common.lua @@ -485,6 +485,7 @@ function m.unexpectedDisconnect() m.getHMIConnection():ExpectNotification("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) :Times(actions.mobile.getAppsCount()) actions.mobile.disconnect() + utils.wait(1000) end --[[ @connectMobile: create connection From 4d01e03347b7d789826f0269f0a2798738b820d3 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Thu, 19 Mar 2020 13:41:55 -0400 Subject: [PATCH 43/64] Scripts for 3279 issue (#2368) * Update existing Policy scripts * Add new scripts to check PTU triggers without app registered * Enable PROPRIETARY policy flow * Update existing WebEngine scripts * Disable PROPRIETARY policy flow for script 021 --- .../HMI_PTU/018_No_App_kilometers_trigger.lua | 74 +++++++++++++++++++ .../HMI_PTU/019_No_App_days_trigger.lua | 63 ++++++++++++++++ .../020_No_App_ignition_cycles_trigger.lua | 67 +++++++++++++++++ .../HMI_PTU/021_No_App_manual_trigger.lua | 48 ++++++++++++ .../Policies/HMI_PTU/common_hmi_ptu.lua | 47 ++++++++---- ...ition_cycles_since_last_exchange_in_PT.lua | 10 ++- ...TF_Check_app_registration_language_gui.lua | 12 ++- .../202_ATF_No_OnSDLConsentNeeded.lua | 22 +++--- .../027_UpdateAppList_unregister_2apps.lua | 7 +- test_sets/hmi_ptu.txt | 4 + 10 files changed, 320 insertions(+), 34 deletions(-) create mode 100644 test_scripts/Policies/HMI_PTU/018_No_App_kilometers_trigger.lua create mode 100644 test_scripts/Policies/HMI_PTU/019_No_App_days_trigger.lua create mode 100644 test_scripts/Policies/HMI_PTU/020_No_App_ignition_cycles_trigger.lua create mode 100644 test_scripts/Policies/HMI_PTU/021_No_App_manual_trigger.lua diff --git a/test_scripts/Policies/HMI_PTU/018_No_App_kilometers_trigger.lua b/test_scripts/Policies/HMI_PTU/018_No_App_kilometers_trigger.lua new file mode 100644 index 0000000000..b76689549c --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/018_No_App_kilometers_trigger.lua @@ -0,0 +1,74 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- Issue:https://github.com/smartdevicelink/sdl_core/issues/3279 + +-- Description: Check that PTU is successfully performed via HMI + +-- In case: +-- 1. No app is registered +-- 2. And 'Exchange after X kilometers' PTU trigger occurs +-- SDL does: +-- a) Start new PTU sequence through HMI: +-- - Send 'BC.PolicyUpdate' request to HMI +-- - Send 'SDL.OnStatusUpdate(UPDATE_NEEDED)' notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local odometer = 500 + +--[[ Local Functions ]] +local function ptuViaHMI() + local function updFunc(pTbl) + pTbl.policy_table.module_config.exchange_after_x_kilometers = odometer + end + local function expFunc() + common.hmi():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) + :Do(function(_, data) + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { odometer = 0 }) + end) + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) + end + common.ptuViaHMI(updFunc, expFunc) +end + +local function noPTUTriggerOnOdometer() + common.hmi():SendNotification("VehicleInfo.OnVehicleData", { odometer = odometer - 1 }) + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Times(0) + common.hmi():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) +end + +local function newPTUTriggerOnOdometer() + common.hmi():SendNotification("VehicleInfo.OnVehicleData", { odometer = odometer }) + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(2) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("HMI PTU Successful", ptuViaHMI) +runner.Step("Unregister App", common.unRegister) +runner.Step("No HMI PTU on Odometer trigger", noPTUTriggerOnOdometer) +runner.Step("New HMI PTU on Odometer trigger", newPTUTriggerOnOdometer) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/019_No_App_days_trigger.lua b/test_scripts/Policies/HMI_PTU/019_No_App_days_trigger.lua new file mode 100644 index 0000000000..2316999f3d --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/019_No_App_days_trigger.lua @@ -0,0 +1,63 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- Issue:https://github.com/smartdevicelink/sdl_core/issues/3279 + +-- Description: Check that PTU is successfully performed via HMI + +-- In case: +-- 1. No app is registered +-- 2. And 'Exchange after X days' PTU trigger occurs +-- SDL does: +-- a) Start new PTU sequence through HMI: +-- - Send 'BC.PolicyUpdate' request to HMI +-- - Send 'SDL.OnStatusUpdate(UPDATE_NEEDED)' notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local days = 30 + +--[[ Local Functions ]] +local function updFunc(pTbl) + pTbl.policy_table.module_config.exchange_after_x_days = days +end + +local function setPtExchangedXDaysAfterEpochInDB() + local daysAfterEpoch = math.floor(os.time() / 86400) - days - 1 + local dbQuery = '\"UPDATE module_meta SET pt_exchanged_x_days_after_epoch = ' + .. daysAfterEpoch .. ' WHERE rowid = 1;\"' + common.updatePolicyDB(dbQuery) +end + +local function ignitionOn() + common.start() + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(2) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("HMI PTU Successful", common.ptuViaHMI, { updFunc }) +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("Set SystemDaysAfterEpoch in the past in policy DB", setPtExchangedXDaysAfterEpochInDB) +runner.Step("New HMI PTU on Days trigger", ignitionOn) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/020_No_App_ignition_cycles_trigger.lua b/test_scripts/Policies/HMI_PTU/020_No_App_ignition_cycles_trigger.lua new file mode 100644 index 0000000000..b4253fcb56 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/020_No_App_ignition_cycles_trigger.lua @@ -0,0 +1,67 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- Issue:https://github.com/smartdevicelink/sdl_core/issues/3279 + +-- Description: Check that PTU is successfully performed via HMI + +-- In case: +-- 1. No app is registered +-- 2. And 'Exchange after X ignition cycles' PTU trigger occurs +-- SDL does: +-- a) Start new PTU sequence through HMI: +-- - Send 'BC.PolicyUpdate' request to HMI +-- - Send 'SDL.OnStatusUpdate(UPDATE_NEEDED)' notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local cycles = 3 + +--[[ Local Functions ]] +local function updFunc(pTbl) + pTbl.policy_table.module_config.exchange_after_x_ignition_cycles = cycles +end + +local function ignitionOnNoPTU() + common.start() + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Times(0) + common.hmi():ExpectNotification("SDL.OnStatusUpdate") + :Times(0) +end + +local function ignitionOnWithPTU() + common.start() + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(2) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("HMI PTU Successful", common.ptuViaHMI, { updFunc }) +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("Ignition On without PTU", ignitionOnNoPTU) +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("Ignition On without PTU", ignitionOnNoPTU) +runner.Step("Ignition Off", common.ignitionOff) +runner.Step("New HMI PTU on Ignition cycles trigger", ignitionOnWithPTU) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/021_No_App_manual_trigger.lua b/test_scripts/Policies/HMI_PTU/021_No_App_manual_trigger.lua new file mode 100644 index 0000000000..9de5036221 --- /dev/null +++ b/test_scripts/Policies/HMI_PTU/021_No_App_manual_trigger.lua @@ -0,0 +1,48 @@ +--------------------------------------------------------------------------------------------------- +-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0248-hmi-ptu-support.md +-- Issue:https://github.com/smartdevicelink/sdl_core/issues/3279 + +-- Description: Check that PTU is successfully performed via HMI + +-- In case: +-- 1. No app is registered +-- 2. And 'Manual' PTU trigger occurs +-- SDL does: +-- a) Start new PTU sequence through HMI: +-- - Send 'BC.PolicyUpdate' request to HMI +-- - Send 'SDL.OnStatusUpdate(UPDATE_NEEDED)' notification to HMI +--------------------------------------------------------------------------------------------------- + +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('test_scripts/Policies/HMI_PTU/common_hmi_ptu') + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Functions ]] +local function manualPTU() + local cid = common.hmi():SendRequest("SDL.UpdateSDL") + common.hmi():ExpectResponse(cid, { result = { code = 0, method = "SDL.UpdateSDL", result = "UPDATE_NEEDED" }}) + common.hmi():ExpectRequest("BasicCommunication.PolicyUpdate") + :Do(function(_, data) + common.hmi():SendResponse(data.id, data.method, "SUCCESS", { }) + end) + common.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UPDATING" }) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("RAI", common.registerApp) +runner.Step("Activate App", common.activateApp) + +runner.Title("Test") +runner.Step("HMI PTU Successful", common.ptuViaHMI) +runner.Step("Unregister App", common.unRegister) +runner.Step("New HMI PTU on Manual trigger", manualPTU) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua b/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua index adefbb5162..e954394c29 100644 --- a/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua +++ b/test_scripts/Policies/HMI_PTU/common_hmi_ptu.lua @@ -9,8 +9,8 @@ config.checkAllValidations = true local utils = require('user_modules/utils') local consts = require('user_modules/consts') local actions = require("user_modules/sequences/actions") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') local atf_logger = require("atf_logger") +local SDL = require('SDL') --[[ Common Variables ]] local m = {} @@ -30,6 +30,7 @@ m.getPreloadedPT = actions.sdl.getPreloadedPT m.registerNoPTU = actions.app.registerNoPTU m.register = actions.app.register m.runAfter = actions.run.runAfter +m.unRegister = actions.app.unRegister --[[ Common Functions ]] --[[ @getPTUFromPTS: create policy table update table (PTU) using PTS @@ -40,17 +41,7 @@ local function getPTUFromPTS() local pTbl = m.getPTS() if pTbl == nil then utils.cprint(consts.color.magenta, "PTS file was not found, PreloadedPT is used instead") - local appConfigFolder = m.getSDLIniParameter("AppConfigFolder") - if appConfigFolder == nil or appConfigFolder == "" then - appConfigFolder = commonPreconditions:GetPathToSDL() - end - local preloadedPT = m.getSDLIniParameter("PreloadedPT") - local ptsFile = appConfigFolder .. preloadedPT - if utils.isFileExist(ptsFile) then - pTbl = utils.jsonFileToTable(ptsFile) - else - utils.cprint(consts.color.magenta, "PreloadedPT was not found, PTS is not created") - end + pTbl = m.getPreloadedPT() end if next(pTbl) ~= nil then pTbl.policy_table.consumer_friendly_messages = nil @@ -91,10 +82,10 @@ function m.ptuViaHMI(pPTUpdateFunc, pExpNotificationFunc) if not pExpNotificationFunc then m.hmi():ExpectRequest("VehicleInfo.GetVehicleData", { odometer = true }) m.hmi():ExpectNotification("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) - :Do(function() os.remove(ptuFileName) end) end m.hmi():SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = ptuFileName }) + m.runAfter(function() os.remove(ptuFileName) end, 250) for id, _ in pairs(actions.mobile.getApps()) do m.mobile(id):ExpectNotification("OnPermissionsChange") end @@ -180,4 +171,34 @@ function m.checkPTUStatus(pExpStatus) m.hmi():ExpectResponse(cid, { result = { status = pExpStatus }}) end +--[[ @ignitionOff: perform Ignition Off sequence +--! @parameters: none +--! @return: none +--]] +function m.ignitionOff() + m.hmi():SendNotification("BasicCommunication.OnIgnitionCycleOver") + m.hmi():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "SUSPEND" }) + m.hmi():ExpectNotification("BasicCommunication.OnSDLPersistenceComplete") + :Do(function() + m.hmi():SendNotification("BasicCommunication.OnExitAllApplications", { reason = "IGNITION_OFF" }) + m.hmi():ExpectNotification("BasicCommunication.OnSDLClose") + :Do(function() + SDL.DeleteFile() + actions.mobile.getConnection():Close() + end) + end) + m.wait(3000) +end + +--[[ @updatePolicyDB: update value in Policy DB +--! @parameters: +--! pQuery - query which is going to be executed +--! @return: none +--]] +function m.updatePolicyDB(pQuery) + local pathToDB = SDL.AppStorage.path() .. config.pathToSDLPolicyDB + os.execute('sqlite3 ' .. pathToDB .. ' ' .. pQuery) + m.wait(1000) +end + return m diff --git a/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua b/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua index 30c23f0d66..b2fd45f301 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/280_ATF_Reset_ignition_cycles_since_last_exchange_in_PT.lua @@ -125,6 +125,11 @@ function Test:Precondition_Registering_app() self.applications[config.application1.registerAppInterfaceParams.appName] = d.params.application.appID end) self.mobileSession:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }):Times(2) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) end --[[ Test ]] @@ -150,8 +155,9 @@ function Test:TestStep_Ignition_cycles_since_last_exchange_not_reset_after_RAI() end end end -function Test:TestStep_trigger_getting_device_consent() - testCasesForPolicyTable:trigger_getting_device_consent(self, config.application1.registerAppInterfaceParams.appName, utils.getDeviceMAC()) + +function Test:ActivateAppInFULLLevel() + commonSteps:ActivateAppInSpecificLevel(self,self.applications[config.application1.registerAppInterfaceParams.appName],"FULL") end function Test:TestStep_flow_SUCCEESS_EXTERNAL_PROPRIETARY() diff --git a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua index e81781f59e..547ff191c0 100644 --- a/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua +++ b/test_scripts/Policies/Validation_of_PolicyTables/308_ATF_Check_app_registration_language_gui.lua @@ -141,7 +141,11 @@ function Test:RegisterFirstApp() EXPECT_RESPONSE(correlationId, { success = true }) EXPECT_NOTIFICATION("OnPermissionsChange") end) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }):Times(2) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) end function Test:CheckDB_app_registration_language_gui() @@ -162,12 +166,6 @@ commonFunctions:newTestCasesGroup("Test") function Test:ActivateAppInFULLLevel() commonSteps:ActivateAppInSpecificLevel(self,HMIAppID,"FULL") - EXPECT_HMICALL("BasicCommunication.PolicyUpdate") - :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) - end) - :Times(AtLeast(1)) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATING"}) end function Test:InitiatePTUForGetSnapshot() diff --git a/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua b/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua index c94e460686..f97dcb3640 100644 --- a/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua +++ b/test_scripts/Policies/user_consent_of_Policies/202_ATF_No_OnSDLConsentNeeded.lua @@ -47,20 +47,20 @@ commonFunctions:newTestCasesGroup("Test") function Test:PTU_requested_through_HMI() local RequestIdUpdateSDL = self.hmiConnection:SendRequest("SDL.UpdateSDL") - EXPECT_HMIRESPONSE(RequestIdUpdateSDL,{result = {code = 0, method = "SDL.UpdateSDL", result = "UPDATE_NEEDED" }}) - EXPECT_HMINOTIFICATION("SDL.OnSDLConsentNeeded"):Times(0) - EXPECT_HMICALL("BasicCommunication.PolicyUpdate", {}):Times(0) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}):Times(0) - - local function to_run() - if ( commonSteps:file_exists( '/tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json') ) then - self:FailTestCase(" \27[31m /tmp/fs/mp/images/ivsu_cache/sdl_snapshot.json is created \27[0m") - end - end + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function(_,data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + end) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATING" }) + :Do(function() + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", + { requestType = "PROPRIETARY", fileName = "dummyfile" }) + end) - RUN_AFTER(to_run, 10000) + EXPECT_HMINOTIFICATION("SDL.OnSDLConsentNeeded"):Times(0) + self.mobileSession:ExpectRequest("OnSystemRequest"):Times(0) commonTestCases:DelayedExp(11000) end diff --git a/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua b/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua index 2197dc32f6..8542cece90 100644 --- a/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua +++ b/test_scripts/WebEngine/027_UpdateAppList_unregister_2apps.lua @@ -48,6 +48,11 @@ local function unregisterApp(pAppID, pTimes, pExpNumOfApps) common.checkUpdateAppList("000000" .. pAppID, pTimes, pExpNumOfApps) end +local function registerApp(pAppID, pTimes, pExpNumOfApps) + common.registerAppWOPTU(1, 1) + common.checkUpdateAppList("000000" .. pAppID, pTimes, pExpNumOfApps) +end + --[[ Scenario ]] common.Title("Preconditions") common.Step("Clean environment", common.preconditions) @@ -58,7 +63,7 @@ common.Step("UpdateAppList on setAppProperties for policyAppID1:enabled=true", setAppProperties, { 1, true, expected, 1 }) common.Step("UpdateAppList on setAppProperties for policyAppID2:enabled=true", setAppProperties, { 2, true, expected, 2 }) -common.Step("RAI of web App1", common.registerApp, { 1, 1 }) +common.Step("RAI of web App1", registerApp, { 2, expected, 2 }) common.Step("Activate web app1", common.activateApp, { 1 }) common.Step("Unregister App1", unregisterApp, { 2, expected, 2 }) diff --git a/test_sets/hmi_ptu.txt b/test_sets/hmi_ptu.txt index c262886216..dbb3052d16 100644 --- a/test_sets/hmi_ptu.txt +++ b/test_sets/hmi_ptu.txt @@ -15,3 +15,7 @@ ./test_scripts/Policies/HMI_PTU/015_Successful_PTU_after_failed_retry_consequtive_trigger_propr.lua ./test_scripts/Policies/HMI_PTU/016_Successful_PTU_after_failed_retry_parallel_trigger_ext.lua ./test_scripts/Policies/HMI_PTU/017_Successful_PTU_after_failed_retry_parallel_trigger_propr.lua +./test_scripts/Policies/HMI_PTU/018_No_App_kilometers_trigger.lua +./test_scripts/Policies/HMI_PTU/019_No_App_days_trigger.lua +./test_scripts/Policies/HMI_PTU/020_No_App_ignition_cycles_trigger.lua +./test_scripts/Policies/HMI_PTU/021_No_App_manual_trigger.lua From 61f899563053270fb2d1c880c0405d3550a3d852 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Mon, 23 Mar 2020 20:49:05 +0200 Subject: [PATCH 44/64] Test set for scripts from Defects folder (#2334) * Test set for scripts from Defects folder * fixup! Test set for scripts from Defects folder * fixup! Test set for scripts from Defects folder * fixup! Test set for scripts from Defects folder * Remove comment for 1376 * Remove extra lines with comments * fixup! Test set for scripts from Defects folder Co-authored-by: Dmitriy Boltovskiy --- .../Defects/Defects_releases_4_x_and_5_x.txt | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 test_sets/Defects/Defects_releases_4_x_and_5_x.txt diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt new file mode 100644 index 0000000000..435142d121 --- /dev/null +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -0,0 +1,92 @@ +;Policies +;./test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +./test_scripts/Defects/4_5/1376_PTU_all_flows.lua +;./test_scripts/Defects/4_5/1772_update_default_section.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2314 +./test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua +;./test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2330 +;./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2333 +;./test_scripts/Defects/4_6/842_App_does_not_activate_when_policies_are_disabled.lua https://github.com/smartdevicelink/sdl_core/issues/3285 +./test_scripts/Defects/5_0/1887_PoliciesManager_allows_all_requested_params_in_case_parameters_field_is_empty.lua +./test_scripts/Defects/5_0/2427_policy_db_consistency_after_ignition_cycle.lua +;./test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;./test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +;Security +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_1_navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_2_non-navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_3_navi_audio_force_off.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_4_navi_video_force_off.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_5_navi_audio_force_on.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_6_navi_video_force_on.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1891_1_navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1891_2_non-navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1891_3_navi_audio.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1891_4_navi_video.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1894_1_navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1894_2_non-navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1894_3_navi_audio.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1894_4_navi_video.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1922_1_navi_audio.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1922_2_navi_video.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1923_1_navi_audio.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1923_2_navi_video.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1924_1_non-navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1924_2_navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_1_navi_no_cert_new_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_2_navi_no_cert_existing_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_3_navi_cert_new_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_4_navi_cert_existing_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_5_non-navi_no_cert_new_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_6_non-navi_no_cert_existing_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_7_non-navi_cert_new_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1925_8_non-navi_cert_existing_app.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 +;Resumption +./test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua +./test_scripts/Defects/5_0/959_resumption_limited_non_media.lua +./test_scripts/Defects/5_0/1898_Canceling_HMILevel_resumption_of_media_app_after_unexpectedDisconnect.lua +;./test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2376 +;./test_scripts/Defects/5_0/2447_Resumption_revoked_app_still_be_resumed_as_FULL.lua https://github.com/smartdevicelink/sdl_core/issues/2447 +;RPC +;./test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +./test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua +./test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua +;./test_scripts/Defects/5_0/972_SDL_should_respond_IGNORED_with_correct_result_code_for_UnSubscribeVehicleData_in_case_vi_interface_is_not_available.lua https://github.com/smartdevicelink/sdl_core/issues/3205 +;./test_scripts/Defects/5_0/2457_Needed_fixes_sending_of_UpdateDeviceList_notification_on_device_connect.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2365 +./test_scripts/Defects/5_0/1031_SDL_transfer_OnKeyboardInput_notification_to_not_active_App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua +./test_scripts/Defects/5_0/2480_Vefiry_that_SDL_sends_OnDD_notification_once_upon_registration.lua +./test_scripts/Defects/5_0/1035_SDL_doesnt_send_REJECTED_code_to_mobile_app_when_activating_app_from_HMI_with_activate.lua +./test_scripts/Defects/5_0/1218_Mandatory_parameter_spaceAvailable_is_not_provided_in_response_for_PutFile_request.lua +;./test_scripts/Defects/5_0/1032_CreateInteractionChoiceSet_core_successfully_creates_choice_set_with_duplicate_vrCommands_menuName_inside_it.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2330 +./test_scripts/Defects/5_0/2443_SDL_does_not_check_for_non_manadatory_parameters.lua +./test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua +./test_scripts/Defects/5_0/1030_API_SDL_sends_OnAppInterfaceUnregistered(DRIVER_DISTRACTION_VIOLATION)_to_app_when_receives_OnExitApplication(DRIVER_DISTRACTION_VIOLATION)_from_HMI.lua +;./test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2329 +;./test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2329 +;./test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2329 +./test_scripts/Defects/5_1/2862_SDL_sends_UnsubscribeWayPoint_request_to_HMI.lua +./test_scripts/Defects/5_1/2874_SDL_sends_system_request_with_correlationid_-1_and_INAVLID_DATA.lua +;Streaming +./test_scripts/Defects/4_5/1912_Video_service_start_via_2_protocol.lua +./test_scripts/Defects/5_0/2479_SDL_does_not_respond_NACK_to_second_request/2479_1_SDL_does_not_respond_NACK_Navi_Type.lua +./test_scripts/Defects/5_0/2479_SDL_does_not_respond_NACK_to_second_request/2479_2_SDL_does_not_respond_NACK_Audio_Type.lua +./test_scripts/Defects/5_0/2479_SDL_does_not_respond_NACK_to_second_request/2479_3_SDL_respond_NACK_from_protected_to_not_protected.lua +./test_scripts/Defects/5_0/2479_SDL_does_not_respond_NACK_to_second_request/2479_4_SDL_respond_NACK_from_protected_to_protected.lua +./test_scripts/Defects/5_0/2479_SDL_does_not_respond_NACK_to_second_request/2479_5_SDL_respond_NACK_from_not_protected_to_not_protected.lua +;./test_scripts/Defects/5_0/2479_SDL_does_not_respond_NACK_to_second_request/2479_6_SDL_respond_ACK_from_not_protected_to_protected.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2366 +;HeartBeat +;./test_scripts/Defects/4_5/1893_ATF_HeartBeat_App_does_not_send_HB_and_does_not_respond.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2374 +;./test_scripts/Defects/4_5/1892_HB_from_SDL_after_receiving_HB_from_mobile.lua https://github.com/smartdevicelink/sdl_core/issues/1892 +;Remote Controol +./test_scripts/Defects/5_0/2670_GetInteriorVD_after_ignition_off.lua +./test_scripts/Defects/5_0/2670_2_GetInteriorVD_after_ignition_off.lua +./test_scripts/Defects/5_0/2670_3_GetInteriorVD_after_ignition_off.lua +;./test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2376 +;IGNITION OFF +;./test_scripts/Defects/4_5/1225_FACTORY_DEFAULTS.lua https://github.com/smartdevicelink/sdl_core/issues/3204 +./test_scripts/Defects/5_0/2464_SDL_does_not_send_OnSDLClose_notification_by_switching_off_with_reason_IGNITION_OFF.lua From ff140f4b328cb8bcec89f9f4aba4efa0bc6d65cd Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Mon, 23 Mar 2020 19:22:33 -0400 Subject: [PATCH 45/64] Improve stability of scripts (#2378) * Check absence of PTS one step earlier * Increase ApplicationListUpdateTimeout for RC scripts * Add delay for RAI sequence * Disable PTS check for PTU sequence for EXT policy mode * Move long-lasting scripts to the beginnig of test set --- test_scripts/Defects/6_1/3136_02_External_Proprietary.lua | 2 +- .../Defects/6_1/3136_05_External_Proprietary_3apps.lua | 3 +-- .../3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua | 1 + .../022_Release_resource_on_PTU_with_module_disallow.lua | 2 +- .../023_Release_resource_on_PTU_with_app_revoked.lua | 2 +- .../012_notification_by_revoking_module_by_policy.lua | 2 +- ...notification_by_revoking_several_modules_by_policy.lua | 2 +- test_sets/policies_all_flows.txt | 8 ++++---- user_modules/shared_testcases/testCasesForPolicyTable.lua | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua b/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua index cb1212b0b9..b5b819d989 100644 --- a/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua +++ b/test_scripts/Defects/6_1/3136_02_External_Proprietary.lua @@ -128,7 +128,7 @@ local function unsuccessfulPTUviaMobile() if e.occurences == #exp - 1 and isBCPUReceived == true then return false, "BC.PolicyUpdate is sent before new PTU sequence" end - if e.occurences == #exp - 2 and common.sdl.getPTS() ~= nil then + if e.occurences == #exp - 3 and common.sdl.getPTS() ~= nil then return false, "PTS was created before new PTU sequence" end return true diff --git a/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua b/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua index 1a2f43e893..a289adc68f 100644 --- a/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua +++ b/test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua @@ -108,7 +108,6 @@ local function unsuccessfulPTUviaMobile(pNewAppId) { status = "UPDATE_NEEDED" }, -- new PTU sequence { status = "UPDATING" } } - utils.printTable(exp) common.hmi.getConnection():ExpectNotification("SDL.OnStatusUpdate", table.unpack(exp)) :Times(#exp) :Timeout(timeout) @@ -130,7 +129,7 @@ local function unsuccessfulPTUviaMobile(pNewAppId) if e.occurences == #exp - 1 and isBCPUReceived == true then return false, "BC.PolicyUpdate is sent before new PTU sequence" end - if e.occurences == #exp - 2 and common.sdl.getPTS() ~= nil then + if e.occurences == #exp - 3 and common.sdl.getPTS() ~= nil then return false, "PTS was created before new PTU sequence" end return true diff --git a/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua b/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua index a95c2000ea..f486546306 100644 --- a/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +++ b/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua @@ -36,6 +36,7 @@ local function registerAppWOPTU(pAppId) mobileSession:ExpectNotification("OnSystemRequest", { requestType = "LOCK_SCREEN_ICON_URL" }) end) end) + utils.wait(500) end --[[ Scenario ]] diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua index bc20bdb4bb..71143ced73 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/022_Release_resource_on_PTU_with_module_disallow.lua @@ -42,7 +42,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonRC.preconditions, { false }) -runner.Step("Update SDL config", commonRC.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) +runner.Step("Update SDL config", commonRC.setSDLIniParameter, { "ApplicationListUpdateTimeout", 5000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start) runner.Step("RAI1", commonRC.registerApp) runner.Step("PTU with RADIO for App1", commonRC.policyTableUpdate, { PTUfunc1 }) diff --git a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua index fa2112c7fd..7446b0606d 100644 --- a/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua +++ b/test_scripts/RC/CLIMATE_RADIO/OnRemoteControlSettings/023_Release_resource_on_PTU_with_app_revoked.lua @@ -29,7 +29,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonRC.preconditions, { true, 1 }) -runner.Step("Update SDL config", commonRC.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) +runner.Step("Update SDL config", commonRC.setSDLIniParameter, { "ApplicationListUpdateTimeout", 5000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", commonRC.start) runner.Step("RAI1", commonRC.registerAppWOPTU) diff --git a/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua b/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua index 39d928869d..5331679ab1 100644 --- a/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua +++ b/test_scripts/RC/OnRCStatus/012_notification_by_revoking_module_by_policy.lua @@ -51,7 +51,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions, { true, 1 }) -runner.Step("Update SDL config", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) +runner.Step("Update SDL config", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 5000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register RC application 1", common.registerRCApplication) runner.Step("Activate App 1", common.activateApp) diff --git a/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua b/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua index a36f3cf51d..0bbfd6fef2 100644 --- a/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua +++ b/test_scripts/RC/OnRCStatus/029_notification_by_revoking_several_modules_by_policy.lua @@ -46,7 +46,7 @@ end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions, { true, 1 }) -runner.Step("Update SDL config", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) +runner.Step("Update SDL config", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 5000 }) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Register RC application 1", common.registerRCApplication) runner.Step("Activate App 1", common.activateApp) diff --git a/test_sets/policies_all_flows.txt b/test_sets/policies_all_flows.txt index a99eef8a35..ca63ee99f6 100644 --- a/test_sets/policies_all_flows.txt +++ b/test_sets/policies_all_flows.txt @@ -1,3 +1,7 @@ +./test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua +./test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua +./test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua +./test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua ./test_scripts/Policies/build_options/047_ATF_SDL_Build_DEXTENDED_POLICY_EXTERNAL_PROPRIETARY.lua ./test_scripts/Policies/build_options/048_ATF_SDL_Build_Flag_DEXTENDED_POLICY_PROPRIETARY.lua ./test_scripts/Policies/build_options/050_ATF_Request_PTU_Trigger_PTU_failed_previous_IGN_ON_HTTP.lua @@ -332,10 +336,6 @@ ./test_scripts/Policies/Validation_of_PolicyTables/227_ATF_usage_and_error_counts_update_count_sync_out_of_memory.lua ./test_scripts/Policies/Validation_of_PolicyTables/228_ATF_usage_and_error_counts_update_count_of_sync_reboots.lua ./test_scripts/Policies/Validation_of_PolicyTables/229_ATF_usage_and_error_counts_update_count_of_iap_buffer_full.lua -./test_scripts/Policies/Validation_of_PolicyTables/230_ATF_usage_and_error_counts_update_minutes_in_hmi_none.lua -./test_scripts/Policies/Validation_of_PolicyTables/231_ATF_usage_and_error_counts_update_minutes_in_hmi_limited.lua -./test_scripts/Policies/Validation_of_PolicyTables/232_ATF_usage_and_error_counts_update_minutes_in_hmi_full.lua -./test_scripts/Policies/Validation_of_PolicyTables/233_ATF_usage_and_error_counts_update_minutes_in_hmi_background.lua ./test_scripts/Policies/Validation_of_PolicyTables/234_ATF_preloaded_pt_validation_rules_for_omited_parameters_exist.lua ./test_scripts/Policies/Validation_of_PolicyTables/235_preloaded_pt_validation_rules_for_omited_parameters_absent.lua ./test_scripts/Policies/Validation_of_PolicyTables/236_preloaded_pt_validation_rules_for_optional_parameters.lua diff --git a/user_modules/shared_testcases/testCasesForPolicyTable.lua b/user_modules/shared_testcases/testCasesForPolicyTable.lua index f9527845f3..66b2a04496 100644 --- a/user_modules/shared_testcases/testCasesForPolicyTable.lua +++ b/user_modules/shared_testcases/testCasesForPolicyTable.lua @@ -913,7 +913,7 @@ function testCasesForPolicyTable:flow_SUCCEESS_EXTERNAL_PROPRIETARY(self, app_id local pts_file_name = commonFunctions:read_parameter_from_smart_device_link_ini("PathToSnapshot") -- Check SDL snapshot is created correctly and get needed data - testCasesForPolicyTableSnapshot:verify_PTS(true, {app_id}, {device_id}, {hmi_app_id}) + -- testCasesForPolicyTableSnapshot:verify_PTS(true, {app_id}, {device_id}, {hmi_app_id}) local endpoints = {} for i = 1, #testCasesForPolicyTableSnapshot.pts_endpoints do From 5a9160e7f9a27f6e24db76367dc06bf954762751 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Mon, 30 Mar 2020 17:08:38 -0400 Subject: [PATCH 46/64] Add closeSession to unregisterApp (#2380) --- .../6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua | 1 - user_modules/sequences/actions.lua | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua b/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua index f486546306..a95c2000ea 100644 --- a/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua +++ b/test_scripts/Defects/6_1/3267_1_RAI_OnSystemRequest_LOCK_SCREEN_ICON_URL.lua @@ -36,7 +36,6 @@ local function registerAppWOPTU(pAppId) mobileSession:ExpectNotification("OnSystemRequest", { requestType = "LOCK_SCREEN_ICON_URL" }) end) end) - utils.wait(500) end --[[ Scenario ]] diff --git a/user_modules/sequences/actions.lua b/user_modules/sequences/actions.lua index 6125735356..db9d1c7242 100644 --- a/user_modules/sequences/actions.lua +++ b/user_modules/sequences/actions.lua @@ -715,7 +715,7 @@ function m.app.unRegister(pAppId) { unexpectedDisconnect = false, appID = m.app.getHMIId(pAppId) }) :Do(function() m.app.deleteHMIId(pAppId) - m.mobile.deleteSession(pAppId) + m.mobile.closeSession(pAppId) end) end From 49fc2be922f89d24340f0040653147e9b87bce5c Mon Sep 17 00:00:00 2001 From: Klepikov Viacheslav <45170482+VjKlepikov@users.noreply.github.com> Date: Fri, 3 Apr 2020 18:24:25 +0300 Subject: [PATCH 47/64] Add script for 3302 issue (#2377) --- .../6_1/3302_BC_GetSystemInfo_once.lua | 34 +++++++++++++++++++ test_sets/Defects/6_1/3302.txt | 1 + 2 files changed, 35 insertions(+) create mode 100644 test_scripts/Defects/6_1/3302_BC_GetSystemInfo_once.lua create mode 100644 test_sets/Defects/6_1/3302.txt diff --git a/test_scripts/Defects/6_1/3302_BC_GetSystemInfo_once.lua b/test_scripts/Defects/6_1/3302_BC_GetSystemInfo_once.lua new file mode 100644 index 0000000000..2547d5adf4 --- /dev/null +++ b/test_scripts/Defects/6_1/3302_BC_GetSystemInfo_once.lua @@ -0,0 +1,34 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3302 +-- +-- Description: Check that SDL sends BC.GetSystemInfo request once on boot +-- +-- Steps: +-- 1. HMI and SDL are started. +-- SDL does: +-- - SDL requests BC.GetSystemInfo one time +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") +local hmi_values = require("user_modules/hmi_values") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +--[[ Local Functions ]] +local function getHMIParams() + local hmiCaps = hmi_values.getDefaultHMITable() + hmiCaps.BasicCommunication.GetSystemInfo.mandatory = true + return hmiCaps +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) + +runner.Title("Test") +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start, { getHMIParams() }) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3302.txt b/test_sets/Defects/6_1/3302.txt new file mode 100644 index 0000000000..d06d25afcd --- /dev/null +++ b/test_sets/Defects/6_1/3302.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/3302_BC_GetSystemInfo_once.lua From 80c4eaed1d673a2b0d38b88e83f60c0c7f538d37 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Fri, 7 Feb 2020 10:58:19 +0200 Subject: [PATCH 48/64] Update script for issue 1921 --- ...Invalid_PT_after_cutting_unknow_values.lua | 107 ++++++++++++++---- .../Defects/Defects_releases_4_x_and_5_x.txt | 2 +- 2 files changed, 88 insertions(+), 21 deletions(-) diff --git a/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua b/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua index 6539aefd2c..f0c5c1bada 100644 --- a/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua +++ b/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua @@ -28,6 +28,28 @@ local SendLocationParams = { local unknownAPI = "UnknownAPI" local unknownParameter = "unknownParameter" +local gpsDataResponse = { + longitudeDegrees = 100, + latitudeDegrees = 20, + utcYear = 2050, + utcMonth = 10, + utcDay = 30, + utcHours = 20, + utcMinutes = 50, + utcSeconds = 50, + compassDirection = "NORTH", + pdop = 5, + hdop = 5, + vdop = 5, + actual = false, + satellites = 30, + dimension = "2D", + altitude = 9500, + heading = 350, + speed = 450, + shifted = true +} + --[[ Local Functions ]] --[[ @ptsToTable: decode snapshot from json to table @@ -125,18 +147,16 @@ local function contains(pTbl, pValue) return false end ---[[ @CheckCuttingUnknowValues: Perform app registration, PTU and check absence of unknown values in ---! OnPermissionsChange notification +--[[ @CheckCuttingUnknowValues: expectation of OnPermissionsChange notification and check its content --! @parameters: +--! pNotifTimes - expected number of OnPermissionsChange notification --! self - test object --! @return: none --]] -local function CheckCuttingUnknowValues(ptuUpdateFunc, self) - commonDefects.rai_ptu_n_without_OnPermissionsChange(1, ptuUpdateFunc, self) +local function CheckCuttingUnknowValues(pNotifTimes, self) self.mobileSession1:ExpectNotification("OnPermissionsChange") - :Times(2) - :ValidIf(function(exp, data) - if exp.occurences == 2 then + :Times(pNotifTimes) + :ValidIf(function(_, data) local isError = false local ErrorMessage = "" if #data.payload.permissionItem ~= 0 then @@ -159,10 +179,18 @@ local function CheckCuttingUnknowValues(ptuUpdateFunc, self) else return true end - else - return true - end - end) + end) +end + +--[[ @rai_with_OnPermissionChange: Perform app registration, check received OnPermissionsChange notification +--! @parameters: +--! pUpdateFunction - update table for PTU +--! self - test object +--! @return: none +--]] +local function rai_with_OnPermissionChange(ptuUpdateFunc, self) + commonDefects.rai_ptu_n_without_OnPermissionsChange(1, ptuUpdateFunc, self) + CheckCuttingUnknowValues(2, self) end --[[ @SuccessfulProcessingRPC: Successful processing API @@ -170,18 +198,42 @@ end --! RPC - RPC name --! params - RPC params for mobile request --! interface - interface of RPC on HMI +--! responseParams - parameters for sent response --! self - test object --! @return: none --]] -local function SuccessfulProcessingRPC(RPC, params, interface, self) +local function SuccessfulProcessingRPC(RPC, params, interface, responseParams, self) local cid = self.mobileSession1:SendRPC(RPC, params) EXPECT_HMICALL(interface .. "." .. RPC, params) :Do(function(_,data) - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", responseParams) end) self.mobileSession1:ExpectResponse(cid,{ success = true, resultCode = "SUCCESS" }) end +--[[ @triggerPTU: Trigger PTU from HMI via OnPolicyUpdate notification +--! @parameters: +--! self - test object +--! @return: none +--]] +local function triggerPTU(self) + self.hmiConnection:SendNotification("SDL.OnPolicyUpdate", { }) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) + :Times(2) + EXPECT_HMICALL("BasicCommunication.PolicyUpdate", { file = pathToPTS }) + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) + end) +end + +--[[ @ptuExpUnsuccessFlow: Expectations of OnStatusUpdate notifications during unsuccessful PTU +--! @parameters: none +--! @return: none +--]] +local function ptuExpUnsuccessFlow() + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) +end + --[[ @removeSnapshotAndTriggerPTUFromHMI: Remove snapshot and trigger PTU from HMI for creation new snapshot, --! check absence of unknown parameters in snapshot --! @parameters: @@ -193,7 +245,8 @@ local function removeSnapshotAndTriggerPTUFromHMI(self) os.execute("rm -f " .. pathToPTS) -- expect PolicyUpdate request on HMI side EXPECT_HMICALL("BasicCommunication.PolicyUpdate", { file = pathToPTS }) - :Do(function() + :Do(function(_, data) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", { }) if (commonSteps:file_exists(pathToPTS) == false) then self:FailTestCase(pathToPTS .. " is not created") else @@ -210,6 +263,7 @@ local function removeSnapshotAndTriggerPTUFromHMI(self) end) -- Sending OnPolicyUpdate notification form HMI self.hmiConnection:SendNotification("SDL.OnPolicyUpdate", { }) + -- Expect OnStatusUpdate notifications on HMI side EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) :Times(2) @@ -231,25 +285,38 @@ local function DisallowedRPC(RPC, params, interface, self) commonDefects.delayedExp() end +--[[ @ptu: Policy table update +--! @parameters: +--! pUpdateFunction - update table for PTU +--! self - test object +--! @return: none +--]] +local function ptu(pUpdateFunction, self) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) + commonDefects.ptu(pUpdateFunction, self) + CheckCuttingUnknowValues(1, self) +end + --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", commonDefects.preconditions) runner.Step("Start SDL, HMI, connect Mobile, start Session", commonDefects.start) runner.Title("Test") -runner.Step("App registration, PTU with unknown API", CheckCuttingUnknowValues, { ptuUpdateFuncRPC }) +runner.Step("App registration, PTU with unknown API", rai_with_OnPermissionChange, { ptuUpdateFuncRPC }) runner.Step("Check applying of PT by processing SendLocation", SuccessfulProcessingRPC, - { "SendLocation", SendLocationParams, "Navigation" }) -runner.Step("Unregister application", commonDefects.unregisterApp) + { "SendLocation", SendLocationParams, "Navigation", {} }) +runner.Step("Trigger PTU from HMI", triggerPTU) -runner.Step("App registration, PTU with unknown parameters", CheckCuttingUnknowValues, { ptuUpdateFuncParams }) +runner.Step("PTU with unknown parameters", ptu, { ptuUpdateFuncParams }) runner.Step("Check applying of PT by processing GetVehicleData", SuccessfulProcessingRPC, - { "GetVehicleData", { gps = true }, "VehicleInfo" }) + { "GetVehicleData", { gps = true }, "VehicleInfo", { gps = gpsDataResponse } }) runner.Step("Check applying of PT by processing SubscribeVehicleData", DisallowedRPC, { "SubscribeVehicleData", { gps = true }, "VehicleInfo" }) runner.Step("Remove Snapshot and trigger PTU, check new created PTS", removeSnapshotAndTriggerPTUFromHMI) -runner.Step("Invalid_PTU_after_cutting_of_unknown_values", commonDefects.unsuccessfulPTU, { ptuUpdateFuncNotValid }) +runner.Step("Invalid_PTU_after_cutting_of_unknown_values", commonDefects.unsuccessfulPTU, + { ptuUpdateFuncNotValid, ptuExpUnsuccessFlow }) runner.Title("Postconditions") runner.Step("Stop SDL", commonDefects.postconditions) diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt index 435142d121..8d4215c826 100644 --- a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -4,7 +4,7 @@ ;./test_scripts/Defects/4_5/1772_update_default_section.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2314 ./test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua ;./test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2330 -;./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2333 +./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua ;./test_scripts/Defects/4_6/842_App_does_not_activate_when_policies_are_disabled.lua https://github.com/smartdevicelink/sdl_core/issues/3285 ./test_scripts/Defects/5_0/1887_PoliciesManager_allows_all_requested_params_in_case_parameters_field_is_empty.lua ./test_scripts/Defects/5_0/2427_policy_db_consistency_after_ignition_cycle.lua From 91c10efab1a17f6aa4034f72ddf43e0952a61884 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Fri, 7 Feb 2020 12:12:13 +0200 Subject: [PATCH 49/64] Update for common file --- test_scripts/Defects/4_5/commonDefects.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test_scripts/Defects/4_5/commonDefects.lua b/test_scripts/Defects/4_5/commonDefects.lua index 3994ea353d..464638b267 100644 --- a/test_scripts/Defects/4_5/commonDefects.lua +++ b/test_scripts/Defects/4_5/commonDefects.lua @@ -393,9 +393,8 @@ end --! self - test object --! @return: none --]] -function commonDefect.unsuccessfulPTU(ptu_update_func, self) - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }, { status = "UPDATING" }) - :Times(2) +function commonDefect.unsuccessfulPTU(ptu_update_func, expec_func, self) + expec_func() ptu(self, ptu_update_func) end @@ -540,4 +539,14 @@ function commonDefect.getMobileSession(self, pAppId) return self["mobileSession" .. pAppId] end +--[[ @ptu: perform policy table update +--! @parameters: +--! pUpdateFunction - additional function for update +--! self - test object +--! @return: mobile session +--]] +function commonDefect.ptu(pUpdateFunction, self) + ptu(self, pUpdateFunction) +end + return commonDefect From 97c9b5727dc2ef96c255d2715fbeae082430e346 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Fri, 7 Feb 2020 11:41:46 +0200 Subject: [PATCH 50/64] Policy flow specification --- ...PTU_Trigger_PTU_failed_previous_IGN_ON.lua | 3 +++ ...havior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua | 1 + .../Defects/4_5/1225_FACTORY_DEFAULTS.lua | 3 +++ ...Invalid_PT_after_cutting_unknow_values.lua | 3 +++ .../5_0/2405/001_omitted_omitted_SUCCESS.lua | 1 + .../5_0/2405/002_omitted_empty_SUCCESS.lua | 1 + .../5_0/2405/003_omitted_param_SUCCESS.lua | 1 + .../5_0/2405/004_empty_omitted_SUCCESS.lua | 1 + .../2405/005_empty_empty_USER_DISALLOWED.lua | 1 + .../006_empty_param_SUCCESS_DISALLOWED.lua | 1 + .../5_0/2405/007_param_omitted_SUCCESS.lua | 1 + .../008_param_empty_SUCCESS_DISALLOWED.lua | 1 + .../5_0/2405/009_param_param_SUCCESS.lua | 1 + test_scripts/Defects/5_0/2405/common.lua | 2 +- .../Defects/Defects_releases_4_x_and_5_x.txt | 22 +++++++++---------- 15 files changed, 31 insertions(+), 12 deletions(-) diff --git a/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua b/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua index f950383ce4..2df77c4629 100644 --- a/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua +++ b/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua @@ -9,6 +9,9 @@ local mobile_session = require("mobile_session") local common = require("test_scripts/Defects/4_5/commonDefects") local color = require("user_modules/consts").color +--[[ General configuration parameters ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "HTTP" } } } + --[[ Local Functions ]] --[[ @registerApplicationAndWaitPTUStart: create mobile session, start RPC service, register mobile application --! and check that 'SDL.OnStatusUpdate' notification is sent to HMI with 'UPDATE_NEEDED' status diff --git a/test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua b/test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua index 0dcaceb317..caf5a6ac0e 100644 --- a/test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua +++ b/test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua @@ -10,6 +10,7 @@ local common = require("test_scripts/Defects/4_5/commonDefects") local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ General configuration parameters ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } -- switch ATF to mode when it will continue test script execution even if SDL crashes config.ExitOnCrash = false diff --git a/test_scripts/Defects/4_5/1225_FACTORY_DEFAULTS.lua b/test_scripts/Defects/4_5/1225_FACTORY_DEFAULTS.lua index 88d4c9e1e1..aea566b8f0 100644 --- a/test_scripts/Defects/4_5/1225_FACTORY_DEFAULTS.lua +++ b/test_scripts/Defects/4_5/1225_FACTORY_DEFAULTS.lua @@ -30,6 +30,9 @@ local sdl = require("SDL") local events = require('events') local json = require("modules/json") +--[[ General configuration parameters ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] -- Path to policy table snapshot local pathToPTS = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") .. "/" diff --git a/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua b/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua index f0c5c1bada..5e4a0e0c07 100644 --- a/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua +++ b/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua @@ -16,6 +16,9 @@ local commonFunctions = require('user_modules/shared_testcases/commonFunctions') local commonSteps = require ('user_modules/shared_testcases/commonSteps') local json = require("modules/json") +--[[ General configuration parameters ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY" } } } + --[[ Local variables ]] -- define path to policy table snapshot local pathToPTS = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") .. "/" diff --git a/test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua b/test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua index 479a453aee..d49589803d 100644 --- a/test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua +++ b/test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua b/test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua index 1e50423ac8..b45563a659 100644 --- a/test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua +++ b/test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua b/test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua index 223eb81da9..e8ad9a7ca3 100644 --- a/test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua +++ b/test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua b/test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua index 01af379f57..2c38b83394 100644 --- a/test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua +++ b/test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua b/test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua index dff9274da2..90d902220d 100644 --- a/test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua +++ b/test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua b/test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua index 0b62b105fc..6d94918018 100644 --- a/test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua +++ b/test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua b/test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua index bd75281add..c774b36cb7 100644 --- a/test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua +++ b/test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua b/test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua index d42dda8311..90e0366e5f 100644 --- a/test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua +++ b/test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua b/test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua index 9083c8a776..9c21a06940 100644 --- a/test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua +++ b/test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua @@ -7,6 +7,7 @@ local common = require('test_scripts/Defects/5_0/2405/common') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local grp = { diff --git a/test_scripts/Defects/5_0/2405/common.lua b/test_scripts/Defects/5_0/2405/common.lua index 92e2c8b2a5..d4fa3e7f97 100644 --- a/test_scripts/Defects/5_0/2405/common.lua +++ b/test_scripts/Defects/5_0/2405/common.lua @@ -23,7 +23,7 @@ function m.policyTableUpdate(pGrp) } } local fg = pTbl.policy_table.functional_groupings - local appId = common.getConfigAppParams().appID + local appId = common.getConfigAppParams().fullAppID if not pTbl.policy_table.app_policies[appId] then pTbl.policy_table.app_policies[appId] = utils.cloneTable(pTbl.policy_table.app_policies.default) end diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt index 8d4215c826..4f200a8561 100644 --- a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -1,5 +1,5 @@ ;Policies -;./test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +./test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua ./test_scripts/Defects/4_5/1376_PTU_all_flows.lua ;./test_scripts/Defects/4_5/1772_update_default_section.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2314 ./test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua @@ -8,15 +8,15 @@ ;./test_scripts/Defects/4_6/842_App_does_not_activate_when_policies_are_disabled.lua https://github.com/smartdevicelink/sdl_core/issues/3285 ./test_scripts/Defects/5_0/1887_PoliciesManager_allows_all_requested_params_in_case_parameters_field_is_empty.lua ./test_scripts/Defects/5_0/2427_policy_db_consistency_after_ignition_cycle.lua -;./test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 -;./test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +./test_scripts/Defects/5_0/2405/001_omitted_omitted_SUCCESS.lua +./test_scripts/Defects/5_0/2405/002_omitted_empty_SUCCESS.lua +./test_scripts/Defects/5_0/2405/003_omitted_param_SUCCESS.lua +./test_scripts/Defects/5_0/2405/004_empty_omitted_SUCCESS.lua +./test_scripts/Defects/5_0/2405/005_empty_empty_USER_DISALLOWED.lua +./test_scripts/Defects/5_0/2405/006_empty_param_SUCCESS_DISALLOWED.lua +./test_scripts/Defects/5_0/2405/007_param_omitted_SUCCESS.lua +./test_scripts/Defects/5_0/2405/008_param_empty_SUCCESS_DISALLOWED.lua +./test_scripts/Defects/5_0/2405/009_param_param_SUCCESS.lua ;Security ;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_1_navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 ;./test_scripts/Defects/4_5/Trigger_PTU_NO_Certificate/1888_2_non-navi.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2331 @@ -53,7 +53,7 @@ ;./test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2376 ;./test_scripts/Defects/5_0/2447_Resumption_revoked_app_still_be_resumed_as_FULL.lua https://github.com/smartdevicelink/sdl_core/issues/2447 ;RPC -;./test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 +./test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua ./test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua ./test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua ;./test_scripts/Defects/5_0/972_SDL_should_respond_IGNORED_with_correct_result_code_for_UnSubscribeVehicleData_in_case_vi_interface_is_not_available.lua https://github.com/smartdevicelink/sdl_core/issues/3205 From 0f8dc94bc113f6386c340fae3d8ded0681e0eb95 Mon Sep 17 00:00:00 2001 From: Dmitriy Boltovskiy Date: Thu, 9 Apr 2020 00:05:58 -0400 Subject: [PATCH 51/64] fixup! Policy flow specification --- test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua | 3 +++ ...873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua | 3 +++ .../Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua | 3 +++ ...1_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua | 3 +++ .../Defects/4_5/1912_Video_service_start_via_2_protocol.lua | 3 +++ ...App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua | 3 +++ ...o_mobile_app_when_activating_app_from_HMI_with_activate.lua | 3 +++ ...ailable_is_not_provided_in_response_for_PutFile_request.lua | 3 +++ ...n_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua | 3 +++ ...s_system_request_with_correlationid_-1_and_INAVLID_DATA.lua | 1 + 10 files changed, 28 insertions(+) diff --git a/test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua b/test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua index 34368d0936..17ec78f134 100644 --- a/test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua +++ b/test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua @@ -18,6 +18,9 @@ local mobile_session = require("mobile_session") local common = require('test_scripts/Defects/4_5/commonDefects') local sdl = require('SDL') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] --[[ Local Functions ]] diff --git a/test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua b/test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua index 407f2b3f14..a8d0a8f482 100644 --- a/test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua +++ b/test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua @@ -6,6 +6,9 @@ local runner = require('user_modules/script_runner') local commonDefects = require('test_scripts/Defects/4_5/commonDefects') local json = require("json") +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] local gpsDataResponse = { longitudeDegrees = 100, diff --git a/test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua b/test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua index 04f0a5d157..82a74156bf 100644 --- a/test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua +++ b/test_scripts/Defects/4_5/1880_DefaultAndRPCTimeoutGENERIC_ERROR.lua @@ -12,6 +12,9 @@ local apiLoader = require("modules/api_loader") local api = apiLoader.init("data/MOBILE_API.xml") local schema = api.interface[next(api.interface)] +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] local DefaultTimeout = 10000 diff --git a/test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua b/test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua index 9e576df6cd..85bccd4b6c 100644 --- a/test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua +++ b/test_scripts/Defects/4_5/1881_OnDriverDistraction_After_changing_HMIlevel_from_NONE.lua @@ -6,6 +6,9 @@ local runner = require('user_modules/script_runner') local commonDefects = require('test_scripts/Defects/4_5/commonDefects') local mobile_session = require("mobile_session") +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] config.application1.registerAppInterfaceParams.isMediaApplication = true config.application1.registerAppInterfaceParams.appHMIType = {"DEFAULT"} diff --git a/test_scripts/Defects/4_5/1912_Video_service_start_via_2_protocol.lua b/test_scripts/Defects/4_5/1912_Video_service_start_via_2_protocol.lua index 04dc0eb469..af7609b8f5 100644 --- a/test_scripts/Defects/4_5/1912_Video_service_start_via_2_protocol.lua +++ b/test_scripts/Defects/4_5/1912_Video_service_start_via_2_protocol.lua @@ -17,6 +17,9 @@ local constants = require('protocol_handler/ford_protocol_constants') local commonDefects = require('test_scripts/Defects/4_5/commonDefects') local events = require('events') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ General configuration parameters ]] config.defaultProtocolVersion = 2 config.application1.registerAppInterfaceParams.appHMIType = {"NAVIGATION"} diff --git a/test_scripts/Defects/5_0/1031_SDL_transfer_OnKeyboardInput_notification_to_not_active_App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua b/test_scripts/Defects/5_0/1031_SDL_transfer_OnKeyboardInput_notification_to_not_active_App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua index 6d52ce2c1d..523deae3fc 100644 --- a/test_scripts/Defects/5_0/1031_SDL_transfer_OnKeyboardInput_notification_to_not_active_App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua +++ b/test_scripts/Defects/5_0/1031_SDL_transfer_OnKeyboardInput_notification_to_not_active_App_when_there_is_no_active_PerformInteraction_KEYBOARD.lua @@ -20,6 +20,9 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/Defects/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] local requestParams = { initialText = "StartPerformInteraction", diff --git a/test_scripts/Defects/5_0/1035_SDL_doesnt_send_REJECTED_code_to_mobile_app_when_activating_app_from_HMI_with_activate.lua b/test_scripts/Defects/5_0/1035_SDL_doesnt_send_REJECTED_code_to_mobile_app_when_activating_app_from_HMI_with_activate.lua index cecebb5081..73cd08dcab 100644 --- a/test_scripts/Defects/5_0/1035_SDL_doesnt_send_REJECTED_code_to_mobile_app_when_activating_app_from_HMI_with_activate.lua +++ b/test_scripts/Defects/5_0/1035_SDL_doesnt_send_REJECTED_code_to_mobile_app_when_activating_app_from_HMI_with_activate.lua @@ -20,6 +20,9 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/Defects/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Variables ]] local kRejected = 4 local kSuccess = 0 diff --git a/test_scripts/Defects/5_0/1218_Mandatory_parameter_spaceAvailable_is_not_provided_in_response_for_PutFile_request.lua b/test_scripts/Defects/5_0/1218_Mandatory_parameter_spaceAvailable_is_not_provided_in_response_for_PutFile_request.lua index afbf57d188..1f4a6a74cf 100644 --- a/test_scripts/Defects/5_0/1218_Mandatory_parameter_spaceAvailable_is_not_provided_in_response_for_PutFile_request.lua +++ b/test_scripts/Defects/5_0/1218_Mandatory_parameter_spaceAvailable_is_not_provided_in_response_for_PutFile_request.lua @@ -17,6 +17,9 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/Defects/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Functions ]] local function putFileSUCCESS(self) local paramsSend = { diff --git a/test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua b/test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua index 00d1334eca..838c604851 100644 --- a/test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua +++ b/test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua @@ -19,6 +19,9 @@ local commonPreconditions = require('user_modules/shared_testcases/commonPrecond local utils = require("user_modules/utils") local actions = require("user_modules/sequences/actions") +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Functions ]] local function getPathToFileInStorage(pFileName, pAppId) if not pAppId then pAppId = 1 end diff --git a/test_scripts/Defects/5_1/2874_SDL_sends_system_request_with_correlationid_-1_and_INAVLID_DATA.lua b/test_scripts/Defects/5_1/2874_SDL_sends_system_request_with_correlationid_-1_and_INAVLID_DATA.lua index abf7af6b17..c5522d6c6d 100644 --- a/test_scripts/Defects/5_1/2874_SDL_sends_system_request_with_correlationid_-1_and_INAVLID_DATA.lua +++ b/test_scripts/Defects/5_1/2874_SDL_sends_system_request_with_correlationid_-1_and_INAVLID_DATA.lua @@ -17,6 +17,7 @@ local commonFunctions = require("user_modules/shared_testcases/commonFunctions") --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false + runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } --[[ Local Variables ]] local cloud_app_id = "cloudAppID123" From ea4bd2d02334db7c52af70f64f591bbd293330e3 Mon Sep 17 00:00:00 2001 From: Dmitriy Boltovskiy Date: Thu, 9 Apr 2020 03:32:56 -0400 Subject: [PATCH 52/64] fixup! Update 1206 script --- ...PTU_Trigger_PTU_failed_previous_IGN_ON.lua | 30 ++++++++++++------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua b/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua index 2df77c4629..f92c13a9f4 100644 --- a/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua +++ b/test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua @@ -1,6 +1,6 @@ ---------------------------------------------------------------------------------------------------- -- Script verifies issue https://github.com/SmartDeviceLink/sdl_core/issues/1206 --- Flow: HTTP +-- Flow: HTTP, PROPRIETARY ---------------------------------------------------------------------------------------------------- --[[ Required Shared libraries ]] local runner = require("user_modules/script_runner") @@ -22,6 +22,13 @@ runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPR local function registerApplicationAndWaitPTUStart(self) -- create mobile session self.mobileSession1 = mobile_session.MobileSession(self, self.mobileConnection) + -- register expectation of 'SDL.OnStatusUpdate' notification on HMI connection + -- it's expected that the value of 'status' argument will be 'UPDATE_NEEDED' + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) + :Do(function() + -- print information about received notification to console + commonFunctions:userPrint(color.blue, "Received OnStatusUpdate: UPDATE_NEEDED") + end) -- start RPC service self.mobileSession1:StartService(7) :Do(function() @@ -37,13 +44,17 @@ local function registerApplicationAndWaitPTUStart(self) EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", { application = { appName = config.application1.registerAppInterfaceParams.appName } }) - -- register expectation of 'SDL.OnStatusUpdate' notification on HMI connection - -- it's expected that the value of 'status' argument will be 'UPDATE_NEEDED' - EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) - :Do(function() - -- print information about received notification to console - commonFunctions:userPrint(color.blue, "Received OnStatusUpdate: UPDATE_NEEDED") - end) + end) +end + +local function start(self) + common.start(self) + -- register expectation of 'SDL.OnStatusUpdate' notification on HMI connection + -- it's expected that the value of 'status' argument will be 'UPDATE_NEEDED' + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UPDATE_NEEDED" }) + :Do(function() + -- print information about received notification to console + commonFunctions:userPrint(color.blue, "Received OnStatusUpdate: UPDATE_NEEDED") end) end @@ -56,8 +67,7 @@ runner.Step("SDL Configuration", common.printSDLConfig) runner.Title("Test") runner.Step("Application Registration and wait for UPDATE_NEEDED", registerApplicationAndWaitPTUStart) runner.Step("Ignition Off", common.ignitionOff) -runner.Step("Start SDL, HMI, connect Mobile", common.start) -runner.Step("Application Registration and wait for UPDATE_NEEDED", registerApplicationAndWaitPTUStart) +runner.Step("Start SDL, HMI, connect Mobile and wait for UPDATE_NEEDED", start) runner.Title("Postconditions") runner.Step("Stop SDL", common.postconditions) From 5b3014bac7a706d6225117031858f51c59c7a7c3 Mon Sep 17 00:00:00 2001 From: IGetmanets Date: Mon, 23 Mar 2020 16:40:53 +0200 Subject: [PATCH 53/64] Update according to 3279 in scripts for defects --- ...en_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua | 8 +------- .../5_0/2670_4_GetInteriorVD_after_ignition_off.lua | 7 +++---- test_sets/Defects/Defects_releases_4_x_and_5_x.txt | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua b/test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua index 0c32936e97..b390a74950 100644 --- a/test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua +++ b/test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua @@ -51,7 +51,7 @@ local function ignitionOff() end) end -function registerAppWithDeactivatedHMI(pAppId) +local function registerAppWithDeactivatedHMI(pAppId) if not pAppId then pAppId = 1 end common.getMobileSession(pAppId):StartService(7) :Do(function() @@ -60,11 +60,6 @@ function registerAppWithDeactivatedHMI(pAppId) { application = { appName = common.getConfigAppParams(pAppId).appName } }) :Do(function(_, d1) common.setHMIAppId(d1.params.application.appID, pAppId) - common.getHMIConnection():ExpectRequest("BasicCommunication.PolicyUpdate") - :Do(function(_, d2) - common.getHMIConnection():SendResponse(d2.id, d2.method, "SUCCESS", { }) - ptuTable = utils.jsonFileToTable(d2.params.file) - end) end) common.getMobileSession(pAppId):ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) :Do(function() @@ -102,7 +97,6 @@ runner.Step("ShutDown IGNITION_OFF", ignitionOff) runner.Step("Clean sessions", cleanSessions) runner.Step("Start SDL, init HMI, connect Mobile", common.start) - -- [[ Test ]] runner.Title("Test") runner.Step("Deactivate HMI", hmiDeactivation) diff --git a/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua b/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua index 5a5bc51e28..b43c519e9a 100644 --- a/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua +++ b/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua @@ -30,7 +30,6 @@ runner.testSettings.isSelfIncluded = false --[[ Local function ]] local function updatePreloadedPT() - if not pCountOfRCApps then pCountOfRCApps = 2 end local preloadedFile = commonPreconditions:GetPathToSDL() .. commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") local preloadedTable = utils.jsonFileToTable(preloadedFile) @@ -43,8 +42,8 @@ local function updatePreloadedPT() utils.tableToJsonFile(preloadedTable, preloadedFile) end -function preconditions() - actions.preconditions() +local function preconditions() + actions.preconditions() updatePreloadedPT() end @@ -78,7 +77,7 @@ runner.Step("GetInteriorVehicleData RADIO", commonRC.rpcDenied, { "RADIO", 1, "GetInteriorVehicleData", "DISALLOWED" }) runner.Step("ignitionOff", ignitionOff) runner.Step("Start SDL, HMI, connect Mobile, start Session", actions.start) -runner.Step("RAI", actions.registerApp) +runner.Step("RAI", actions.registerAppWOPTU) runner.Step("Activate App", actions.activateApp) runner.Step("GetInteriorVehicleData SEAT", commonRC.rpcDenied, { "SEAT", 1, "GetInteriorVehicleData", "DISALLOWED" }) diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt index 435142d121..420fc520eb 100644 --- a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -50,7 +50,7 @@ ./test_scripts/Defects/4_5/1395_Resumption_data_IGN_OFF.lua ./test_scripts/Defects/5_0/959_resumption_limited_non_media.lua ./test_scripts/Defects/5_0/1898_Canceling_HMILevel_resumption_of_media_app_after_unexpectedDisconnect.lua -;./test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2376 +./test_scripts/Defects/5_0/2446_SDL_doesn_t_resume_HMILevel_when_DEACTIVATE_HMI_with_isActive_is_true_then_false.lua ;./test_scripts/Defects/5_0/2447_Resumption_revoked_app_still_be_resumed_as_FULL.lua https://github.com/smartdevicelink/sdl_core/issues/2447 ;RPC ;./test_scripts/Defects/4_5/1211_ATF_Check_count_of_removals_for_bad_behavior_REQUEST_WHILE_IN_NONE_HMI_LEVEL.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2332 @@ -86,7 +86,7 @@ ./test_scripts/Defects/5_0/2670_GetInteriorVD_after_ignition_off.lua ./test_scripts/Defects/5_0/2670_2_GetInteriorVD_after_ignition_off.lua ./test_scripts/Defects/5_0/2670_3_GetInteriorVD_after_ignition_off.lua -;./test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2376 +./test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua ;IGNITION OFF ;./test_scripts/Defects/4_5/1225_FACTORY_DEFAULTS.lua https://github.com/smartdevicelink/sdl_core/issues/3204 ./test_scripts/Defects/5_0/2464_SDL_does_not_send_OnSDLClose_notification_by_switching_off_with_reason_IGNITION_OFF.lua From d45c6c1bf29039c26e3999ce1ddb879b1bbb079e Mon Sep 17 00:00:00 2001 From: Dmitriy Boltovskiy Date: Tue, 14 Apr 2020 17:11:31 -0400 Subject: [PATCH 54/64] Apply suggestions --- .../1921_Invalid_PT_after_cutting_unknow_values.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua b/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua index f0c5c1bada..9380d122f9 100644 --- a/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua +++ b/test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua @@ -147,13 +147,13 @@ local function contains(pTbl, pValue) return false end ---[[ @CheckCuttingUnknowValues: expectation of OnPermissionsChange notification and check its content +--[[ @CheckCuttingUnknownValues: expectation of OnPermissionsChange notification and check its content --! @parameters: --! pNotifTimes - expected number of OnPermissionsChange notification --! self - test object --! @return: none --]] -local function CheckCuttingUnknowValues(pNotifTimes, self) +local function CheckCuttingUnknownValues(pNotifTimes, self) self.mobileSession1:ExpectNotification("OnPermissionsChange") :Times(pNotifTimes) :ValidIf(function(_, data) @@ -190,7 +190,7 @@ end --]] local function rai_with_OnPermissionChange(ptuUpdateFunc, self) commonDefects.rai_ptu_n_without_OnPermissionsChange(1, ptuUpdateFunc, self) - CheckCuttingUnknowValues(2, self) + CheckCuttingUnknownValues(2, self) end --[[ @SuccessfulProcessingRPC: Successful processing API @@ -294,7 +294,7 @@ end local function ptu(pUpdateFunction, self) EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", { status = "UP_TO_DATE" }) commonDefects.ptu(pUpdateFunction, self) - CheckCuttingUnknowValues(1, self) + CheckCuttingUnknownValues(1, self) end --[[ Scenario ]] @@ -315,7 +315,7 @@ runner.Step("Check applying of PT by processing SubscribeVehicleData", Disallowe { "SubscribeVehicleData", { gps = true }, "VehicleInfo" }) runner.Step("Remove Snapshot and trigger PTU, check new created PTS", removeSnapshotAndTriggerPTUFromHMI) -runner.Step("Invalid_PTU_after_cutting_of_unknown_values", commonDefects.unsuccessfulPTU, +runner.Step("Invalid_PTU_after_cutting_off_unknown_values", commonDefects.unsuccessfulPTU, { ptuUpdateFuncNotValid, ptuExpUnsuccessFlow }) runner.Title("Postconditions") From a520d887d67fb32b4e781d6ad914f4c5eee96f2d Mon Sep 17 00:00:00 2001 From: Dmitriy Boltovskiy Date: Thu, 16 Apr 2020 13:37:00 -0400 Subject: [PATCH 55/64] Fix update/restore SDL PreloadedPT --- ...670_4_GetInteriorVD_after_ignition_off.lua | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua b/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua index b43c519e9a..a2c5898830 100644 --- a/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua +++ b/test_scripts/Defects/5_0/2670_4_GetInteriorVD_after_ignition_off.lua @@ -19,32 +19,20 @@ local runner = require('user_modules/script_runner') local commonRC = require('test_scripts/RC/commonRC') local actions = require("user_modules/sequences/actions") -local test = require("user_modules/dummy_connecttest") -local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') -local commonFunctions = require("user_modules/shared_testcases/commonFunctions") -local json = require("modules/json") -local utils = require('user_modules/utils') --[[ Test Configuration ]] runner.testSettings.isSelfIncluded = false --[[ Local function ]] local function updatePreloadedPT() - local preloadedFile = commonPreconditions:GetPathToSDL() - .. commonFunctions:read_parameter_from_smart_device_link_ini("PreloadedPT") - local preloadedTable = utils.jsonFileToTable(preloadedFile) - preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = json.null + local preloadedTable = actions.sdl.getPreloadedPT() + preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = actions.json.null preloadedTable.policy_table.functional_groupings["RemoteControl"].rpcs.OnRCStatus = { hmi_levels = { "FULL", "BACKGROUND", "LIMITED", "NONE" } } preloadedTable.policy_table.app_policies.default.groups = {"Base-4", "RemoteControl"} preloadedTable.policy_table.app_policies.default.moduleType = nil - utils.tableToJsonFile(preloadedTable, preloadedFile) -end - -local function preconditions() - actions.preconditions() - updatePreloadedPT() + actions.sdl.setPreloadedPT(preloadedTable) end local function ignitionOff() @@ -57,15 +45,15 @@ local function ignitionOff() EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = false }) EXPECT_HMINOTIFICATION("BasicCommunication.OnSDLClose") :Do(function() - test.mobileSession[1] = nil + actions.mobile.closeSession() StopSDL() end) end --[[ Scenario ]] runner.Title("Preconditions") -runner.Step("Clean environment", preconditions) -runner.Step("Backup preloaded pt", commonPreconditions.BackupFile, { test, "sdl_preloaded_pt.json" }) +runner.Step("Clean environment", actions.preconditions) +runner.Step("Update SDL preloadedPT", updatePreloadedPT) runner.Step("Start SDL, HMI, connect Mobile, start Session", actions.start) runner.Step("RAI", actions.registerAppWOPTU) runner.Step("Activate App", actions.activateApp) @@ -85,5 +73,4 @@ runner.Step("GetInteriorVehicleData RADIO", commonRC.rpcDenied, { "RADIO", 1, "GetInteriorVehicleData", "DISALLOWED" }) runner.Title("Postconditions") -runner.Step("Restore preloaded pt", commonPreconditions.RestoreFile, { test, "sdl_preloaded_pt.json" }) runner.Step("Stop SDL", actions.postconditions) From 775f6a8a773e31664b3076ad2a0ac1448a3e2ce7 Mon Sep 17 00:00:00 2001 From: JackLivio Date: Thu, 16 Apr 2020 13:46:23 -0700 Subject: [PATCH 56/64] Update proprietary retry tests (#2390) * Update proprietary retry tests * Update descriptions --- .../build_options/retry_seq_url_array.json | 2274 +++++++++++++++++ ...F_Start_PTU_retry_sequence_PROPRIETARY.lua | 14 +- ...PTU_retry_sequence_HMI_URL_PROPRIETARY.lua | 136 + .../policies_happy_paths_PROPRIETARY.txt | 3 +- 4 files changed, 2420 insertions(+), 7 deletions(-) create mode 100644 files/jsons/Policies/build_options/retry_seq_url_array.json create mode 100644 test_scripts/Policies/build_options/119_ATF_Start_PTU_retry_sequence_HMI_URL_PROPRIETARY.lua diff --git a/files/jsons/Policies/build_options/retry_seq_url_array.json b/files/jsons/Policies/build_options/retry_seq_url_array.json new file mode 100644 index 0000000000..7bcbd40c70 --- /dev/null +++ b/files/jsons/Policies/build_options/retry_seq_url_array.json @@ -0,0 +1,2274 @@ +{ + "policy_table": { + "module_config": { + "preloaded_pt": true, + "exchange_after_x_ignition_cycles": 100, + "exchange_after_x_kilometers": 1800, + "exchange_after_x_days": 30, + "timeout_after_x_seconds": 8, + "seconds_between_retries": [1, + 2, + 3, + 4, + 5], + "endpoints": { + "0x07": { + "default": ["http://policies.telematics.ford.com/api/policies/1", "http://policies.telematics.ford.com/api/policies/2"] + }, + "0x04": { + "default": ["http://ivsu.software.ford.com/api/getsoftwareupdates"] + }, + "queryAppsUrl": { + "default": ["http://sdl.shaid.server"] + }, + "lock_screen_icon_url": { + "default": ["http://i.imgur.com/QwZ9uKG.png"] + } + }, + "notifications_per_minute_by_priority": { + "EMERGENCY": 60, + "NAVIGATION": 15, + "VOICECOM": 20, + "COMMUNICATION": 6, + "NORMAL": 4, + "NONE": 0 + } + }, + "functional_groupings": { + "Base-4": { + "rpcs": { + "AddCommand": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "AddSubMenu": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "Alert": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "ChangeRegistration": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "CreateInteractionChoiceSet": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "DeleteCommand": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "DeleteFile": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "DeleteInteractionChoiceSet": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "DeleteSubMenu": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "EncodedSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "EndAudioPassThru": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "GenericResponse": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ListFiles": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnAppInterfaceUnregistered": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnAudioPassThru": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "OnButtonEvent": { + "hmi_levels": ["FULL", + "LIMITED", + "BACKGROUND"] + }, + "OnButtonPress": { + "hmi_levels": ["FULL", + "LIMITED", + "BACKGROUND"] + }, + "OnCommand": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "OnDriverDistraction": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "OnEncodedSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnHashChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnHMIStatus": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnLanguageChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnPermissionsChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnSystemRequest": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "PerformAudioPassThru": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "PerformInteraction": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "PutFile": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "RegisterAppInterface": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "ResetGlobalProperties": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "ScrollableMessage": { + "hmi_levels": ["FULL"] + }, + "SetAppIcon": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetDisplayLayout": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetGlobalProperties": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetMediaClockTimer": { + "hmi_levels": ["FULL", + "LIMITED", + "BACKGROUND"] + }, + "Show": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "Slider": { + "hmi_levels": ["FULL"] + }, + "Speak": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "SubscribeButton": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "SystemRequest": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "UnregisterAppInterface": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "UnsubscribeButton": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "Location-1": { + "user_consent_prompt": "Location", + "rpcs": { + "GetVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["gps", + "speed"] + }, + "OnVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["gps", + "speed"] + }, + "SubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["gps", + "speed"] + }, + "UnsubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["gps", + "speed"] + } + } + }, + "Notifications": { + "user_consent_prompt": "Notifications", + "rpcs": { + "Alert": { + "hmi_levels": ["BACKGROUND"] + } + } + }, + "DrivingCharacteristics-3": { + "user_consent_prompt": "DrivingCharacteristics", + "rpcs": { + "GetVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["accPedalPosition", + "beltStatus", + "driverBraking", + "myKey", + "prndl", + "rpm", + "steeringWheelAngle"] + }, + "OnVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["accPedalPosition", + "beltStatus", + "driverBraking", + "myKey", + "prndl", + "rpm", + "steeringWheelAngle"] + }, + "SubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["accPedalPosition", + "beltStatus", + "driverBraking", + "myKey", + "prndl", + "rpm", + "steeringWheelAngle"] + }, + "UnsubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["accPedalPosition", + "beltStatus", + "driverBraking", + "myKey", + "prndl", + "rpm", + "steeringWheelAngle"] + } + } + }, + "VehicleInfo-3": { + "user_consent_prompt": "VehicleInfo", + "rpcs": { + "GetVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["bodyInformation", + "deviceStatus", + "engineTorque", + "externalTemperature", + "fuelLevel", + "fuelLevel_State", + "headLampStatus", + "instantFuelConsumption", + "odometer", + "tirePressure", + "vin", + "wiperStatus"] + }, + "OnVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["bodyInformation", + "deviceStatus", + "engineTorque", + "externalTemperature", + "fuelLevel", + "fuelLevel_State", + "headLampStatus", + "instantFuelConsumption", + "odometer", + "tirePressure", + "vin", + "wiperStatus"] + }, + "SubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["bodyInformation", + "deviceStatus", + "engineTorque", + "externalTemperature", + "fuelLevel", + "fuelLevel_State", + "headLampStatus", + "instantFuelConsumption", + "odometer", + "tirePressure", + "wiperStatus"] + }, + "UnsubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["bodyInformation", + "deviceStatus", + "engineTorque", + "externalTemperature", + "fuelLevel", + "fuelLevel_State", + "headLampStatus", + "instantFuelConsumption", + "odometer", + "tirePressure", + "wiperStatus"] + } + } + }, + "PropriataryData-1": { + "rpcs": { + "DiagnosticMessage": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "GetDTCs": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ReadDID": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "PropriataryData-2": { + "rpcs": { + "DiagnosticMessage": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "GetDTCs": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ReadDID": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "ProprietaryData-3": { + "rpcs": { + "GetDTCs": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ReadDID": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "Emergency-1": { + "rpcs": { + "GetVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["airbagStatus", + "clusterModeStatus", + "eCallInfo", + "emergencyEvent"] + }, + "OnVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["airbagStatus", + "clusterModeStatus", + "eCallInfo", + "emergencyEvent"] + }, + "SubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["airbagStatus", + "clusterModeStatus", + "eCallInfo", + "emergencyEvent"] + }, + "UnsubscribeVehicleData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"], + "parameters": ["airbagStatus", + "clusterModeStatus", + "eCallInfo", + "emergencyEvent"] + } + } + }, + "Navigation-1": { + "rpcs": { + "AlertManeuver": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ShowConstantTBT": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "UpdateTurnList": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "Base-6": { + "rpcs": { + "AddCommand": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "AddSubMenu": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "Alert": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "ChangeRegistration": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "CreateInteractionChoiceSet": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "DeleteCommand": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "DeleteFile": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "DeleteInteractionChoiceSet": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "DeleteSubMenu": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "EncodedSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "EndAudioPassThru": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "GenericResponse": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ListFiles": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnAppInterfaceUnregistered": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnAudioPassThru": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "OnButtonEvent": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "OnButtonPress": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "OnCommand": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "OnDriverDistraction": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "OnEncodedSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnHMIStatus": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnLanguageChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnPermissionsChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnTBTClientState": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "PerformAudioPassThru": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "PerformInteraction": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "PutFile": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "RegisterAppInterface": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "ResetGlobalProperties": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "ScrollableMessage": { + "hmi_levels": ["FULL"] + }, + "SetAppIcon": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetDisplayLayout": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetGlobalProperties": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "SetMediaClockTimer": { + "hmi_levels": ["FULL"] + }, + "Show": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "Slider": { + "hmi_levels": ["FULL"] + }, + "Speak": { + "hmi_levels": ["FULL", + "LIMITED"] + }, + "SubscribeButton": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + }, + "SyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "UnregisterAppInterface": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "UnsubscribeButton": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "OnKeyboardInputOnlyGroup": { + "rpcs": { + "OnKeyboardInput": { + "hmi_levels": ["FULL"] + } + } + }, + "OnTouchEventOnlyGroup": { + "rpcs": { + "OnTouchEvent": { + "hmi_levels": ["FULL"] + } + } + }, + "DiagnosticMessageOnly": { + "rpcs": { + "DiagnosticMessage": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "DataConsent-2": { + "user_consent_prompt": "DataConsent", + "rpcs": null + }, + "BaseBeforeDataConsent": { + "rpcs": { + "ChangeRegistration": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "DeleteFile": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "EncodedSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "ListFiles": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnAppInterfaceUnregistered": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnEncodedSyncPData": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnHashChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnHMIStatus": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnLanguageChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnPermissionsChange": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "OnSystemRequest": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "PutFile": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "RegisterAppInterface": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "ResetGlobalProperties": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetGlobalProperties": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetAppIcon": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SetDisplayLayout": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "SystemRequest": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + }, + "UnregisterAppInterface": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED", + "NONE"] + } + } + }, + "SendLocation": { + "rpcs": { + "SendLocation": { + "hmi_levels": ["BACKGROUND", + "FULL", + "LIMITED"] + } + } + }, + "BackgroundAPT": { + "rpcs": { + "EndAudioPassThru": { + "hmi_levels": ["BACKGROUND"] + }, + "OnAudioPassThru": { + "hmi_levels": ["BACKGROUND"] + }, + "PerformAudioPassThru": { + "hmi_levels": ["BACKGROUND"] + } + } + } + }, + "consumer_friendly_messages": { + "version": "001.001.021", + "messages": { + "AppPermissions": { + "languages": { + "de-de": { + "tts": "%appName% benötigt die folgenden Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Wenn Sie Ja drücken, erklären Sie sich damit einverstanden, dass %vehicleMake% nicht für Schäden oder Verletzungen der Privatsphäre haftet, die im Zusammenhang mit der Nutzung Ihrer Benutzerdaten durch %appName% entstehen. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab.", + "line1": "Zugriffsanfrage(n)", + "line2": "erlauben?" + }, + "en-au": { + "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.", + "line1": "Grant requested", + "line2": "permission(s)?" + }, + "en-gb": { + "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. Please press Yes to allow or No to deny.", + "line1": "Grant requested", + "line2": "permission(s)?", + "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%`s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu." + }, + "en-ie": { + "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press Yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%'s use of your data. Please press Yes to allow or No to deny.", + "line1": "Grant requested", + "line2": "permission(s)?" + }, + "en-us": { + "tts": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. If you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. Please press yes to allow or no to deny.", + "line1": "Grant Requested", + "line2": "Permission(s)?", + "textBody": "%appName% is requesting the use of the following vehicle information and permissions: %functionalGroupLabels%. \n\nIf you press yes, you agree that %vehicleMake% will not be liable for any damages or loss of privacy related to %appName%’s use of your data. You can change these permissions and hear detailed descriptions in the mobile apps settings menu." + }, + "es-en": { + "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.", + "line1": "¿Otorgar permiso(s)", + "line2": "solicitado(s)?", + "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. \n\n Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles." + }, + "es-es": { + "tts": "%appName% está solicitando el uso de los siguientes permisos e información del vehículo: %functionalGroupLabels%. Si pulsa sí, acepta que %vehicleMake% no será responsable de los daños o la pérdida de privacidad relacionados con el uso de sus datos por parte de %appName%. Pulse sí para permitir o no para denegar.", + "line1": "¿Conceder permisos", + "line2": "solicitados?" + }, + "es-mx": { + "tts": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. Si presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar.", + "line1": "¿Otorgar permiso(s)", + "line2": "solicitado(s)?", + "textBody": "%appName% solicita el uso de la siguiente información y permisos del vehículo: %functionalGroupLabels%. \n\nSi presiona Sí, acepta que %vehicleMake% no se hará responsable por los daños o pérdidas de privacidad relacionados con el uso que %appName% haga de sus datos. Presione Sí para permitir y No para denegar. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles." + }, + "fr-ca": { + "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.", + "line1": "Accorder permission(s)", + "line2": "demandée(s)", + "textBody": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles." + }, + "fr-fr": { + "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Si vous appuyez sur Oui, vous acceptez que %vehicleMake% ne sera pas responsable des dommages ou des pertes de confidentialité reliées à l’utilisation de vos données par %appName%. Veuillez appuyer sur Oui pour autoriser ou sur Non pour refuser.", + "line1": "Accorder permission(s)", + "line2": "demandée(s)" + }, + "it-it": { + "tts": "%appName% richiede l'uso delle seguenti informazioni e autorizzazioni sul veicolo: %functionalGroupLabels%. Se si preme Sì, si acconsente che %vehicleMake% non sarà responsabile per danni o perdita di privacy in relazione all'impiego dei dati da parte di %appName%. Premere Sì per consentire e No per negare.", + "line1": "Concedi autorizzaz.", + "line2": "richiesta(e)?" + }, + "nl-nl": { + "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. Als u op Ja drukt, gaat u ermee akkoord dat %vehicleMake% in geen geval aansprakelijk gesteld kan worden voor schade of verlies van privacy als gevolg van het feit dat %appName% gebruik maakt van uw gegevens. Druk op Ja om dit toe te staan of Nee om te weigeren.", + "line1": "Aangevraagde", + "line2": "permissie(s) verlenen?" + }, + "pl-pl": { + "tts": "%appName% wymaga następujących informacji o pojeździe oraz pozwoleń: %functionalGroupLabels%. Naciśnięcie TAK oznacza zgodę na fakt, iż %vehicleMake% nie będzie ponosić odpowiedzialności za szkody ani utratę prywatności w związku z wykorzystaniem przez %appName% danych, należących do użytkownika. Naciśnij TAK w celu udzielenia zgody lub NIE w celu odrzucenia żądania.", + "line1": "Udzielić żądanych", + "line2": "pozwoleń?" + }, + "pt-br": { + "tts": "%appName% está solicitando o uso das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se pressionar sim, você concorda que a %vehicleMake% não será responsável por danos ou perdas de privacidade relacionados ao uso dos seus dados por %appName%. Pressione sim para permitir ou não para negar.", + "line1": "Conceder permissão", + "line2": "solicitada?" + }, + "pt-pt": { + "tts": "%appName% está a solicitar a utilização das seguintes informações e permissões do veículo: %functionalGroupLabels%. Se premir “Sim”, concorda que %vehicleMake% não será responsável por quaisquer danos ou perda de privacidade relacionada com a utilização dos seus dados por parte de %appName%. Prima “Sim” para permitir ou “Não” para recusar.", + "line1": "Conceder permiss.", + "line2": "solicitada(s)?" + }, + "ru-ru": { + "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Нажатием \"\"да\"\", Вы соглашаетесь, что %vehicleMake% не будет нести ответственность за какие-либо убытки или потерю прайвеси, связанные с использованием Ваших данных компанией %appName%. Нажмите \"\"Да\"\", если Вы согласны, или \"\"Нет\"\" - если не согласны.", + "line1": "Предост. заправш.", + "line2": "разрешения?" + }, + "sv-se": { + "tts": "%appName% begär att få tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Om du trycker Ja godkänner du att %vehicleMake% ska hållas skadeslös för alla skador som kan uppstå eller eventuella integritetsintrång som uppstår när %appName% använder dina data. Tryck Ja för att godkänna eller Nej för att neka.", + "line1": "Vill du ge", + "line2": "tillstånd?" + }, + "tr-tr": { + "tts": "%appName%, şu araç bilgilerini ve izinleri kullanma isteğinde bulunuyor: %functionalGroupLabels%. Evet'e basarsanız, %appName%'in verilerinizi kullanması sonucunda oluşabilecek hasarlardan veya gizlilik kaybından %vehicleMake%'in sorumlu olmayacağını kabul etmiş olacaksınız. Lütfen kabul etmek için Evet'e veya reddetmek için Hayır'a basın.", + "line1": "İstenen izinler", + "line2": "verilsin mi?" + }, + "zh-cn": { + "tts": "%appName% 正在请求使用下列车辆信息和权限: %functionalGroupLabels%。如果您按“是”,则表示您同意。 %vehicleMake% 将不会对因 %appName% 使用您的数据而引起的任何损毁或隐私损失负责。 请按“是”允许或按“否”拒绝。", + "line1": "是否允许请求的", + "line2": "权限?" + }, + "zh-tw": { + "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。按「是」,表示您同意,如因 %appName% 使用您的資料導致任何損害或損失,%vehicleMake% 將不負賠償責任。同意請按「是」,拒絕請按「否」。", + "line1": "允許", + "line2": "授權請求?" + } + } + }, + "AppPermissionsHelp": { + "languages": { + "de-de": { + "tts": "%appName% fordert folgende Fahrzeuginformationen und Zugriffsberechtigungen: %functionalGroupLabels%. Im Einstellungsmenü der mobilen Apps können Sie diese Berechtigungen ändern und sich detaillierte Beschreibungen anhören. Mit Ja stimmen Sie zu; mit Nein lehnen Sie ab." + }, + "en-au": { + "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny." + }, + "en-gb": { + "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny." + }, + "en-ie": { + "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press Yes to grant permissions or No to deny." + }, + "en-us": { + "tts": "%appName% is requesting the following vehicle information and permissions: %functionalGroupLabels%. You can change these permissions and hear detailed descriptions in the mobile apps settings menu. Please press yes to grant permissions or no to deny." + }, + "es-en": { + "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar." + }, + "es-es": { + "tts": "%appName% está solicitando los siguientes permisos e información del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y escuchar descripciones detalladas en el menú de configuración de la aplicación móvil. Pulse sí para conceder el permiso o no para denegarlo." + }, + "es-mx": { + "tts": "%appName% solicita la siguiente información y permisos del vehículo: %functionalGroupLabels%. Puede cambiar estos permisos y consultar descripciones detalladas en el menú de configuración de las aplicaciones móviles. Presione Sí para otorgar permisos y No para denegar." + }, + "fr-ca": { + "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser." + }, + "fr-fr": { + "tts": "%appName% demande d’utiliser les informations du véhicule et les permissions suivantes : %functionalGroupLabels%. Vous pouvez modifier ces permissions et entendre les descriptions détaillées dans le menu des réglages des applications mobiles. Veuillez appuyer sur Oui pour accorder les permissions ou sur Non pour refuser." + }, + "it-it": { + "tts": "%appName% richiede le seguenti informazioni e autorizzazioni riguardo il veicolo: %functionalGroupLabels%. È possibile modificare tali autorizzazioni e ascoltare descrizioni dettagliate nel menu impostazioni delle app mobili. Premere Sì per concedere le autorizzazioni e No per negarle." + }, + "nl-nl": { + "tts": "%appName% vraagt gebruikmaking van de volgende voertuiginformatie en toestemmingen aan: %functionalGroupLabels%. U kunt deze toestemmingen wijzigen en gedetailleerde beschrijvingen beluisteren in het instellingenmenu voor mobiele apps. Druk op Ja om permissies te verlenen of op Nee om te weigeren." + }, + "pl-pl": { + "tts": "%appName% wymaga następujących informacji o pojeździe oraz zezwoleń: %functionalGroupLabels%. W menu ustawień aplikacji mobilnych można zmienić owe zezwolenia i usłyszeć ich szczegółowy opis. Naciśnij TAK, aby wyrazić zgodę lub NIE w celu odrzucenia żądania." + }, + "pt-br": { + "tts": "%appName% está solicitando as seguintes informações e permissões do veículo: %functionalGroupLabels%. Você pode alterar estas permissões e ouvir descrições detalhadas no menu de configurações de aplicativos móveis. Pressione sim para conceder as permissões ou não para negar." + }, + "pt-pt": { + "tts": "%appName% está a solicitar as seguintes informações e permissões do veículo: %functionalGroupLabels%. Pode alterar estas permissões e ouvir descrições detalhadas no menu de definições das aplicações móveis. Prima \"\"Sim\"\" para permitir ou \"\"Não\"\" para recusar." + }, + "ru-ru": { + "tts": "%appName% запрашивает следующую информацию об автомобиле и разрешения: %functionalGroupLabels%. Вы можете изменить эти разрешения и прослушать подробные их описания в меню настроек мобильного приложения. Нажмите \"\"да\"\", чтобы предоставить разрешения, или \"\"нет\"\", чтобы не предоставлять." + }, + "sv-se": { + "tts": "%appName% begär tillgång till följande fordonsinformation och tillstånd: %functionalGroupLabels%. Du kan ändra tillstånden och höra detaljerade beskrivningar i menyn för mobilappsinställningar. Tryck Ja för att ge tillstånd eller Nej för att neka." + }, + "tr-tr": { + "tts": "%appName%, şu araç bilgilerini ve izinleri istiyor: %functionalGroupLabels%. Bu izinleri değiştirebilir ve mobil uygulamalar ayarlar menüsünden ayrıntılı açıklamaları dinleyebilirsiniz. Lütfen izin vermek için Evet'e veya reddetmek için Hayır'a basın." + }, + "zh-cn": { + "tts": "%appName% 正在请求下列车辆信息和权限: %functionalGroupLabels%。您可在移动应用程序设置菜单中更改这些权限,并听取详细说明。请按“是”允许权限或按“否”拒绝。" + }, + "zh-tw": { + "tts": "%appName% 正請求使用 %functionalGroupLabels% 的車輛資訊和許可。您可在行動應用程式設定清單中更改這些許可,並聆聽詳細說明。給予許可請按「是」,拒絕請按「否」。" + } + } + }, + "AppPermissionsRevoked": { + "languages": { + "de-de": { + "tts": "Die Autorisierungsdaten der App wurden geändert. %appName% hat keinen Zugriff auf %functionalGroupLabels% mehr. Installieren Sie die neueste Version der App auf Ihrem Gerät.." + }, + "en-au": { + "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device." + }, + "en-gb": { + "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device." + }, + "en-ie": { + "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device." + }, + "en-us": { + "tts": "App authorizations have changed. %appName% can no longer access %functionalGroupLabels%. Please ensure you have the most recent app version installed on your mobile device." + }, + "es-en": { + "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil." + }, + "es-es": { + "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de que tiene la versión más reciente de la aplicación instalada en su dispositivo móvil." + }, + "es-mx": { + "tts": "Las autorizaciones de la aplicación han cambiado. %appName% ya no puede acceder a %functionalGroupLabels%. Asegúrese de haber instalado la versión más reciente de la aplicación en su dispositivo móvil." + }, + "fr-ca": { + "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile." + }, + "fr-fr": { + "tts": "Les autorisations pour app ont changé. %appName% ne peut plus accéder à %functionalGroupLabels%. Veuillez vous assurer que la plus récente version de l’application est installée sur votre appareil mobile." + }, + "it-it": { + "tts": "Le autorizzazioni dell'app sono cambiate. %appName% non è più in grado di accedere a %functionalGroupLabels%. Assicurarsi di avere la versione più recente dell'app installata sul dispositivo mobile." + }, + "nl-nl": { + "tts": "De app-autorisaties zijn gewijzigd. %appName% heeft geen toegang meer tot %functionalGroupLabels%. Zorg ervoor dat u de meest recente app-versie op uw mobiele apparaat geïnstalleerd hebt." + }, + "pl-pl": { + "tts": "Dane dostępu aplikacji zostały zmienione. %appName% nie ma już dostępu do %functionalGroupLabels%. Sprawdź, czy na telefonie komórkowym zainstalowano najnowszą wersję aplikacji." + }, + "pt-br": { + "tts": "As autorizações dos aplicativos foram alteradas. %appName% não pode mais acessar %functionalGroupLabels%. Certifique-se de que a versão mais recente do aplicativo está instalada no seu dispositivo móvel." + }, + "pt-pt": { + "tts": "As autorizações das aplicações mudaram. %appName% já não consegue aceder a %functionalGroupLabels%. Certifique-se de que tem a última versão da aplicação no seu dispositivo móvel." + }, + "ru-ru": { + "tts": "Авторизации приложения изменены. %appName% больше не имеет доступа к %functionalGroupLabels%. Убедитесь, что на вашем мобильном устройстве установлена самая новая версия приложения." + }, + "sv-se": { + "tts": "Appens behörigheter har ändrats. %appName% har inte längre åtkomst till %functionalGroupLabels%. Kontrollera att du har installerat den senaste versionen av appen på mobilenheten." + }, + "tr-tr": { + "tts": "Uygulama yetkileri değişti. %appName% artık %functionalGroupLabels%'e erişemeyecek. Lütfen mobil aygıtınızda en son uygulama sürümünün yüklü olduğundan emin olun." + }, + "zh-cn": { + "tts": "应用程序授权已变更。 %appName% 将不能再访问 %functionalGroupLabels%。 请确认您的移动设备上安装的应用程序是最新版本。" + }, + "zh-tw": { + "tts": "應用程式授權已改變。%appName% 已無法進入 %functionalGroupLabels%。請確認您的行動裝置上安裝了最新版應用程式。" + } + } + }, + "AppUnauthorized": { + "languages": { + "de-de": { + "tts": "Diese Version von %appName% ist nicht autorisiert und wird nicht mit SYNC funktionieren.", + "line1": "nicht autorisiert" + }, + "en-au": { + "tts": "This version of %appName% is not authorized and will not work with SYNC.", + "line1": "not authorized" + }, + "en-gb": { + "tts": "This version of %appName% is not authorized and will not work with SYNC.", + "line1": "not authorized", + "textBody": "This version of %appName% is not authorized and will not work with SYNC." + }, + "en-ie": { + "tts": "This version of %appName% is not authorized and will not work with SYNC.", + "line1": "not authorized" + }, + "en-us": { + "tts": "This version of %appName% is not authorized and will not work with SYNC.", + "line1": "Not Authorized", + "textBody": "This version of %appName% is no longer authorized to work with AppLink. Please update to the latest version of %appName%." + }, + "es-en": { + "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.", + "line1": "no autorizada", + "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC." + }, + "es-es": { + "tts": "Esta versión de %appName% no está autorizada y no funcionará con SYNC.", + "line1": "No autorizada" + }, + "es-mx": { + "tts": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC.", + "line1": "no autorizada", + "textBody": "Esta versión de %appName% no tiene autorización y no funcionará con SYNC." + }, + "fr-ca": { + "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.", + "line1": "non autorisée", + "textBody": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC." + }, + "fr-fr": { + "tts": "Cette version de %appName% n’est pas autorisée et ne fonctionnera pas avec SYNC.", + "line1": "non autorisée" + }, + "it-it": { + "tts": "Questa versione di %appName% non è autorizzata e non funziona con il SYNC.", + "line1": "non autorizzata" + }, + "nl-nl": { + "tts": "Deze versie van %appName% is niet geautoriseerd en werkt niet met SYNC.", + "line1": "niet geautoriseerd" + }, + "pl-pl": { + "tts": "Niniejsza wersja %appName% nie posiada autoryzacji i nie będzie działać z SYNC.", + "line1": "brak autoryzacji" + }, + "pt-br": { + "tts": "Esta versão do %appName% não tem autorização e não funcionará com o SYNC.", + "line1": "não autorizado" + }, + "pt-pt": { + "tts": "Esta versão de %appName% não está autorizada e não funcionará com o SYNC.", + "line1": "não autorizada" + }, + "ru-ru": { + "tts": "Эта версия %appName% не авторизирована и не будет работать с SYNC.", + "line1": "не авторизировано" + }, + "sv-se": { + "tts": "Den här versionen av %appName% är inte godkänd och fungerar inte med SYNC.", + "line1": "är ej godkänd" + }, + "tr-tr": { + "tts": "Bu %appName% sürümüne izin verilmediğinden SYNC ile çalışamaz.", + "line1": "için izin yok" + }, + "zh-cn": { + "tts": "此版本的%appName% 未得到授权,无法在SYNC上使用。", + "line1": "未得到授权" + }, + "zh-tw": { + "tts": "%appName% 的版本未獲得授權,將無法透過 SYNC 使用。", + "line1": "無授權" + } + } + }, + "AppUnsupported": { + "languages": { + "de-de": { + "tts": "Diese Version von %appName% wird von SYNC nicht unterstützt.", + "line1": "nicht unterstützt" + }, + "en-au": { + "tts": "This version of %appName% is not supported by SYNC.", + "line1": "not supported" + }, + "en-gb": { + "tts": "This version of %appName% is not supported by SYNC.", + "line1": "not supported", + "textBody": "This version of %appName% is not supported by SYNC." + }, + "en-ie": { + "tts": "This version of %appName% is not supported by SYNC.", + "line1": "not supported" + }, + "en-us": { + "tts": "This version of %appName% is not supported by SYNC.", + "line1": "Not Supported", + "textBody": "Your version of %appName% is not supported by SYNC." + }, + "es-en": { + "tts": "Esta versión de %appName% no es compatible con SYNC.", + "line1": "no compatible", + "textBody": "Esta versión de %appName% no es compatible con SYNC." + }, + "es-es": { + "tts": "Esta versión de %appName% no es compatible con SYNC.", + "line1": "No compatible" + }, + "es-mx": { + "tts": "Esta versión de %appName% no es compatible con SYNC.", + "line1": "no compatible", + "textBody": "Esta versión de %appName% no es compatible con SYNC." + }, + "fr-ca": { + "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.", + "line1": "incompatible", + "textBody": "Cette version de %appName% n’est pas prise en charge par SYNC." + }, + "fr-fr": { + "tts": "Cette version de %appName% n’est pas prise en charge par SYNC.", + "line1": "incompatible" + }, + "it-it": { + "tts": "Questa versione di %appName% non è supportata dal SYNC.", + "line1": "non supportata" + }, + "nl-nl": { + "tts": "Deze versie van %appName% wordt niet ondersteund door SYNC.", + "line1": "niet ondersteund" + }, + "pl-pl": { + "tts": "Niniejsza wersja %appName% nie jest obsługiwana przez system SYNC.", + "line1": "aplikacja nie obsług." + }, + "pt-br": { + "tts": "Esta versão do %appName% não é suportada pelo SYNC.", + "line1": "não suportado" + }, + "pt-pt": { + "tts": "Esta versão de %appName% não é suportado pelo SYNC.", + "line1": "não suportada" + }, + "ru-ru": { + "tts": "Эта версия %appName% не поддерживается SYNC.", + "line1": "не поддерживается" + }, + "sv-se": { + "tts": "SYNC har inte stöd för den här versionen av %appName%.", + "line1": "stöds ej" + }, + "tr-tr": { + "tts": "Bu %appName% sürümü SYNC tarafından desteklenmiyor.", + "line1": "desteklenmiyor" + }, + "zh-cn": { + "tts": "SYNC不支持此版本的%appName%。", + "line1": "不受支持" + }, + "zh-tw": { + "tts": "SYNC 不支援此版本的%appName% 。", + "line1": "不支援" + } + } + }, + "DataConsent": { + "languages": { + "en-gb": { + "textBody": "Would you like to enable Mobile Apps on SYNC? To use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S. \r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information." + }, + "en-us": { + "line1": "Enable Mobile Apps", + "line2": "on SYNC? (Uses Data)", + "textBody": "Would you like to enable Mobile Apps on SYNC?\r\n\r\nTo use Mobile Apps with SYNC, SYNC will communicate with Ford at least once per month using your mobile device’s data plan. Standard rates may apply. SYNC will send your VIN and SYNC module number to Ford U.S.\r\n\r\nUpdates are about the size of an email, and the occurrence of updates depends on your vehicle usage and when a new app is found on your device. To turn on or off, visit the SYNC Settings menu. See your Owner Guide for more information." + }, + "es-mx": { + "textBody": "Para usar aplicaciones móviles con SYNC, este debe comunicarse con Ford al menos una vez al mes a través del plan de datos de su dispositivo móvil. Pueden aplicar tarifas normales. SYNC enviará su VIN y el número de módulo de SYNC a Ford de Estados Unidos de América. \n\nLas actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario. \n\nPresione Sí para permitir y No para denegar." + }, + "fr-ca": { + "textBody": "Pour utiliser AppLink, SYNC devra communiquer avec Ford au moins une fois par mois en utilisant le forfait de données de votre appareil mobile. Les tarifs réguliers peuvent s’appliquer. SYNC enverra votre NIV et le numéro de votre module SYNC à Ford États-Unis. Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements.\r\n\r\nVeuillez appuyer sur Oui pour autoriser ou sur Non pour refuser." + } + } + }, + "DataConsentHelp": { + "languages": { + "en-us": { + "textBody": "By enabling mobile apps, you consent to allowing SYNC to communicate with Ford at least once per month using your mobile device’s data plan. Disabling will stop all data usage, but you will not be able to use mobile apps on SYNC. See your Owner Guide for more information." + }, + "es-mx": { + "textBody": "Las actualizaciones tienen el tamaño aproximado de un mensaje de correo electrónico, y la frecuencia de las actualizaciones depende del uso de su vehículo y de si se encuentran nuevas aplicaciones en su dispositivo. Para obtener más información, consulte la Guía del propietario." + }, + "fr-ca": { + "textBody": "Les mises à jour ont la taille d’un courriel et la fréquence des mises à jour dépend de l’utilisation de votre véhicule et si une nouvelle application se trouve sur votre appareil. Consultez le Guide de l’utilisateur pour obtenir d’autres renseignements." + } + } + }, + "DisableApps": { + "languages": { + "de-de": { + "tts": "Ausschalten der automatischen Updates führt zum Ausschalten von SYNC mobile Apps. Sie können Ihre mobilen Apps dann nicht mehr mit SYNC nutzen. Bitte drücken Sie Ja zur Bestätigung oder Nein, um abzubrechen.", + "line1": "Auto-Update", + "line2": "und Mobile Apps deaktivieren" + }, + "en-au": { + "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.", + "line1": "Disable auto-updates", + "line2": "and Mobile Apps?" + }, + "en-gb": { + "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.", + "line1": "Disable auto-updates", + "line2": "and Mobile Apps?", + "textBody": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel." + }, + "en-ie": { + "tts": "Disabling automatic updates will also disable SYNC mobile apps. You will not be able to use any mobile apps with SYNC. Please press Yes to confirm or No to cancel.", + "line1": "Disable auto-updates", + "line2": "and Mobile Apps?" + }, + "en-us": { + "tts": "Disabling automatic updates will also disable sync mobile apps. You will not be able to use any mobile apps with SYNC. Please press yes to confirm or no to cancel.", + "line1": "Disable Auto-Updates", + "line2": "and Mobile Apps?", + "textBody": "If you disable, you will not be able to use any mobile apps with SYNC and your vehicle will stop receiving mobile app permission updates via your device`s data plan. Please press yes to disable mobile apps or no to cancel." + }, + "es-en": { + "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.", + "line1": "¿Deshab. actualiz.", + "line2": "autom. y aplic. móv.?", + "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar." + }, + "es-es": { + "tts": "Si desactiva las actualizaciones automáticas, también se desactivará la sincronización de las aplicaciones móviles. No podrá utilizar ninguna aplicación móvil con SYNC. Pulse sí para confirmar o no para cancelar.", + "line1": "¿Desact. actual. auto", + "line2": "y apl. móviles?" + }, + "es-mx": { + "tts": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar.", + "line1": "¿Deshab. actualiz.", + "line2": "autom. y aplic. móv.?", + "textBody": "Si se desactivan las actualizaciones automáticas, también se desactivarán las aplicaciones móviles de SYNC. No podrá usar ninguna aplicación móvil con SYNC. Presione Sí para confirmar o No para cancelar." + }, + "fr-ca": { + "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.", + "line1": "Désactiver màj autom.", + "line2": "et app. mobiles?", + "textBody": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler." + }, + "fr-fr": { + "tts": "La désactivation des mises à jour automatiques désactivera aussi les applications mobiles SYNC. Vous ne pourrez pas utiliser d’application mobile avec SYNC. Veuillez appuyer sur Oui pour confirmer ou sur Non pour annuler.", + "line1": "Désactiver màj autom.", + "line2": "et app. mobiles?" + }, + "it-it": { + "tts": "Disabilitando gli aggiornamenti automatici si disattiva anche la sincronizzazione delle app mobili. Non sarà possibile usare app mobili con il SYNC. Premere Sì per confermare e No per cancellare.", + "line1": "Disabilitare agg. aut.", + "line2": "e app mobili?" + }, + "nl-nl": { + "tts": "Door automatische updates uit te schakelen, schakelt u ook SYNC-mobiele apps uit. U kunt dan geen mobiele apps meer gebruiken met SYNC. Druk op Ja om te bevestigen of op Nee om te annuleren.", + "line1": "Auto-updates en mob.", + "line2": "apps uitschakelen?" + }, + "pl-pl": { + "tts": "Wyłączenie automatycznych aktualizacji spowoduje także wyłączenie aplikacji mobilnych SYNC. Korzystanie z mobilnych aplikacji za pomocą SYNC będzie niemożliwe. Naciśnij TAK, by potwierdzić lub NIE, by anulować.", + "line1": "Wył. automat. aktual.", + "line2": "i aplikacje mobilne?" + }, + "pt-br": { + "tts": "Se as atualizações automáticas forem desativadas, os aplicativos também serão desativados. Você não poderá usar nenhum aplicativo com o SYNC. Pressione sim para confirmar ou não para cancelar.", + "line1": "Desativar atualizações", + "line2": "autom. e aplicativos?" + }, + "pt-pt": { + "tts": "A desactivação das actualizações automáticas desactiva igualmente as aplicações móveis do SYNC. Não poderá utilizar quaisquer aplicações móveis com o SYNC. Prima \"\"Sim\"\" para confirmar ou \"\"Não\"\" para cancelar.", + "line1": "Desact. actual. autom.", + "line2": "e aplicações móveis?" + }, + "ru-ru": { + "tts": "При отключении автоматических обновлений также будут отключены мобильные приложения sync. Вы не сможете использовать какие-либо мобильные приложения с SYNC. Нажмите \"\"Да\"\" для подтверждения или \"\"Нет\"\" для отмены.", + "line1": "Откл. автообновления", + "line2": "и мобил. прилож.?" + }, + "sv-se": { + "tts": "Om du avaktiverar automatisk uppdatering avaktiverar du även synkning av mobilappar. Du kommer inte längre att kunna använda dina mobilappar med SYNC. Tryck Ja för att bekräfta eller Nej för att avbryta.", + "line1": "Avaktiverar autouppdat.", + "line2": "och mobilappar?" + }, + "tr-tr": { + "tts": "Otomatik güncellemeleri devre dışı bırakırsanız sync mobil uygulamalar da devre dışı kalır. SYNC ile mobil uygulama kullanmanız mümkün olmaz. Lütfen onaylamak için Evet'e veya iptal etmek için Hayır'a basın.", + "line1": "Oto. güncelleme ve", + "line2": "mobil uygul. kapat?" + }, + "zh-cn": { + "tts": "禁用自动更新同时也会禁用SYNC移动应用程序。您将无法在 SYNC 中使用任何移动应用程序。请按“是”确认或按“否”取消。", + "line1": "是否禁用自动更新和", + "line2": "移动应用程序?" + }, + "zh-tw": { + "tts": "停用自動更新也將停用 sync 行動應用程式。您將無法透過 SYNC 使用任何行動應用程式。確認請按「是」,取消請按「否」。", + "line1": "停用自動更新", + "line2": "和行動應用程式?" + } + } + }, + "DrivingCharacteristics": { + "languages": { + "de-de": { + "tts": "Eine App hat Zugriff auf die folgenden Fahreigenschaften: Kraftstoffverbrauch, MyKey, Sicherheitsgurtstatus.", + "label": "Fahreigenschaften" + }, + "en-au": { + "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.", + "label": "Driving characteristics" + }, + "en-gb": { + "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.", + "label": "Driving characteristics", + "textBody": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status." + }, + "en-ie": { + "tts": "An app can access the following driving characteristics: Fuel consumption, MyKey, Seat belt status.", + "label": "Driving characteristics" + }, + "en-us": { + "tts": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status.", + "label": "Driving Characteristics", + "textBody": "An app can access the following driving characteristics: Fuel Consumption, MyKey, Seat Belt Status." + }, + "es-en": { + "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.", + "label": "Características del manejo", + "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad." + }, + "es-es": { + "tts": "Una aplicación puede acceder a las siguientes características de conducción: Consumo de combustible, MyKey, Estado cinturones de seguridad.", + "label": "Características de conducción" + }, + "es-mx": { + "tts": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad.", + "label": "Características del manejo", + "textBody": "Las aplicaciones pueden acceder a las siguientes características del manejo: Consumo de combustible, MyKey, Estado del cinturón de seguridad." + }, + "fr-ca": { + "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.", + "label": "Caractéristiques de conduite", + "textBody": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité." + }, + "fr-fr": { + "tts": "Une application peut accéder aux caractéristiques de conduite suivantes: Consommation de carburant, MyKey, État des ceintures de sécurité.", + "label": "Caractéristiques de conduite" + }, + "it-it": { + "tts": "Un'app può avere accesso alle seguenti caratteristiche di guida: Consumo carburante, MyKey, Stato cinture di sicurezza.", + "label": "Caratteristiche di guida" + }, + "nl-nl": { + "tts": "Een app heeft toegang tot de volgende rijkenmerken: Brandstofverbruik, MyKey, Veiligheidsgordelstatus.", + "label": "Rijkenmerken" + }, + "pl-pl": { + "tts": "Aplikacja może uzyskać dostęp do następujących informacji dotyczących jazdy: Zużycie paliwa, MyKey, Stan pasów bezpieczeństwa.", + "label": "Informacje dotyczące stylu jazdy" + }, + "pt-br": { + "tts": "Um aplicativo pode acessar as seguintes características de condução: Consumo de combustível, MyKey, Estado do cinto de segurança.", + "label": "Características de condução" + }, + "pt-pt": { + "tts": "Uma aplicação consegue aceder às seguintes informações de condução: Consumo de combustível, MyKey, Estado dos cintos de segurança.", + "label": "Características de condução" + }, + "ru-ru": { + "tts": "Приложение имеет доступ к следующим характеристикам движения: Расход топлива, MyKey, Состояние ремней безопасности.", + "label": "Характеристики движения" + }, + "sv-se": { + "tts": "Appen kan komma åt följande köregenskaper: Bränsleförbrukning, MyKey, Bältesstatus.", + "label": "Köregenskaper" + }, + "tr-tr": { + "tts": "Bir uygulama şu sürüş karakteristiklerine erişebilir: Yakıt tüketimi, MyKey, Emniyet kemeri durumu.", + "label": "Sürüş karakteristikleri" + }, + "zh-cn": { + "tts": "移动应用程序可访问下列行驶特性: 油耗, MyKey, 安全带状态", + "label": "行驶特性" + }, + "zh-tw": { + "tts": "應用程式可存取以下駕駛特性: 油耗, MyKey, 安全帶狀態", + "label": "駕駛特性" + } + } + }, + "Location": { + "languages": { + "de-de": { + "tts": "Eine App hat Zugriff auf die GPS-Daten und die Geschwindigkeit des Fahrzeugs.", + "label": "GPS und Geschwindigkeit" + }, + "en-au": { + "tts": "An app can access vehicle GPS and speed.", + "label": "GPS and speed" + }, + "en-gb": { + "tts": "An app can access vehicle GPS and speed.", + "label": "GPS and speed", + "textBody": "An app can access vehicle GPS and speed." + }, + "en-ie": { + "tts": "An app can access vehicle GPS and speed.", + "label": "GPS and speed" + }, + "en-us": { + "tts": "An app can access vehicle GPS and speed.", + "label": "GPS and speed", + "textBody": "An app can access vehicle GPS and speed." + }, + "es-en": { + "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.", + "label": "GPS y velocidad", + "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo." + }, + "es-es": { + "tts": "Una aplicación puede acceder al GPS y la velocidad del vehículo.", + "label": "GPS y velocidad" + }, + "es-mx": { + "tts": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo.", + "label": "GPS y velocidad", + "textBody": "Las aplicaciones pueden acceder al GPS y a la velocidad del vehículo." + }, + "fr-ca": { + "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.", + "label": "GPS et vitesse", + "textBody": "Une application peut accéder au GPS et à la vitesse du véhicule." + }, + "fr-fr": { + "tts": "Une application peut accéder au GPS et à la vitesse du véhicule.", + "label": "GPS et vitesse" + }, + "it-it": { + "tts": "Un'app può avere accesso a GPS e velocità del veicolo.", + "label": "GPS e velocità" + }, + "nl-nl": { + "tts": "Een app heeft toegang tot gps en de snelheid van het voertuig.", + "label": "Gps en snelheid" + }, + "pl-pl": { + "tts": "Aplikacja może uzyskać dostęp do modułu GPS i prędkości pojazdu.", + "label": "GPS i prędkość" + }, + "pt-br": { + "tts": "Um aplicativo pode acessar o GPS e a velocidade do veículo.", + "label": "GPS e velocidade" + }, + "pt-pt": { + "tts": "Uma aplicação consegue aceder ao GPS e à velocidade do veículo.", + "label": "GPS e velocidade" + }, + "ru-ru": { + "tts": "Приложение имеет доступ к GPS и скорости автомобиля.", + "label": "GPS и скорость" + }, + "sv-se": { + "tts": "Appen kan komma åt fordonets GPS och hastighetsmätare.", + "label": "GPS och hastighet" + }, + "tr-tr": { + "tts": "Bu uygulama aracın GPS ve hız bilgilerine erişebilir.", + "label": "GPS ve hız" + }, + "zh-cn": { + "tts": "移动应用程序可以访问车辆 GPS 和车速信息。", + "label": "GPS 和车速" + }, + "zh-tw": { + "tts": "應用程式可存取車輛的GPS和速度。", + "label": "GPS和車速" + } + } + }, + "Notifications": { + "languages": { + "de-de": { + "tts": "Läuft die App im Hintergrund, kann Sie Benachrichtigungen senden.", + "label": "Push-Benachrichtigungen" + }, + "en-au": { + "tts": "An app can send notifications when running in the background.", + "label": "Push notifications" + }, + "en-gb": { + "tts": "An app can send notifications when running in the background.", + "label": "Push notifications", + "textBody": "An app can send notifications when running in the background." + }, + "en-ie": { + "tts": "An app can send notifications when running in the background.", + "label": "Push notifications" + }, + "en-us": { + "tts": "An app can send notifications when running in the background.", + "label": "Push notifications", + "textBody": "An app can send notifications when running in the background." + }, + "es-en": { + "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.", + "label": "Notificaciones tipo Push", + "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano." + }, + "es-es": { + "tts": "Una aplicación puede enviar notificaciones cuando se está ejecutando en segundo plano.", + "label": "Notificaciones push" + }, + "es-mx": { + "tts": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano.", + "label": "Notificaciones tipo Push", + "textBody": "Las aplicaciones pueden enviar notificaciones cuando se ejecutan en segundo plano." + }, + "fr-ca": { + "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.", + "label": "Notifications instantanées", + "textBody": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan." + }, + "fr-fr": { + "tts": "Une application peut envoyer des avis lorsqu’elle fonctionne en arrière-plan.", + "label": "Notifications push" + }, + "it-it": { + "tts": "Un'app può inviare notifiche se eseguita in background.", + "label": "Notifiche push" + }, + "nl-nl": { + "tts": "Een app kan meldingen versturen als deze op de achtergrond actief is.", + "label": "Push-meldingen" + }, + "pl-pl": { + "tts": "Aplikacja może wysyłać powiadomienia, działając w tle.", + "label": "Powiadomienia Push" + }, + "pt-br": { + "tts": "Um aplicativo pode enviar notificações quando estiver sendo executado em segundo plano.", + "label": "Notificações Push" + }, + "pt-pt": { + "tts": "Uma aplicação consegue enviar notificações quando está activa em segundo plano.", + "label": "Notificações push" + }, + "ru-ru": { + "tts": "Если приложение работает в фоновом режиме, оно может отправлять оповещения.", + "label": "Оповещения о пересылке" + }, + "sv-se": { + "tts": "Appen kan skicka meddelanden när den körs i bakgrunden.", + "label": "Push-notiser" + }, + "tr-tr": { + "tts": "Bir uygulama arka planda çalışırken bildirim gönderebilir.", + "label": "Anlık bildirimleri" + }, + "zh-cn": { + "tts": "移动应用程序在后台运行时可推送通知。", + "label": "推送通知" + }, + "zh-tw": { + "tts": "車輛行進時,應用程式可在背景中傳送通知。", + "label": "傳送通知" + } + } + }, + "SettingDisableUpdates": { + "languages": { + "de-de": { + "line1": "Updates deakt." + }, + "en-au": { + "line1": "Disable updates" + }, + "en-gb": { + "line1": "Disable updates" + }, + "en-ie": { + "line1": "Disable updates" + }, + "en-us": { + "line1": "Disable Updates", + "textBody": "Disable Updates" + }, + "es-en": { + "line1": "Deshab. actual.", + "textBody": "Deshab. actual." + }, + "es-es": { + "line1": "Desact. actual." + }, + "es-mx": { + "line1": "Deshab. actual.", + "textBody": "Deshab. actual." + }, + "fr-ca": { + "line1": "Désactiver MAJ", + "textBody": "Désactiver MAJ" + }, + "fr-fr": { + "line1": "Désactiver màj" + }, + "it-it": { + "line1": "Disabilita agg." + }, + "nl-nl": { + "line1": "Upd. uitschak." + }, + "pl-pl": { + "line1": "Wyłącz aktual." + }, + "pt-br": { + "line1": "Desat. atualiz." + }, + "pt-pt": { + "line1": "Desact. actualiz." + }, + "ru-ru": { + "line1": "Откл. обновл." + }, + "sv-se": { + "line1": "Inaktivera uppd." + }, + "tr-tr": { + "line1": "Güncell. Kapat" + }, + "zh-cn": { + "line1": "禁用更新" + }, + "zh-tw": { + "line1": "停用更新" + } + } + }, + "SettingEnableUpdates": { + "languages": { + "de-de": { + "line1": "Apps aktivieren" + }, + "en-au": { + "line1": "Enable Apps" + }, + "en-gb": { + "line1": "Enable Apps" + }, + "en-ie": { + "line1": "Enable Apps" + }, + "en-us": { + "line1": "Enable Apps" + }, + "es-en": { + "line1": "Hab. aplic." + }, + "es-es": { + "line1": "Activar apl." + }, + "es-mx": { + "line1": "Hab. aplic." + }, + "fr-ca": { + "line1": "Activer app.", + "textBody": "Activer app." + }, + "fr-fr": { + "line1": "Activer app." + }, + "it-it": { + "line1": "Abilita app" + }, + "nl-nl": { + "line1": "Apps inschak." + }, + "pl-pl": { + "line1": "Włącz aplikacje" + }, + "pt-br": { + "line1": "Ativar aplic." + }, + "pt-pt": { + "line1": "Activar actualiz." + }, + "ru-ru": { + "line1": "Вкл. прилож." + }, + "sv-se": { + "line1": "Aktivera appar" + }, + "tr-tr": { + "line1": "Uygulamaları aç" + }, + "zh-cn": { + "line1": "启用应用程序" + }, + "zh-tw": { + "line1": "啟用應用程式" + } + } + }, + "SettingUpdateAuto": { + "languages": { + "de-de": { + "line1": "Update anford." + }, + "en-au": { + "line1": "Request update" + }, + "en-gb": { + "line1": "Request update" + }, + "en-ie": { + "line1": "Request update" + }, + "en-us": { + "line1": "Request Update", + "textBody": "Select `Update now` to receive app permissions for your SYNC-enabled mobile apps. This may enable additional functionality depending on the app and your settings. If your phone has a working data connection, an update should complete in less than 1 minute." + }, + "es-en": { + "line1": "Solicit. actualiz.", + "textBody": "Solicit. actualiz." + }, + "es-es": { + "line1": "Solicitar actual." + }, + "es-mx": { + "line1": "Solicit. actualiz.", + "textBody": "Solicit. actualiz." + }, + "fr-ca": { + "line1": "Demander MAJ", + "textBody": "Demander MAJ" + }, + "fr-fr": { + "line1": "Demander màj" + }, + "it-it": { + "line1": "Rich. aggiorn." + }, + "nl-nl": { + "line1": "Upd. aanvragen" + }, + "pl-pl": { + "line1": "Zażądaj aktual." + }, + "pt-br": { + "line1": "Solicitar atualiz." + }, + "pt-pt": { + "line1": "Solicit. actualiz." + }, + "ru-ru": { + "line1": "Запрос на обн." + }, + "sv-se": { + "line1": "Begär uppdat." + }, + "tr-tr": { + "line1": "Güncelleme iste" + }, + "zh-cn": { + "line1": "请求更新" + }, + "zh-tw": { + "line1": "請求更新" + } + } + }, + "StatusNeeded": { + "languages": { + "de-de": { + "line1": "Update benötigt" + }, + "en-au": { + "line1": "Update needed" + }, + "en-gb": { + "line1": "Update needed", + "textBody": "Update needed" + }, + "en-ie": { + "line1": "Update needed" + }, + "en-us": { + "line1": "Update Needed", + "textBody": "Update Needed" + }, + "es-en": { + "line1": "Actualiz. neces.", + "textBody": "Actualiz. neces." + }, + "es-es": { + "line1": "Actu. necesaria" + }, + "es-mx": { + "line1": "Actualiz. neces.", + "textBody": "Actualiz. neces." + }, + "fr-ca": { + "line1": "Màj requise", + "textBody": "Màj requise" + }, + "fr-fr": { + "line1": "Mise à jour requise" + }, + "it-it": { + "line1": "Necess. aggiorn." + }, + "nl-nl": { + "line1": "Update nodig" + }, + "pl-pl": { + "line1": "Potrzeba aktual." + }, + "pt-br": { + "line1": "Atualiz. necess." + }, + "pt-pt": { + "line1": "Actual. necess." + }, + "ru-ru": { + "line1": "Необх. обновл." + }, + "sv-se": { + "line1": "Uppdat. krävs" + }, + "tr-tr": { + "line1": "Güncellenmeli" + }, + "zh-cn": { + "line1": "需要进行更新" + }, + "zh-tw": { + "line1": "需更新" + } + } + }, + "StatusPending": { + "languages": { + "de-de": { + "line1": "Aktualisieren..." + }, + "en-au": { + "line1": "Updating..." + }, + "en-gb": { + "line1": "Updating...", + "textBody": "Updating..." + }, + "en-ie": { + "line1": "Updating..." + }, + "en-us": { + "line1": "Updating...", + "textBody": "Updating..." + }, + "es-en": { + "line1": "Actualizando...", + "textBody": "Actualizando..." + }, + "es-es": { + "line1": "Actualizando..." + }, + "es-mx": { + "line1": "Actualizando...", + "textBody": "Actualizando..." + }, + "fr-ca": { + "line1": "MAJ en cours...", + "textBody": "MAJ en cours..." + }, + "fr-fr": { + "line1": "Màj en cours..." + }, + "it-it": { + "line1": "Aggiornamento" + }, + "nl-nl": { + "line1": "Updaten..." + }, + "pl-pl": { + "line1": "Aktualizowanie" + }, + "pt-br": { + "line1": "Atualizando..." + }, + "pt-pt": { + "line1": "A actualizar..." + }, + "ru-ru": { + "line1": "Обновление..." + }, + "sv-se": { + "line1": "Uppdaterar..." + }, + "tr-tr": { + "line1": "Güncelleniyor..." + }, + "zh-cn": { + "line1": "正在更新......" + }, + "zh-tw": { + "line1": "更新中..." + } + } + }, + "StatusUpToDate": { + "languages": { + "de-de": { + "line1": "Aktuelle Version" + }, + "en-au": { + "line1": "Up-to-date" + }, + "en-gb": { + "line1": "Up-to-date", + "textBody": "Up-to-date" + }, + "en-ie": { + "line1": "Up-to-date" + }, + "en-us": { + "line1": "Up-To-Date", + "textBody": "Up-To-Date" + }, + "es-en": { + "line1": "Actualizado", + "textBody": "Actualizado" + }, + "es-es": { + "line1": "Actualizada" + }, + "es-mx": { + "line1": "Actualizado", + "textBody": "Actualizado" + }, + "fr-ca": { + "line1": "Déjà à jour", + "textBody": "Déjà à jour" + }, + "fr-fr": { + "line1": "Déjà à jour" + }, + "it-it": { + "line1": "più recente" + }, + "nl-nl": { + "line1": "Up-to-date" + }, + "pl-pl": { + "line1": "Aktualne" + }, + "pt-br": { + "line1": "Atualizado" + }, + "pt-pt": { + "line1": "Actualizado" + }, + "ru-ru": { + "line1": "Обновлено" + }, + "sv-se": { + "line1": "Uppdat. krävs ej" + }, + "tr-tr": { + "line1": "Güncel" + }, + "zh-cn": { + "line1": "最新更新" + }, + "zh-tw": { + "line1": "更新最新" + } + } + }, + "VehicleInfo": { + "languages": { + "de-de": { + "tts": "Eine App hat Zugriff auf die folgenden Fahrzeuginformationen: Kraftstoff-Füllstand, Kraftstoffverbrauch, Motordrehzahl, Kilometerzähler, FIN, Außentemperatur, Gangstellung, Reifenluftdruck.", + "label": "Fahrzeuginformationen" + }, + "en-au": { + "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.", + "label": "Vehicle information" + }, + "en-gb": { + "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure.", + "label": "Vehicle information", + "textBody": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tire pressure." + }, + "en-ie": { + "tts": "An app can access the following vehicle information: Fuel level, Fuel economy, Engine RPMs, Odometer, VIN, Outside air temperature, Gear position, Tyre pressure.", + "label": "Vehicle information" + }, + "en-us": { + "tts": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure.", + "label": "Vehicle information", + "textBody": "An app can access the following vehicle information: Fuel Level, Fuel Economy, Engine RPMs, Odometer, VIN, External Temperature, Gear Position, Tire Pressure." + }, + "es-en": { + "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.", + "label": "Información del vehículo", + "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos." + }, + "es-es": { + "tts": "Una aplicación puede acceder a la siguiente información del vehículo: Nivel de combustible, Ahorro de combustible, RPM del motor, Cuentakilómetros, VIN, Temperatura aire exterior, Marcha engranada, Presión de neumáticos.", + "label": "Información del vehículo" + }, + "es-mx": { + "tts": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos.", + "label": "Información del vehículo", + "textBody": "Las aplicaciones pueden acceder a la siguiente información del vehículo: Nivel de combustible, Economía de combustible, RPM del motor, Cuentakilómetros, Número de identificación del vehículo, Temperatura externa, Posición del cambio, Presión de los neumáticos." + }, + "fr-ca": { + "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus.", + "label": "Renseignements du véhicule", + "textBody": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Au régime du moteur, Odomètre, NIV, Température extérieure, Position d’embrayage, Pression des pneus." + }, + "fr-fr": { + "tts": "Une application peut accéder aux informations suivantes du véhicule: Niveau de carburant, Économie de carburant, Vitesse de moteur, Compteur kilométrique, NIV, Température extérieure, Position de vitesse, Pression des pneus.", + "label": "Renseignements du véhicule" + }, + "it-it": { + "tts": "Un'app può avere accesso alle seguenti informazioni del veicolo: Livello carburante, Consumi carburante, Numero giri motore, Contachilometri, VIN, Temperatura esterna, Posizione marcia, Pressione pneumatici.", + "label": "Informazioni sul veicolo" + }, + "nl-nl": { + "tts": "Een app heeft toegang tot de volgende voertuiginformatie: Brandstofpeil, Brandstofverbruik, Motortoerental, Kilometerteller, VIN, Buitentemperatuur, Versnellingsstand, Bandenspanning.", + "label": "Voertuiginformatie" + }, + "pl-pl": { + "tts": "Aplikacja może uzyskać dostęp do następujących informacji o pojeździe: Poziom paliwa, Zużycie paliwa, Obroty silnika, Licznik przebiegu, Numer VIN, Temperatura zewnętrzna, Aktualny bieg, Ciśnienie opon.", + "label": "Informacje o pojeździe" + }, + "pt-br": { + "tts": "Um aplicativo pode acessar as seguintes informações sobre o veículo: Nível de combustível, Economia de combustível, RPM do motor, Hodômetro, VIN, Temperatura externa, Posição das marchas, Pressão dos pneus.", + "label": "Informações sobre o veículo" + }, + "pt-pt": { + "tts": "Uma aplicação consegue aceder às seguintes informações do veículo: Nível de combustível, Poupança de combustível, RPM do motor, Conta-quilómetros, VIN, Temperatura exterior, Posição da mudança de velocidade, Pressão dos pneus.", + "label": "Informações do veículo" + }, + "ru-ru": { + "tts": "Приложение имеет доступ к следующим данным автомобиля: Уровень топлива, Економия топлива, Число оборотов двигателя, Одометр, Номер VIN, Температура за бортом, Положение передачи, Давление шин.", + "label": "Информация об автомобиле" + }, + "sv-se": { + "tts": "Appen kan komma åt följande fordonsinformation: Bränslenivå, Bränsleekonomi, Motorns varvtal, Vägmätare, VIN, Utetemperatur, Växelläge, Däcktryck.", + "label": "Fordonsinformation" + }, + "tr-tr": { + "tts": "Bir uygulama şu araç bilgilerine erişebilir: Yakıt seviyesi, Yakıt ekonomisi, Motor devirleri, Kilometre sayacı, VIN, Dış sıcaklık, Vites konumu, Lastik basıncı.", + "label": "Araç bilgisi" + }, + "zh-cn": { + "tts": "移动应用程序可访问下列车辆信息 : 燃油量, 燃油经济性, 发动机转速(RPM), 里程表, VIN, 车外温度, 档位, 胎压.", + "label": "车辆信息" + }, + "zh-tw": { + "tts": "一個應用程式可存取以下車輛資訊 : 燃油存量, 燃油經濟性, 引擎轉速, 里程表, 車輛識別號碼, 車外溫度, 檔位, 胎壓.", + "label": "車輛資訊" + } + } + } + } + }, + "app_policies": { + "default": { + "keep_context": false, + "steal_focus": false, + "priority": "NONE", + "default_hmi": "NONE", + "groups": ["Base-4"], + "RequestType": [] + }, + "device": { + "keep_context": false, + "steal_focus": false, + "priority": "NONE", + "default_hmi": "NONE", + "groups": ["DataConsent-2"] + }, + "pre_DataConsent": { + "keep_context": false, + "steal_focus": false, + "priority": "NONE", + "default_hmi": "NONE", + "groups": ["BaseBeforeDataConsent"] + } + } + } +} + diff --git a/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua b/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua index beb565c292..bc00faa429 100644 --- a/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua +++ b/test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua @@ -5,6 +5,7 @@ -- Description: -- In case PoliciesManager does not receive the Updated PT during time defined in -- "timeout_after_x_seconds" section of Local PT, it must start the retry sequence. +-- The HMI does not provide a url so Core must use the urls included in the policy table. -- 1. Used preconditions -- SDL is built with "-DEXTENDED_POLICY: PROPRIETARY" flag -- Application not in PT is registered -> PTU is triggered @@ -13,11 +14,12 @@ -- -- 2. Performed steps -- HMI -> SDL: SDL.GetURLs () --- HMI->SDL: BasicCommunication.OnSystemRequest ('url', requestType: PROPRIETARY) +-- HMI->SDL: BasicCommunication.OnSystemRequest (requestType: PROPRIETARY) +-- SDL->app: OnSystemRequest (, requestType:PROPRIETARY, fileType="JSON") -- -- Expected result: --- Timeout expires and retry sequence started --- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON") +-- Timeout expires and retry sequence started with next url in endpoint array +-- SDL->app: OnSystemRequest (, requestType:PROPRIETARY, fileType="JSON") -- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) --------------------------------------------------------------------------------------------- require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) @@ -44,7 +46,7 @@ local tolerance = 500 -- ms --[[ General Precondition before ATF start ]] commonSteps:DeleteLogsFileAndPolicyTable() testCasesForPolicyTable.Delete_Policy_table_snapshot() -testCasesForPolicyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/jsons/Policies/build_options/retry_seq.json") +testCasesForPolicyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/jsons/Policies/build_options/retry_seq_url_array.json") --[[ General Settings for configuration ]] Test = require('user_modules/connecttest_resumption') @@ -92,7 +94,7 @@ function Test:TestStep_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request() local policy_file_path = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") local pts_file_name = commonFunctions:read_parameter_from_smart_device_link_ini("PathToSnapshot") self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", fileName = policy_file_path .. pts_file_name }) - self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) + self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY", url = "http://policies.telematics.ford.com/api/policies/1" }) end) end) end @@ -114,7 +116,7 @@ function Test:TestStep_RetrySequenceStart() :Timeout(15000) EXPECT_HMICALL("BasicCommunication.PolicyUpdate"):Times(0) - self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }):Times(1) + self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" , url = "http://policies.telematics.ford.com/api/policies/2"}):Times(1) :Timeout(15000) commonTestCases:DelayedExp(15000) diff --git a/test_scripts/Policies/build_options/119_ATF_Start_PTU_retry_sequence_HMI_URL_PROPRIETARY.lua b/test_scripts/Policies/build_options/119_ATF_Start_PTU_retry_sequence_HMI_URL_PROPRIETARY.lua new file mode 100644 index 0000000000..bfa6244de0 --- /dev/null +++ b/test_scripts/Policies/build_options/119_ATF_Start_PTU_retry_sequence_HMI_URL_PROPRIETARY.lua @@ -0,0 +1,136 @@ +--------------------------------------------------------------------------------------------- +-- Requirements summary: +-- [PolicyTableUpdate] Local Policy Table retry sequence start +-- +-- Description: +-- In case PoliciesManager does not receive the Updated PT during time defined in +-- "timeout_after_x_seconds" section of Local PT, it must start the retry sequence. +-- The HMI supplies the URL in this case so SDL Core must cache that url and use it in future retry attempts +-- 1. Used preconditions +-- SDL is built with "-DEXTENDED_POLICY: PROPRIETARY" flag +-- Application not in PT is registered -> PTU is triggered +-- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) +-- SDL->HMI:SDL.PolicyUpdate(file, timeout, retry[]) +-- +-- 2. Performed steps +-- HMI -> SDL: SDL.GetURLs () +-- HMI->SDL: BasicCommunication.OnSystemRequest ('url', requestType: PROPRIETARY) +-- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON") +-- +-- Expected result: +-- Timeout expires and retry sequence started +-- SDL->app: OnSystemRequest ('url', requestType:PROPRIETARY, fileType="JSON") +-- SDL->HMI: SDL.OnStatusUpdate(UPDATE_NEEDED) +--------------------------------------------------------------------------------------------- +require('user_modules/script_runner').isTestApplicable({ { extendedPolicy = { "PROPRIETARY" } } }) + +--[[ General configuration parameters ]] +config.application1.registerAppInterfaceParams.appHMIType = { "MEDIA" } +config.defaultProtocolVersion = 2 + +--[[ Required Shared libraries ]] +local commonSteps = require('user_modules/shared_testcases/commonSteps') +local commonFunctions = require('user_modules/shared_testcases/commonFunctions') +local commonTestCases = require('user_modules/shared_testcases/commonTestCases') +local testCasesForPolicyTable = require('user_modules/shared_testcases/testCasesForPolicyTable') +local commonPreconditions = require('user_modules/shared_testcases/commonPreconditions') +local mobile_session = require('mobile_session') +local atf_logger = require('atf_logger') + +--[[ Local variables ]] +local time_prev = 0 +local time_curr = 0 +local exp_timeout = 8000 +local tolerance = 500 -- ms + +--[[ General Precondition before ATF start ]] +commonSteps:DeleteLogsFileAndPolicyTable() +testCasesForPolicyTable.Delete_Policy_table_snapshot() +testCasesForPolicyTable:Precondition_updatePolicy_By_overwriting_preloaded_pt("files/jsons/Policies/build_options/retry_seq.json") + +--[[ General Settings for configuration ]] +Test = require('user_modules/connecttest_resumption') +require('cardinalities') +require('user_modules/AppTypes') + +--[[ Preconditions ]] +commonFunctions:newTestCasesGroup("Preconditions") + +function Test:Precondition_Connect_device() + self:connectMobile() +end + +function Test:Precondition_StartSession() + self.mobileSession = mobile_session.MobileSession(self, self.mobileConnection) + self.mobileSession:StartService(7) +end + +--[[ Test ]] +commonFunctions:newTestCasesGroup("Test") + +function Test:TestStep_OnStatusUpdate_UPDATE_NEEDED_new_PTU_request() + local correlationId = self.mobileSession:SendRPC("RegisterAppInterface", config.application1.registerAppInterfaceParams) + + EXPECT_HMINOTIFICATION("BasicCommunication.OnAppRegistered", {application = {appName = config.application1.registerAppInterfaceParams.appName}}) + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}) + :Do(function(exp, data) + print("[" .. atf_logger.formated_time(true) .. "] " .. "SDL->HMI: SDL.OnStatusUpdate()" .. ": " .. exp.occurences .. ": " .. data.params.status) + if (exp.occurences == 2) and (data.params.status == "UPDATING") then + time_prev = timestamp() + end + end) + :Times(2) + + self.mobileSession:ExpectResponse(correlationId, { success = true, resultCode = "SUCCESS" }) + self.mobileSession:ExpectNotification("OnHMIStatus", {hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN"}) + + EXPECT_HMICALL("BasicCommunication.PolicyUpdate") + :Do(function() + print("[" .. atf_logger.formated_time(true) .. "] " .. "SDL->HMI: BC.PolicyUpdate") + local requestId = self.hmiConnection:SendRequest("SDL.GetPolicyConfigurationData", + { policyType = "module_config", property = "endpoints" }) + EXPECT_HMIRESPONSE(requestId) + :Do(function() + local policy_file_path = commonFunctions:read_parameter_from_smart_device_link_ini("SystemFilesPath") + local pts_file_name = commonFunctions:read_parameter_from_smart_device_link_ini("PathToSnapshot") + self.hmiConnection:SendNotification("BasicCommunication.OnSystemRequest", { requestType = "PROPRIETARY", url = "http://www.smartdevicelink.com", fileName = policy_file_path .. pts_file_name }) + self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY", url = "http://www.smartdevicelink.com" }) + end) + end) +end + +function Test:TestStep_RetrySequenceStart() + EXPECT_HMINOTIFICATION("SDL.OnStatusUpdate", {status = "UPDATE_NEEDED"}, {status = "UPDATING"}) + :Do(function(exp, data) + print("[" .. atf_logger.formated_time(true) .. "] " .. "SDL->HMI: SDL.OnStatusUpdate()" .. ": " .. exp.occurences .. ": " .. data.params.status) + if (exp.occurences == 1) and (data.params.status == "UPDATE_NEEDED") then + time_curr = timestamp() + local act_timeout = time_curr - time_prev + print("Timeout between retries: " .. act_timeout .. "ms") + if (act_timeout > exp_timeout + tolerance) or (act_timeout < exp_timeout - tolerance) then + self:FailTestCase("Timeout for retry sequence is not as expected: " .. exp_timeout .. "ms (" .. tolerance .. "ms tolerance)") + end + end + end) + :Times(2) + :Timeout(15000) + + EXPECT_HMICALL("BasicCommunication.PolicyUpdate"):Times(0) + self.mobileSession:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" , url = "http://www.smartdevicelink.com"}):Times(1) + :Timeout(15000) + + commonTestCases:DelayedExp(15000) +end + +--[[ Postconditions ]] +commonFunctions:newTestCasesGroup("Postconditions") + +function Test.Postcondition_Restore_files() + commonPreconditions:RestoreFile("sdl_preloaded_pt.json") +end + +function Test.Postcondition_Stop() + StopSDL() +end + +return Test diff --git a/test_sets/policies_happy_paths_PROPRIETARY.txt b/test_sets/policies_happy_paths_PROPRIETARY.txt index 26607a57b8..6b0c625675 100644 --- a/test_sets/policies_happy_paths_PROPRIETARY.txt +++ b/test_sets/policies_happy_paths_PROPRIETARY.txt @@ -16,8 +16,9 @@ ./test_scripts/Policies/build_options/108_ATF_PTU_Trigger_days_PROPRIETARY.lua ./test_scripts/Policies/build_options/109_ATF_PTU_Trigger_IGN_cycles_PROPRIETARY.lua ./test_scripts/Policies/build_options/110_ATF_PTU_Trigger_kilometers_PROPRIETARY.lua -;./test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua 1210 +./test_scripts/Policies/build_options/111_ATF_Start_PTU_retry_sequence_PROPRIETARY.lua ./test_scripts/Policies/build_options/112_ATF_transfer_SystemRequest_from_app_to_HMI_PROPRIETARY.lua ./test_scripts/Policies/build_options/113_ATF_transfer_SystemRequest_from_HMI_to_app_PROPRIETARY.lua ./test_scripts/Policies/build_options/114_ATF_Register_NewApp_not_exist_inLocalPT_FinishPTU_PROPRIETARY.lua ./test_scripts/Policies/build_options/115_ATF_Register_NewApp_not_exist_inLocalPT_start_PTU_for_NewApp_PROPRIETARY.lua +./test_scripts/Policies/build_options/119_ATF_Start_PTU_retry_sequence_HMI_URL_PROPRIETARY.lua From ef8498d63322274aa5f0a9f3246df5671538223e Mon Sep 17 00:00:00 2001 From: Klepikov Viacheslav <45170482+VjKlepikov@users.noreply.github.com> Date: Fri, 17 Apr 2020 20:52:50 +0300 Subject: [PATCH 57/64] Add script for 3327 issue (#2387) --- ...VehicleData_VEHICLE_DATA_NOT_AVAILABLE.lua | 69 +++++++++++++++++++ test_sets/Defects/6_1/3327.txt | 1 + 2 files changed, 70 insertions(+) create mode 100644 test_scripts/Defects/6_1/3327_GetVehicleData_VEHICLE_DATA_NOT_AVAILABLE.lua create mode 100644 test_sets/Defects/6_1/3327.txt diff --git a/test_scripts/Defects/6_1/3327_GetVehicleData_VEHICLE_DATA_NOT_AVAILABLE.lua b/test_scripts/Defects/6_1/3327_GetVehicleData_VEHICLE_DATA_NOT_AVAILABLE.lua new file mode 100644 index 0000000000..bcf2b76352 --- /dev/null +++ b/test_scripts/Defects/6_1/3327_GetVehicleData_VEHICLE_DATA_NOT_AVAILABLE.lua @@ -0,0 +1,69 @@ +-- User story: +-- +-- Precondition: +-- 1) SDL and HMI are running. +-- 2) Application is registered and activated. +-- Description: +-- Steps to reproduce: +-- 1) Send GetVehicleData with speed = true +-- 2) SDL sends to HMI VehicleInfo.GetVehicleData: "params": {"speed":true} +-- 3) Send HMI response with VEHICLE_DATA_NOT_AVAILABLE +--{"error":{"code":9,"data":{"method":"VehicleInfo.GetVehicleData"}, message:"error message" },"id":57,"jsonrpc":"2.0"} +-- Expected result: +-- 1) SDL sends to mobile response of GetVehicleData with +-- {"resultCode":"VEHICLE_DATA_NOT_AVAILABLE", "success":false, info = "error message"} +-- Actual result: +-- 1) SDL sends to mobile response of GetVehicleData with +-- {"resultCode":"GENERIC_ERROR","success":false} +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require('user_modules/sequences/actions') + +-- [[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false +config.defaultProtocolVersion = 2 + +--[[ Local Functions ]] +function common.updatePreloadedPT() + common.sdl.backupPreloadedPT() + local pt = common.sdl.getPreloadedPT() + local VDgroup = { + rpcs = { + GetVehicleData = { + hmi_levels = { "NONE", "BACKGROUND", "LIMITED", "FULL" }, + parameters = { "speed" } + } + } + } + pt.policy_table.app_policies["default"].groups = { "Base-4", "VDTestCaseGroup" } + pt.policy_table.functional_groupings["VDTestCaseGroup"] = VDgroup + pt.policy_table.functional_groupings["DataConsent-2"].rpcs = common.json.null + common.sdl.setPreloadedPT(pt) +end + + + +local function getVehicleData() + local cid = common.mobile.getSession():SendRPC("GetVehicleData",{ speed = true }) + common.hmi.getConnection():ExpectRequest("VehicleInfo.GetVehicleData", { speed = true }) + :Do(function(_, data) + common.hmi.getConnection():SendError(data.id, data.method, "DATA_NOT_AVAILABLE", "error message" ) + end) + common.mobile.getSession():ExpectResponse(cid, + { success = false, resultCode = "VEHICLE_DATA_NOT_AVAILABLE", info = "error message" }) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Back-up/update PPT", common.updatePreloadedPT) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("App registration without PTU", common.registerAppWOPTU) +runner.Step("App activation", common.activateApp) + +runner.Title("Test") +runner.Step("Sends GetVehicleData request", getVehicleData) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3327.txt b/test_sets/Defects/6_1/3327.txt new file mode 100644 index 0000000000..aae7a769dc --- /dev/null +++ b/test_sets/Defects/6_1/3327.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/3327_GetVehicleData_VEHICLE_DATA_NOT_AVAILABLE.lua From f50c6481fce6adde4d4ebdd64f4875324665963a Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Fri, 17 Apr 2020 14:14:21 -0400 Subject: [PATCH 58/64] Add missing script into test set (#2392) --- test_sets/auto_complete_list.txt | 2 +- test_sets/policies_all_flows.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/test_sets/auto_complete_list.txt b/test_sets/auto_complete_list.txt index 0809d7337f..397d856010 100644 --- a/test_sets/auto_complete_list.txt +++ b/test_sets/auto_complete_list.txt @@ -1,4 +1,4 @@ ./test_scripts/API/AutoCompleteList/001_SetGlobalProperties_SUCCESS.lua ./test_scripts/API/AutoCompleteList/002_SetGlobalProperties_autoCompleteText_replace.lua ./test_scripts/API/AutoCompleteList/003_SetGlobalProperties_autoCompleteList_empty.lua -./test_scripts/API/AutoCompleteList/004_ResetGlobalProperties_SUCCESS.lua \ No newline at end of file +./test_scripts/API/AutoCompleteList/004_ResetGlobalProperties_SUCCESS.lua diff --git a/test_sets/policies_all_flows.txt b/test_sets/policies_all_flows.txt index ca63ee99f6..eda206faae 100644 --- a/test_sets/policies_all_flows.txt +++ b/test_sets/policies_all_flows.txt @@ -69,6 +69,7 @@ ./test_scripts/Policies/build_options/116_ATF_DEXTENDED_POLICY_OFF_HTTP.lua ./test_scripts/Policies/build_options/117_ATF_DEXTENDED_POLICY_No_Flag_HTTP.lua ./test_scripts/Policies/build_options/118_ATF_Request_PTU_Trigger_App_Excluded_PT_HTTP.lua +./test_scripts/Policies/build_options/119_ATF_Start_PTU_retry_sequence_HMI_URL_PROPRIETARY.lua ./test_scripts/Policies/appID_Management/031_ATF_Register_App_Interface_App_Unauthorized.lua ./test_scripts/Policies/appID_Management/032_ATF_Register_App_Interface_Successful_Nickname_Validation.lua ./test_scripts/Policies/appID_Management/033_ATF_Register_App_Interface_Order_Of_Nickname_Validation.lua From 7d9e437b4606df7845e42cb4deb4970048d07a96 Mon Sep 17 00:00:00 2001 From: Klepikov Viacheslav <45170482+VjKlepikov@users.noreply.github.com> Date: Mon, 20 Apr 2020 22:46:35 +0300 Subject: [PATCH 59/64] Scripts for 3321 issue (#2391) * Scripts for 3321 issue * fixup! Scripts for 3321 issue --- ..._OnAppPropertiesChange_remove_nickname.lua | 58 +++++++++++++++++++ test_sets/Defects/6_1/3321.txt | 1 + 2 files changed, 59 insertions(+) create mode 100644 test_scripts/Defects/6_1/3321_OnAppPropertiesChange_remove_nickname.lua create mode 100644 test_sets/Defects/6_1/3321.txt diff --git a/test_scripts/Defects/6_1/3321_OnAppPropertiesChange_remove_nickname.lua b/test_scripts/Defects/6_1/3321_OnAppPropertiesChange_remove_nickname.lua new file mode 100644 index 0000000000..0c7919ca73 --- /dev/null +++ b/test_scripts/Defects/6_1/3321_OnAppPropertiesChange_remove_nickname.lua @@ -0,0 +1,58 @@ +--------------------------------------------------------------------------------------------------- +-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3321 +-- +-- Description: +-- Processing of the OnAppPropertiesChange notification to HMI on SetAppProperties request +-- with updated data of application where one of nicknames had been removed +-- +-- Precondition: +-- 1. SDL and HMI are started +-- 2. Web app is enabled and has two nicknames in SDL policy table set by SetAppProperties RPC +-- +-- Sequence: +-- 1. HMI sends BC.SetAppProperties request with application properties +-- (without one of nicknames) of the policyAppID to SDL +-- a. SDL sends successful response to HMI +-- b. SDL sends BC.OnAppPropertiesChange notification with appropriate app properties parameters +-- (without one of nicknames) to HMI +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local common = require('test_scripts/WebEngine/commonWebEngine') + +--[[ Local Variables ]] +local appProperties = { + nicknames = { "nickname_11", "nickname_12" }, + policyAppID = "0000001", + enabled = true, + transportType = "transportType1", + hybridAppPreference = "CLOUD", +} + +local appPropertiesRemovedOneNickname = { + nicknames = { "nickname_11" }, --removed nickname_12 + policyAppID = "0000001", + enabled = true, + transportType = "transportType1", + hybridAppPreference = "CLOUD" +} + + +--[[ Local Variables ]] +local function onAppPropertiesChange(pData, pTimes) + common.setAppProperties(pData) + common.onAppPropertiesChange(pData, pTimes) +end + +-- [[ Scenario ]] +common.Title("Preconditions") +common.Step("Clean environment", common.preconditions) +common.Step("Start SDL, HMI, connect regular mobile, start Session", common.start) +common.Step("OnAppPropertiesChange notification: added app properties with two nicknames", + onAppPropertiesChange, { appProperties }) + +common.Title("Test") +common.Step("OnAppPropertiesChange notification: update app properties without one of nickname", + onAppPropertiesChange, { appPropertiesRemovedOneNickname }) + +common.Title("Postconditions") +common.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3321.txt b/test_sets/Defects/6_1/3321.txt new file mode 100644 index 0000000000..0e5f92236a --- /dev/null +++ b/test_sets/Defects/6_1/3321.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/3321_OnAppPropertiesChange_remove_nickname.lua From 46a76abd51a39d0f89a63c9af4d98861beacadc2 Mon Sep 17 00:00:00 2001 From: "Halyna Savynetska (GitHub)" <34478015+HSavynetska@users.noreply.github.com> Date: Wed, 22 Apr 2020 17:31:47 +0300 Subject: [PATCH 60/64] Add script to verify 3196 issue (#2306) * Add script to verify 3196 issue * Test script updated according to comments * Script has rebased on the current develop and it has added to the test set * Test script updated according to request * The script was moved to 6_1 folder and created a separate test set for it --- ...LABLE_and_not_in_subscribed_list_store.lua | 83 +++++++++++++++++++ test_sets/Defects/6_1/3196.txt | 1 + 2 files changed, 84 insertions(+) create mode 100644 test_scripts/Defects/6_1/3196_SDL_responds_resultCode_GENERIC_ERROR_while_dataType_VEHICLEDATA_EXTERNTEMP_is_VEHICLE_DATA_NOT_AVAILABLE_and_not_in_subscribed_list_store.lua create mode 100644 test_sets/Defects/6_1/3196.txt diff --git a/test_scripts/Defects/6_1/3196_SDL_responds_resultCode_GENERIC_ERROR_while_dataType_VEHICLEDATA_EXTERNTEMP_is_VEHICLE_DATA_NOT_AVAILABLE_and_not_in_subscribed_list_store.lua b/test_scripts/Defects/6_1/3196_SDL_responds_resultCode_GENERIC_ERROR_while_dataType_VEHICLEDATA_EXTERNTEMP_is_VEHICLE_DATA_NOT_AVAILABLE_and_not_in_subscribed_list_store.lua new file mode 100644 index 0000000000..686aacc25c --- /dev/null +++ b/test_scripts/Defects/6_1/3196_SDL_responds_resultCode_GENERIC_ERROR_while_dataType_VEHICLEDATA_EXTERNTEMP_is_VEHICLE_DATA_NOT_AVAILABLE_and_not_in_subscribed_list_store.lua @@ -0,0 +1,83 @@ +--------------------------------------------------------------------------------------------------- +-- User story: https://github.com/smartdevicelink/sdl_core/issues/3196 +-- +-- Description: +-- SDL responds "resultCode: SUCCESS" while dataType:VEHICLEDATA_EXTERNTEMP is VEHICLE_DATA_NOT_AVAILABLE and not +-- in-subscribed list store +-- Precondition: +-- 1) SDL and HMI are started. +-- 2) SubscribeVehicleData (speed, externalTemperature), OnVehicleData is allowed by policy for app_1 and app_2. +-- 3) Navi App1 and navi app2 are registered and activated. +-- Steps to reproduce: +-- 1) Send SubscribeVehicleData (speed, externalTemperature) from app_1 => SDL responds SubscribeVehicleData +-- SDL should send "SUCCESS, (speed: SUCCESS), (externalTemperature: VEHICLE_DATA_NOT_AVAILABLE)" to mobile app1. +-- 2) Send SubscribeVehicleData (speed, externalTemperature) from app_2. +-- 3) Observe the result. +-- Expected result: +-- SDL should send "SUCCESS, (speed: SUCCESS), (externalTemperature: VEHICLE_DATA_NOT_AVAILABLE)" to mobile app2. +--------------------------------------------------------------------------------------------------- +--[[ Required Shared libraries ]] +local runner = require('user_modules/script_runner') +local common = require("user_modules/sequences/actions") + +--[[ Test Configuration ]] +runner.testSettings.isSelfIncluded = false + +config.application1.appHMIType = { "NAVIGATION" } +config.application2.appHMIType = { "NAVIGATION" } + +--[[ Local Functions ]] +local function ptuUpdate(tbl) + local VDgroup = { + rpcs = { + SubscribeVehicleData = { + hmi_levels = { "BACKGROUND", "FULL", "LIMITED", "NONE" }, + parameters = {"speed", "externalTemperature"} + } + } + } + tbl.policy_table.functional_groupings["NewTestCaseGroup"] = VDgroup + tbl.policy_table.app_policies[config.application1.registerAppInterfaceParams.fullAppID].groups = {"Base-4", "NewTestCaseGroup"} + tbl.policy_table.app_policies[config.application2.registerAppInterfaceParams.fullAppID].groups = {"Base-4", "NewTestCaseGroup"} +end + +local function subscribeVehicleData(pAppId, pFirstApp) + local cid = common.getMobileSession(pAppId):SendRPC("SubscribeVehicleData", { speed = true, externalTemperature = true }) + if pFirstApp then + common.getHMIConnection():ExpectRequest("VehicleInfo.SubscribeVehicleData", { speed = true, externalTemperature = true }) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { + speed = { dataType = "VEHICLEDATA_SPEED", resultCode = "SUCCESS" }, + externalTemperature = { dataType = "VEHICLEDATA_EXTERNTEMP", resultCode = "VEHICLE_DATA_NOT_AVAILABLE" } + }) + end) + else + common.getHMIConnection():ExpectRequest("VehicleInfo.SubscribeVehicleData", { externalTemperature = true }) + :Do(function(_, data) + common.getHMIConnection():SendResponse(data.id, data.method, "SUCCESS", { + externalTemperature = { dataType = "VEHICLEDATA_EXTERNTEMP", resultCode = "VEHICLE_DATA_NOT_AVAILABLE" } + }) + end) + end + common.getMobileSession(pAppId):ExpectResponse(cid, { success = true, resultCode = "SUCCESS", + speed = { dataType = "VEHICLEDATA_SPEED", resultCode = "SUCCESS" }, + externalTemperature = { dataType = "VEHICLEDATA_EXTERNTEMP", resultCode = "VEHICLE_DATA_NOT_AVAILABLE" } + }) +end + +--[[ Scenario ]] +runner.Title("Preconditions") +runner.Step("Clean environment", common.preconditions) +runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) +runner.Step("App1 is registered", common.registerAppWOPTU) +runner.Step("Activate App1", common.activateApp) +runner.Step("App2 is registered", common.registerApp, {2}) +runner.Step("Activate App2", common.activateApp, {2}) +runner.Step("Perform PTU", common.policyTableUpdate,{ptuUpdate}) + +runner.Title("Test") +runner.Step("App1 is subscribed to get speed and externalTemperature data", subscribeVehicleData, {1, true}) +runner.Step("App2 is subscribed to get speed and externalTemperature data", subscribeVehicleData, {2, false}) + +runner.Title("Postconditions") +runner.Step("Stop SDL", common.postconditions) diff --git a/test_sets/Defects/6_1/3196.txt b/test_sets/Defects/6_1/3196.txt new file mode 100644 index 0000000000..f5f2e39105 --- /dev/null +++ b/test_sets/Defects/6_1/3196.txt @@ -0,0 +1 @@ +./test_scripts/Defects/6_1/3196_SDL_responds_resultCode_GENERIC_ERROR_while_dataType_VEHICLEDATA_EXTERNTEMP_is_VEHICLE_DATA_NOT_AVAILABLE_and_not_in_subscribed_list_store.lua From 9b4241de17623cb8edefa0a9847c2cba3c27cb51 Mon Sep 17 00:00:00 2001 From: "Halyna Savynetska (GitHub)" <34478015+HSavynetska@users.noreply.github.com> Date: Mon, 27 Apr 2020 16:51:50 +0300 Subject: [PATCH 61/64] Upadte script to verify 1772 issue (#2310) * Upadte script to verify 1772 issue * Add applicable policy mode restrictions Co-authored-by: Dmitriy Boltovskiy --- .../4_5/1772_update_default_section.lua | 30 +++++++++++++++++-- .../Defects/Defects_releases_4_x_and_5_x.txt | 2 +- 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/test_scripts/Defects/4_5/1772_update_default_section.lua b/test_scripts/Defects/4_5/1772_update_default_section.lua index 70ed80e22a..612e94b686 100644 --- a/test_scripts/Defects/4_5/1772_update_default_section.lua +++ b/test_scripts/Defects/4_5/1772_update_default_section.lua @@ -18,6 +18,32 @@ local runner = require('user_modules/script_runner') local commonDefects = require('test_scripts/Defects/4_5/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + +--[[ Local Variables ]] +local gpsDataResponse = { + longitudeDegrees = 100, + latitudeDegrees = 20, + utcYear = 2050, + utcMonth = 10, + utcDay = 30, + utcHours = 20, + utcMinutes = 50, + utcSeconds = 50, + compassDirection = "NORTH", + pdop = 5, + hdop = 5, + vdop = 5, + actual = false, + satellites = 30, + dimension = "2D", + altitude = 9500, + heading = 350, + speed = 450, + shifted = true +} + --[[ Local Functions ]] -- Preparation policy table for Policy table update -- @tparam table tbl table to update @@ -45,10 +71,10 @@ local function GetVD(self) -- Request from mobile app local cid = self.mobileSession1:SendRPC("GetVehicleData", { gps = true }) -- expectation of VehicleInfo.GetVehicleData request from SDL on HMI side - EXPECT_HMICALL("VehicleInfo.GetVehicleData") + EXPECT_HMICALL("VehicleInfo.GetVehicleData", { gps = true }) :Do(function(_, data) -- sending VehicleInfo.GetVehicleData response from HMI with resultCode SUCCESS - self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {}) + self.hmiConnection:SendResponse(data.id, data.method, "SUCCESS", {gps = gpsDataResponse}) end) -- expectation of GetVehicleData response on mobile app with resultCode SUCCESS self.mobileSession1:ExpectResponse(cid, { success = true, resultCode = "SUCCESS" }) diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt index a96fd307d9..1f5ad296ad 100644 --- a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -1,7 +1,7 @@ ;Policies ./test_scripts/Defects/4_5/1206_REQUEST_PTU_Trigger_PTU_failed_previous_IGN_ON.lua ./test_scripts/Defects/4_5/1376_PTU_all_flows.lua -;./test_scripts/Defects/4_5/1772_update_default_section.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2314 +./test_scripts/Defects/4_5/1772_update_default_section.lua ./test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua ;./test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2330 ./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua From 56814d9c4723b021da087aaf2c7151b9c7acc593 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Tue, 28 Apr 2020 00:23:46 +0300 Subject: [PATCH 62/64] HMI response struct update (#2338) * HMI response struct update * Add applicable policy mode restrictions Co-authored-by: Dmitriy Boltovskiy --- ...respond_to_HMI_request_with_missed_mandatory_params.lua | 5 ++++- ...ot_respond_to_HMI_request_with_wrong_type_of_params.lua | 7 +++++-- ..._respond_to_HMI_request_with_empty_string_parameter.lua | 5 ++++- test_sets/Defects/Defects_releases_4_x_and_5_x.txt | 6 +++--- 4 files changed, 16 insertions(+), 7 deletions(-) diff --git a/test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua b/test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua index df5cb6bba9..f4c988f2d7 100644 --- a/test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua +++ b/test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua @@ -17,10 +17,13 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/Defects/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Functions ]] local function GetUserFriendlyMessage(self) local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US"}) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 11, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 11, data = {method = "SDL.GetUserFriendlyMessage"}}}) end --[[ Scenario ]] diff --git a/test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua b/test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua index f4a7211adb..9254a77914 100644 --- a/test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua +++ b/test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua @@ -17,17 +17,20 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/Defects/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + -- [[ Local Functions ]] local function GetUserFriendlyMessage(self) local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = 1} ) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 11, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 11, data = {method = "SDL.GetUserFriendlyMessage"}}}) end --[[ Scenario ]] runner.Title("Preconditions") runner.Step("Clean environment", common.preconditions) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) -runner.Step("App registration, PTU", common.rai_n) +runner.Step("App registration, PTU", common.rai_ptu) runner.Step("Activate App", common.activate_app) runner.Title("Test") diff --git a/test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua b/test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua index 7e98e01f7f..dc1d87375e 100644 --- a/test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua +++ b/test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua @@ -17,11 +17,14 @@ local runner = require('user_modules/script_runner') local common = require('test_scripts/Defects/commonDefects') +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Functions ]] local function GetUserFriendlyMessage(self) local RequestId = self.hmiConnection:SendRequest("SDL.GetUserFriendlyMessage", {language = "EN-US", messageCodes = {""} }) - EXPECT_HMIRESPONSE(RequestId,{result = {code = 11, method = "SDL.GetUserFriendlyMessage"}}) + EXPECT_HMIRESPONSE(RequestId,{result = {code = 11, data = {method = "SDL.GetUserFriendlyMessage"}}}) end --[[ Scenario ]] diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt index 1f5ad296ad..c7b8907847 100644 --- a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -66,9 +66,9 @@ ./test_scripts/Defects/5_0/2443_SDL_does_not_check_for_non_manadatory_parameters.lua ./test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua ./test_scripts/Defects/5_0/1030_API_SDL_sends_OnAppInterfaceUnregistered(DRIVER_DISTRACTION_VIOLATION)_to_app_when_receives_OnExitApplication(DRIVER_DISTRACTION_VIOLATION)_from_HMI.lua -;./test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2329 -;./test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2329 -;./test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2329 +./test_scripts/Defects/5_0/1866_SDL_does_not_respond_to_HMI_request_with_missed_mandatory_params.lua +./test_scripts/Defects/5_0/1867_SDL_does_not_respond_to_HMI_request_with_wrong_type_of_params.lua +./test_scripts/Defects/5_0/1868_SDL_does_not_respond_to_HMI_request_with_empty_string_parameter.lua ./test_scripts/Defects/5_1/2862_SDL_sends_UnsubscribeWayPoint_request_to_HMI.lua ./test_scripts/Defects/5_1/2874_SDL_sends_system_request_with_correlationid_-1_and_INAVLID_DATA.lua ;Streaming From a02f0f8c833f642a55a2d2d68d75fb89d938d4c5 Mon Sep 17 00:00:00 2001 From: "Dmytro Boltovskyi (GitHub)" Date: Tue, 28 Apr 2020 10:11:56 -0400 Subject: [PATCH 63/64] Improve stability of scripts #2 (#2393) * Make 076 policy script stable * Make 061 policy script stable * Make RGNSD scripts stable * Make combined test set for 3136 issue * Include 015 abd 016 scripts for Mobile Projection into test set * Make script for issue 1376 stable * Do not remove predefined SDL certificates in tests for WebEngine feature --- ..._VD_from_permissions_from_1_app_2_apps.lua | 3 +- ...moving_VD_from_permissions_from_2_apps.lua | 3 +- .../commonGenericNetSignalData.lua | 9 +++++ .../Defects/4_5/1376_PTU_all_flows.lua | 8 ++-- ...Sending_PTS_to_Mobile_Application_HTTP.lua | 37 ++++++++++--------- ...PermissionChange_Notification_App_HTTP.lua | 27 +++++++------- test_scripts/WebEngine/commonWebEngine.lua | 23 ++++++++---- .../Defects/6_1/{3136_EXT.txt => 3136.txt} | 4 ++ test_sets/Defects/6_1/3136_HTTP.txt | 7 ---- test_sets/Defects/6_1/3136_PROP.txt | 7 ---- test_sets/mobile_projection.txt | 4 +- 11 files changed, 71 insertions(+), 61 deletions(-) rename test_sets/Defects/6_1/{3136_EXT.txt => 3136.txt} (78%) delete mode 100644 test_sets/Defects/6_1/3136_HTTP.txt delete mode 100644 test_sets/Defects/6_1/3136_PROP.txt diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/036_4_Subscribtion_after_removing_VD_from_permissions_from_1_app_2_apps.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/036_4_Subscribtion_after_removing_VD_from_permissions_from_1_app_2_apps.lua index ff452a0a9e..559da83bb0 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/036_4_Subscribtion_after_removing_VD_from_permissions_from_1_app_2_apps.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/036_4_Subscribtion_after_removing_VD_from_permissions_from_1_app_2_apps.lua @@ -138,7 +138,7 @@ runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Set ApplicationListUpdateTimeout=4000", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) runner.Step("App1 registration", common.registerAppWOPTU, {appSessionId1}) -runner.Step("App2 registration", common.registerApp, { appSessionId2 }) +runner.Step("App2 registration", common.registerAppWOPTU, {appSessionId2}) runner.Step("App1 activation", common.activateApp, {appSessionId1}) runner.Step("App2 activation", common.activateApp, {appSessionId2}) runner.Step("PTU with VehicleDataItems", common.policyTableUpdateWithOnPermChange, @@ -170,6 +170,7 @@ runner.Step("App2 OnVehicleData " .. rpcSpecDataApp2, common.onVD, runner.Step("App1 SubscribeVehicleData " .. itemToRemove .. " after VD was removed", common.errorRPCprocessing, { appSessionId1, itemToRemove, "SubscribeVehicleData", "INVALID_DATA" }) +runner.Step("Exit apps", common.exitApps) runner.Step("Ignition off", common.ignitionOff) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("App1 registration after ign_off", registerApp1WithResumption) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/036_5_Subscribtion_after_removing_VD_from_permissions_from_2_apps.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/036_5_Subscribtion_after_removing_VD_from_permissions_from_2_apps.lua index cee63af89f..7d0b85f30d 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/036_5_Subscribtion_after_removing_VD_from_permissions_from_2_apps.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/036_5_Subscribtion_after_removing_VD_from_permissions_from_2_apps.lua @@ -163,7 +163,7 @@ runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("Set ApplicationListUpdateTimeout=4000", common.setSDLIniParameter, { "ApplicationListUpdateTimeout", 4000 }) runner.Step("App1 registration", common.registerAppWOPTU, {appSessionId1}) -runner.Step("App2 registration", common.registerApp, { appSessionId2 }) +runner.Step("App2 registration", common.registerAppWOPTU, {appSessionId2}) runner.Step("App1 activation", common.activateApp, {appSessionId1}) runner.Step("App2 activation", common.activateApp, {appSessionId2}) runner.Step("PTU with VehicleDataItems", common.policyTableUpdateWithOnPermChange, @@ -198,6 +198,7 @@ runner.Step("App1 SubscribeVehicleData " .. itemToRemove .. " after VD was remov runner.Step("App2 SubscribeVehicleData " .. itemToRemove .. " after VD was removed", common.errorRPCprocessing, { appSessionId2, itemToRemove, "SubscribeVehicleData", "INVALID_DATA" }) +runner.Step("Exit apps", common.exitApps) runner.Step("Ignition off", common.ignitionOff) runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) runner.Step("App1 registration after ign_off", registerApp1WithResumption) diff --git a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua index d42ae6d409..55ebe96096 100644 --- a/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua +++ b/test_scripts/API/VehicleData/GenericNetworkSignalData/commonGenericNetSignalData.lua @@ -985,5 +985,14 @@ function common.getAllVehicleData() return allVDdata end +function common.exitApps() + for appId = 1, common.getAppsCount() do + common.getMobileSession(appId):ExpectNotification("OnHMIStatus", { hmiLevel = "NONE" }) + common.getHMIConnection():SendNotification("BasicCommunication.OnExitApplication", { + appID = common.getHMIAppId(appId), + reason = "USER_EXIT" }) + end +end + return common diff --git a/test_scripts/Defects/4_5/1376_PTU_all_flows.lua b/test_scripts/Defects/4_5/1376_PTU_all_flows.lua index 1232693884..f60d6e5676 100644 --- a/test_scripts/Defects/4_5/1376_PTU_all_flows.lua +++ b/test_scripts/Defects/4_5/1376_PTU_all_flows.lua @@ -263,6 +263,10 @@ local function raiPTU(self) { application = { appName = config.application1.registerAppInterfaceParams.appName } }) :Do(function() log("SDL->HMI: N: BC.OnAppRegistered") + end) + -- Expect RegisterAppInterface response on mobile side with resultCode SUCCESS + self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) + :Do(function() if sdl.buildOptions.extendedPolicy == "PROPRIETARY" or sdl.buildOptions.extendedPolicy == "EXTERNAL_PROPRIETARY" then -- Expect PolicyUpdate request on HMI side @@ -303,10 +307,6 @@ local function raiPTU(self) end) :Times(2) end - end) - -- Expect RegisterAppInterface response on mobile side with resultCode SUCCESS - self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) - :Do(function() log("SDL->MOB: RS: RegisterAppInterface") -- Expect OnHMIStatus with hmiLevel NONE on mobile side form SDL self.mobileSession:ExpectNotification("OnHMIStatus", diff --git a/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua b/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua index 42cdb6af5f..2b1cbfe291 100644 --- a/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua +++ b/test_scripts/Policies/build_options/061_ATF_Sending_PTS_to_Mobile_Application_HTTP.lua @@ -71,27 +71,28 @@ function Test:TestStep_Sending_PTS_to_mobile_application() for _,v in pairs(timeout_table) do timeout = v end + end) - EXPECT_NOTIFICATION("OnSystemRequest"): Times(2) - :ValidIf(function(e, d) - print("OnSystemRequest: " .. e.occurences .. ": " .. d.payload.requestType) - if (e.occurences == 1) then - return true - elseif (e.occurences == 2) and (d.payload.requestType == "HTTP") then - print("OnSystemRequest(HTTP) is sent to App") - if (d.payload.url ~= endpoints_url) then - return false, "Expected URL: " .. endpoints_url .. ", actual: " .. tostring(d.payload.url) - end - if (tostring(d.payload.timeout) ~= timeout) then - return false, "Expected Timeout: " .. timeout .. ", actual: " .. tostring(d.payload.timeout) - end - else - return false, "OnSystemRequest(HTTP) was not sent to App" - end - return true - end) + EXPECT_NOTIFICATION("OnSystemRequest"): Times(2) + :ValidIf(function(e, d) + print("OnSystemRequest: " .. e.occurences .. ": " .. d.payload.requestType) + if (e.occurences == 1) then + return true + elseif (e.occurences == 2) and (d.payload.requestType == "HTTP") then + print("OnSystemRequest(HTTP) is sent to App") + if (d.payload.url ~= endpoints_url) then + return false, "Expected URL: " .. endpoints_url .. ", actual: " .. tostring(d.payload.url) + end + if (tostring(d.payload.timeout) ~= timeout) then + return false, "Expected Timeout: " .. timeout .. ", actual: " .. tostring(d.payload.timeout) + end + else + return false, "OnSystemRequest(HTTP) was not sent to App" + end + return true end) + end --[[ Postconditions ]] diff --git a/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua b/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua index 6c07c1d2ff..b77d4f5b53 100644 --- a/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua +++ b/test_scripts/Policies/build_options/076_ATF_PTU_Changes_Applied_OnPermissionChange_Notification_App_HTTP.lua @@ -131,21 +131,20 @@ function Test:RAI_PTU() log("SDL->HMI: N: SDL.OnStatusUpdate", d2.params.status) end) :Times(3) - -- workaround due to issue in Mobile API: APPLINK-30390 - local onSystemRequestRecieved = false - self.mobileSession:ExpectNotification("OnSystemRequest") - :Do( - function(_, d2) - log("SDL->MOB: N: OnSystemRequest, RequestType: "..d2.payload.requestType ) - if (not onSystemRequestRecieved) and (d2.payload.requestType == "HTTP") then - onSystemRequestRecieved = true - ptu_table = json.decode(d2.binaryData) - ptu(self) - end - end) - :Times(2) end) - + -- workaround due to issue in Mobile API: APPLINK-30390 + local onSystemRequestRecieved = false + self.mobileSession:ExpectNotification("OnSystemRequest") + :Do( + function(_, d2) + log("SDL->MOB: N: OnSystemRequest, RequestType: "..d2.payload.requestType ) + if (not onSystemRequestRecieved) and (d2.payload.requestType == "HTTP") then + onSystemRequestRecieved = true + ptu_table = json.decode(d2.binaryData) + ptu(self) + end + end) + :Times(2) self.mobileSession:ExpectResponse(corId, { success = true, resultCode = "SUCCESS" }) :Do( function() diff --git a/test_scripts/WebEngine/commonWebEngine.lua b/test_scripts/WebEngine/commonWebEngine.lua index 6a9cddec18..0df789e557 100644 --- a/test_scripts/WebEngine/commonWebEngine.lua +++ b/test_scripts/WebEngine/commonWebEngine.lua @@ -75,6 +75,11 @@ config.wssCertificateCAPath = aftCertPath.. common.wssCertificateCAname config.wssCertificateClientPath = aftCertPath .. common.wssCertificateClientName config.wssPrivateKeyPath = aftCertPath .. common.wssPrivateKeyName +local isSDLCrtsCopied = { + { name = common.wssCertificateCAname, value = false }, + { name = common.wssCertificateServerName, value = false }, + { name = common.wssServerPrivateKeyName, value = false } +} --[[ Common Functions ]] local function getWebEngineConParams(pConnectionType) @@ -239,16 +244,20 @@ function common.postconditions() end function common.addAllCertInSDLbinFolder() - os.execute("cp -f " .. aftCertPath .. common.wssCertificateCAname .. " " .. common.GetPathToSDL()) - os.execute("cp -f " .. aftCertPath .. common.wssCertificateServerName .. " " .. common.GetPathToSDL()) - os.execute("cp -f " .. aftCertPath .. common.wssServerPrivateKeyName .. " " .. common.GetPathToSDL()) + for _, crt in pairs(isSDLCrtsCopied) do + if not utils.isFileExist(common.GetPathToSDL() .. crt.name) then + os.execute("cp -f " .. aftCertPath .. crt.name .. " " .. common.GetPathToSDL()) + crt.value = true + end + end end function common.removeAllCertFromSDLbinFolder() - local command = "rm -f " .. common.GetPathToSDL() .. common.wssCertificateCAname .. " " - .. common.GetPathToSDL() .. common.wssCertificateServerName .. " " - .. common.GetPathToSDL() .. common.wssServerPrivateKeyName - os.execute(command) + for _, crt in pairs(isSDLCrtsCopied) do + if crt.value == true then + os.execute("rm -f " .. common.GetPathToSDL() .. crt.name) + end + end end function common.addAllCertInIniFile() diff --git a/test_sets/Defects/6_1/3136_EXT.txt b/test_sets/Defects/6_1/3136.txt similarity index 78% rename from test_sets/Defects/6_1/3136_EXT.txt rename to test_sets/Defects/6_1/3136.txt index 0a7fb1920f..2d6cffed18 100644 --- a/test_sets/Defects/6_1/3136_EXT.txt +++ b/test_sets/Defects/6_1/3136.txt @@ -1,5 +1,9 @@ +./test_scripts/Defects/6_1/3136_01_Proprietary.lua ./test_scripts/Defects/6_1/3136_02_External_Proprietary.lua +./test_scripts/Defects/6_1/3136_03_Http.lua +./test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua ./test_scripts/Defects/6_1/3136_05_External_Proprietary_3apps.lua +./test_scripts/Defects/6_1/3136_06_Http_3apps.lua ./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua ./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua ./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua diff --git a/test_sets/Defects/6_1/3136_HTTP.txt b/test_sets/Defects/6_1/3136_HTTP.txt deleted file mode 100644 index 05e377a2be..0000000000 --- a/test_sets/Defects/6_1/3136_HTTP.txt +++ /dev/null @@ -1,7 +0,0 @@ -./test_scripts/Defects/6_1/3136_03_Http.lua -./test_scripts/Defects/6_1/3136_06_Http_3apps.lua -./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua -./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua -./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua -./test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua -./test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua diff --git a/test_sets/Defects/6_1/3136_PROP.txt b/test_sets/Defects/6_1/3136_PROP.txt deleted file mode 100644 index 440c1282a9..0000000000 --- a/test_sets/Defects/6_1/3136_PROP.txt +++ /dev/null @@ -1,7 +0,0 @@ -./test_scripts/Defects/6_1/3136_01_Proprietary.lua -./test_scripts/Defects/6_1/3136_04_Proprietary_3apps.lua -./test_scripts/TheSameApp/Policies/AppId/001_PTU_is_not_triggered_after_registration_app_with_the_same_id.lua -./test_scripts/TheSameApp/Policies/AppId/002_PTU_is_triggered_after_registration_app_with_different_app_id.lua -./test_scripts/TheSameApp/Policies/AppId/003_PTU_is_not_triggered_after_registration_app_with_the_same_id_after_PTU.lua -./test_scripts/TheSameApp/Policies/AppId/004_PTU_is_triggered_after_registration_app_with_different_app_id_after_PTU.lua -./test_scripts/TheSameApp/Policies/AppId/005_PTU_is_not_triggered_after_registration_app_with_different_app_id_during_timeout.lua diff --git a/test_sets/mobile_projection.txt b/test_sets/mobile_projection.txt index a902784ff8..824f42174e 100644 --- a/test_sets/mobile_projection.txt +++ b/test_sets/mobile_projection.txt @@ -12,6 +12,6 @@ ./test_scripts/MobileProjection/Phase1/012_Retry_sequence_of_StartStream_during_video_service_start.lua ./test_scripts/MobileProjection/Phase1/013_Rejecting_StartAudioStream_during_audio_service_start.lua ./test_scripts/MobileProjection/Phase1/014_Rejecting_StartStream_during_video_service_start.lua -;./test_scripts/MobileProjection/Phase1/015_Restore_video_streaming_from_NONE.lua 2721 -;./test_scripts/MobileProjection/Phase1/016_Restore_audio_streaming_from_NONE.lua 2721 +./test_scripts/MobileProjection/Phase1/015_Restore_video_streaming_from_NONE.lua +./test_scripts/MobileProjection/Phase1/016_Restore_audio_streaming_from_NONE.lua ./test_scripts/MobileProjection/Phase1/017_HappyPath_flow_with_audio_video_streamings.lua From a7db5ccc5dfdb2b37346143538846f4e33f87b81 Mon Sep 17 00:00:00 2001 From: "Getmanets Irina (GitHub)" <11210973+GetmanetsIrina@users.noreply.github.com> Date: Tue, 28 Apr 2020 17:55:39 +0300 Subject: [PATCH 64/64] Scripts stabilization with OnPermissionChange expectation (#2339) * Scripts stabilization with OnPermissionChange expectation * Add applicable policy mode restrictions * Add delay for allow SDL Co-authored-by: Dmitriy Boltovskiy --- test_scripts/Defects/4_5/1376_PTU_all_flows.lua | 2 ++ .../Defects/4_5/1873_Parameters_empty_in_policy_table.lua | 3 +++ test_scripts/Defects/4_5/commonDefects.lua | 2 ++ test_scripts/Defects/commonDefects.lua | 2 ++ test_sets/Defects/Defects_releases_4_x_and_5_x.txt | 4 ++-- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/test_scripts/Defects/4_5/1376_PTU_all_flows.lua b/test_scripts/Defects/4_5/1376_PTU_all_flows.lua index f60d6e5676..48cbf9eb9d 100644 --- a/test_scripts/Defects/4_5/1376_PTU_all_flows.lua +++ b/test_scripts/Defects/4_5/1376_PTU_all_flows.lua @@ -11,6 +11,7 @@ local atf_logger = require("atf_logger") local sdl = require("SDL") local commonSteps = require("user_modules/shared_testcases/commonSteps") local utils = require ('user_modules/utils') +local commonTestCases = require("user_modules/shared_testcases/commonTestCases") --[[ General configuration parameters ]] config.mobileHost = "127.0.0.1" @@ -44,6 +45,7 @@ local function allowSDL(self) name = utils.getDeviceName() } }) + commonTestCases:DelayedExp(500) end -- Start SDL and HMI, establish connection between SDL and HMI, open mobile connection via TCP diff --git a/test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua b/test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua index f17bda9605..0dc031ff8f 100644 --- a/test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua +++ b/test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua @@ -6,6 +6,9 @@ local runner = require('user_modules/script_runner') local commonDefects = require('test_scripts/Defects/4_5/commonDefects') local json = require("json") +--[[ Test Configuration ]] +runner.testSettings.restrictions.sdlBuildOptions = { { extendedPolicy = { "PROPRIETARY", "EXTERNAL_PROPRIETARY" } } } + --[[ Local Functions ]] --! @ptuUpdateFuncDisallowedRPC: Update PT with empty parameters --! @parameters: diff --git a/test_scripts/Defects/4_5/commonDefects.lua b/test_scripts/Defects/4_5/commonDefects.lua index 464638b267..425d88a11a 100644 --- a/test_scripts/Defects/4_5/commonDefects.lua +++ b/test_scripts/Defects/4_5/commonDefects.lua @@ -185,6 +185,7 @@ function commonDefect.allow_sdl(self) name = commonDefect.getDeviceName() } }) + commonDefect.delayedExp(commonDefect.minTimeout) end --[[ @preconditions: precondition steps @@ -424,6 +425,7 @@ function commonDefect.rai_n(id, expect_dd, self) { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Times(AtLeast(1)) self["mobileSession" .. id]:ExpectNotification("OnPermissionsChange") + :Times(AtLeast(1)) if expect_dd then self["mobileSession" .. id]:ExpectNotification("OnDriverDistraction", { state = "DD_OFF" }) else diff --git a/test_scripts/Defects/commonDefects.lua b/test_scripts/Defects/commonDefects.lua index babb5fc2f7..3cc07389c6 100644 --- a/test_scripts/Defects/commonDefects.lua +++ b/test_scripts/Defects/commonDefects.lua @@ -186,6 +186,7 @@ function commonDefect.allow_sdl(self) name = commonDefect.getDeviceName() } }) + commonDefect.delayedExp(commonDefect.minTimeout) end --[[ @preconditions: precondition steps @@ -425,6 +426,7 @@ function commonDefect.rai_n(id, self) { hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) :Times(AtLeast(1)) self["mobileSession" .. id]:ExpectNotification("OnPermissionsChange") + :Times(AtLeast(1)) self["mobileSession" .. id]:ExpectNotification("OnDriverDistraction", { state = "DD_OFF" }) end) end) diff --git a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt index c7b8907847..caf57e5eda 100644 --- a/test_sets/Defects/Defects_releases_4_x_and_5_x.txt +++ b/test_sets/Defects/Defects_releases_4_x_and_5_x.txt @@ -3,7 +3,7 @@ ./test_scripts/Defects/4_5/1376_PTU_all_flows.lua ./test_scripts/Defects/4_5/1772_update_default_section.lua ./test_scripts/Defects/4_5/1873_UnsubscribeVD_OnVD_Parameters_empty_in_policy_table.lua -;./test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2330 +./test_scripts/Defects/4_5/1873_Parameters_empty_in_policy_table.lua ./test_scripts/Defects/4_5/1921_Invalid_PT_after_cutting_unknow_values.lua ;./test_scripts/Defects/4_6/842_App_does_not_activate_when_policies_are_disabled.lua https://github.com/smartdevicelink/sdl_core/issues/3285 ./test_scripts/Defects/5_0/1887_PoliciesManager_allows_all_requested_params_in_case_parameters_field_is_empty.lua @@ -62,7 +62,7 @@ ./test_scripts/Defects/5_0/2480_Vefiry_that_SDL_sends_OnDD_notification_once_upon_registration.lua ./test_scripts/Defects/5_0/1035_SDL_doesnt_send_REJECTED_code_to_mobile_app_when_activating_app_from_HMI_with_activate.lua ./test_scripts/Defects/5_0/1218_Mandatory_parameter_spaceAvailable_is_not_provided_in_response_for_PutFile_request.lua -;./test_scripts/Defects/5_0/1032_CreateInteractionChoiceSet_core_successfully_creates_choice_set_with_duplicate_vrCommands_menuName_inside_it.lua https://github.com/smartdevicelink/sdl_atf_test_scripts/issues/2330 +./test_scripts/Defects/5_0/1032_CreateInteractionChoiceSet_core_successfully_creates_choice_set_with_duplicate_vrCommands_menuName_inside_it.lua ./test_scripts/Defects/5_0/2443_SDL_does_not_check_for_non_manadatory_parameters.lua ./test_scripts/Defects/5_0/964_SDL_sends_to_mobile_APPLICATION_NOT_REGISTRED_in_setAppIcon_responce_if_HMI_responds_with_INVALID_DATA.lua ./test_scripts/Defects/5_0/1030_API_SDL_sends_OnAppInterfaceUnregistered(DRIVER_DISTRACTION_VIOLATION)_to_app_when_receives_OnExitApplication(DRIVER_DISTRACTION_VIOLATION)_from_HMI.lua