RDKWindowManager Testing Documentation#
Test using Script#
A new script, RDKWMJsonL3Test.sh, has been added for testing RDKWindowManager plugin methods using JSON-RPC curl commands.
Only a few test cases have been added so far. If you want to verify more test cases, you can use the curl command directly in the terminal for testing. For example:
Fresh Boot (Recommended)#
To run the test-related test cases or the testAll test cases using the script, you should stop the sky service first and then activate the plugin again using the curl command.
Step 1: Stop the Sky Service#
Run the following commands twice to stop the sky service:
systemctl stop sky-appsservice
systemctl stop sky-appsservice
Step 2: Activate the RDKWindowManager Plugin#
Activate the plugin using the following curl command:
curl --header "Content-Type: application/json" --request POST --data '{"jsonrpc": "2.0", "id": 42, "method": "Controller.1.activate", "params": {"callsign": "org.rdk.RDKWindowManager"}}' http://127.0.0.1:9998/jsonrpc
Step 3: Ensure Plugin Activation#
Verify that the RDKWindowManager Plugin has been activated using the verbose curl command:
curl --verbose http://127.0.0.1:9998/Service/Controller
Step 4: Execute Test Commands#
Now, execute the commands listed in the table below.
Note: A test case may fail if there are conflicts with displays or if the display is already pre-created with the same name. If this happens, it is recommended to reboot the device and try running the test again.
| Si.No | TestCase | Command | Test Details | Expected Output | Remarks |
|---|---|---|---|---|---|
| 1 | testCreateDisplay1 | RDKWMJsonL3Test.sh testCreateDisplay1 | 1. Without resolution, it will invoke the createDisplay function with the Westerosapp client. 2. It will invoke the getClients function to verify that the westerostest client is present. 3. The westerostest client will connect to the westeros_test app, which will then launch. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes From Logs: createDisplay and getClients methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams": "{\"client\":\"westerosapp\",\"displayName\":\"westerostest\"}"}} Expected: null Result: null testCreateDisplay1 : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 42,"method": "org.rdk.RDKWindowManager.getClients"} Expected: "[\"westerosapp\"]" Result: "[\"westerosapp\"]" testCreateDisplay1 : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 2 Success Test Count - 2 Failed Test Count - 0 --------------------------------------------------------------- | |
| 2 | testCreateDisplay2 | RDKWMJsonL3Test.sh testCreateDisplay2 | 1. With given resolution, it will invoke the createDisplay function with the Westerosapp client. 2. It will invoke the getClients function to verify that the westerostest client is present. 3. The westerostest client will connect to the westeros_test app, which will then launch. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes From Logs: createDisplay and getClients methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"westerostest1\", \"displayName\": \"test1\",\"displayWidth\": 1920,\"displayHeight\": 1080,\"virtualDisplay\": false,\"virtualWidth\": 1920,\"virtualHeight\": 1080,\"topmost\": false,\"focus\": false}"}} Expected: null Result: null testCreateDisplay2 : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 42,"method": "org.rdk.RDKWindowManager.getClients"} Expected: "[\"westerostest1\"]" Result: "[\"westerostest1\"]" testCreateDisplay2 : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 2 Success Test Count - 2 Failed Test Count - 0 --------------------------------------------------------------- | |
| 3 | testCreateDisplay3 | RDKWMJsonL3Test.sh testCreateDisplay3 | 1. It will invoke the createDisplay function without any client. 2. Expecting ERROR_GENERAL in error code | On Screen Display - No From Logs: createDisplay request will call and get error code --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 42,"method": "org.rdk.RDKWindowManager.createDisplay","params": {"displayParams": "{\"displayName\": \"test\"}"}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testCreateDisplay3 : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 1 Success Test Count - 1 Failed Test Count - 0 --------------------------------------------------------------- | |
| 4 | testListeners | RDKWMJsonL3Test.sh testListeners | 1. With default resolution,invoke the createDisplay function with the google browser client. 2. AddKeyListener with keyCode 70 with client googletestapp. 3. GenerateKey for keyCode 70 without client. 4.RemoveKeyListener for keyCode 70 with client googletestapp. 5.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes, GoogleBrowser will launch and f should be seen on google screen if focus is googleBrowser logs: rdkwindowmanager_focus create: setting focus of first application created googletestapp From Logs: methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"googletestapp\", \"displayName\": \"wst-webkitbrowser\"}"}} Expected: null Result: null CreateDisplayForGoogle : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.activate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserActivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method":"WebKitBrowser.1.url","params":"http://www.google.com"} Expected: null Result: null LaunchGoogleWeb : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "4","method": "org.rdk.RDKWindowManager.addKeyListener","params": {"keyListeners": "{\"keys\": [{\"keyCode\":70, \"activate\", \"propagate\"}], \"client\": \"googletestapp\"}"}} Expected: null Result: null addKeyListener : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\": [{\"keyCode\": 70, \"delay\": 5, \"modifiers\": []}]}"}} Expected: null Result: null generateKeyafterAddKeyListener : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "4","method": "org.rdk.RDKWindowManager.removeKeyListener","params": {"keyListeners": "{\"keys\": [{\"keyCode":70, \"activate\", \"propagate\"}],\"client\": \"googletestapp\"}"}} Expected: null Result: null removeKeyListener : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 7 Success Test Count - 7 Failed Test Count - 0 --------------------------------------------------------------- | |
| 5 | testIntercept1 | RDKWMJsonL3Test.sh testIntercept1 | 1. With default resolution,invoke the createDisplay function with the google browser client. 2. AddKeyIntercept with keyCode 65 with shift with client googletestapp. 3. InjectKey for keyCode 65 with Modifers shift. 4.RemoveKeyIntercept with keyCode 65 with shift,client googletestapp. 5.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes, GoogleBrowser will launch and A should be seen in the screen as key A is intercepted with googleclient logs: injectKey keyCode 65 flags 8, rdkwindowmanager_focus key intercepted: 1 focused client: googletestapp From Logs: methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"googletestapp\", \"displayName\": \"wst-webkitbrowser\"}"}} Expected: null Result: null CreateDisplayForGoogle : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.activate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserActivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method":"WebKitBrowser.1.url","params":"http://www.google.com"} Expected: null Result: null LaunchGoogleWeb : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.addKeyIntercept", "params":{"intercept":"{\"keyCode\":65,\"modifiers\": [\"shift\"],\"client\":\"googletestapp\"}"}} Expected: null Result: null addKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.injectKey","params": {"keyCode":65, "modifiers": "{\"modifiers": [\"shift\"]}"}} Expected: null Result: null injectKeyAfterAddKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.removeKeyIntercept", "params":{"intercept":"{\"keyCode\":65,\"modifiers\": [\"shift\"],\"client\":\"googletestapp\"}"}} Expected: null Result: null removeKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 7 Success Test Count - 7 Failed Test Count - 0 --------------------------------------------------------------- | |
| 6 | testIntercept2 | RDKWMJsonL3Test.sh testIntercept2 | 1. With default resolution,invoke the createDisplay function with the google browser client. 2. AddKeyIntercept with keyCode 66 with client googletestapp. 3.GenerateKey for keyCode 66 with Modifers shift ,with client googletestapp. 4.RemoveKeyIntercept with keyCode 66 with modifier shift, client googletestapp. 5.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes, GoogleBrowser will launch and B should be seen on the screen as key B is intercepted with googleclient From Logs: methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"googletestapp\", \"displayName\":\"wst-webkitbrowser\"}"}} Expected: null Result: null testCreateDisplayForGoogle : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.activate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null testWebkitBrowserActivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method":"WebKitBrowser.1.url","params":"http://www.google.com"} Expected: null Result: null testLaunchGoogleWeb : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.addKeyIntercept", "params":{"intercept":"{\"keyCode\":66,\"modifiers\":[\"shift\"],\"client\":\"googletestapp\"}"}} Expected: null Result: null testAddKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\":[{\"keyCode\":66,\"delay\":10,\"modifiers\":[\"shift\"]}]}"}} Expected: null Result: null testGenerateKeyAfterAddKeyIntercept : Success --------------------------------------------------------------- ------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.removeKeyIntercept", "params":{"intercept":"{\"keyCode\":66,\"modifiers\":[\"shift\"],\"client\":\"googletestapp\"}"}} Expected: null Result: null testRemoveKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null testWebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 7 Success Test Count - 7 Failed Test Count - 0 --------------------------------------------------------------- | |
| 7 | testIntercept3 | RDKWMJsonL3Test.sh testIntercept3 | 1. with default Resolution,invoke the createDisplay function and launch the google browser client. 2. Create and Launch westeros test. 3. AddKeyIntercept with keyCode 67 with modifer shift , client westerostest. 4.InjectKey for keyCode 67 and 68 with Modifers shift. 5.RemoveKeyIntercept with keyCode 67 with modifier shift, client westerostest. 6.kill westerostest. 7.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes, GoogleBrowser and westeros client is launched injectKey 67 is not seen in googlescreen as it is intercepted and 68 is seen if focus is googlebrowser From Logs: Google Browser request and response same as above,other methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"westerostest\"}"}} Expected: null Result: null westerostestapp : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.addKeyIntercept", "params":{"intercept":"{\"keyCode\":67,\"modifiers\": [\"shift\"],\"client\":\"westerostest\"}"}} Expected: null Result: null addKeyIntercept --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.injectKey","params": {"keyCode":67, "modifiers": "{\"modifiers": [\"shift\"]}"}} Expected: null Result: null injectKeyAfterAddKeyInterceptKeyCode67 : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.injectKey","params": {"keyCode":68, "modifiers": "{\"modifiers\": [\"shift\"]}"}} Expected: null Result: null injectKeyAfterAddKeyInterceptKeyCode68 : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.removeKeyIntercept", "params":{"intercept":"{\"keyCode\":67,\"modifiers\": [\"shift\"],\"client\":\"westerostest\"}"}} Expected: null Result: null removeKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- ./RDKWMJsonL3Test.sh: line 155: 1298 Terminated /usr/bin//westeros_test --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 9 Success Test Count - 9 Failed Test Count - 0 --------------------------------------------------------------- | |
| 8 | testIntercept4 | RDKWMJsonL3Test.sh testIntercept4 | 1. with default Resolution,invoke the createDisplay function and launch the google browser client. 2. Create and Launch westeros test. 3. AddKeyIntercept with keyCode 67 with modifer shift , client westerostest. 4.GenerateKey for keyCode 67 with Modifers shift. 5.RemoveKeyIntercept with keyCode 67 with modifier shift, client westerostest 6.kill westerostest. 7.Deactivate webkitBrowser Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes, Google Browser and westeros client is launched During GenerateKey C is not seen on the google screen as it is intercepted and D can be seen as it is not intercepted , logs: generateKey keyCode 67 flags 8, generateKey with duration keyCode 67 flags 8 rdkwindowmanager_focus key intercepted: 1 focused client: googletestapp From Logs: Google Browser request and response same as above,other methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"westerostest\"}"}} Expected: null Result: null westerostestapp : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.addKeyIntercept", "params":{"intercept":"{\"keyCode\":67,\"modifiers\": [\"shift\"],\"client\":\"westerostest\"}"}} Expected: null Result: null addKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\": [{\"keyCode\": 67, \"delay\": 5, \"modifiers\": [\"shift\"]},{\"keyCode\": 68, \"delay\": 5, \"modifiers\": [\"shift\"]}]}"}} Expected: null Result: null generateKeyAfterAddKeyInterceptWithoutClientSpecified : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.removeKeyIntercept", "params":{"intercept":"{\"keyCode\":67,\"modifiers\": [\"shift\"],\"client\":\"westerostest\"}"}} Expected: null Result: null removeKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- RDKWMJsonL3Test.sh: line 155: 8965 Terminated /usr/bin//westeros_test Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success Total Test Cases - 8 Success Test Count - 8 Failed Test Count - 0 --------------------------------------------------------------- | |
| 9 | testGenerateKey | RDKWMJsonL3Test.sh testGenerateKey | 1. create and launch westeros test client. 2. with default Resolution,invoke the createDisplay function and launch the google browser client. 3.Generate key with keyCode 67 and 68 with modifer shift ,without client . 4.GenerateKey for keyCode 67 and 68 with Modifers shift,with client googletestapp. 6.kill westerostest. 7.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes Westeros client and Google Browser will launch , first generateKey CD is not seen as focus is on westeros and 2nd generateKeywithClient on the screen CD is seen From Logs: methods request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"westerostest\"}"}} Expected: null Result: null westerostestapp : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.generateKey", "params":{"keys": "{"keys": [{"keyCode": 67, "delay": 5, "modifiers": ["shift"]},{"keyCode": 68, "delay": 5, "modifiers": ["shift"]}]}"}}' Expected: null Result: null generateKeyWithoutClient : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\": [{\"keyCode\": 67, \"delay\": 5, \"modifiers\": [\"shift\"]},{\"keyCode\": 68, \"delay\": 5, \"modifiers\": [\"shift\"]}]}","client": "googletestapp"}} Expected: null Result: null generateKeytWithClient : Success --------------------------------------------------------------- --------------------------------------------------------------- RDKWMJsonL3Test.sh: line 155: 8965 Terminated /usr/bin//westeros_test Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success Total Test Cases - 7 Success Test Count - 7 Failed Test Count - 0 --------------------------------------------------------------- | |
| 10 | testIntercepts | RDKWMJsonL3Test.sh testIntercepts | 1. with default Resolution,invoke the createDisplay function and launch the google browser client. 2. create and Launch westerostest. 3. AddKeyIntercepts for keyCode 75 and 76 with shift,client googletestapp & 80 with shift and 79 with no modifiers,client westerostest. 4.GenerateKey for keyCode 79 with no modifiers and 76 with shift, client googletestapp. 5.GenerateKey for keyCode 79 with no modifiers and 76 with shift, without client. 6.RemoveKeyIntercept with keyCode 79 with modifier shift, client westerostest. 7.kill westerostest. 8.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes GoogleBrowser and Westeros is launched , 1st GenerateKey of o and L will be seen as client is specifed and 2nd generateKey as o is intercepted not seen and only L is seen From Logs: Google Browser request and response same as above , other method request & response . --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{\"callsign\":\"westerostest\"}"}} Expected: null Result: null westerostestapp : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.addKeyIntercepts","params": {"intercepts": "{"intercepts": [{"keys": [{"keyCode": 75, "modifiers": ["shift"]},{"keyCode": 76, "modifiers": ["shift"]}],"client": "googletestapp"},{"keys": [{"keyCode": 79, "modifiers": []},{"keyCode": 80, "modifiers": ["shift"]}],"client": "westerostest"}]}"}} Expected: null Result: null addKeyInterceptsForbothWesterostestandgoogletest : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\": [{\"keyCode\": 79, \"delay\": 5, \"modifiers\": []},{\"keyCode\": 76, \"delay\": 5, \"modifiers\": [\"shift\"]}]}","client": "googletestapp"}} Expected: null Result: null generateKeyAfterAddKeyInterceptsForGoogletestapp : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\": [{\"keyCode\": 79, \"delay\": 5, \"modifiers\": []},{\"keyCode\": 76, \"delay\": 5, \"modifiers\": [\"shift\"]}]}"}} Expected: null Result: null generateKeyAfterAddKeyInterceptsWithoutClient : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.removeKeyIntercept", "params":{"intercept":"{\"keyCode\":79,\"modifiers\": [],\"client\":\"westerostest\"}"}} Expected: null Result: null removeKeyIntercept : Success --------------------------------------------------------------- --------------------------------------------------------------- /RDKWMJsonL3Test.sh: line 155: 10756 Terminated /usr/bin//westeros_test Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success ---------------------------------------------------------------Total Test Cases - 9 Success Test Count - 9 Failed Test Count - 0 --------------------------------------------------------------- | |
| 11 | testInjectGenerateKey | RDKWMJsonL3Test.sh testInjectGenerateKey | 1. with default Resolution,invoke the createDisplay function and launch the google browser client. 2. injectKey for keyCode 71. 3.GenerateKey for keyCode 72 and 73 with shift,client googletestapp. 4.Deactivate webkitBrowser. Note: Before starting the test, Stop the sky service using systemctl command | On Screen Display - Yes, Google Browser is launched ,injectKey G is seen if focus is googlebrowser and generateKey h and I should be seen as client is specified From Logs: methods for request and response --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{"callsign":"googletestapp", "displayName": "wst-webkitbrowser"}"}} Expected: null Result: null CreateDisplayForGoogle : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.activate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserActivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method":"WebKitBrowser.1.url","params":"http://www.google.com"} Expected: null Result: null LaunchGoogleWeb : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.injectKey","params": {"keyCode":71, "modifiers": "{\"modifiers\": [\"shift\"]}"}} Expected: null Result: null injectKey : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "3","method": "org.rdk.RDKWindowManager.generateKey","params": {"keys": "{\"keys\": [{\"keyCode\": 72, \"delay\": 5, \"modifiers\": []},{\"keyCode\": 73, \"delay\": 5, \"modifiers\": [\"shift\"]}]}","client": "googletestapp"}} Expected: null Result: null generateKey : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 6 Success Test Count - 6 Failed Test Count - 0 --------------------------------------------------------------- | |
| 12 | testKeyListenersFailures | RDKWMJsonL3Test.sh testKeyListenersFailures | 1. AddKeyListener with both keyCode and NativeKeyCode present. 2. Expecting ERROR_GENERAL in error code. 3.AddKeyListener without both keyCode and NativeKeyCode. 4.Expecting ERROR_GENERAL in error code. 5.RemoveKeyListener with both keyCode and NativeKeyCode. 6.Expecting ERROR_GENERAL in error code. 7.RemoveKeyListener without both keyCode and NativeKeyCode. 8.Expecting ERROR_GENERAL in error code. | On Screen Display - Yes From Logs: methods for request and response --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "4","method": "org.rdk.RDKWindowManager.addKeyListener","params": {"keyListeners": "{\"keys\": [{\"keyCode\":70,\"nativeKeyCode\": 72,\"activate\", \"propagate\"}], \"client\": \"googletestapp\"}"}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testAddKeyListenersForFailureCasesForAddingBothKeyCodeAndNativeKeyCode : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "4","method": "org.rdk.RDKWindowManager.addKeyListener","params": {"keyListeners": "{\"keys\": [{\"activate\", \"propagate\"}], \"client\": \"googletestapp\"}"}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testAddKeyListenersForFailureCasesForNotHavingBothKeyCodeAndNativeKeyCode : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "4","method": "org.rdk.RDKWindowManager.removeKeyListener","params": {"keyListeners": "{\"keys\": [{\"keyCode\":70,\"nativeKeyCode\": 72,\"activate\", \"propagate\"}], \"client\": \"googletestapp\"}"}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testRemoveKeyListenersForFailureCasesForAddingBothKeyCodeAndNativeKeyCode : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": "4","method": "org.rdk.RDKWindowManager.removeKeyListener","params": {"keyListeners": "{\"keys\": [{\"activate\", \"propagate\"}], \"client\": \"googletestapp\"}"}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testRemoveKeyListenersForFailureCasesForNotHavingBothKeyCodeAndNativeKeyCode : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 4 Success Test Count - 4 Failed Test Count - 0 --------------------------------------------------------------- | |
| 13 | testInactivity1 | RDKWMJsonL3Test.sh testInactivity1 | 1. Enable the inactivity reporting feature. 2. Set inactivity time of 1 minute. | On Screen Display - No Sample logs that needs to be observed(time may differ depending upon the current time) --------------------------------------------- i)EnableInactivityReporting: EnableInactivityReporting Entered ii)setInactivityInterval: RDKWindowManager setInactivity for Interval:1 iii)Callback should be invoked for every minute onUserInactive: RDKWindowManager onUserInactive event received minutes: 1.346539 onUserInactive: RDKWindowManager onUserInactive event received minutes: 2.346863 | |
| 14 | testInactivity2 | RDKWMJsonL3Test.sh testInactivity2 | 1. Disable the inactivity reporting feature. 2. Set inactivity time of 1 minute. | On Screen Display - No Sample logs that needs to be observed(time may differ depending upon the current time) --------------------------------------------- i)EnableInactivityReporting: EnableInactivityReporting Entered ii)setInactivityInterval: RDKWindowManager setInactivity for Interval:1 iii)Callback should not be invoked as the feature is disabled i.e ,Should not be seeing below log: onUserInactive: RDKWindowManager onUserInactive event received minutes: <> | |
| 15 | testInactivity3 | RDKWMJsonL3Test.sh testInactivity3 | 1. Enable the inactivity reporting feature. 2. Set inactivity time of 1 minute. 3.Wait for 40seconds and then reset | On Screen Display - No Sample logs that needs to be observed(time may differ depending upon the current time) --------------------------------------------- i)EnableInactivityReporting: EnableInactivityReporting Entered ii)onUserInactive: RDKWindowManager onUserInactive event received minutes: 7.305942 iii)setInactivityInterval: RDKWindowManager setInactivity for Interval:1 iv)Callback will be incoming now: onUserInactive: RDKWindowManager onUserInactive event received minutes: 7.306774 v)resetInactivityTime: RDKWindowManager inactivity time reset vi)The inactive timer will be reset and it will restart counting amin offset with current time i.e, Dispatch: RDKWindowManager Dispatch OnUserInactivity minutes: 1.000350 Dispatch: RDKWindowManager Dispatch OnUserInactivity minutes: 2.000690 | |
| 16 | testInactivity4 | RDKWMJsonL3Test.sh testInactivity4 | 1. Ran westeros test application. 2. Enable the inactivity reporting feature. 3.Set inactivity time of 1min and wait for 40secs 4. Inject key | On Screen Display - Westeros app will be running Sample logs that needs to be observed(time may differ depending upon the current time) --------------------------------------------- i)EnableInactivityReporting: EnableInactivityReporting Entered ii)setInactivityInterval: RDKWindowManager setInactivity for Interval:1 iii)Callback will be incoming now for every minute: Dispatch: RDKWindowManager Dispatch OnUserInactivity minutes: 3.70336 iv)InjectKey: modifiers v)The inactive timer will be reset and it will restart counting amin offset with current time i.e, Dispatch: RDKWindowManager Dispatch OnUserInactivity minutes: 1.000240 Dispatch: RDKWindowManager Dispatch OnUserInactivity minutes: 2.000720 | |
| 17 | testGetClients1 | RDKWMJsonL3Test.sh testGetClients1 | 1. It will invoke the getClients function without calling the createDisplay and ensure no clients are present Note: This test was run without performing any createDisplay. | On Screen Display - No From Logs: createDisplay and getClients methods request and response --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 42,"method": "org.rdk.RDKWindowManager.getClients"} Expected: "" Result: "" testGetClients2 : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 1 Success Test Count - 1 Failed Test Count - 0 --------------------------------------------------------------- | |
| 18 | testGetClients2 | RDKWMJsonL3Test.sh testGetClients2 | 1. It will invoke the createDisplay function with client only. 2. It will invoke the getClients function to verify that the client is present. | On Screen Display - No From Logs: createDisplay and getClients methods request and response --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 42,"method": "org.rdk.RDKWindowManager.createDisplay","params": {"displayParams": "{\"client\": \"org.rdk.Netflix\",\"callsign\": \"org.rdk.Netflix\",\"displayName\": \"test\"}"}} Expected: null Result: null testGetClients1 : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 42,"method": "org.rdk.RDKWindowManager.getClients"} Expected: "[\"org.rdk.netflix\"]" Result: "[\"org.rdk.netflix\"]" testGetClients1 : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 2 Success Test Count - 2 Failed Test Count - 0 -------------------------------------------------------------- | |
| 19 | testGetKeyRepeatsEnabled | RDKWMJsonL3Test. testGetKeyRepeatsEnabled | 1. Call the testEnableKeyRepeats function to disable the key repeat feature. 2.Invoke the org.rdk.RDKWindowManager.getKeyRepeatsEnabled method 3.Verify that the response is false, indicating that key repeats are disabled. 4.Call the testEnableKeyRepeats function to enable the key repeat feature 5.Invoke the org.rdk.RDKWindowManager.getKeyRepeatsEnabled method 6.Verify that the response is true, confirming that key repeats are enabled. | On Screen Display - No From Logs: getKeyRepeatsEnabled methods request and response ----------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "1", "method": "org.rdk.RDKWindowManager.enableKeyRepeats", "params": {"enable": false}} Expected: null Result: null testEnableKeyRepeat_setKeyRepeatDisable : Success --------------------------------------------------------------- --------------------------------------------------------------- ---- Testing GetKeyRepeatsEnabled Flow ---- Success: null --------------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "1", "method": "org.rdk.RDKWindowManager.enableKeyRepeats", "params": {"enable": false}} Expected: null Result: null testEnableKeyRepeat_false : Success --------------------------------------------------------------- Success: false --------------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "3", "method": "org.rdk.RDKWindowManager.getKeyRepeatsEnabled"} Expected: false Result: false testGetKeyRepeatsEnabled : Success --------------------------------------------------------------- Success: null --------------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "1", "method": "org.rdk.RDKWindowManager.enableKeyRepeats", "params": {"enable": true}} Expected: null Result: null testEnableKeyRepeat_true : Success --------------------------------------------------------------- Success: true --------------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "3", "method": "org.rdk.RDKWindowManager.getKeyRepeatsEnabled"} Expected: true Result: true testGetKeyRepeatsEnabled : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 4 Success Test Count - 4 Failed Test Count - 0 --------------------------------------------------------------- | |
| 20 | testInputEventEnable | RDKWMJsonL3Test.sh testInputEventEnable | 1.create a display using the createDisplay API 2.Activate the WebKitBrowser plugin by invoking the Controller.1.activate 3.Load the Google homepage in the WebKitBrowser 4. Enable input events for the testapp client by calling the testSetInputEventEnable function. 5.Attempt to inject a key using the injectKey API 6.Verify that the response is null 7.Confirm that the key injection is accepted on the WebKitBrowser application side when input events are Enabled | On Screen Display - Confirm that the key injection is accepted on the WebKitBrowser application side From Logs: enableInputEvent method request and response --------------------------------------------------------------- -------------------------------------------------------------- --------------------------------------------------------------- Request: "jsonrpc": "2.0", "id": "5", "method": "org.rdk.RDKWindowManager.enableInputEvents", "params": { "clients": {"clients": ["testapp"]}, { "enable": true }} Expected: null Result: null testSetInputEventEnable : Success --------------------------------------------------------------- Success: null --------------------------------------------------------------- Request: "jsonrpc": "2.0", "id": "5", "method": "org.rdk.RDKWindowManager.enableInputEvents", "params": { "clients": {"clients": ["testapp"]}, { enable": true }} Expected: null Result: null testInjectKey_InputEventEnabled : Success --------------------------------------------------------------- {"jsonrpc":"2.0","id":4,"result"}---- Confirm on the WebKitBrowser application side that the Generate key is accepted when input events are Enabled. ---- --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 2 Success Test Count - 2 Failed Test Count - 0 --------------------------------------------------------------- | |
| 21 | testInputEventDisable | RDKWMJsonL3Test.sh testInputEventDisable | 1.create a display using the createDisplay API 2.Activate the WebKitBrowser plugin by invoking the Controller.1.activate 3.Load the Google homepage in the WebKitBrowser 4. Disable input events for the testapp client by calling the testSetInputEventEnable function. 5.Attempt to inject a key using the injectKey API 6.Verify that the response is null 7.Confirm that the key injection is NOT accepted on the WebKitBrowser application side when input events are Disabled | On Screen Display - Confirm that the key injection is NOT accepted on the WebKitBrowser application side From Logs: enableInputEvent method request and response --------------------------------------------------------------- -------------------------------------------------------------- Request: { "jsonrpc": "2.0", "id": "6", "method": "org.rdk.RDKWindowManager.enableInputEvents", "params": { "clients": {"clients": ["testapp"]}, "enable": false }} Expected: null Result: null testEnableInputEvents_setInputEventDisable : Success --------------------------------------------------------------- --------------------------------------------------------------- Request: { "jsonrpc": "2.0", "id": "6", "method": "org.rdk.RDKWindowManager.enableInputEvents", "params": { "clients": {"clients": ["testapp"]}, "enable": false }} Expected: null Result: null testInjectKey_InputEventDisabled : Success --------------------------------------------------------------- ---------------------------------------------------------------{"jsonrpc":"2.0","id":4,"result"}---- Confirm on the WebKitBrowser application side that the Generate key is NOT accepted when input events are disabled. ---- --------------------------------------------------------------- Total Test Cases - 2 Success Test Count - 2 Failed Test Count - 0 | |
| 22 | testIgnoreKeyInputsEnable | RDKWMJsonL3Test.sh testIgnoreKeyInputsEnable | Prerequisites RDK_WINDOW_MANAGER_ENABLE_KEY_IGNORE feature must be enabled (set to 1) for this function to execute. 1.create a display using the createDisplay API 2.Activate the WebKitBrowser plugin by invoking the Controller.1.activate 3.Load the Google homepage in the WebKitBrowser 4. Enable the ignoreKeyInputs feature by invoking the ignoreKeyInputs API with the enabled parameter set to true. 5.Verify that the response is null. 6.Attempt to press a key using the Remote Controller". 7.Confirm that the key injection is not accepted on the application side when key inputs are ignored. | On Screen Display - Confirm that the key injection is not accepted on the WebKitBrowser application side From Logs: ignoreKeyInputs method request and response --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{"callsign":"googletestapp", "displayName": "wst-webkitbrowser"}"}} Expected: null Result: null CreateDisplayForGoogle : Success --------------------------------------------------------------- Success: null --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.activate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserActivate : Success --------------------------------------------------------------- Success: null --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method":"WebKitBrowser.1.url","params":"http://www.google.com"} Expected: null Result: null LaunchGoogleWeb : Success --------------------------------------------------------------- ---- Testing Inject Key Flow when Input Events are Disabled ---- Success: null --------------------------------------------------------------- Request: { "jsonrpc": "2.0", "id": "5", "method": "org.rdk.RDKWindowManager.ignoreKeyInputs", "params": {"ignore": true} } Expected: null Result: null testIgnoreKeyInputs_true : Success --------------------------------------------------------------- ---- Confirm on the WebKitBrowser application side that the physical key press [remote key press] is NOT accepted when IgnoreKey Inputs Disbled. ---- Success: null --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 5 Success Test Count - 5 Failed Test Count - 0 --------------------------------------------------------------- | |
| 23 | testIgnoreKeyInputsDisable | RDKWMJsonL3Test.sh testIgnoreKeyInputsDisable | Prerequisites RDK_WINDOW_MANAGER_ENABLE_KEY_IGNORE feature must be enabled (set to 1) for this function to execute. 1.create a display using the createDisplay API 2.Activate the WebKitBrowser plugin by invoking the Controller.1.activate 3.Load the Google homepage in the WebKitBrowser 4. Disable the ignoreKeyInputs feature by invoking the ignoreKeyInputs API with the enabled parameter set to false. 5.Verify that the response is null. 6.Attempt to press a key using the Remote Controller". 7.Confirm that the key injection is accepted on the application side when key inputs are ignored. | On Screen Display - Confirm that the key injection is accepted on the WebKitBrowser application side From Logs: ignoreKeyInputs method request and response --------------------------------------------------------------- --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method": "org.rdk.RDKWindowManager.createDisplay", "params":{"displayParams":"{"callsign":"googletestapp", "displayName": "wst-webkitbrowser"}"}} Expected: null Result: null CreateDisplayForGoogle : Success --------------------------------------------------------------- Success: null --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.activate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserActivate : Success --------------------------------------------------------------- Success: null --------------------------------------------------------------- Request: {"jsonrpc":"2.0","id":"3","method":"WebKitBrowser.1.url","params":"http://www.google.com"} Expected: null Result: null LaunchGoogleWeb : Success --------------------------------------------------------------- ---- Testing Inject Key Flow when Input Events are Disabled ---- Success: null --------------------------------------------------------------- Request: { "jsonrpc": "2.0", "id": "5", "method": "org.rdk.RDKWindowManager.ignoreKeyInputs", "params": {"ignore": false} } Expected: null Result: null testIgnoreKeyInputs_false : Success --------------------------------------------------------------- ---- Confirm on the WebKitBrowser application side that the physical key press [remote key press] is accepted when IgnoreKey Inputs Disbled. ---- Success: null --------------------------------------------------------------- Request: {"jsonrpc": "2.0","id": 4,"method": "Controller.1.deactivate", "params": { "callsign": "WebKitBrowser"}} Expected: null Result: null WebkitBrowserDeactivate : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 5 Success Test Count - 5 Failed Test Count - 0 --------------------------------------------------------------- | |
| 24 | testKeyRepeatConfigUnsupportedInput | RDKWMJsonL3Test.shtestKeyRepeatConfig_UnsupportedInput | 1. Attempt to configure keyRepeatConfig for an unsupported input type (e.g., "mouse") using the API. 2.Verify that the response contains an error with code: 1 and message: "ERROR_GENERAL". 3.Confirm that the key repeat configuration is not applied due to the missing parameter. | On screen display-NO from Log confirm request and response of keyRepeatConfig --------------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "5", "method": "org.rdk.RDKWindowManager.keyRepeatConfig", "params": {"input": "mouse", "keyConfig": {"enabled": true, "initialDelay": 500, "repeatInterval": 100}}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testKeyRepeatConfig_UnsupportedInput : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 1 Success Test Count - 1 Failed Test Count - 0 --------------------------------------------------------------- | |
| 25 | testKeyRepeatConfigMissingEnabled | RDKWMJsonL3Test.sh testKeyRepeatConfig_MissingEnabled | 1.Invoke the keyRepeatConfig API for the "default" input, omitting the enabled parameter. 2.Verify that the response contains an error with code: 1 and message: "ERROR_GENERAL". 3.Confirm that the key repeat configuration is not applied due to the missing parameter. | On Screen Display - No From Log Confirm request and response of keyRepeatConfig --------------------------------------------------------------- Request: {"jsonrpc": "2.0", "id": "6", "method": "org.rdk.RDKWindowManager.keyRepeatConfig", "params": {"input": "default", "keyConfig": {"initialDelay": 500, "repeatInterval": 100}}} Expected: "code":1,"message":"ERROR_GENERAL" Result: "code":1,"message":"ERROR_GENERAL" testKeyRepeatConfig_MissingEnabled : Success --------------------------------------------------------------- --------------------------------------------------------------- Total Test Cases - 1 Success Test Count - 1 Failed Test Count - 0 | |
| 26 | testAll | RDKWMJsonL3Test.sh testAll | Run all the tests Note: 1. Do this After Fresh bootup, 2. Stop the sky service using systemctl command 3. Activate the RDKWindowManager Plugin using curl command 4. Then run the testAll test command | On Screen Display - Come for testCreateDisplay1 and testCreateDisplay2 From Logs: createDisplay and getClients methods request and response Same set of logs menitioned for each test will come, then final results will display --------------------------------------------------------------- Total Test Cases - 8 Success Test Count - 8 Failed Test Count - 0 -------------------------------------------------------------- |