Take the 2-minute tour ×
Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

I have an automated testing program in Perl. When it is launched on Windows, it has pop-up windows, like Windows cmd console or SunAwtFrame, and I keep losing input focus.

I don't want to watch my test for hours, instead I want to use my 12-core machine to do something else concurrently. My question is that can I hide/block the test GUI windows, or put all test processes in background (no GUI interruptions)?

I have tried to use virtual desktops to hide my test pop-up Windows.

First, VituaWin won't work for my case. All pop-up windows are shown on the current display desktop, not the original starting desktop.

Second, Windows Sysinternals Desktop.exe seems to be a good candidate. It can hide all my test pop-ups in its starting desktop. However, I failed to automate the process; I did not find a way to use Win32::GuiTest and Windows Desktop API to launch apps from a different desktop. (This may explain why Sysinternal Desktop.exe does not offer such capability in their manual page.) Any help on this method?

It seems to me what left on the table is to block GUI.

Two options I can think of. First is to convert my perl test program into a Windows service, and launch tests in non-GUI mode. Second, install ssh-service on my Windows, and launch tests without X forwarding (via opensshd, or other ssh services). I personally prefer the second option (it also paves the way for distributed testing). Any recommendation/suggestion is highly appreciated on this topic.

share|improve this question

3 Answers 3

GUI automation is very tricky to say the least. As a general rule of thumb GUI automation demands that the automated test 'know' the machine state at all times. This means that we shouldn't assume that a particular window has focus. If the automation requires a window to have focus it should check to make sure that window has focus and if not set focus to that window.

Running your GUI automated tests concurrently on a main, or desktop machine seems very counter-intuitive since your test 'windows' will always want to be in the foreground.

VMs my be another option, but if your functional tests can run successfully and provide you the information you need without having to manipulate the GUI, then IMHO that is a great approach and one we use quite often.

share|improve this answer
    
VMs is one of solutions, however, it comes with large overheads and large system loads. –  zhjeff Dec 12 '13 at 17:14
    
Great comments. VMs is indeed one of solutions, however, it comes with high overheads and large system loads. In my case, tests show all pup-up windows as its routine procedure, demonstrating results in graphs in windows. I believe, focus change is intended to be. Sometime, we won't care about tests, unless something goes wrong, and we are good at detecting it. –  zhjeff Dec 12 '13 at 17:23

My hunch is what you're looking for is a "QA Environment", which is just a term to describe a place where testing happens.

In contrast, your normal desktop is more like a "workstation" or perhaps even "Dev Environment".

The problems you describe are part of the reason these sorts of tasks are done in different places. Setting up a Virtual Machine on your workstation to house your QA Environment is a great way to get started.

share|improve this answer

The best choice will be using Virtual Machines for test automation purpose.
You can download free Windows Virtual Boxes from Modern.IE.

http://www.modern.ie/en-us/virtualization-tools/#downloads

The license agreement does not restrict you to test Desktop or any other applications. You may install any 3-rd party software.
The only restrictions are:

  • You’ll have to use those images only for testing purpose. You are not allowed to run the images as production servers.
  • The image lifetime expires in 90 days. Then you have to delete and restore the VM from scratch.
share|improve this answer
    
Great info. I am checking it out. –  zhjeff Dec 12 '13 at 17:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.