GPII-1839 Using the Dynamic Device Reporter when running acceptance tests#461
GPII-1839 Using the Dynamic Device Reporter when running acceptance tests#461klown wants to merge 13 commits intoGPII:masterfrom
Conversation
Modified "basic" configuration files such that the device reporter is configured/loaded in production mode as opposed to development mode.
Added a "deviceReporter" block to test definitions for the built-in, and orca test specs.
Added a "deviceReporter" block to test definitions for the built-in, jaws, maavis, and nvda test specs.
Fixed lint errors.
|
Could one of the admins verify that these changes are reasonable to test? If so, please reply with "ok to test". |
|
ok to test |
|
CI job passed. |
kaspermarkus
left a comment
There was a problem hiding this comment.
I tried running the NVDA acceptance tests in windows - but on a machine without NVDA installed - and they exploded (since it couldn't find the config file)... I think a good chunk of the purpose of this JIRA is to avoid that the tests explodes if you dont have ALL the 3rd party ATs installed on your device when running acceptance tests. So in my case for example, the acceptance test should pass - but probably print out to the console that NVDA was not installed and that was the reason for passing
| } | ||
| }, | ||
| "mergeConfigs": "%universal/gpii/configs/gpii.config.development.all.local.json" | ||
| "mergeConfigs": "%universal/gpii/configs/gpii.config.all.development.dr.production.json" |
There was a problem hiding this comment.
It seems that this file is now identical to "gpii.tests.acceptance.dynamicDeviceReporter.config.json" - so it seems sensible to remove one of them.. perhaps this one and then use the dynamicDeviceReporter instead and update references and docs accordingly
There was a problem hiding this comment.
@kaspermarkus I need clarification on what "this one" is. Which two config files are identical? Which one are you suggesting should be deleted? I can find no file with the name you gave above:"gpii.tests.acceptance.dynamicDeviceReporter.config.json".
There was a problem hiding this comment.
@kaspermarkus I figured it out. You meant that "gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json" is identical to "gpii.tests.acceptance.localInstall.confg.json". I'll delete the latter and replace it with the former, and update docs etc.
| "%flatMatchMaker/configs/gpii.flatMatchMaker.config.development.json", | ||
| "%rawPreferencesServer/configs/gpii.rawPreferencesServer.config.development.json", | ||
| "%deviceReporter/configs/gpii.deviceReporter.config.development.json" | ||
| "%deviceReporter/configs/gpii.deviceReporter.config.production.json" |
There was a problem hiding this comment.
Is this a change that you have made? And if so, what's the reason?
There was a problem hiding this comment.
Yes, this is a change I made. The reason being that this JIRA is about using the production version of the device reporter for acceptance testing. I'm guessing from your comment that the proposed change is not specific to testing, or has nothing to do with testing at all. Is that correct?
|
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
|
@kaspermarkus Using your fix for GPII-2006 helps, but the tests are still exploding in at least two other places. First, the setting handlers still attempt to set the contents of the INI file to the test values, but an exception is thrown since the file doesn't exist, and the test fails since the actual payload is a set of settings all of which are "undefined". Later, there is an attempt to kill the NVDA process, which isn't running, and that explodes/fails as well. I'm working on a fix, and looking for similar gotchas. |
Don't explode on writing to non-existent settings file.
|
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
| gpii.settingsHandlers.writeFile = function (content, options) { | ||
| if (!options || !options.filename) { | ||
| fluid.fail("writeFile: expected an options block defining filename and encoding"); | ||
| } else if (!fs.existsSync(options.filename)) { |
There was a problem hiding this comment.
This seems odd - why wouldn't we want to support writing a file which didn't previously exist? I imagine this branch would break the work that @javihernandez would like to do with #462
There was a problem hiding this comment.
There are two cases of non-existence. The case here is when the solution is not installed and there is no settings file to write. This is the flip side of using the solution to GPII-2006, where the reading of the file fails for the same reason. @kaspermarkus wrote above:
I tried running the NVDA acceptance tests in windows - but on a machine without NVDA installed - and they exploded (since it couldn't find the config file)...
See also my comment from Sep 24:
... the setting handlers still attempt to set the contents of the INI file to the test values, but an exception is thrown since the file doesn't exist ...
That happens because the settings file is within a directory structure that doesn't exist if the solution is not installed, something like "...\nvda\nvda.ini" There is no parent "nvda" directory. I'll update the unit test for writing to a non-existent file to reflect that.
The other sense of non-existence is where the solution is installed, but needs to be run once to create the settings file. In that case, writing (creating) the settings file should be supported.
We need to handle both cases. The system should be sensitive to the context -- whether the solution is installed -- and react appropriately.
Added some directory structure to better reflect the situation when a settings file does not exist because the solution is not installed.
|
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
- replaced base gpii.tests.acceptance.localInstall.config.json|txt with gpii.tests.acceptance.localInstall.dynamicDeviceReporter.config.json|txt - updated dependant configuration files to reference the new dynamicDeviceReporter base configuration file. - updated all the associated ".txt" documentation files.
|
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
|
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
|
ok to test |
|
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
|
New pull request is #494 |
@kaspermarkus One of the work items discussed at the June face-to-face was to use the dynamic device reporter in acceptance testing, and not the mock version. I volunteered to make the changes. I've done two things here:
I'm not 100% sure I've found everything that needs changing, but this is ready for review. Let me know if more changes are needed.