Skip to content

Commit 852f4a2

Browse files
committed
Address comments
1 parent b252583 commit 852f4a2

21 files changed

Lines changed: 122 additions & 80 deletions

test_scripts/API/VehicleData/GetVehicleData/001_GetVD_Success_flow.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
-- 1) App sends valid GetVehicleData(<vd_param>=true) request to SDL
1111
-- SDL does:
1212
-- - a) transfer this request to HMI
13-
-- 2) HMI sends VehicleInfo.GetVehicleData response with <vd_param> data to SDL
13+
-- 2) HMI sends VI.GetVehicleData response with <vd_param> data to SDL
1414
-- SDL does:
1515
-- - a) send GetVehicleData response with (success = true, resultCode = "SUCCESS",
1616
-- <vd_param> = <data received from HMI>) to App

test_scripts/API/VehicleData/GetVehicleData/003_GetVD_disallowed_after_PTU.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
-- 1) App sends valid GetVehicleData(<vd_param>=true) request to SDL
1212
-- SDL does:
1313
-- - a) transfer this request to HMI
14-
-- 2) HMI sends VehicleInfo.GetVehicleData response with <vd_param> data to SDL
14+
-- 2) HMI sends VI.GetVehicleData response with <vd_param> data to SDL
1515
-- SDL does:
1616
-- - a) send GetVehicleData response with (success = true, resultCode = "SUCCESS",
1717
-- <vd_param> = <data received from HMI>) to App

test_scripts/API/VehicleData/GetVehicleData/006_GetVD_mandatory_parameters.lua

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---------------------------------------------------------------------------------------------------
22
-- Description: Check that SDL processes GetVehicleData RPC with <vd_param> parameter
3-
-- with only mandatory sub-parameters
3+
-- with only mandatory sub-parameters in HMI response
4+
-- or with missing at least one mandatory sub-parameter
45
--
56
-- Preconditions:
67
-- 1) SDL and HMI are started
@@ -11,11 +12,19 @@
1112
-- 1) App sends valid GetVehicleData(<vd_param>=true) request to SDL
1213
-- SDL does:
1314
-- - a) transfer this request to HMI
14-
-- 2) HMI sends VehicleInfo.GetVehicleData response with <vd_param> data to SDL
15+
-- 2) HMI sends VI.GetVehicleData response with <vd_param> data to SDL
1516
-- with only mandatory sub-parameters
1617
-- SDL does:
1718
-- - a) send GetVehicleData response with (success = true, resultCode = "SUCCESS",
1819
-- <vd_param> = <data received from HMI>) to App
20+
-- 3) App sends valid GetVehicleData(<vd_param>=true) request to SDL
21+
-- SDL does:
22+
-- - a) transfer this request to HMI
23+
-- 4) HMI sends VI.GetVehicleData response with <vd_param> data to SDL
24+
-- with missing mandatory sub-parameter
25+
-- SDL does:
26+
-- - a) ignore HMI response
27+
-- - b) send GetVehicleData response with (success = false, resultCode = "GENERIC_ERROR") to App
1928
---------------------------------------------------------------------------------------------------
2029
--[[ Required Shared libraries ]]
2130
local common = require('test_scripts/API/VehicleData/common')

test_scripts/API/VehicleData/GetVehicleData/007_GetVD_app_version_is_greater_than_parameter_version.lua

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,26 @@
55
-- Preconditions:
66
-- 1) SDL and HMI are started
77
-- 2) Vehicle Data RPCs and <vd_param> parameter are allowed by policies
8-
-- 3) <vd_param> parameter has param_version = 5.1.0
9-
-- 4) App is registered with syncMsgVersion = 5.1.1
8+
-- 3) <vd_param> parameter has param_version defined (e.g. 5.1.0)
9+
-- 4) App is registered with specific syncMsgVersion (e.g. 5.1.1)
10+
-- which is greater than version of <vd_param> parameter
1011
--
1112
-- In case:
12-
-- 1) App send any of Vehicle Data RPC with <vd_param> parameter
13+
-- 1) App sends any of Vehicle Data RPC with <vd_param> parameter
1314
-- - a) GetVehicleData, SubscribeVehicleData, UnsubscribeVehicleData
1415
-- SDL does:
15-
-- - a) processes this RPC successfully
16+
-- - a) process this RPC successfully
1617
-- 2) App is subscribed to <vd_param> parameter
1718
-- 3) HMI sends OnVehicleData notification with <vd_param> parameter
1819
-- SDL does:
19-
-- - a) processes this Notification successfully
20+
-- - a) process this Notification successfully
2021
---------------------------------------------------------------------------------------------------
2122
--[[ Required Shared libraries ]]
2223
local common = require('test_scripts/API/VehicleData/common')
2324

25+
--[[ Local Variables ]]
26+
local isExpected = 1
27+
2428
--[[ Scenario ]]
2529
for param, version in common.spairs(common.versioningVD) do
2630
common.Title("VD parameter: " .. param)
@@ -33,7 +37,7 @@ for param, version in common.spairs(common.versioningVD) do
3337
common.Title("Test")
3438
common.Step("RPC " .. common.rpc.get, common.getVehicleData, { param })
3539
common.Step("RPC " .. common.rpc.sub, common.processSubscriptionRPC, { common.rpc.sub, param })
36-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 1 })
40+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isExpected })
3741
common.Step("RPC " .. common.rpc.unsub, common.processSubscriptionRPC, { common.rpc.unsub, param })
3842

3943
common.Title("Postconditions")

test_scripts/API/VehicleData/GetVehicleData/008_GetVD_app_version_is_less_than_parameter_version.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
-- Preconditions:
66
-- 1) SDL and HMI are started
77
-- 2) Vehicle Data RPCs and <vd_param> parameter are allowed by policies
8-
-- 3) <vd_param> parameter has param_version = 5.1.0
9-
-- 4) App is registered with syncMsgVersion = 5.0.9
8+
-- 3) <vd_param> parameter has param_version defined (e.g. 5.1.0)
9+
-- 4) App is registered with specific syncMsgVersion (e.g. 5.0.9)
10+
-- which is lower than version of <vd_param> parameter
1011
--
1112
-- In case:
12-
-- 1) App send any of Vehicle Data RPC with <vd_param> parameter
13+
-- 1) App sends any of Vehicle Data RPC with <vd_param> parameter
1314
-- - a) GetVehicleData, SubscribeVehicleData, UnsubscribeVehicleData
1415
-- SDL does:
1516
-- - a) send GetVehicleData response with (success = false, resultCode = "INVALID_DATA") to App
@@ -23,6 +24,7 @@ local common = require('test_scripts/API/VehicleData/common')
2324

2425
--[[ Local Variables ]]
2526
local result = "INVALID_DATA"
27+
local isNotExpected = 0
2628

2729
--[[ Scenario ]]
2830
for param, version in common.spairs(common.versioningVD) do
@@ -36,7 +38,7 @@ for param, version in common.spairs(common.versioningVD) do
3638
common.Title("Test")
3739
common.Step("RPC " .. common.rpc.get, common.processRPCFailure, { common.rpc.get, param, result })
3840
common.Step("RPC " .. common.rpc.sub, common.processRPCFailure, { common.rpc.sub, param, result })
39-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 0 })
41+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isNotExpected })
4042
common.Step("RPC " .. common.rpc.unsub, common.processRPCFailure, { common.rpc.unsub, param, result })
4143

4244
common.Title("Postconditions")

test_scripts/API/VehicleData/OnVehicleData/001_OnVD_Success.lua

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,15 @@
1111
-- 1) HMI sends valid OnVehicleData notification with <vd_param> parameter data to SDL
1212
-- SDL does:
1313
-- - a) transfer this notification to App
14+
-- Exception: Notification for unsubscribable VD parameter is not transfered
1415
---------------------------------------------------------------------------------------------------
1516
--[[ Required Shared libraries ]]
1617
local common = require('test_scripts/API/VehicleData/common')
1718

19+
--[[ Local Variables ]]
20+
local isExpected = 1
21+
local isNotExpected = 0
22+
1823
--[[ Scenario ]]
1924
common.Title("Preconditions")
2025
common.Step("Clean environment and update preloaded_pt file", common.preconditions)
@@ -25,11 +30,11 @@ common.Title("Test")
2530
for param in common.spairs(common.getVDParams(true)) do
2631
common.Title("VD parameter: " .. param)
2732
common.Step("RPC " .. common.rpc.sub, common.processSubscriptionRPC, { common.rpc.sub, param })
28-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 1 })
33+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isExpected })
2934
end
3035
for param in common.spairs(common.getVDParams(false)) do
3136
common.Title("VD parameter: " .. param)
32-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 0 })
37+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isNotExpected })
3338
end
3439

3540
common.Title("Postconditions")

test_scripts/API/VehicleData/OnVehicleData/002_OnVD_disallowed.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
--[[ Required Shared libraries ]]
1717
local common = require('test_scripts/API/VehicleData/common')
1818

19+
--[[ Local Variables ]]
20+
local isNotExpected = 0
21+
1922
--[[ Local Functions ]]
2023
local function getVDGroup(pDisallowedParam)
2124
local all_params = {}
@@ -48,7 +51,7 @@ for param in common.spairs(common.getVDParams(true)) do
4851

4952
common.Title("Test")
5053
common.Step("RPC " .. common.rpc.sub .. " SUCCESS", common.processSubscriptionRPC, { common.rpc.sub, param })
51-
common.Step("RPC " .. common.rpc.on .. " ignored", common.sendOnVehicleData, { param, 0 })
54+
common.Step("RPC " .. common.rpc.on .. " ignored", common.sendOnVehicleData, { param, isNotExpected })
5255

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

test_scripts/API/VehicleData/OnVehicleData/003_OnVD_disallowed_after_PTU.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@
1919
--[[ Required Shared libraries ]]
2020
local common = require('test_scripts/API/VehicleData/common')
2121

22+
--[[ Local Variables ]]
23+
local isExpected = 1
24+
local isNotExpected = 0
25+
2226
--[[ Local Functions ]]
2327
local function getVDGroup(pDisallowedParam)
2428
local all_params = {}
@@ -57,11 +61,11 @@ for param in common.spairs(common.getVDParams(true)) do
5761
common.Step("Start SDL, HMI, connect Mobile, start Session", common.start)
5862
common.Step("Register App", common.registerApp)
5963
common.Step("RPC " .. common.rpc.sub .. " SUCCESS", common.processSubscriptionRPC, { common.rpc.sub, param })
60-
common.Step("RPC " .. common.rpc.on .. " transferred", common.sendOnVehicleData, { param, 1 })
64+
common.Step("RPC " .. common.rpc.on .. " transferred", common.sendOnVehicleData, { param, isExpected })
6165

6266
common.Title("Test")
6367
common.Step("PTU with disabling permissions for VD parameter", policyTableUpdate, { param })
64-
common.Step("RPC " .. common.rpc.on .. " ignored", common.sendOnVehicleData, { param, 0 })
68+
common.Step("RPC " .. common.rpc.on .. " ignored", common.sendOnVehicleData, { param, isNotExpected })
6569

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

test_scripts/API/VehicleData/OnVehicleData/004_OnVD_with_invalid_data.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
-- 1) HMI sends OnVehicleData notification with invalid data for <vd_param> parameter to SDL
1313
-- SDL does:
1414
-- - a) ignore this notification and not transfer to App
15+
-- Addition: Notification for unsubscribable VD parameter is not transfered as well
1516
---------------------------------------------------------------------------------------------------
1617
--[[ Required Shared libraries ]]
1718
local common = require('test_scripts/API/VehicleData/common')
1819

20+
--[[ Local Variables ]]
21+
local isNotExpected = 0
22+
1923
--[[ Scenario ]]
2024
common.Title("Preconditions")
2125
common.Step("Clean environment and update preloaded_pt file", common.preconditions)
@@ -26,11 +30,13 @@ common.Title("Test")
2630
for param, value in common.spairs(common.getVDParams(true)) do
2731
common.Title("VD parameter: " .. param)
2832
common.Step("RPC " .. common.rpc.sub, common.processSubscriptionRPC, { common.rpc.sub, param })
29-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 0, common.getInvalidData(value) })
33+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData,
34+
{ param, isNotExpected, common.getInvalidData(value) })
3035
end
3136
for param, value in common.spairs(common.getVDParams(false)) do
3237
common.Title("VD parameter: " .. param)
33-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 0, common.getInvalidData(value) })
38+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData,
39+
{ param, isNotExpected, common.getInvalidData(value) })
3440
end
3541

3642
common.Title("Postconditions")

test_scripts/API/VehicleData/OnVehicleData/005_OnVD_App_is_not_subscribed.lua

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,15 @@
1717
-- 3) HMI sends valid OnVehicleData notification with <vd_param> parameter data to SDL
1818
-- SDL does:
1919
-- - a) not transfer this notification to App
20+
-- Exception: Notification for unsubscribable VD parameter is not transfered
2021
---------------------------------------------------------------------------------------------------
2122
--[[ Required Shared libraries ]]
2223
local common = require('test_scripts/API/VehicleData/common')
2324

25+
--[[ Local Variables ]]
26+
local isExpected = 1
27+
local isNotExpected = 0
28+
2429
--[[ Scenario ]]
2530
common.Title("Preconditions")
2631
common.Step("Clean environment and update preloaded_pt file", common.preconditions)
@@ -31,13 +36,13 @@ common.Title("Test")
3136
for param in common.spairs(common.getVDParams(true)) do
3237
common.Title("VD parameter: " .. param)
3338
common.Step("RPC " .. common.rpc.sub, common.processSubscriptionRPC, { common.rpc.sub, param })
34-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 1 })
39+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isExpected })
3540
common.Step("RPC " .. common.rpc.unsub, common.processSubscriptionRPC, { common.rpc.unsub, param })
36-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 0 })
41+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isNotExpected })
3742
end
3843
for param in common.spairs(common.getVDParams(false)) do
3944
common.Title("VD parameter: " .. param)
40-
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, 0 })
45+
common.Step("RPC " .. common.rpc.on, common.sendOnVehicleData, { param, isNotExpected })
4146
end
4247

4348
common.Title("Postconditions")

0 commit comments

Comments
 (0)