Wednesday, May 30, 2012

Installing Rational Quality Manager for testing purpose

Objectives :

  • Evaluate if Rational Quality Manager capabilities could fit our needs in a couple of days
  • Build a test using a java.jar, injecting references datas, collecting results and evaluate this results. 


This install is a trial  Jazz Team server bundle.

Donwloading and installing
  • As I already have installed Rational Functional Tester I have an IBM Installer Manager. So I download the 1,5 Go zip file on jazz.net.
  • I unzip and register the result in the Installation manager.
  • I install all elements
After this you have a tomcat server installed in:
${YOUR_PATH}/IBM/JazzTeamServer/server

run
sudo ./repotools-qm.sh -clean

Start this server
./server.startup.sh (add a tail -f on log file to see what happened....)
Open a browser and go to
https://localhost:9443/jts/setup

you will have a setup screen :

  • Configure URI : in my case I use "https://localhost:9443/jts"  (testing purpose)
  • Configure Database : let Derby's configuration
  • Enable E-mail notification : disabled
Problems
At this point I have to stop my server because I couldn't discover properly application to register qm, ccm, etc.
After looking in logs I found a problem :
'too many file open' 
this problem sound like familiar as a friend  has the same problem on alfresco... so after looking here, modifying and restarting I could continue.

So I login as ADMIN (https://localhost:9443/jts/setup) and finish setting process. It was a long list of "next","wait", "next","wait"....  (setting for jts, qm, ccm, admin and rm)

And finally you have a success setup screen that allows you to create users or create lifcyle project....

I can now set role and permissions, create project areas and so on....

Create a command line script
After a "set up" phase :

  • test environnement, 
  • test case 
  • machines
  • users
  • and so on...
Now I would like to create a commandLine script and I block on adapter selection.... after a few reading and ggogling I found that :

  • Command Line Adapter is deliver with RQM
  • In my case it's a zip file
  • The readme.txt show how to run this adapter to allow RQM to propose this adapter in a selection list.
At the end I found this link https://jazz.net/library/article/809. This link explain a lot of things....
And this one https://jazz.net/library/article/755









Starting dev on ubuntu 12.04 LTS : GTK (part 02)

Now we have our C launcher I'd like to see how it could work with Python.
Writing the next script give the same result as in C :

main.py :
#!/usr/bin/env python

import sys
import gtk
    
class TestProg:
    def on_window_destroy(self, widget, data=None):
        gtk.main_quit()
     
    def __init__(self):
    
        builder = gtk.Builder()
        builder.add_from_file("test.xml") 
        
        self.window = builder.get_object("window1")
        builder.connect_signals(self)       
    
if __name__ == "__main__":
    prog = TestProg()
    prog.window.show()
    gtk.main()


the next step is : how to react to my button...

Friday, May 25, 2012

Starting dev on ubuntu 12.04 LTS : GTK (part 01)

After few reading and googling I choose to use glade and GTK (see http://glade.gnome.org/  and http://www.gtk.org)

Before starting I do some installations :
apt-get install  glade

apt-get install gnome-core-devel build-essential


And I start with the tutorial.. (http://developer.gnome.org/gtk-tutorial/stable/c39.html)

and then I start building my own GUI :


After few reading I saw that there is a GTK+ 3 ... Then I install it :
sudo apt-get install libgtk-3-0 libgtk-3-0-dbg libgtk-3-bin libgtk-3-common libgtk-3-dev libgtk-3-doc


To see the version and the includes path use (more explanation could be found at : http://www.micahcarrick.com/gtk-glade-tutorial-part-3.html)
pkg-config --modversion gtk+-2.0

pkg-config --cflags gtk+-3.0

Now I want to run my app... so i need to
  • write a "launcher" (I chose to write it in C)
  • compile
The launcher :

#include <gtk/gtk.h>

void 
on_window_destroy (GObject *object, gpointer user_data)
{
        gtk_main_quit();
}

int
main (int argc, char *argv[])
{
        GtkBuilder              *builder;
        GtkWidget               *window;
        
        gtk_init (&argc, &argv);
        
        builder = gtk_builder_new ();
        gtk_builder_add_from_file (builder, "test.xml", NULL);

        window = GTK_WIDGET (gtk_builder_get_object (builder, "window1"));
        gtk_builder_connect_signals (builder, NULL);          
        g_object_unref (G_OBJECT (builder));
        
        gtk_widget_show (window);       
        gtk_main ();
        
        return 0;
}

To  compile :

gcc -Wall -g -o testProg main.c -export-dynamic `pkg-config --cflags --libs gtk+-3.0`


The first running does not work...I have to 
  • change from GtkGrid to GtkTable
  • change from to 
  • change from to
  • change values attach to right_attach and bottom_attach
  • change from GtkPaned to GtkHPaned
At the end I saw :


Ok, I have something but it's not exactly what I want... 


Materials
  • gcc proxypass.c -o proxypass `pkg-config --cflags --libs gtk+-2.0`
  • http://www.micahcarrick.com/gtk-glade-tutorial-part-3.html
  • http://www.micahcarrick.com/gtk-glade-tutorial-part-1.html
  • http://www.gtk.org/documentation.php
  • sudo apt-get install libgtk2.0-dev sudo apt-get install libgtk2.0-doc devhelp

Thursday, May 24, 2012

resizing virtualbox machine disk on Ubuntu 12.04 LTS guest

Before starting do a backup and verify it works ....!


  • First use vboxmanage  (I want to changemy VM size from 8Go to 15 Go dynamic size): 

VBoxManage modifyhd  yourpath\yourMachine.vdi --resize 15360


you will see something like that  :

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%



  • Then add in the VM settings an ubuntu live CD  (containing gparted) and then boot on it. After boot, run gparted. In my case, before extend my partition, I have to move extended partition containing swap. 
  • Finally extend your partition.

At the end if you have moved your SWAP partition you'll probably change its UUID (see here). Use the next command to see your current and in use swap UUID :
cat /etc/fstab 

And use 
blkid | grep -i swap 

to see if UUID are the same.... Make correction if needed in fstab.