LDTP Architecture

From LDTP

NOTE: This site is no longer maintained, Please visit http://ldtp.freedesktop.org for latest updates

-- Under construction --

Architecture of LDTP

The important files of LDTP are:

ldtp.c

gui.c

client.c

appmap.c

input.c

var.c


1.ldtp.c:

     This is the main executable file. All other functions and files are called from this file.
   i. It receives data from the server line by line. For this it uses the function
      send_line (to send the test case file name). 
  ii. It performs the function of processing the current record( process_current_record).
      This processing is done using a switch statement. The switch statement switches to
      the particular case (Eg. : check_box, combo_box, dialog, push_button, menu item,
      table text, etc ).This processing is done by the ldtp_main function.
 iii.It connects to the server and retrieves test-records one by one and processes them with
     the help of process_current_record function.

2. gui.c:

       The main functions of gui.c are
     i. Get the accessible handle of the given application ( for eg. to get the accessible handle of  Gedit). This includes functions to 
        * Get the SPI handle of desktop
        * Get total count of child processes in the desktop
        * Traverse the list of application handle and if application name matches, then return the handle.
     ii. Get accessible handle of the given object.

3. client.c: The main functions of client.c are

     i.  Connect to the server: It performs the function of connecting to the server. (It connects the main ldtp file to the server). It returns “END” on     
         the completion of the file.
     ii. Read line: Performs the function of reading the test file line by line.
     iii.Send line: performs the function of sending a file from the ldtp to the server. It returns a “OK” on the successful completion of the operation.

4.appmap.c:

         The main functions of appmap.c are 
     i. It reads the appmap file stored in the input directory and parses the file, line by line to the server.
     ii.It generates the hash tables for the given input files (appmap.map and test.SDD) It also prints the data in the hash table.

5.input.c:

         The main function of input.c is to parse the input record, test.SDD , one line at a time to the server.

6.var.c:

      The main function of this file is to initialise the hash table which holds the appmap.