Desktop Testing, GNOME Continuous and VMs..

Before writing tests, one needs to figure whats wrong with the existing ones and fix them. Or better more get them to run first.
This is where I started testing those we already have gnome-weather. (Insert – This is where I realized my system needed a lot more packages, thrashing and fixing to run anything close to tests) .

Usually, by my experience prior to this project, I would simply run the python tests (via “make check”). However, as gnome-weather has quite a complicated way to get started, one needs gnome-desktop-testing runner installed via jhbuild.

[sourcecode language="bash"]
jhbuild build gnome-desktop-testing-runner
jhbuild run gnome-desktop-testing-runner org.gnome.Weather
[/sourcecode]

Following this, to be able to run the above tests the app needs to be built with  –enable-installed-tests -> this to be added in autogenargs in the file “~/.config/jhbuildrc”.

I faced some at-spi issues, which I resolved by building  at-spi2-atk, at-spi2-core and pyatspi2-python2 with jhbuild.

In my case however, some packages clashed because of which depreciation errors kept intruding. To overcome this, I moved to a much saner approach. Install a pristine environment for the tests. (Read – create a gnome-continuous VM and work on installed tests).

The following post will talk all about setting up a VM for gnome-continuous. The image we will need is Here.
There are various options of VM Managers available , the easiest to use is Virt-Manager, the one I used.

The foremost thing we will do is, setting up a Bridged Network which the VM can use to ssh into.

  1. Go to “Edit – Connection Detals”
  2. Navigate to “Virtual Networks”
  3. Click “+” < Input any name for the Network < Then click Forward < Forward < Forward < Check “Forwarding to physical network”
  4. Choose your connection (em1 usually, if wired) and finally, method = NAT
  5. Click Finish.

Your final output should be something like the below:

Image

After the network is setup, we will create the VM which will be using the above network to connect to the internet and for ssh connections. The steps to install the gnome-continuous image can be seen in the following screens.

ImageImageImageClick Forward < Finish.

Make sure the VM boots. A few troubleshooting tips:

  • Make sure the storage format is selected correctly, the default format is “raw”, while we are using “qcow2” , which might cause problems in booting the VM. You can correct the same by changing the it from the IDE Disk settings tab as follows: Image
  • Another issue can be the boot loader settings. Make sure the Boot source is set to be from the Hard Disk. Image

After this hopefully, your VM should be up and running!
If not. you arent alone ! 😛 Although the VM should ideally boot up by now, there is a slight bug because of which you might be prompted to login. I was subjected to a blank gnome screen and was stuck after this. The workaround for the following awaits you in the escape terminal. The steps you need are :

  1. Start the vt2 terminal by sending in the combination Ctrl+Atl+F1/F2
  2. Login as root
  3. Use “useradd test”
  4. and finally ‘passwd test”

This should get the VM up and running with a VM 😀

Image

More on testing to follow 🙂

 

 

Advertisements

5 thoughts on “Desktop Testing, GNOME Continuous and VMs..

  1. So I assume Boxes is not working for you or gnome-continuous images are not working out of the box in Boxes? Would be really nice to get bug reports on those issues so at least in GNOME and especially for GNOME development, people would use our own VM software rather than an external one.

    1. Hello Zeeshan!
      I did try using boxes, but somehow I was facing some issues with that + qemu console later. So I decided to stick to the tried and tested software, since my work was time bound and I could not spend much time on debugging VM issues, more than I had, than learning behave, Dogtail etc. However, I am making the VM run in boxes too now, and hopefully should follow up with a blog about that too 🙂

  2. Nice tutorial, Shivani. Thanks a lot! Though I think you also need to change “Video” to “VGA”. At least it doesn’t work for me if I don’t do that.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s