SkillAgentSearch skills...

Gatf

Generic Automated Test Framework For API/UI/RPA/Load Testing

Install / Use

/learn @sumeetchhetri/Gatf

README

Generic Automated Test Framework (GATF)

GATF is an automated test generator and acceptance testing framework. It provides multiple components namely the Test Generator, the Test Executor , the Config Tool and the Robotic Process Automation Tool

GATF Acceptance Test executor is data-type agnostic, which means that your testcases can be in any formats like XML, JSON or plain old CSV. Whereas the Test generator generates only XML files (so that even complex data structures can be supported within your testcases)

The primary goal of GATF is Automation with Simplicity.

Important features

  1. Robotic Process Automation
  2. Comparative Env Testing
  3. Concurrent User Testing
  4. Performance Testing
  5. Load Testing (API and UI both) [wrk, wrk2, vegeta, autocannon, embedded]
  6. UI Testing with seleasy language + seleasy debugger
  7. Reporting Engine
  8. Remote Agent for Distributed Load Testing
  9. Workflow Testing
  10. Data Source Integrations
    • SQL
    • MongoDB
    • Files (XML/JSON/CSV/XLS/XLSX/ODT)

GATF Test Executor

The GATF Test Executor module provides a consolidated testing tool for,

  1. Single Session Test case execution
  2. Performance Test case execution
  3. Scenario/Workflow based Test case execution
  4. Concurrent User Simulation
  5. Comparative Test case study against multiple environments
  6. Load (Distributed) Testing

It also provides the following,

  1. Pie charts for overall test status (Success/Failure reports)
  2. Line/Bar charts for overall performance results
  3. Detailed test case reports with comprehensive information about a test execution request/response
  4. Maven/Executable-Jar test case execution options

It uses a highly performant asynchronous http client library - async-http-client and hence achieves very good execution times.

<h3 style="margin-left:20px">GATF Test Data Providers</h3> <p style="margin-left:20px">The GATF framework provides the option to integrate to multiple data sources for fetching test case data, which include the following,</p> <li style="margin-left:40px">Any SQL compliant database</li> <li style="margin-left:40px">MongoDB</li> <li style="margin-left:40px">Files - CSV/JSON/XML</li> <li style="margin-left:40px">Inline/Value based</li> <li style="margin-left:40px">Custom Provider</li> <li style="margin-left:40px">Random Value Provider</li> <p style="margin-left:40px">The framework provides automatic built-in providers for easy integration to the above mentioned data sources. But we can also define custom providers if required.</p> <h3 style="margin-left:20px">GATF Pre/Post Test Case Execution Hooks</h3> <p style="margin-left:20px">The framework also provides the facility to plug in pre/post test case execution logic in order to control the test case execution flow, it provides 2 simple annotations,</p> <li style="margin-left:40px">@PreTestCaseExecutionHook - Marks a method as a pre-test-case execution hook</li> <li style="margin-left:40px">@PostTestCaseExecutionHook - Marks a method as a post-test-case execution hook</li> <p style="margin-left:20px">The complete configuration for the GATF executor framework is listed below, We just need to define a file with the contents below and configure it in maven or provide the path to the file to the executor to execute your test cases.</p> <details style="margin-left:20px"> <summary>Sample executor config.xml</summary> <br>
<gatf-execute-config>
    <!-- Whether auto authentication support is enabled -->
    <authEnabled>true</authEnabled>
  
    <!-- Authentication token parameters - name(token), where to find it(json),
        name(token) and usage of token in subsequent secure calls(query parameter) -->
    <authExtractAuth>token,json,token,queryparam</authExtractAuth>
  
    <!-- The authentication URL -->
    <authUrl>api/rest/auth/loginh</authUrl>
  
    <!-- The username and password parameters and their point of presence in the request -->
    <authParamsDetails>username,header,password,header</authParamsDetails>
  
    <!-- The environment base URL, all requests(authentication and other testcases)
        having relative URL's will be using this URL as their base -->
    <baseUrl>http://localhost:8080/sampleApp</baseUrl>
  
    <!-- Whether the plugin is enabled -->
    <enabled>true</enabled>
  
    <!-- Where should the testcase execution reports be generated, default folder name is out -->
    <outFilesDir>out</outFilesDir>
  
    <!-- Where to find all the testcases(xml,json,csv files), default folder name is data -->
    <testCaseDir>data</testCaseDir>
  
    <!-- Whether HTTP compression is enabled, default true -->
    <httpCompressionEnabled>true</httpCompressionEnabled>
    <!-- The HTTP connection timeout, default 10000 (10sec), time in ms -->
    <httpConnectionTimeout>100000</httpConnectionTimeout>
     
    <!-- The HTTP request timeout, default 10000 (10sec), time in ms -->
    <httpRequestTimeout>10000</httpRequestTimeout>
  
    <!-- The plugin enables the use of pre/post testcase execution hooks,
        with the help of the @PreTestCaseExecutionHook and @PostTestCaseExecutionHook annotations,
        Custom logic can be written using these annotations for pre/post testcase execution control,
        this parameter defines the pacakage to scan to find the custom defined java classes defining
        the hooks using the annotation -->
    <testCaseHooksPaths>
        <testCaseHooksPath>com.*</testCaseHooksPath>
    </testCaseHooksPaths>
  
    <!-- The number of concurrent users to simulate, default 0 -->
    <concurrentUserSimulationNum>1</concurrentUserSimulationNum>
    <!-- The number of concurrent connections to the Base environment HTTP Server, default 1 -->
    <numConcurrentExecutions>1</numConcurrentExecutions>\
  
    <!-- The provider name that will be used to fetch user/password details for user credentials -->
    <simulationUsersProviderName>file-auth-provider</simulationUsersProviderName>
  
    <!-- Whether comparative analysis is enabled, if yes then the compareEnvBaseUrls property inside
          gatfTestDataConfig element needs to define the multiple environments where a comparison
          of test case executions is desired -->
    <compareEnabled>false</compareEnabled>
  
    <!-- Whether load testing is enabled -->
    <loadTestingEnabled>false</loadTestingEnabled>
  
    <!-- Load testing execution time, time in ms -->
    <loadTestingTime>40000</loadTestingTime>
 
    <!-- The concurrent user ramp up time during load testing, time in ms -->
    <concurrentUserRampUpTime>500</concurrentUserRampUpTime>
  
    <!-- The number of report samples to be generated during the load testing window -->
    <loadTestingReportSamples>6</loadTestingReportSamples>
  
    <!-- Whether debug logs are enabled or not -->
    <debugEnabled>true</debugEnabled>
  
    <!-- The WSDL Location file with the wsdl endpoints -->
    <wsdlLocFile>wsdl-locations.csv</wsdlLocFile>
  
    <!-- The test data configuration parameters including the global parameters, compare
        environment URL's and the list of all the test data providers you may define-->
    <gatfTestDataConfig>
         
        <!-- The list of compare environment URL's -->
        <compareEnvBaseUrls>
            <string>http://localhost:8081/sampleApp</string>
        </compareEnvBaseUrls>
  
        <!-- The global parameter list -->
        <globalVariables>
            <gvar1>gvalue</gvar1>
        </globalVariables>
  
        <!-- The list of test data providers --> 
        <providerTestDataList>
  
            <!-- The MongoDB test data provider -->
            <gatf-testdata-provider>
                <!-- Provider name -->
                <providerName>mongodb-auth-provider</providerName>
                <!-- Provider class -->
                <providerClass>com.gatf.executor.dataprovider.MongoDBTestDataProvider
                </providerClass>
                <args>
                    <!-- MongoDB Host -->
                    <arg>localhost</arg>
                    <!-- MongoDB Port -->
                    <arg>27017</arg>
                    <!-- MongoDB Database name -->
                    <arg>wellogic</arg>
                    <!-- MongoDB Collection -->
                    <arg>User</arg>
                    <!-- MongoDB Query -->
                    <arg>{"status": "ACTIVE"}</arg>
                    <!-- MongoDB Collection property names -->
                    <arg>user,password</arg>
                    <!-- Provider variable names -->
                    <arg>username,password</arg>
                </args>
            </gatf-testdata-provider>
  
            <!-- The Database test data provider -->
            <gatf-testdata-provider>
                <providerName>database-auth-provider</providerName>
                <providerClass>com.gatf.executor.dataprovider.DatabaseTestCaseDataProvider
                </providerClass>
                <args>
                    <!-- Database JDBC Url -->
                    <arg>jdbc:mysql://localhost/globaldb</arg>
                    <!-- Database driver class name -->
                    <arg>com.mysql.jdbc.Driver</arg>
                    <!-- Database username -->
                    <arg>root</arg>
                    <!-- Database Password -->
                    <arg></arg>
                    <!-- SQL Query -->
                    <arg>SELECT USER_NAME,PASSWORD FROM BASE_USER</arg>
                    <!-- Provider variable names -->
                    <arg>username,password</arg>
                </args>
            </gatf-testdata-provider>
  
            <!-- The File test data provider -->
            <gatf-testdata-provider>
                <enabled>true</enabled>
                <providerName>file-auth-provider</providerName>
                <providerClass>com.gatf.executor.dataprovider.FileTestCaseDataProvider
                </providerClass>
                <args>
        
View on GitHub
GitHub Stars17
CategoryDevelopment
Updated3mo ago
Forks12

Languages

JavaScript

Security Score

92/100

Audited on Dec 23, 2025

No findings