Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save sgithens/4a68b887336abf153e5994226baa5375 to your computer and use it in GitHub Desktop.

Select an option

Save sgithens/4a68b887336abf153e5994226baa5375 to your computer and use it in GitHub Desktop.
Example of fully defined GPII Test Defs
[
{
"name": "Flow Manager Simple BrowserChannel tests",
"expect": 15,
"config": {
"configName": "gpii.flowManager.tests.browserChannel.config",
"configPath": "%flowManager/test/configs"
},
"events": {
"loginAndSettingsChangedChrome": {
"events": {
"login": "{loginChrome}.events.onComplete",
"org.chrome.cloud4chrome": "{clientOne}.events.onSettingsChanged"
},
"args": [
"{arguments}",
{
"gpiiKey": "{loginChrome}.options.gpiiKey",
"clientIds": [
"org.chrome.cloud4chrome"
]
}
]
}
},
"components": {
"clientOne": {
"type": "gpii.tests.flowManager.browserChannel.chromeClient"
},
"loginChrome": {
"type": "gpii.tests.flowManager.browserChannel.loginRequest",
"options": {
"gpiiKey": "chrome2"
}
},
"logoutChrome1": {
"type": "gpii.tests.flowManager.browserChannel.logoutRequest",
"options": {
"gpiiKey": "chrome2"
}
},
"logoutChrome2": {
"type": "gpii.tests.flowManager.browserChannel.logoutRequest",
"options": {
"gpiiKey": "chrome2"
}
}
},
"sequence": [
{
"func": "gpii.tests.flowManager.browserChannel.checkClients"
},
{
"func": "{clientOne}.connect"
},
{
"event": "{clientOne}.events.onConnect",
"listener": "fluid.identity"
},
{
"func": "{clientOne}.sendId"
},
{
"event": "{clientOne}.events.onReceiveMessage",
"listener": "gpii.tests.flowManager.browserChannel.checkConnectionRequest"
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.chrome.cloud4chrome": 1
}
},
{
"func": "{loginChrome}.send"
},
{
"event": "{testCaseHolder}.events.loginAndSettingsChangedChrome",
"listener": "gpii.tests.flowManager.browserChannel.loginAndSettingsChanged"
},
{
"func": "{logoutChrome1}.send"
},
{
"event": "{logoutChrome1}.events.onComplete",
"listener": "{logoutChrome1}.checkResponse"
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.chrome.cloud4chrome": 1
}
},
{
"func": "{clientOne}.disconnect"
},
{
"func": "{logoutChrome2}.send"
},
{
"event": "{logoutChrome2}.events.onComplete",
"listener": "gpii.tests.flowManager.browserChannel.checkErrorResponse",
"args": [
"chrome2",
"{arguments}.0",
"{arguments}.1"
]
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients"
}
]
},
{
"name": "Flow Manager BrowserChannel tests",
"expect": 30,
"config": {
"configName": "gpii.flowManager.tests.browserChannel.config",
"configPath": "%flowManager/test/configs"
},
"events": {
"loginAndSettingsChangedChromeAndFirefox": {
"events": {
"login": "{loginChromeAndFirefox}.events.onComplete",
"org.chrome.cloud4chrome": "{clientTwo}.events.onSettingsChanged",
"org.mozilla.cloud4firefox": "{clientThree}.events.onSettingsChanged"
},
"args": [
"{arguments}",
{
"gpiiKey": "{loginChromeAndFirefox}.options.gpiiKey",
"clientIds": [
"org.chrome.cloud4chrome",
"org.mozilla.cloud4firefox"
]
}
]
}
},
"components": {
"clientOne": {
"type": "gpii.tests.flowManager.browserChannel.chromeClient"
},
"clientTwo": {
"type": "gpii.tests.flowManager.browserChannel.chromeClient"
},
"clientThree": {
"type": "gpii.tests.flowManager.browserChannel.firefoxClient"
},
"clientFour": {
"type": "gpii.tests.flowManager.browserChannel.unauthorizedClient"
},
"clientFive": {
"type": "gpii.tests.flowManager.browserChannel.chromeClient"
},
"loginChrome": {
"type": "gpii.tests.flowManager.browserChannel.loginRequest",
"options": {
"gpiiKey": "chrome2"
}
},
"logoutChrome1": {
"type": "gpii.tests.flowManager.browserChannel.logoutRequest",
"options": {
"gpiiKey": "chrome1"
}
},
"logoutChrome2": {
"type": "gpii.tests.flowManager.browserChannel.logoutRequest",
"options": {
"gpiiKey": "chrome2"
}
},
"logoutFirefox": {
"type": "gpii.tests.flowManager.browserChannel.logoutRequest",
"options": {
"gpiiKey": "firefox"
}
},
"loginChromeAndFirefox": {
"type": "gpii.tests.flowManager.browserChannel.loginRequest",
"options": {
"gpiiKey": "chrome_and_firefox"
}
},
"logoutChromeAndFirefox": {
"type": "gpii.tests.flowManager.browserChannel.logoutRequest",
"options": {
"gpiiKey": "chrome_and_firefox"
}
}
},
"sequence": [
{
"func": "gpii.tests.flowManager.browserChannel.checkClients"
},
{
"func": "{clientOne}.connect"
},
{
"event": "{clientOne}.events.onConnect",
"listener": "fluid.identity"
},
{
"func": "{clientOne}.sendId"
},
{
"event": "{clientOne}.events.onReceiveMessage",
"listener": "gpii.tests.flowManager.browserChannel.checkConnectionRequest"
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.chrome.cloud4chrome": 1
}
},
{
"func": "{clientTwo}.connect"
},
{
"event": "{clientTwo}.events.onConnect",
"listener": "fluid.identity"
},
{
"func": "{clientTwo}.sendId"
},
{
"event": "{clientTwo}.events.onReceiveMessage",
"listener": "gpii.tests.flowManager.browserChannel.checkConnectionRequest"
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.chrome.cloud4chrome": 2
}
},
{
"func": "{clientThree}.connect"
},
{
"event": "{clientThree}.events.onConnect",
"listener": "fluid.identity"
},
{
"func": "{clientThree}.sendId"
},
{
"event": "{clientThree}.events.onReceiveMessage",
"listener": "gpii.tests.flowManager.browserChannel.checkConnectionRequest"
},
{
"func": "{clientFour}.connect"
},
{
"event": "{clientFour}.events.onConnect",
"listener": "fluid.identity"
},
{
"func": "{clientFour}.sendId"
},
{
"event": "{clientFour}.events.onReceiveMessage",
"listener": "gpii.tests.flowManager.browserChannel.checkRejectedConnection",
"args": [
"{arguments}.0",
"{clientFour}.options.solutionId"
]
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.chrome.cloud4chrome": 2,
"org.mozilla.cloud4firefox": 1
}
},
{
"func": "{clientOne}.disconnect"
},
{
"func": "{logoutChrome1}.send"
},
{
"event": "{logoutChrome1}.events.onComplete",
"listener": "gpii.tests.flowManager.browserChannel.checkErrorResponse",
"args": [
"chrome1",
"{arguments}.0",
"{arguments}.1"
]
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.chrome.cloud4chrome": 1,
"org.mozilla.cloud4firefox": 1
}
},
{
"func": "{loginChromeAndFirefox}.send"
},
{
"event": "{testCaseHolder}.events.loginAndSettingsChangedChromeAndFirefox",
"listener": "gpii.tests.flowManager.browserChannel.loginAndSettingsChanged"
},
{
"func": "{logoutChromeAndFirefox}.send"
},
{
"event": "{logoutChromeAndFirefox}.events.onComplete",
"listener": "{logoutChromeAndFirefox}.checkResponse"
},
{
"func": "{clientTwo}.disconnect"
},
{
"func": "{logoutFirefox}.send"
},
{
"event": "{logoutFirefox}.events.onComplete",
"listener": "gpii.tests.flowManager.browserChannel.checkErrorResponse",
"args": [
"firefox",
"{arguments}.0",
"{arguments}.1"
]
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients",
"args": {
"org.mozilla.cloud4firefox": 1
}
},
{
"func": "{clientThree}.disconnect"
},
{
"func": "{loginChrome}.send"
},
{
"event": "{loginChrome}.events.onComplete",
"listener": "gpii.tests.flowManager.browserChannel.loginAndSettingsChanged",
"args": [
{
"login": [
"{arguments}.0"
]
},
{
"gpiiKey": "{loginChrome}.options.gpiiKey"
}
]
},
{
"func": "{clientFive}.connect"
},
{
"event": "{clientFive}.events.onConnect",
"listener": "fluid.identity"
},
{
"func": "{clientFive}.sendId"
},
{
"event": "{clientFive}.events.onReceiveMessage",
"listener": "gpii.tests.flowManager.browserChannel.checkConnectionRequest"
},
{
"func": "gpii.tests.flowManager.browserChannel.checkPersistentSettings",
"args": "org.chrome.cloud4chrome"
},
{
"func": "{clientFive}.disconnect"
},
{
"func": "{logoutChrome2}.send"
},
{
"event": "{logoutChrome2}.events.onComplete",
"listener": "{logoutChrome2}.checkResponse"
},
{
"func": "gpii.tests.flowManager.browserChannel.checkClients"
}
]
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment