NewApplications

If you want to add test suites to an Ubuntu application that is not yet available in the framework you will need some python coding knowledge and should have some knowledge of the LDTP framework.

When adding a new Ubuntu application to the framework, you will need to edit the mago/applications/ubuntu.py file. When adding a new generic GNOME application to the framework, you will need to edit the mago/applications/gnome.py file.

In the first one, add a new child class of Application, for the selected application, following the template below:

   1 class <NameOfApplication>(Application):
   2     """
   3     Description of the class
   4     """
   5  
   6     """
   7     Application constant labels
   8     """
   9     WINDOW       = "frmPasswordsandEncryptionKeys"
  10     LAUNCHER     = "seahorse"
  11  
  12     def __init__(self):
  13         Application.__init__(self, ubuntu_constants.<APP_WINDOW_NAME>)
  14 
  15     def do_stuff(self, arg1, arg2):
  16         """
  17         Description of the method
  18         
  19         @type arg1: <string, float, ...>
  20         @param arg1: description of first argument
  21 
  22         @type arg2: <string, float, ...>
  23         @param arg2: description of second argument argument
  24 
  25         """
  26         
  27         application = ooldtp.context(self.name)
  28         
  29         #insert here the ldtpcode
  30         
  31     def do_other_stuff(self, arg1, arg2):
  32         """
  33         Description of the method
  34         
  35         @type arg1: <string, float, ...>
  36         @param arg1: description of first argument
  37 
  38         @type arg2: <string, float, ...>
  39         @param arg2: description of second argument argument
  40 
  41         """
  42         
  43         application = ooldtp.context(self.name)
  44         
  45         #insert here the ldtpcode

All the constants of the application, such as window titles, button names, etc. should be described as strings at the beginning of the class.

All the applications should have these methods:

  • init: It calls the parent's init method with the name of the window title for the new one.

  • The rest of the methods will use ldtp calls to do common stuff with the application: write text, create documents, etc.

The test suites folder

When adding a new application to the framework, you should also create a new folder in the root mago folder called as the application name. This folder will be the container of the testsuites related to this application.

Please, refer to the document about creating new tests for more information about how to add new test suites to the new application.

Testing/Automation/Mago/NewApplications (last edited 2009-06-29 09:19:51 by 63)