-
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.
Add test scripts to check defect 3175 (#2450)
Co-authored-by: Dmitriy Boltovskiy <dboltovskyi@luxoft.com>
- Loading branch information
1 parent
dc55b86
commit 01dac98
Showing
10 changed files
with
496 additions
and
0 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
...ripts/Defects/7_0/3175/3175_1_VR.OnLanguageChange_during_PTU_before_receiving_of_URLs.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,39 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange before receiving of URLs during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local requestId = common.getHmiConnection():SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
common.getHmiConnection():ExpectResponse(requestId) | ||
common.checkVrOnLanguageChangeProcessing() | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange before receiving of URLs during PTU processing", performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
41 changes: 41 additions & 0 deletions
41
...cripts/Defects/7_0/3175/3175_2_VR.OnLanguageChange_during_PTU_after_receiving_of_URLs.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,41 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange after receiving of URLs during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local requestId = common.getHmiConnection():SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
common.getHmiConnection():ExpectResponse(requestId) | ||
:Do(function() | ||
common.checkVrOnLanguageChangeProcessing() | ||
end) | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange after receiving of URLs during PTU processing", performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
45 changes: 45 additions & 0 deletions
45
...ts/7_0/3175/3175_3_VR.OnLanguageChange_during_PTU_after_sending_of_BC_OnSystemRequest.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,45 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange after sending of BC.OnSystemRequest during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local hmi = common.getHmiConnection() | ||
local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
hmi:ExpectResponse(requestId) | ||
:Do(function() | ||
hmi:SendNotification("BasicCommunication.OnSystemRequest", | ||
{ requestType = "PROPRIETARY", fileName = common.getPTSFilePath() }) | ||
common.checkVrOnLanguageChangeProcessing() | ||
end) | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange after sending of BC.OnSystemRequest during PTU processing", | ||
performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
48 changes: 48 additions & 0 deletions
48
...cts/7_0/3175/3175_4_VR.OnLanguageChange_during_PTU_after_receiving_of_OnSystemRequest.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,48 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange after receiving of OnSystemRequest by App during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local hmi = common.getHmiConnection() | ||
local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
hmi:ExpectResponse(requestId) | ||
:Do(function() | ||
hmi:SendNotification("BasicCommunication.OnSystemRequest", | ||
{ requestType = "PROPRIETARY", fileName = common.getPTSFilePath() }) | ||
common.getMobileSession():ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) | ||
:Do(function() | ||
common.checkVrOnLanguageChangeProcessing() | ||
end) | ||
end) | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange after receiving of OnSystemRequest by App during PTU processing", | ||
performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
58 changes: 58 additions & 0 deletions
58
...ts/7_0/3175/3175_5_VR.OnLanguageChange_during_PTU_after_receiving_of_BC_SystemRequest.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,58 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange after receiving of BC.SystemRequest by HMI during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local hmi = common.getHmiConnection() | ||
local mobile = common.getMobileSession() | ||
local ptuFileName = os.tmpname() | ||
local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
hmi:ExpectResponse(requestId) | ||
:Do(function() | ||
local ptuTable = common.getPTUFromPTS() | ||
ptuTable.policy_table.app_policies[common.getPolicyAppId()] = common.getAppDataForPTU() | ||
common.tableToJsonFile(ptuTable, ptuFileName) | ||
hmi:SendNotification("BasicCommunication.OnSystemRequest", | ||
{ requestType = "PROPRIETARY", fileName = common.getPTSFilePath() }) | ||
mobile:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) | ||
:Do(function() | ||
hmi:ExpectRequest("BasicCommunication.SystemRequest") | ||
:Do(function() | ||
common.checkVrOnLanguageChangeProcessing() | ||
end) | ||
mobile:SendRPC("SystemRequest", { requestType = "PROPRIETARY" }, ptuFileName) | ||
os.remove(ptuFileName) | ||
end) | ||
end) | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange after receiving of BC.SystemRequest by HMI during PTU processing", | ||
performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
59 changes: 59 additions & 0 deletions
59
...s/7_0/3175/3175_6_VR.OnLanguageChange_during_PTU_after_responding_to_BC_SystemRequest.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,59 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange after responding to BC.SystemRequest by HMI during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local hmi = common.getHmiConnection() | ||
local mobile = common.getMobileSession() | ||
local ptuFileName = os.tmpname() | ||
local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
hmi:ExpectResponse(requestId) | ||
:Do(function() | ||
local ptuTable = common.getPTUFromPTS() | ||
ptuTable.policy_table.app_policies[common.getPolicyAppId()] = common.getAppDataForPTU() | ||
common.tableToJsonFile(ptuTable, ptuFileName) | ||
hmi:SendNotification("BasicCommunication.OnSystemRequest", | ||
{ requestType = "PROPRIETARY", fileName = common.getPTSFilePath() }) | ||
mobile:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) | ||
:Do(function() | ||
hmi:ExpectRequest("BasicCommunication.SystemRequest") | ||
:Do(function(_, d3) | ||
hmi:SendResponse(d3.id, "BasicCommunication.SystemRequest", "SUCCESS", { }) | ||
common.checkVrOnLanguageChangeProcessing() | ||
end) | ||
mobile:SendRPC("SystemRequest", { requestType = "PROPRIETARY" }, ptuFileName) | ||
os.remove(ptuFileName) | ||
end) | ||
end) | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange after responding to BC.SystemRequest by HMI during PTU processing", | ||
performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
60 changes: 60 additions & 0 deletions
60
...175/3175_7_VR.OnLanguageChange_during_PTU_after_sending_of_SDL_OnReceivedPolicyUpdate.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,60 @@ | ||
--------------------------------------------------------------------------------------------------- | ||
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/3175 | ||
-- | ||
-- Description: SDL should successfully process VR.ChangeLanguage during PTU | ||
-- | ||
-- Pre-conditions: | ||
-- 1. Start SDL, HMI, connect Mobile device | ||
-- 2. Register application which is new for SDL to trigger PTU | ||
-- | ||
-- Steps: | ||
-- 1. HMI sends VR.OnLanguageChange after sending of SDL.OnReceivedPolicyUpdate by HMI during PTU processing | ||
-- SDL does: | ||
-- - send OnLanguageChange notification to App | ||
-- - send OnAppInterfaceUnregistered(reason = "LANGUAGE_CHANGE") notification to App | ||
-- - send BasicCommunication.OnAppUnregistered(unexpectedDisconnect = false) to HMI | ||
--------------------------------------------------------------------------------------------------- | ||
|
||
--[[ Required Shared libraries ]] | ||
local common = require('test_scripts/Defects/7_0/3175/common_3175') | ||
|
||
--[[ Local Functions ]] | ||
local function performPTUWithVrOnLanguageChange() | ||
local hmi = common.getHmiConnection() | ||
local mobile = common.getMobileSession() | ||
local ptuFileName = os.tmpname() | ||
local requestId = hmi:SendRequest("SDL.GetPolicyConfigurationData", | ||
{ policyType = "module_config", property = "endpoints" }) | ||
hmi:ExpectResponse(requestId) | ||
:Do(function() | ||
local ptuTable = common.getPTUFromPTS() | ||
ptuTable.policy_table.app_policies[common.getPolicyAppId()] = common.getAppDataForPTU() | ||
common.tableToJsonFile(ptuTable, ptuFileName) | ||
hmi:SendNotification("BasicCommunication.OnSystemRequest", | ||
{ requestType = "PROPRIETARY", fileName = common.getPTSFilePath() }) | ||
mobile:ExpectNotification("OnSystemRequest", { requestType = "PROPRIETARY" }) | ||
:Do(function() | ||
hmi:ExpectRequest("BasicCommunication.SystemRequest") | ||
:Do(function(_, d3) | ||
hmi:SendResponse(d3.id, "BasicCommunication.SystemRequest", "SUCCESS", { }) | ||
hmi:SendNotification("SDL.OnReceivedPolicyUpdate", { policyfile = d3.params.fileName }) | ||
common.checkVrOnLanguageChangeProcessing() | ||
end) | ||
mobile:SendRPC("SystemRequest", { requestType = "PROPRIETARY" }, ptuFileName) | ||
os.remove(ptuFileName) | ||
end) | ||
end) | ||
end | ||
|
||
--[[ 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", common.registerApp) | ||
|
||
common.Title("Test") | ||
common.Step("VR.OnLanguageChange after sending of SDL.OnReceivedPolicyUpdate by HMI during PTU processing", | ||
performPTUWithVrOnLanguageChange) | ||
|
||
common.Title("Postconditions") | ||
common.Step("Stop SDL", common.postconditions) |
Oops, something went wrong.