Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDL-0273] WebEngine Projection mode #39

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
7516dc6
Add simple registration an application with HMI WEB_VIEW type
Apr 2, 2020
78eeb98
Check that SDL doesn't close the connection with WebEngine projection…
Apr 21, 2020
bf7f302
Check that SDL forwards OnSystemCapabilityUpdated notification to the…
Apr 23, 2020
4dd2c07
Add webengine_projection_mode test set
Apr 27, 2020
14e4913
Add script for OnExitApplication(RESOURCE_CONSTRAINT)
mvorobio Apr 10, 2020
1acf14a
Updated scripts for success WEB_VIEW registration
Apr 29, 2020
1bad9fd
Add new scripts for reject registration to test_set
May 7, 2020
e9a96c9
Add 008_Registration_appHMIType_is_array script
Jun 24, 2020
d98c8e9
Add new scripts
YarikMamykin Jun 26, 2020
154d63d
Fix response code for application unregistration
YarikMamykin Jun 26, 2020
a5651cc
Rework 006 and 007 scripts
YarikMamykin Jul 1, 2020
92447f0
Forwarding of OnSystemCapabilityUpdated notification to WEB_VIEW app
Jun 25, 2020
6452869
Move testSettings.restrictions.sdlBuildOptions to the common and chan…
Jun 26, 2020
62ab9d1
Processing of Show rpc
VjKlepikov Jul 2, 2020
32c2290
add test script to check PTU
VjKlepikov Jul 2, 2020
554bdb5
Widgets processing for WEB_VIEW template
VjKlepikov Jul 3, 2020
1582552
Add test scripts for OnExitApplication notification with reason RESOU…
aderiabin Jul 1, 2020
afd91a0
Add HMI status test scripts for WEB_VIEW applications
aderiabin Jul 1, 2020
b6d6a8c
Rename of webengine projection scripts
aderiabin Jul 7, 2020
f63aea0
Remove redundant whitespaces in webengine projection scripts
aderiabin Jul 7, 2020
fec6c82
Fix description issues in webengine projection scripts
aderiabin Jul 7, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that it is possible to register App with HMI type WEB_VIEW.
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL

-- Sequence:
-- 1. Application register with WEB_VIEW appHMIType
-- a. SDL successfully registers application (resultCode SUCCESS, success:"true")
---------------------------------------------------------------------------------------------------
-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId = 1
local appHMIType = "WEB_VIEW"

--[[ General configuration parameters ]]
config.application1.registerAppInterfaceParams.appHMIType = { appHMIType }
config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 7
config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Add AppHMIType to preloaded policy table", common.updatePreloadedPT,
{ appSessionId, { appHMIType }})
common.Step("Start SDL, HMI, connect Mobile", common.start)

common.Title("Test")
common.Step("Register App without PTU", common.registerAppWOPTU, { appSessionId })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that it is possible to register App with array of HMI types [WEB_VIEW, Media].
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL
-- 3. WEB_VIEW and Media appHMITypes are allowed by policy for application (App)

-- Sequence:
-- 1. Application register with WEB_VIEW and MEDIA appHMITypes
-- a. SDL successfully registers application (resultCode SUCCESS, success:"true")
---------------------------------------------------------------------------------------------------
-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId = 1
local appHMIType = { "WEB_VIEW", "MEDIA" }

--[[ General configuration parameters ]]
config.application1.registerAppInterfaceParams.appHMIType = appHMIType
config.application1.registerAppInterfaceParams.syncMsgVersion.majorVersion = 7
config.application1.registerAppInterfaceParams.syncMsgVersion.minorVersion = 0

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Add AppHMIType to preloaded policy table", common.updatePreloadedPT,
{ appSessionId, appHMIType })
common.Step("Start SDL, HMI, connect Mobile", common.start)

common.Title("Test")
common.Step("Register App without PTU", common.registerAppWOPTU, { appSessionId })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that App will be rejected with HMI type WEB_VIEW
-- when WEB_VIEW AppHmiType is absent in application policies
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL

-- Sequence:
-- 1. Application tries to register with WEB_VIEW appHMIType
-- a. SDL rejects registration of application (resultCode: "DISALLOWED", success: false)
---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.defaultMobileAdapterType = "WS"

-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId = 1
local appHMITypeWebView = { "WEB_VIEW" }
local appHMITypeMedia = { "MEDIA" }
local appsRAIParams = {
appHMIType = appHMITypeWebView,
syncMsgVersion = {
majorVersion = 7,
minorVersion = 0
}
}

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Setup RegisterAppInterface params", common.setupRAIParams, { appSessionId, appsRAIParams })
common.Step("Add AppHMIType to preloaded policy table", common.updatePreloadedPT,
{ appSessionId, appHMITypeMedia })
common.Step("Start SDL, HMI, connect Mobile", common.start)

common.Title("Test")
common.Step("Register App, PT does not contain WEB_VIEW AppHMIType", common.disallowedRegisterApp, { appSessionId })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that App will be rejected with HMI type WEB_VIEW
-- when mobile application has no policy record in local policy table
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL

-- Sequence:
-- 1. Application1 tries to register with WEB_VIEW appHMIType
-- a. SDL rejects registration of application (resultCode: "DISALLOWED", success: false)
-- 2. Application2 tries to register with NAVIGATION appHMIType
-- a. SDL successfully registers application (resultCode: "SUCCESS", success: true)
-- b. SDL creates policy table snapshot and start policy table update
-- 3. Check absence of permissions for rejected application in LPT
-- a. Permission for rejected Application1 is absent in LPT
---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.defaultMobileAdapterType = "WS"

-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId1 = 1
local appSessionId2 = 2
local webEngineDevice = 1
local appHMITypeWebView = { "WEB_VIEW" }
local appHMITypeNavigation = { "NAVIGATION" }
local app1RAIParams = {
appHMIType = appHMITypeWebView,
syncMsgVersion = {
majorVersion = 7,
minorVersion = 0
}
}
local app2RAIParams = {
appHMIType = appHMITypeNavigation,
syncMsgVersion = {
majorVersion = 7,
minorVersion = 0
}
}

local function checkAbsenceOfPermissions()
local ptsTable = common.ptsTable()
if not ptsTable then
common.failTestStep("Policy table snapshot was not created")
elseif ptsTable.policy_table.app_policies[common.getParams(appSessionId1).fullAppID] ~= nil then
common.failTestStep("Permission for rejected application is present in LPT")
end
end

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Setup RegisterAppInterface params for App1", common.setupRAIParams, { appSessionId1, app1RAIParams })
common.Step("Setup RegisterAppInterface params for App2", common.setupRAIParams, { appSessionId2, app2RAIParams })
common.Step("Start SDL, HMI", common.start)

common.Title("Test")
common.Step("Register App with WEB_VIEW appHmiType", common.disallowedRegisterApp, { appSessionId1 })
common.Step("Connect WebEngine device", common.connectWebEngine, { webEngineDevice, "WS" })
common.Step("Register App with NAVIGATION appHmiType", common.registerApp, { appSessionId2 })

common.Step("Check absence of permissions for rejected application in LPT", checkAbsenceOfPermissions)

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that App will be disallowed to register with HMI type MEDIA
-- when application does not have permission to use WEB_VIEW hmi type in policy table
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL
-- 3. PT contains record for App1 with all properties for webengine app
-- and appHMIType = MEDIA.

-- Sequence:
-- 1. Application1 tries to register with WEB_VIEW appHMIType
-- a. SDL rejects registration of application (resultCode: "DISALLOWED", success: false)
---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.defaultMobileAdapterType = "WS"

-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId = 1
local appHMITypeWebView = { "WEB_VIEW" }
local appHMITypeMedia = { "MEDIA" }
local appsRAIParams = {
appHMIType = appHMITypeWebView,
syncMsgVersion = {
majorVersion = 7,
minorVersion = 0
}
}

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Setup RegisterAppInterface params", common.setupRAIParams, { appSessionId, appsRAIParams })
common.Step("Add AppHMIType to preloaded policy table", common.updatePreloadedPT,
{ appSessionId, appHMITypeMedia })
common.Step("Start SDL, HMI, connect Mobile", common.start)

common.Title("Test")
common.Step("Register App, PT does not contain WEB_VIEW AppHMIType", common.disallowedRegisterApp, { appSessionId })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that App will be disallowed to register with HMI type WEB_VIEW
-- when application has revoked permissions in policy table
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL
-- 3. PT contains record for App1 with null permissions

-- Sequence:
-- 1. Application1 tries to register with WEB_VIEW appHMIType
-- a. SDL rejects registration of application (resultCode: "DISALLOWED", success: false)
---------------------------------------------------------------------------------------------------
--[[ General configuration parameters ]]
config.defaultMobileAdapterType = "WS"

-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId = 1
local appHMIType = { "WEB_VIEW" }
local appsRAIParams = {
appHMIType = appHMIType,
syncMsgVersion = {
majorVersion = 7,
minorVersion = 0
}
}

local function updatePreloadedPT(pAppId)
local preloadedTable = common.getPreloadedPT()
local appId = config["application" .. pAppId].registerAppInterfaceParams.fullAppID
preloadedTable.policy_table.app_policies[appId] = common.null
preloadedTable.policy_table.functional_groupings["DataConsent-2"].rpcs = common.null
common.setPreloadedPT(preloadedTable)
end

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Setup RegisterAppInterface params", common.setupRAIParams, { appSessionId, appsRAIParams })
common.Step("Add AppHMIType to preloaded policy table", updatePreloadedPT,
{ appSessionId })
common.Step("Start SDL, HMI, connect Mobile", common.start)

common.Title("Test")
common.Step("Register App, PT does not contain WEB_VIEW AppHMIType", common.disallowedRegisterApp, { appSessionId })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---------------------------------------------------------------------------------------------------
-- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0273-webengine-projection-mode.md
--
-- Description:
-- Check that application will be disallowed to register with WEB_VIEW HMI type
-- if the application has no record in policies. WEB_VIEW is one of HMI types in AppHmiType parameter of RAI
--
-- Precondition:
-- 1. SDL and HMI are started
-- 2. WebEngine device is connected to SDL
-- 3. PT contains record for App1 and no record for App2
--
-- Sequence:
-- 1. Application1 tries to register with WEB_VIEW appHMIType
-- a. SDL rejects registration of application (resultCode: "DISALLOWED", success: false)
---------------------------------------------------------------------------------------------------

--[[ General configuration parameters ]]
config.defaultMobileAdapterType = "WS"

-- [[ Required Shared Libraries ]]
local common = require('test_scripts/WebEngine/commonWebEngine')

--[[ Local Variables ]]
local appSessionId = 1
local appNotInPTSessionId = 2
local appHMIType = { "MEDIA", "WEB_VIEW" }
local appsRAIParams = {
appHMIType = appHMIType,
syncMsgVersion = {
majorVersion = 7,
minorVersion = 0
}
}

--[[ Scenario ]]
common.Title("Preconditions")
common.Step("Clean environment", common.preconditions)
common.Step("Setup RegisterAppInterface params for App1", common.setupRAIParams, { appSessionId, appsRAIParams })
common.Step("Setup RegisterAppInterface params for App2", common.setupRAIParams, { appNotInPTSessionId, appsRAIParams })
common.Step("Prepare preloaded policy table", common.updatePreloadedPT,
{ appSessionId, appHMIType })
common.Step("Start SDL, HMI, connect Mobile", common.start)

common.Title("Test")
common.Step("Registration of App2, no record in policy", common.disallowedRegisterApp, { appNotInPTSessionId })

common.Title("Postconditions")
common.Step("Stop SDL", common.postconditions)
Loading