Home - GielRaijmakers/FTAS GitHub Wiki

Welcome to the FTAS wiki!

This wiki will tell how FTAS is made and how to use it.

Technical: Sikuli

Sikuli is made by another person/community. All about Sikuli can be found on: http://sikulix.com The framework is made with Sikuli 1.1.0.

I do use Ruby in my scripts, so, all there is on Ruby: https://www.ruby-lang.org/en/
The scripts I made are split up in a few different technical parts. There is a script pure for the repository of Sikuli, it stores all images that are used in the testscripts. One script stores all generic functions to "translate" the testscript into sikuli scripts. And one script is for the project specific scripts (like handeling certain popups).

aut.sikuli

In this script the "appication under test" scripts are made. A function in this script will look like:

def ExampleDef(list)
    begin
      wait('image.png',5)  
      HandelTestStep(list)
      passed = true
    rescue
        ErrorHandler("error", "ExampleDef")         
        passed = false
    ensure 
       WriteToLog("ExampleDef",passed)  
    end
end

The function first waits till a certain image is loaded on the screen (e.g. a label). If it is loaded, it sends a list to the generic function "HandelTestStep". The step it self is logged with the generic function "WriteToLog". A line in a testscript can look like:

 ExampleDef("birthdate:23-5-1977;search:<click>;")

The list it sends to the "HandelTestScript" will look like:

 "birthdate:23-5-1977;search:<click>;"

ExampleDef is an actionword. The objects birthdate will be filled in with "23-5-1977" (a type action). The object "search" will get a click event. (translates into Sikuli click("search.png") ).

generic.sikuli

This script contains functions that arn't project specific. These are functions for handeling a testscript (there is an option to run prestored testscript, e.g. when a logon script is always the same). Handeling the teststeps (clicking on an object, filling in some text, etc...). Making screenshots for testresults and logging steps.

repository.sikuli

This script contains all images for the project. It doensn't matter how they are added, as long as they get logical names and not the number they get by default. The name should be the same as the object for an actionword. E.g. actionword ExampleLogon will have objects "username", "password", "cancel", "OK". If a project is made correct all cancel and ok buttens will look the same. "username" is the editbox, so, the image will be named username.png. For adding to the repository, record "click("username.png")".

Technical: Excel

Excel is part of the total solution of the FTAS framework. With the Excel sheet a tester can create tests and export them to a txt file that can be used by Sikuli (with the framework). In VBA there are a bunch of modules, each module with its own specific function. The Sheet provides the user with a few things:

  • Creating Projects
  • Creating Actionwords
  • Creating Objects with the actionwords
  • Creating functional testscripts
  • Exporting functional testscripts(Excel) to Sikuli scripts
  • Providing predefined actions (right mouse click in Excel)
  • Providing FTAS ribbon in Excel

A tester can select a project. With selecting this project, all belonging actionwords are loaded into a dropdown menu in the A column. When an actionword is selected, the belonging objects are added to the sheet.

The VBA code is set up modular. Changes and alterations should not confilct in any way. Currently a accesdb is used. When you would like to use another kind of db, just change the GetRS and RunSQL. -> On the backlog: generic db settings what GetRS and RunSQL will use....

dbmodule

This contains all database related functions. There are a few functions only for creating the sql string, executing an sql and getting a recordset.

ExportTestScript

This module is only for exporting the created testscript into a textfile. The content of this textfile is a script that can be used in sikuli.

importResults

This is an empty module, reserved to get the results after the sikuli run.

Main

This module contains the function to set up the sheet. Getting the actionwords, getting the projects, getting the objects, file checker and opening the configuration form.

Menu

This module is for adding the ribbon menu and the rightclick menu.

ReadResults

Part of the importResults module, also empty

Repository

This module actually retrives the actionwords, projects and objects. This passes the results to the main module.

StartTestInSikuli

Also a TODO module. I hope to figure out how to open sikuli from within the excelsheet....

Technical: accdb

The database is used by the excelsheet to store the actionwords, projects and objects.

Functional: FTAS

FTAS exists out of 3 components. Sikuli with ruby scripts, Excelsheet with VBA, and an access database(can be changed into any other db easy). The installation of Sikuli should be clearly described on the page mentioned above. Also how to install Ruby should be clear.

In the repo you will find the repository.sikuli, aut.sikuli, generic.sikuli. These files should be in one folder. The aut.sikuli is the "application under test".

The repository.sikuli and aut.sikuli are empty, except for some comments. In the techical explaination I go more into these scripts.

The generic.sikuli script contains all generic functions for translating the testscript generated by Excel, creating reports, making screenshots and error handling.

Functional: Excel

The Excelsheet is made for tester. Here a tester can create testscripts for specific projects. In order to make the scripts, first the project(s), actionwords and objects should be added to the database. This can be done with the configuration form. This form is called with the button in the ribbon. To logon to the administrator tab, fill in the password (default: test).

⚠️ **GitHub.com Fallback** ⚠️