tests: do not show window if possible

to avoid window that pop up when running the test suite.