-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scripts for resumption within low voltage
- Loading branch information
1 parent
e424464
commit c801cea
Showing
21 changed files
with
1,217 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
57 changes: 57 additions & 0 deletions
57
test_scripts/LowVoltage/006_Low_Voltage_and_Wake_Up_resumption_FULL_hmi_level.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- In case: | ||
-- 1. Mobile app is in FULL HMILevel | ||
-- 2. App has some persistent data that can be resumed | ||
-- 3. Mobile app is disconnected during the time frame of 30 sec (inclusive) before "SDL_LOW_VOLTAGE" unix signal from HMI | ||
-- 4. Mobile app registers with the same hashID during 30 sec. after "WAKE_UP" unix signal in the same ignition cycle | ||
-- 5. there is no application currently in FULL | ||
-- SDL does: | ||
-- 1. resume FULL HMILevel for app | ||
-- 2. resume persistent data | ||
--------------------------------------------------------------------------------------------------- | ||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/LowVoltage/common') | ||
local runner = require('user_modules/script_runner') | ||
|
||
--[[ Test Configuration ]] | ||
runner.testSettings.isSelfIncluded = false | ||
|
||
--[[ Local Functions ]] | ||
local function addResumptionData() | ||
common.rpcSend.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionData() | ||
common.rpcCheck.AddCommand(1, 1) | ||
end | ||
|
||
local function checkAppId(pAppId, pData) | ||
if pData.params.application.appID ~= common.getHMIAppId(pAppId) then | ||
return false, "App " .. pAppId .. " is registered with not the same HMI App Id" | ||
end | ||
return true | ||
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("PolicyTableUpdate", common.policyTableUpdate) | ||
runner.Step("Activate app", common.activateApp) | ||
runner.Step("Add resumption data for App ", addResumptionData) | ||
|
||
runner.Title("Test") | ||
runner.Step("Wait until Resumption Data is stored" , common.waitUntilResumptionDataIsStored) | ||
runner.Step("Close mobile connection", common.cleanSessions) | ||
runner.Step("Wait 10 sec before LOW_VOLTAGE", common.wait, {10000}) | ||
runner.Step("Send LOW_VOLTAGE signal", common.sendLowVoltageSignal) | ||
runner.Step("Send WAKE_UP signal", common.sendWakeUpSignal) | ||
runner.Step("Wait 10 sec before registration", common.wait, {10000}) | ||
runner.Step("Re-connect Mobile", common.connectMobile) | ||
runner.Step("Re-register App, check resumption data and HMI level", common.reRegisterApp, { | ||
1, checkAppId, checkResumptionData, common.checkResumptionHMILevel, "SUCCESS", 1000 | ||
}) | ||
|
||
runner.Title("Postconditions") | ||
runner.Step("Stop SDL", common.postconditions) |
66 changes: 66 additions & 0 deletions
66
...Low_Voltage_and_Wake_Up_absence_resumption_FULL_hmi_level_in_case_existed_app_in_full.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- In case: | ||
-- 1. Mobile app is in FULL HMILevel | ||
-- 2. App has some persistent data that can be resumed | ||
-- 3. Mobile app is disconnected during the time frame of 30 sec (inclusive) before "SDL_LOW_VOLTAGE" unix signal from HMI | ||
-- 4. Mobile app registers with the same hashID during 30 sec. after "WAKE_UP" unix signal in the same ignition cycle | ||
-- 5. there is application currently in FULL | ||
-- SDL does: | ||
-- 1. not resume FULL HMILevel for app | ||
-- 2. resume persistent data | ||
--------------------------------------------------------------------------------------------------- | ||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/LowVoltage/common') | ||
local runner = require('user_modules/script_runner') | ||
|
||
--[[ Test Configuration ]] | ||
runner.testSettings.isSelfIncluded = false | ||
|
||
--[[ Local Functions ]] | ||
local function addResumptionData() | ||
common.rpcSend.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionData() | ||
common.rpcCheck.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionHMILevel() | ||
common.getMobileSession(1):ExpectNotification("OnHMIStatus", | ||
{ hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) | ||
common.getMobileSession(2):ExpectNotification("OnHMIStatus") | ||
:Times(0) | ||
end | ||
|
||
local function checkAppId(pAppId, pData) | ||
if pData.params.application.appID ~= common.getHMIAppId(pAppId) then | ||
return false, "App " .. pAppId .. " is registered with not the same HMI App Id" | ||
end | ||
return true | ||
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("PolicyTableUpdate", common.policyTableUpdate) | ||
runner.Step("Activate app", common.activateApp) | ||
runner.Step("Add resumption data for App ", addResumptionData) | ||
|
||
runner.Title("Test") | ||
runner.Step("Wait until Resumption Data is stored" , common.waitUntilResumptionDataIsStored) | ||
runner.Step("Close mobile connection", common.cleanSessions) | ||
runner.Step("Wait 5 sec before LOW_VOLTAGE", common.wait, {5000}) | ||
runner.Step("Send LOW_VOLTAGE signal", common.sendLowVoltageSignal) | ||
runner.Step("Send WAKE_UP signal", common.sendWakeUpSignal) | ||
runner.Step("Wait 5 sec before registration", common.wait, {5000}) | ||
runner.Step("Re-connect Mobile", common.connectMobile) | ||
runner.Step("Register app2", common.registerApp, { 2 }) | ||
runner.Step("Activate app2", common.activateApp, { 2 }) | ||
runner.Step("Re-register App , check resumption data and HMI level", common.reRegisterApp, { | ||
1, checkAppId, checkResumptionData, checkResumptionHMILevel, "SUCCESS", 10000 | ||
}) | ||
|
||
runner.Title("Postconditions") | ||
runner.Step("Stop SDL", common.postconditions) |
64 changes: 64 additions & 0 deletions
64
..._Low_Voltage_and_Wake_Up_absence_resumption_FULL_hmi_level_in_case_more_30_sec_before.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- In case: | ||
-- 1. Mobile app is in FULL HMILevel | ||
-- 2. App has some persistent data that can be resumed | ||
-- 3. Mobile app is disconnected in 35 sec before "SDL_LOW_VOLTAGE" unix signal from HMI | ||
-- 4. Mobile app registers with the same hashID during 30 sec. after "WAKE_UP" unix signal in the same ignition cycle | ||
-- 5. there is no application currently in FULL | ||
-- SDL does: | ||
-- 1. not resume FULL HMILevel for app | ||
-- 2. resume persistent data | ||
--------------------------------------------------------------------------------------------------- | ||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/LowVoltage/common') | ||
local runner = require('user_modules/script_runner') | ||
|
||
--[[ Test Configuration ]] | ||
runner.testSettings.isSelfIncluded = false | ||
|
||
--[[ Local Functions ]] | ||
local function addResumptionData() | ||
common.rpcSend.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionData() | ||
common.rpcCheck.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionHMILevel() | ||
common.getMobileSession(1):ExpectNotification("OnHMIStatus", | ||
{ hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) | ||
common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") | ||
:Times(0) | ||
end | ||
|
||
local function checkAppId(pAppId, pData) | ||
if pData.params.application.appID ~= common.getHMIAppId(pAppId) then | ||
return false, "App " .. pAppId .. " is registered with not the same HMI App Id" | ||
end | ||
return true | ||
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("PolicyTableUpdate", common.policyTableUpdate) | ||
runner.Step("Activate app", common.activateApp) | ||
runner.Step("Add resumption data for App ", addResumptionData) | ||
|
||
runner.Title("Test") | ||
runner.Step("Wait until Resumption Data is stored" , common.waitUntilResumptionDataIsStored) | ||
runner.Step("Close mobile connection", common.cleanSessions) | ||
runner.Step("Wait 35 sec before LOW_VOLTAGE", common.wait, {35000}) | ||
runner.Step("Send LOW_VOLTAGE signal", common.sendLowVoltageSignal) | ||
runner.Step("Send WAKE_UP signal", common.sendWakeUpSignal) | ||
runner.Step("Wait 5 sec before registration", common.wait, {5000}) | ||
runner.Step("Re-connect Mobile", common.connectMobile) | ||
runner.Step("Re-register App, check resumption data and HMI level", common.reRegisterApp, { | ||
1, checkAppId, checkResumptionData, checkResumptionHMILevel, "SUCCESS", 5000 | ||
}) | ||
|
||
runner.Title("Postconditions") | ||
runner.Step("Stop SDL", common.postconditions) |
65 changes: 65 additions & 0 deletions
65
...9_Low_Voltage_and_Wake_Up_absence_resumption_FULL_hmi_level_in_case_more_30_sec_after.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
--------------------------------------------------------------------------------------------------- | ||
-- In case: | ||
-- 1. Mobile app is in FULL HMILevel | ||
-- 2. App has some persistent data that can be resumed | ||
-- 3. Mobile app is disconnected during the time frame of 30 sec (inclusive) before "SDL_LOW_VOLTAGE" unix signal from HMI | ||
-- 4. Mobile app registers with the same hashID in 35 sec after "WAKE_UP" unix signal in the same ignition cycle | ||
-- 5. there is no application currently in FULL | ||
-- SDL does: | ||
-- 1. not resume FULL HMILevel for app | ||
-- 2. resume persistent data | ||
--------------------------------------------------------------------------------------------------- | ||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/LowVoltage/common') | ||
local runner = require('user_modules/script_runner') | ||
|
||
--[[ Test Configuration ]] | ||
runner.testSettings.isSelfIncluded = false | ||
|
||
--[[ Local Functions ]] | ||
local function addResumptionData() | ||
common.rpcSend.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionData() | ||
common.rpcCheck.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionHMILevel() | ||
common.getMobileSession(1):ExpectNotification("OnHMIStatus", | ||
{ hmiLevel = "NONE", audioStreamingState = "NOT_AUDIBLE", systemContext = "MAIN" }) | ||
common.getHMIConnection():ExpectRequest("BasicCommunication.ActivateApp") | ||
:Times(0) | ||
end | ||
|
||
local function checkAppId(pAppId, pData) | ||
if pData.params.application.appID ~= common.getHMIAppId(pAppId) then | ||
return false, "App " .. pAppId .. " is registered with not the same HMI App Id" | ||
end | ||
return true | ||
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("PolicyTableUpdate", common.policyTableUpdate) | ||
runner.Step("Activate app", common.activateApp) | ||
runner.Step("Add resumption data for App ", addResumptionData) | ||
|
||
runner.Title("Test") | ||
runner.Step("Wait until Resumption Data is stored" , common.waitUntilResumptionDataIsStored) | ||
runner.Step("Close mobile connection", common.cleanSessions) | ||
runner.Step("Wait 5 sec before LOW_VOLTAGE", common.wait, {5000}) | ||
runner.Step("Send LOW_VOLTAGE signal", common.sendLowVoltageSignal) | ||
runner.Step("Send WAKE_UP signal", common.sendWakeUpSignal) | ||
runner.Step("Wait 35 sec before registration", common.wait, {35000}) | ||
runner.Step("Re-connect Mobile", common.connectMobile) | ||
runner.Step("Re-register App, check resumption data and HMI level", common.reRegisterApp, { | ||
1, checkAppId, checkResumptionData, checkResumptionHMILevel, "SUCCESS", 5000 | ||
}) | ||
|
||
runner.Title("Postconditions") | ||
runner.Step("Stop SDL", common.postconditions) |
61 changes: 61 additions & 0 deletions
61
.../010_Low_Voltage_and_Wake_Up_resumption_FULL_hmi_level_in_case_existed_app_in_limited.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- In case: | ||
-- 1. Mobile app is in FULL HMILevel | ||
-- 2. App has some persistent data that can be resumed | ||
-- 3. Mobile app is disconnected during the time frame of 30 sec (inclusive) before "SDL_LOW_VOLTAGE" unix signal from HMI | ||
-- 4. Mobile app registers with the same hashID during 30 sec. after "WAKE_UP" unix signal in the same ignition cycle | ||
-- 5. there is no application currently in FULL | ||
-- 6. there is application currently in LIMITED | ||
-- SDL does: | ||
-- 1. resume FULL HMILevel for app | ||
-- 2. resume persistent data | ||
--------------------------------------------------------------------------------------------------- | ||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/LowVoltage/common') | ||
local runner = require('user_modules/script_runner') | ||
|
||
--[[ Test Configuration ]] | ||
runner.testSettings.isSelfIncluded = false | ||
|
||
--[[ Local Functions ]] | ||
local function addResumptionData() | ||
common.rpcSend.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionData() | ||
common.rpcCheck.AddCommand(1, 1) | ||
end | ||
|
||
local function checkAppId(pAppId, pData) | ||
if pData.params.application.appID ~= common.getHMIAppId(pAppId) then | ||
return false, "App " .. pAppId .. " is registered with not the same HMI App Id" | ||
end | ||
return true | ||
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("PolicyTableUpdate", common.policyTableUpdate) | ||
runner.Step("Activate app", common.activateApp) | ||
runner.Step("Add resumption data for App ", addResumptionData) | ||
|
||
runner.Title("Test") | ||
runner.Step("Wait until Resumption Data is stored" , common.waitUntilResumptionDataIsStored) | ||
runner.Step("Close mobile connection", common.cleanSessions) | ||
runner.Step("Wait 5 sec before LOW_VOLTAGE", common.wait, {5000}) | ||
runner.Step("Send LOW_VOLTAGE signal", common.sendLowVoltageSignal) | ||
runner.Step("Send WAKE_UP signal", common.sendWakeUpSignal) | ||
runner.Step("Wait 5 sec before registration", common.wait, {5000}) | ||
runner.Step("Re-connect Mobile", common.connectMobile) | ||
runner.Step("Register app2", common.registerApp, { 2 }) | ||
runner.Step("Activate app2", common.activateApp, { 2 }) | ||
runner.Step("Deactivate app2 to limited", common.deactivateAppToLimited, { 2 }) | ||
runner.Step("Re-register App, check resumption data and HMI level", common.reRegisterApp, { | ||
1, checkAppId, checkResumptionData, common.checkResumptionHMILevel, "SUCCESS", 1000 | ||
}) | ||
|
||
runner.Title("Postconditions") | ||
runner.Step("Stop SDL", common.postconditions) |
66 changes: 66 additions & 0 deletions
66
test_scripts/LowVoltage/011_Low_Voltage_and_Wake_Up_resumption_LIMITED_hmi_level.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- In case: | ||
-- 1. Mobile app is in LIMITED HMILevel | ||
-- 2. App has some persistent data that can be resumed | ||
-- 3. Mobile app is disconnected during the time frame of 30 sec (inclusive) before "SDL_LOW_VOLTAGE" unix signal from HMI | ||
-- 4. Mobile app registers with the same hashID during 30 sec. after "WAKE_UP" unix signal in the same ignition cycle | ||
-- 5. there is no application currently in FULL/LIMITED | ||
-- SDL does: | ||
-- 1. resume LIMITED HMILevel for app | ||
-- 2. resume persistent data | ||
--------------------------------------------------------------------------------------------------- | ||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/LowVoltage/common') | ||
local runner = require('user_modules/script_runner') | ||
|
||
--[[ Test Configuration ]] | ||
runner.testSettings.isSelfIncluded = false | ||
config.application1.registerAppInterfaceParams.isMediaApplication = true | ||
|
||
--[[ Local Functions ]] | ||
local function addResumptionData() | ||
common.rpcSend.AddCommand(1, 1) | ||
end | ||
|
||
local function checkResumptionData() | ||
common.rpcCheck.AddCommand(1, 1) | ||
end | ||
|
||
local function checkAppId(pAppId, pData) | ||
if pData.params.application.appID ~= common.getHMIAppId(pAppId) then | ||
return false, "App " .. pAppId .. " is registered with not the same HMI App Id" | ||
end | ||
return true | ||
end | ||
|
||
local function checkResumptionHMILevel() | ||
common.getMobileSession(1):ExpectNotification("OnHMIStatus", | ||
{ hmiLevel = "NONE", systemContext = "MAIN", audioStreamingState = "NOT_AUDIBLE" }, | ||
{ hmiLevel = "LIMITED", systemContext = "MAIN", audioStreamingState = "AUDIBLE" }) | ||
:Times(2) | ||
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("PolicyTableUpdate", common.policyTableUpdate) | ||
runner.Step("Activate app", common.activateApp) | ||
runner.Step("Deactivate app to limited", common.deactivateAppToLimited, { 1 }) | ||
runner.Step("Add resumption data for App ", addResumptionData) | ||
|
||
runner.Title("Test") | ||
runner.Step("Wait until Resumption Data is stored" , common.waitUntilResumptionDataIsStored) | ||
runner.Step("Close mobile connection", common.cleanSessions) | ||
runner.Step("Wait 10 sec before LOW_VOLTAGE", common.wait, {10000}) | ||
runner.Step("Send LOW_VOLTAGE signal", common.sendLowVoltageSignal) | ||
runner.Step("Send WAKE_UP signal", common.sendWakeUpSignal) | ||
runner.Step("Wait 10 sec before registration", common.wait, {10000}) | ||
runner.Step("Re-connect Mobile", common.connectMobile) | ||
runner.Step("Re-register App, check resumption data and HMI level", common.reRegisterApp, { | ||
1, checkAppId, checkResumptionData, checkResumptionHMILevel, "SUCCESS", 1000 | ||
}) | ||
|
||
runner.Title("Postconditions") | ||
runner.Step("Stop SDL", common.postconditions) |
Oops, something went wrong.