Skip to content

System test 'Starts from desktop shortcut' relies on NVDA. #14293

@feerrenrut

Description

@feerrenrut

Description of the problem

The system test 'Starts from desktop shortcut' as part of the 'Basic start and exit tests' defined in startupShutdownNVDA.robot relies on NVDA to be running to send the keyboard shortcut which is intended to start NVDA.

The test is not doing what it describes. It also is fragile since the Robot test spy loses its connection unexpectedly.
This may affect other tests that involve a restart.

See example test failure description from #14054

RF log:

21:35:10.211	INFO	emulateKeyPress ('control+alt+n',)	
21:35:17.569	FAIL	Connection to remote server broken: [WinError 10061] No connection could be made because the target machine actively refused it	
21:35:17.569	DEBUG	Traceback (most recent call last):
  File "C:\projects\nvda\tests\system\robot\startupShutdownNVDA.py", line 124, in test_desktop_shortcut
    spy.emulateKeyPress("control+alt+n")
  File "C:\projects\nvda\tests\system\libraries\NvdaLib.py", line 256, in runKeyword
    return lib.run_keyword(keyword, args, kwargs)
  File "C:\projects\nvda\.venv\lib\site-packages\robot\libraries\Remote.py", line 106, in run_keyword
    result = RemoteResult(self._client.run_keyword(name, args, kwargs))
  File "C:\projects\nvda\.venv\lib\site-packages\robot\libraries\Remote.py", line 264, in run_keyword
    raise RuntimeError(message)

Note NVDA is already running, and is providing the connection to RF.
NVDA is used to send a "control+alt+n" shortcut to start NVDA.
Starting a new instance of NVDA will cause the currently running instance to exit.
This will cause the server to disconnect.
In the failed test image there is no indication that NVDA is running, when NVDA is running the highlighter should be visible.

NVDA log:

INFO - core.main (13:35:12.499) - MainThread (4652):
Exiting
DEBUG - core.triggerNVDAExit (13:35:12.499) - MainThread (4652):
_doShutdown has been queued

This indicates it was about 5 seconds from NVDA shutdown until the RF remote error.

NVDA logs, crash dumps and other attachments:

None

System configuration

NVDA installed/portable/running from source:

Installed

NVDA version:

alpha versions

Windows version:

Windows 10

Name and version of other software in use when reproducing the issue:

Running system tests on appveyor

Other information about your system:

None

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions