forked from smartdevicelink/sdl_atf_test_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/icon resumed #4
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
Open
HSavynetska
wants to merge
30
commits into
develop
Choose a base branch
from
feature/icon_Resumed
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
847e82f
Add test sets for Release 4.5 issues
dboltovskyi 68917c3
Fix cast to string in common module for Resumption
dboltovskyi b5c4e5a
Fix obtaining of MAC address and Device Id
dboltovskyi 0269b1b
Fix file names
dboltovskyi 8abed62
Add additional expectation for PTU sequence
dboltovskyi 5aa6337
Create common module for security
dboltovskyi b5c496c
Correct parameter name
dboltovskyi 6bb27e5
Refactoring test scripts for Security
dboltovskyi d60b4ec
Remove unused code
dboltovskyi 8f5cb5d
Decrease priority of internal ATF expectations
dboltovskyi c79a94e
Change SDL protocol version to 2
dboltovskyi 69ef8f2
Stabilize scripts
dboltovskyi fe60436
Correct expectation function and common module for certificates
dboltovskyi c98e17a
Remove defaulting of 2nd version of SDL protocol
dboltovskyi fe3ec30
Update Policy scripts regarding Device Id and Device Name calculation…
dboltovskyi 3a90459
Update Policy scripts regarding URL changes in PreloadedPT
dboltovskyi 8961ca7
Add new functions to Utils module
dboltovskyi f714f5a
Created common SetAppIcon
HSavynetska a4732ab
Changed commonSetAppIcon
HSavynetska cabca8b
Update common
HSavynetska f9eb4da
Test script for the first checklist item
HSavynetska 6d57d79
Test_scripts 15.03.2018
HSavynetska ae62474
Test_scripts_for_iconResumed
HSavynetska 91ebeb8
Tests_iconResumed
HSavynetska 24df261
modified_Tests_iconResumed
HSavynetska 264ac57
Update test_scripts 02.04.2018
HSavynetska 78ea31c
Delete test_scripts
HSavynetska 693d043
Update test_script №4 02.04.2018
HSavynetska 92b4e77
Modified test_script_for_iconResumed
HSavynetska 6664e45
Made changes to the test script for icon_Resumed
HSavynetska File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
32 changes: 32 additions & 0 deletions
32
test_scripts/API/SetAppIcon/001_Mobile_app_First_Registration.lua
This file contains hidden or 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,32 @@ | ||
| --------------------------------------------------------------------------------------------------- | ||
| -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md | ||
| -- User story:TBD | ||
| -- Use case:TBD | ||
| -- | ||
| -- Requirement summary: | ||
| -- TBD | ||
| -- | ||
| -- Description: | ||
| -- In case: | ||
| -- 1) SDL, HMI are started. | ||
| -- 2) Mobile app registers first time. | ||
| -- SDL does: | ||
| -- 1) Successfully register application and respond with result code "SUCCESS" and "iconResumed" = false" to mobile application. | ||
| --------------------------------------------------------------------------------------------------- | ||
| --[[ Required Shared libraries ]] | ||
| local runner = require('user_modules/script_runner') | ||
| local common = require('test_scripts/API/SetAppIcon/commonIconResumed') | ||
|
|
||
| --[[ Test Configuration ]] | ||
| runner.testSettings.isSelfIncluded = false | ||
|
|
||
| --[[ Scenario ]] | ||
| runner.Title("Preconditions") | ||
| runner.Step("Clean environment", common.preconditions) | ||
| runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) | ||
|
|
||
| runner.Title("Test") | ||
| runner.Step("App registration with iconResumed = false", common.registerAppWOPTU, { 1, false }) | ||
|
|
||
| runner.Title("Postconditions") | ||
| runner.Step("Stop SDL", common.postconditions) |
55 changes: 55 additions & 0 deletions
55
test_scripts/API/SetAppIcon/002_Mobile_app_registration_with_param_iconResumed_true.lua
This file contains hidden or 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,55 @@ | ||
| --------------------------------------------------------------------------------------------------- | ||
| -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md | ||
| -- User story:TBD | ||
| -- Use case:TBD | ||
| -- | ||
| -- Requirement summary: | ||
| -- TBD | ||
| -- | ||
| -- Description: | ||
| -- In case: | ||
| -- 1) SDL, HMI are started. | ||
| -- 2) Mobile application is registered and sets custom icon via sending PutFile and valid SetAppIcon request. | ||
| -- 3) Mobile app is re-registered. | ||
| -- SDL does: | ||
| -- 1) Successfully register application. | ||
| -- 2) Successful process PutFile and SetAppIcon requests. | ||
| -- 3) Respond with result code "SUCCESS" and "iconResumed" = true for RAI request. | ||
| -- 4) Send to HMI OnAppRegistered notification "icon" and notify that apps icon exists. | ||
| --------------------------------------------------------------------------------------------------- | ||
| --[[ Required Shared libraries ]] | ||
| local runner = require('user_modules/script_runner') | ||
| local common = require('test_scripts/API/SetAppIcon/commonIconResumed') | ||
|
|
||
| --[[ Test Configuration ]] | ||
| runner.testSettings.isSelfIncluded = false | ||
|
|
||
| --[[ Local Variables ]] | ||
| local requestParams = { | ||
| syncFileName = "icon.png" | ||
| } | ||
| local requestUiParams = { | ||
| syncFileName = { | ||
| imageType = "DYNAMIC", | ||
| value = common.getPathToFileInStorage(requestParams.syncFileName) | ||
| } | ||
| } | ||
| local allParams = { | ||
| requestParams = requestParams, | ||
| requestUiParams = requestUiParams | ||
| } | ||
|
|
||
| --[[ Scenario ]] | ||
| runner.Title("Preconditions") | ||
| runner.Step("Clean environment", common.preconditions) | ||
| runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) | ||
|
|
||
| runner.Title("Test") | ||
| runner.Step("App registration with iconResumed = false", common.registerAppWOPTU, { 1, false }) | ||
| runner.Step("Upload icon file", common.putFile) | ||
| runner.Step("SetAppIcon", common.setAppIcon, { allParams } ) | ||
| runner.Step("App unregistration", common.unregisterAppInterface, { 1 }) | ||
| runner.Step("App registration with iconResumed = true", common.registerAppWOPTU, { 1, true, true }) | ||
|
|
||
| runner.Title("Postconditions") | ||
| runner.Step("Stop SDL", common.postconditions) | ||
70 changes: 70 additions & 0 deletions
70
test_scripts/API/SetAppIcon/003_Icon_resumption_by_disconnect.lua
This file contains hidden or 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,70 @@ | ||
| --------------------------------------------------------------------------------------------------- | ||
| -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md | ||
| -- User story:TBD | ||
| -- Use case:TBD | ||
| -- | ||
| -- Requirement summary: | ||
| -- TBD | ||
| -- | ||
| -- Description: | ||
| -- In case: | ||
| -- 1) SDL, HMI are started. | ||
| -- 2) Mobile application is registered and sets custom icon via sending PutFile and valid SetAppIcon request. | ||
| -- 3) Mobile application is unregistered. | ||
| -- 4) Mobile app is re-registered. | ||
| -- SDL does: | ||
| -- 1) Respond with result code "SUCCESS" and "iconResumed" = true for RAI request. | ||
| --------------------------------------------------------------------------------------------------- | ||
| --[[ Required Shared libraries ]] | ||
| local runner = require('user_modules/script_runner') | ||
| local common = require('test_scripts/API/SetAppIcon/commonIconResumed') | ||
| local test = require("user_modules/dummy_connecttest") | ||
| local mobile_session = require('mobile_session') | ||
|
|
||
| --[[ Test Configuration ]] | ||
| runner.testSettings.isSelfIncluded = false | ||
|
|
||
| --[[ Local Variables ]] | ||
| local requestParams = { | ||
| syncFileName = "icon.png" | ||
| } | ||
| local requestUiParams = { | ||
| syncFileName = { | ||
| imageType = "DYNAMIC", | ||
| value = common.getPathToFileInStorage(requestParams.syncFileName) | ||
| } | ||
| } | ||
| local allParams = { | ||
| requestParams = requestParams, | ||
| requestUiParams = requestUiParams | ||
| } | ||
|
|
||
| local function CloseConnection() | ||
| test.mobileConnection:Close() | ||
| EXPECT_HMINOTIFICATION("BasicCommunication.OnAppUnregistered", { unexpectedDisconnect = true }) | ||
| end | ||
|
|
||
| local function OpenConnection() | ||
| test.mobileSession[1] = mobile_session.MobileSession( | ||
| test, | ||
| test.mobileConnection, | ||
| config.application1.registerAppInterfaceParams) | ||
| test.mobileConnection:Connect() | ||
| test.mobileSession[1]:StartRPC() | ||
| end | ||
|
|
||
| --[[ Scenario ]] | ||
| runner.Title("Preconditions") | ||
| runner.Step("Clean environment", common.preconditions) | ||
| runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) | ||
|
|
||
| runner.Title("Test") | ||
| runner.Step("App registration with iconResumed = false", common.registerAppWOPTU, { 1, false }) | ||
| runner.Step("Upload icon file", common.putFile) | ||
| runner.Step("SetAppIcon", common.setAppIcon, { allParams } ) | ||
| runner.Step("Disconnect mobile app", CloseConnection) | ||
| runner.Step("Connect mobile app", OpenConnection) | ||
| runner.Step("App registration with iconResumed = true", common.registerAppWOPTU, { 1, true, true }) | ||
|
|
||
| runner.Title("Postconditions") | ||
| runner.Step("Stop SDL", common.postconditions) |
59 changes: 59 additions & 0 deletions
59
test_scripts/API/SetAppIcon/004_Remove_icon_and_reregistered_Mobile_app.lua
This file contains hidden or 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 @@ | ||
| --------------------------------------------------------------------------------------------------- | ||
| -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md | ||
| -- User story:TBD | ||
| -- Use case:TBD | ||
| -- | ||
| -- Requirement summary: | ||
| -- TBD | ||
| -- | ||
| -- Description: | ||
| -- In case: | ||
| -- 1) SDL, HMI are started. | ||
| -- 2) Mobile application is registered and sets custom icon via sending PutFile and valid SetAppIcon request. | ||
| -- 3) Mobile application is unregistered. | ||
| -- 4) Remove Icon for mobile app from the file system | ||
| -- 5) Mobile app is re-registered, mobile app is registered. | ||
| -- SDL does: | ||
| -- 1) SDL respond with result code "SUCCESS" and "iconResumed" = false for RAI request. | ||
| --------------------------------------------------------------------------------------------------- | ||
| --[[ Required Shared libraries ]] | ||
| local runner = require('user_modules/script_runner') | ||
| local common = require('test_scripts/API/SetAppIcon/commonIconResumed') | ||
|
|
||
| --[[ Test Configuration ]] | ||
| runner.testSettings.isSelfIncluded = false | ||
|
|
||
| --[[ Local Variables ]] | ||
| local requestParams = { | ||
| syncFileName = "icon.png" | ||
| } | ||
| local requestUiParams = { | ||
| syncFileName = { | ||
| imageType = "DYNAMIC", | ||
| value = common.getPathToFileInStorage(requestParams.syncFileName) | ||
| } | ||
| } | ||
| local allParams = { | ||
| requestParams = requestParams, | ||
| requestUiParams = requestUiParams | ||
| } | ||
|
|
||
| local function IconRemove(pFile) | ||
| os.remove(common.getPathToFileInStorage(pFile)) | ||
| end | ||
|
|
||
| --[[ Scenario ]] | ||
| runner.Title("Preconditions") | ||
| runner.Step("Clean environment", common.preconditions) | ||
| runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) | ||
|
|
||
| runner.Title("Test") | ||
| runner.Step("App registration with iconResumed = false", common.registerAppWOPTU, { 1, false }) | ||
| runner.Step("Upload icon file", common.putFile) | ||
| runner.Step("SetAppIcon", common.setAppIcon, { allParams } ) | ||
| runner.Step("App unregistration", common.unregisterAppInterface, { 1 }) | ||
| runner.Step("Remove Icon for mobile app from the file system", IconRemove, { "icon.png"}) | ||
| runner.Step("App registration with iconResumed = false", common.registerAppWOPTU, { 1, false, true }) | ||
|
|
||
| runner.Title("Postconditions") | ||
| runner.Step("Stop SDL", common.postconditions) |
55 changes: 55 additions & 0 deletions
55
...I/SetAppIcon/005_Two_apps_are_registered_App1_iconResumed_true_App2_iconResumed_false.lua
This file contains hidden or 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,55 @@ | ||
| --------------------------------------------------------------------------------------------------- | ||
| -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md | ||
| -- User story:TBD | ||
| -- Use case:TBD | ||
| -- | ||
| -- Requirement summary: | ||
| -- TBD | ||
| -- | ||
| -- Description: | ||
| -- In case: | ||
| -- 1) SDL, HMI are started. | ||
| -- 2) App1 set custom icon via putfile and SetAppIcon requests and is re-registered with resuming custom icon( "iconResumed" = true). | ||
| -- 3) Mobile App2 registered. | ||
| -- SDL does: | ||
| -- 1) Register App1 successfully registered and sets its app icon, | ||
| -- respond to RAI with result code "SUCCESS", "iconResumed" = true | ||
| -- 2) Register an App 2 with default icon, "iconResumed" = false | ||
| --------------------------------------------------------------------------------------------------- | ||
| --[[ Required Shared libraries ]] | ||
| local runner = require('user_modules/script_runner') | ||
| local common = require('test_scripts/API/SetAppIcon/commonIconResumed') | ||
|
|
||
| --[[ Test Configuration ]] | ||
| runner.testSettings.isSelfIncluded = false | ||
|
|
||
| --[[ Local Variables ]] | ||
| local requestParams = { | ||
| syncFileName = "icon.png" | ||
| } | ||
| local requestUiParams = { | ||
| syncFileName = { | ||
| imageType = "DYNAMIC", | ||
| value = common.getPathToFileInStorage(requestParams.syncFileName) | ||
| } | ||
| } | ||
| local allParams = { | ||
| requestParams = requestParams, | ||
| requestUiParams = requestUiParams | ||
| } | ||
|
|
||
| --[[ Scenario ]] | ||
| runner.Title("Preconditions") | ||
| runner.Step("Clean environment", common.preconditions) | ||
| runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) | ||
|
|
||
| runner.Title("Test") | ||
| runner.Step("App1 registration with iconResumed = false", common.registerAppWOPTU, { 1, false }) | ||
| runner.Step("Upload icon file", common.putFile) | ||
| runner.Step("SetAppIcon", common.setAppIcon, { allParams } ) | ||
| runner.Step("App1 unregistration", common.unregisterAppInterface, { 1 }) | ||
| runner.Step("App1 registration with iconResumed = true", common.registerAppWOPTU, { 1, true, true }) | ||
| runner.Step("App2 registration with iconResumed = false", common.registerAppWOPTU, { 2, false }) | ||
|
|
||
| runner.Title("Postconditions") | ||
| runner.Step("Stop SDL", common.postconditions) |
74 changes: 74 additions & 0 deletions
74
...PI/SetAppIcon/006_Two_apps_are_registered_App1_iconResumed_true_App2_iconResumed_true.lua
This file contains hidden or 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,74 @@ | ||
| --------------------------------------------------------------------------------------------------- | ||
| -- Proposal: https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0041-appicon-resumption.md | ||
| -- User story:TBD | ||
| -- Use case:TBD | ||
| -- | ||
| -- Requirement summary: | ||
| -- TBD | ||
| -- | ||
| -- Description: | ||
| -- In case: | ||
| -- 1) SDL, HMI are started. | ||
| -- 2) App1 set custom icon via putfile and SetAppIcon requests. | ||
| -- 3) App2 set custom icon via putfile and SetAppIcon requests. | ||
| -- 4) Two app are re-registered. | ||
| -- SDL does: | ||
| -- 1) Register an App 1 successfully, respond to RAI with result code "SUCCESS", "iconResumed" = true. | ||
| -- 2) Register an App 2 successfully, respond to RAI with result code "SUCCESS", "iconResumed" = true. | ||
| --------------------------------------------------------------------------------------------------- | ||
| --[[ Required Shared libraries ]] | ||
| local runner = require('user_modules/script_runner') | ||
| local common = require('test_scripts/API/SetAppIcon/commonIconResumed') | ||
|
|
||
| --[[ Test Configuration ]] | ||
| runner.testSettings.isSelfIncluded = false | ||
|
|
||
| --[[ Local Variables ]] | ||
| local requestParams = { | ||
| syncFileName = "icon.png" | ||
| } | ||
|
|
||
| local requestUiParamsApp1 = { | ||
| syncFileName = { | ||
| imageType = "DYNAMIC", | ||
| value = common.getPathToFileInStorage(requestParams.syncFileName) | ||
| } | ||
| } | ||
| local requestUiParamsApp2 = { | ||
| syncFileName = { | ||
| imageType = "DYNAMIC", | ||
| value = common.getPathToFileInStorage(requestParams.syncFileName, 2) | ||
| } | ||
| } | ||
|
|
||
| local allParamsApp1 = { | ||
| requestParams = requestParams, | ||
| requestUiParams = requestUiParamsApp1 | ||
| } | ||
| local allParamsApp2 = { | ||
| requestParams = requestParams, | ||
| requestUiParams = requestUiParamsApp2 | ||
| } | ||
|
|
||
| --[[ Scenario ]] | ||
| runner.Title("Preconditions") | ||
| runner.Step("Clean environment", common.preconditions) | ||
| runner.Step("Start SDL, HMI, connect Mobile, start Session", common.start) | ||
|
|
||
| runner.Title("Test") | ||
| runner.Step("App1 registration with iconResumed = false", common.registerAppWOPTU, { 1, false }) | ||
| runner.Step("Upload icon file", common.putFile) | ||
| runner.Step("SetAppIcon", common.setAppIcon, { allParamsApp1 } ) | ||
|
|
||
| runner.Step("App2 registration with iconResumed = false", common.registerAppWOPTU, { 2, false }) | ||
| runner.Step("Upload icon file", common.putFile, {nil, nil, 2}) | ||
| runner.Step("SetAppIcon", common.setAppIcon, { allParamsApp2, 2 } ) | ||
|
|
||
| runner.Step("App1 unregistration", common.unregisterAppInterface, { 1 }) | ||
| runner.Step("App2 unregistration", common.unregisterAppInterface, { 2 }) | ||
|
|
||
| runner.Step("App1 registration with iconResumed = true", common.registerAppWOPTU, { 1, true, true }) | ||
| runner.Step("App2 registration with iconResumed = true", common.registerAppWOPTU, { 2, true, true }) | ||
|
|
||
| runner.Title("Postconditions") | ||
| runner.Step("Stop SDL", common.postconditions) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apply comments from script above and remove test_scripts/API/SetAppIcon/002_Mobile_app_registration_with_param_iconResumed=true.lua, as i understood this is the same file but renamed.