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

Add scripts for core issue #2468 #2700

Merged
merged 3 commits into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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,50 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Timeout from UI portion of request
--
-- Requirement summary:
-- [AddCommand] GENERIC_ERROR: getting GENERIC_ERROR on UI.AddCommand timeout
--
-- Description:
-- Mobile application sends valid AddCommand request with both "vrCommands" and "menuParams"
-- data and gets "SUCCESS" for VR.AddCommand and no response for UI.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. App is registered and activated on SDL

-- Steps:
-- 1. App requests AddCommand with both vrCommands and menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL transfers the VR part of request with allowed parameters to HMI
-- 4. SDL receives VR part of response from HMI with "SUCCESS" result code
-- 5. SDL does not receive UI part of response

-- Expected:
-- SDL responds with (resultCode: GENERIC_ERROR, success: false) to mobile application
-- SDL sends UI.DeleteCommand and VR.DeleteCommand based on the original request
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandTimeout, { false, true })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Timeout from VR portion of request
--
-- Requirement summary:
-- [AddCommand] GENERIC_ERROR: getting GENERIC_ERROR on VR.AddCommand timeout
--
-- Description:
-- Mobile application sends valid AddCommand request with both "vrCommands" and "menuParams"
-- data and gets "SUCCESS" for UI.AddCommand and no response for VR.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. appID is registered and activated on SDL

-- Steps:
-- 1. appID requests AddCommand with both vrCommands and menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL transfers the VR part of request with allowed parameters to HMI
-- 4. SDL receives UI part of response from HMI with "SUCCESS" result code
-- 5. SDL does not receive VR part of response

-- Expected:
-- SDL responds with (resultCode: GENERIC_ERROR, success: false) to mobile application
-- SDL sends UI.DeleteCommand and VR.DeleteCommand based on the original request
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandTimeout, { true, false })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
49 changes: 49 additions & 0 deletions test_scripts/Defects/8_2/2468/2468_3_AddCommand_Both_Timeout.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Timeout from UI and VR portion of request
--
-- Requirement summary:
-- [AddCommand] GENERIC_ERROR: getting GENERIC_ERROR on VR and UI.AddCommand timeout
--
-- Description:
-- Mobile application sends valid AddCommand request with both "vrCommands" and "menuParams"
-- data and gets no response for UI.AddCommand and VR.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. App is registered and activated on SDL

-- Steps:
-- 1. App requests AddCommand with both vrCommands and menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL transfers the VR part of request with allowed parameters to HMI
-- 4. SDL does not receive UI or VR part of response

-- Expected:
-- SDL responds with (resultCode: GENERIC_ERROR, success: false) to mobile application
-- SDL sends UI.DeleteCommand and VR.DeleteCommand based on the original request
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandTimeout, { false, false })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Failure from UI portion of request
--
-- Requirement summary:
-- [AddCommand] REJECTED: Getting REJECTED on UI.AddCommand
--
-- Description:
-- Mobile application sends valid AddCommand request with both "vrCommands" and "menuParams"
-- data and gets "SUCCESS" for VR.AddCommand and "REJECTED" for UI.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. App is registered and activated on SDL

-- Steps:
-- 1. App requests AddCommand with both vrCommands and menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL transfers the VR part of request with allowed parameters to HMI
-- 4. SDL receives VR part of response from HMI with "SUCCESS" result code
-- 5. SDL receives UI part of response from HMI with "REJECTED" result code

-- Expected:
-- SDL responds with (resultCode: REJECTED, success: false) to mobile application
-- SDL sends UI.DeleteCommand based on the original request
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local uiResponseCode = "REJECTED"

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandFailure, { uiResponseCode, "SUCCESS" })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Failure from VR portion of request
--
-- Requirement summary:
-- [AddCommand] REJECTED: Getting REJECTED on VR.AddCommand
--
-- Description:
-- Mobile application sends valid AddCommand request with both "vrCommands" and "menuParams"
-- data and gets "SUCCESS" for UI.AddCommand and "REJECTED" for VR.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. App is registered and activated on SDL

-- Steps:
-- 1. App requests AddCommand with both vrCommands and menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL transfers the VR part of request with allowed parameters to HMI
-- 4. SDL receives UI part of response from HMI with "SUCCESS" result code
-- 5. SDL receives VR part of response from HMI with "REJECTED" result code

-- Expected:
-- SDL responds with (resultCode: REJECTED, success: false) to mobile application
-- SDL sends UI.DeleteCommand based on the original request
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local vrResponseCode = "REJECTED"

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandFailure, { "SUCCESS", vrResponseCode })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Timeout from UI portion of request
--
-- Requirement summary:
-- [AddCommand] GENERIC_ERROR: getting GENERIC_ERROR on UI.AddCommand timeout
--
-- Description:
-- Mobile application sends valid AddCommand request with "menuParams"
-- data and gets no response for UI.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. App is registered and activated on SDL

-- Steps:
-- 1. App requests AddCommand with menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL does not receive UI part of response

-- Expected:
-- SDL responds with (resultCode: GENERIC_ERROR, success: false) to mobile application
-- SDL sends UI.DeleteCommand based on the original request
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandTimeout, { false, nil })

runner.Title("Postconditions")
runner.Step("Stop SDL", common.postconditions)
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---------------------------------------------------------------------------------------------------
-- Issue: https://github.com/smartdevicelink/sdl_core/issues/2468
---------------------------------------------------------------------------------------------------
-- Use case: AddCommand
-- Item: Failure from UI portion of request
--
-- Requirement summary:
-- [AddCommand] REJECTED: Getting REJECTED on UI.AddCommand
--
-- Description:
-- Mobile application sends valid AddCommand request with "menuParams"
-- data and gets "REJECTED" for UI.AddCommand from HMI

-- Pre-conditions:
-- a. HMI and SDL are started
-- b. App is registered and activated on SDL

-- Steps:
-- 1. App requests AddCommand with menuParams
-- 2. SDL transfers the UI part of request with allowed parameters to HMI
-- 3. SDL receives UI part of response from HMI with "REJECTED" result code

-- Expected:
-- SDL responds with (resultCode: REJECTED, success: false) to mobile application
---------------------------------------------------------------------------------------------------

--[[ Required Shared libraries ]]
local runner = require('user_modules/script_runner')
local common = require('test_scripts/Defects/8_2/2468/common')

--[[ Test Configuration ]]
runner.testSettings.isSelfIncluded = false

--[[ Local Variables ]]
local uiResponseCode = "REJECTED"

--[[ 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, { common.putFileParams })

runner.Title("Test")
runner.Step("AddCommand", common.addCommandFailure, { uiResponseCode, nil })

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