Conversation
This comment was marked as outdated.
This comment was marked as outdated.
These may require access to IAccessible or RPC, which must happen from main thread.
When "--include NVDA" is present, it isn't possible to select some other tag only, tests matching either tag will be run. This results in many tests running, when a developer may only wish to run chrome, or symbols tests. The initial intention was to prevent developers accidentally running installer tests. This is now achieved by supplying a tag that matches no tests.
HWND passed into EnumWindowsProc was a lpclong, other HWND vals were integer objects, comparisons for the same HWND were always false.
- Keep the 'start' process around until chrome exits (/wait) Track this independently of the chrome process - Look up the chrome window handle and title and save to instance var on the library instance. Work with "Window" class instances rather than HWND directly. - Use the start process to confirm exit, logging shows that the start process still exists prior to sending control w, but not after.
So that screenshots can contain more information.
The test unable to set the foreground window with user32.SetForegroundWindow Testing locally shows that this won't work, documentation backs this up. The RF test runner process is not the foreground process. See docs: https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setforegroundwindow#remarks
view desktop alt+tab back to chrome wait for chrome to be foreground app
Initially this was done to ensure a "clean slate" for each subsequent test. However, each test sample loads in a new tab already, the risk of interference is low. On the offchance that closing and opening chrome causes delays, or background updates to run which may interfere with the tests on appveyor, this is disabled. For developers, it is easier to inspect test samples after the test runs. This may be important if the test fails. However, it is noted that it leaves many tabs open for the developer to tidy up.
Appveyor systems seem to have become slower. Some the amount of time it takes for NVDA to start up is approaching 10 seconds.
714ae81 to
1b2ef06
Compare
|
These system test changes now target beta. While it is still uncertain about the impact on the system test stability, the risk should be quite low for user functionality. |
|
|
||
| def dump_braille_to_log(self): | ||
| def _dump_braille_to_log(self): | ||
| """Should only be called on main thread""" |
There was a problem hiding this comment.
This docstring fails to explain why these methods have to be called from the main thread. Documenting the reasons may allow someone to lift this limitation in the future if this ever becomes a problem.
There was a problem hiding this comment.
Apparently, this comment was missed. At the very least I'll document it here. Several of these functions rely on NVDA code that must be called on the main thread due to limitations in API's being used.
An example of what happens when they aren't called on the main thread:
DEBUGWARNING - NVDAObjects.IAccessible.IAccessible._get_IAccessibleRole (23:29:19.477) - RF Test Spy Thread (1960): accRole failed: (-2147417842, 'The application called an interface that was marshalled for a different thread.', (None, None, None, 0, None))
I assume this limitation is to ensure thread safety for the API implementation.
Related to #13983 Summary of the issue: Sometimes the Appveyor environment is unpredictable, recently Docker Desktop opens a window asking for feedback. This window takes the foreground which subsequently results in applications started from the system test being unable to take focus back. Description of user facing changes For developers: The intention is to fix this foreground issue separately, which may take some time. Until then, and for other issues in the future, make it easier to enable RDP as required. The details of the connection show in the build log at the start of the build (after cloning NVDA) Description of development approach When the environment variable for an RDP password is set (via the Appveyor settings), the appveyor RDP script will be run. NV Access developers will need to set (and unset) this environment variable as required.
Link to issue number:
None
Summary of the issue:
Description of user facing changes
For developers:
Description of development approach
Investigated the approach being taken to look for flawed assumptions.
SetForegroundWindowmay be unreliable for the system tests/waitfor chrome process to finish before exiting, aiding with tracking of the processes.alt+d) then to the document withcontrol+F6chrome shortcut to ensure focus is in the document.numpad 8) to check if already on the start marker, rather than trying to move away and back.Testing strategy:
The runs on appveyor:
Robot.symbolPronunciationTests.symbolInSpeechUIRobotSetup failed:
Unable to connect to nvdaSpyLibTo mitigate, the time to wait for NVDA to startup has been extended
Known issues with pull request:
None
Change log entries:
None
Code Review Checklist: