This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Automation.xml File

This page provides a detailed description about the WSO2 Test Automation Framework (TAF) properties and its sample values. All these properties are available in the automation.xml file.

The description below is classified into a set of contexts for demonstration purposes only.

TAF currently supports the following browser types for UI tests:

Google Chrome| Firefox| Opera | Internet Explorer | HtmlUnit

 

  1. Configurations

     
    Objective: To define custom configuration settings.

    <configurations>
    
            <deploymentDelay>xxxx</deploymentDelay>
    
            <executionEnvironment>xxxx</executionEnvironment>
    
            <coverage>xxxx</coverage>
    
            <frameworkDashboard>xxxx</frameworkDashboard>
    
     </configurations> 

    Description:

    TagSpecificationSample value(s)
    deploymentDelayAllows you to define the time delay before the test artefact deployment.60000
    executionEnvironment

    Allows you to set the test class execution environment. You can run your tests in any of the following environments: product/platform/cloud.

    product
    coverageDescribes the degree to which the source code of a program has been tested. You can use this tag to enable/disable the coverage statistics generation. Use the following options appropriately: true/false. true
    frameworkDashboardDisplays the test results. This property allows you to enables/disable the framework dashboard.true
  2. Tools

    Objective: To define custom settings for the selenium web driver. TAF is capable of supporting the inclusion of selenium tests inside custom test cases through the selenium web driver. Following are the configurations that need to be set up.

    <tools>
            <selenium>
                <!-- Change to enable remote webDriver -->
                <!-- URL of remote webDriver server  -->
                <remoteDriverUrl enable="true">www://xx.xxx.xx.xx:yyyy/zz/</remoteDriverUrl>
    
                <!-- Type of the browser selenium tests are running" -->
                <browser>
                    <browserType>xxxx</browserType>
                    <!-- path to webDriver executable - required only for chrome-->
                    <webdriverPath enable="false">/xxx/xxx/webDriver</webdriverPath>
                </browser>
            </selenium>
    </tools>

    Description:

    TagSpecificationSample Value(s)
    remoteDriverUrl

    URL of the remote webdriver.

    (Note: To enable this feature you should change enable/disable -> true/false)

    http://10.100.2.51:4444/wd/hub/
    browserTypeDefines the browser selenium tests that should run.firefox
    webdriverPath

    This feature is restricted to the Google Chrome browser only. Defines the path to the webDriver executable.

    (Note: To enable this feature you should change enable/disable -> true/false)

    /home/test/name/webDriver
  3. Database/Data Source 

    Objective: Database configuration to be used for data service testing. Defined configuration is used as a data source in dbs files. These db settings are used by data services.

     DB configuration in .dbs files will be replaced with your custom configuration settings at test the run time.

    <datasources>
            <datasource name="dataService">
                <url>jdbc:h2:testDB</url>
                <username>xxxx</username>
                <password>xxxx</password>
                <driverClassName>org.h2.Driver</driverClassName>
            </datasource>
            <datasource name="dataService1">
                <url>jdbc:h2:testDB</url>
                <username>xxxx</username>
                <password>xxxx</password>
                <driverClassName>org.h2.Driver</driverClassName>
            </datasource>
        </datasources>

     Description:

    TagSpecificationSample Value(s)
    url

    Database URL

    jdbc:h2:testDB
    usernameAccess credentials: Username wso2carbon
    password

    Access credentials: Password

    wso2carbon
    driverClassNameYour database driver org.h2.Driver
  4. Security
    1. Keystore

      -  KeyStore consists of a database containing a private key and an associated certificate, or an associated certificate chain.

      Objective: To minimize the security risks, TAF provides keystores to encrypt/decrypt classified information such as passwords.

      <keystore name="wso2">
                  <!--  Keystore file location -->
                  <fileName>keystores/products/wso2carbon.jks</fileName>
                  <!--  Keystore type (JKS/PKCS12 etc.) -->
                  <type>xxx</type>
                  <!--  Keystore password -->
                  <password>xxxx</password>
                  <!--  Private Key alias -->
                  <keyAlias>xxxx</keyAlias>
                  <!--  Private Key password -->
                  <keyPassword>xxxx</keyPassword>
       </keystore> 

       Description:

      TagSpecificationSample Value(s)
      fileNamePath to keystore file keystores/products/wso2carbon.jks
      type

      Type of the keystore

      (JKS/PKCS12 etc.)

      JKS
      passwordKeystore passwordwso2carbon
      keyAliasPrivate key aliaswso2carbon
      keyPasswordPrivate key passwordwso2carbon
    2.  

      Truststore

      - TrustStore contains only the certificates trusted by the client.

      Objective: Define system wide trust-store which is used to maintain the certificates of all the trusted parties.

      <truststore name="wso2">
                  <!--  trust-store file location  -->
                  <fileName>client-truststore.jks</fileName>
                  <!--  trust-store type (JKS/PKCS12 etc.)  -->
                  <type>xxxx</type>
                  <!--  trust-store password  -->
                  <password>xxxx</password>
       </truststore> 

      Description:

      TagSpecificationValue(s)
      fileNamePath to truststore fileclient-truststore.jks
      type

      Type of the truststore

      (JKS/PKCS12 etc.)

      JKS
      passwordTruststore passwordwso2carbon
  5. Feature Management

     Objective: Feature manager is powered by Equinox P2 and allows you to connect to a remote or local P2 repository and get any feature installed into TAF at runtime.

    <featureManagement>
            <p2Repositories>
                <repository name="localDefault">
                    <repository repo-id="yyy">https://xx.xx/xxx</repository>
                    <repository repo-id="yyy">file:///xxx/xxx/xxx</repository>
                </repository>
            </p2Repositories>
    </featureManagement> 

    Description: 

    TagSpecificationValue(s)
    repository nameDefine the name of the repolocalDefault
    repository repo-id

    Identity of the repo. You can use any repo identification.

    (E.g.: online-repository/file-repository)

    https://wso2.org/repo 


     

    file:///home/wtf/test

     

  6. User Management

    Objective: Allows to register a set of system wide users at the test initiation stage.

    1. Super Tenant

      - Following configuration allows you to define an admin super tenant and set of tenant users controlled by the admin super tenant.

      <superTenant>
                  <tenant domain="carbon.super" key="superTenant">
                      <admin>
                          <user key="admin">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                      </admin>
                      <users>
                          <user key="user1">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                          <user key="user2">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                      </users>
                  </tenant>
      </superTenant>

      Description: 

      TagSpecificationValue(s)
      user key

      User identification key. You are allowed to define one admin super tenant and set of tenant users.

      (admin/user1/user2)

      admin
      userName

      Username credentials for the super tenant admin/tenant users.

      (admin/testuser11/testuser21)

      admin
      password

      Password credentials for the super tenant admin/tenant users.

      (admin/testuser11/testuser21)

      admin
    2. Tenant 

      - Following configuration allows you to define an admin tenant user and set of tenant users controlled by the admin tenant user.

      <tenants>
                  <tenant domain="wso2.com" key="wso2">
                      <admin>
                          <user key="superAdmin">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                      </admin>
                      <users>
                          <user key="user1">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                          <user key="user2">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                      </users>
                  </tenant>
                  <tenant domain="abc.com" key="abc">
                      <admin>
                          <user key="admin">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                      </admin>
                      <users>
                          <user key="user1">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                          <user key="user2">
                              <userName>xxxx</userName>
                              <password>xxxx</password>
                          </user>
                      </users>
                  </tenant>
      </tenants>

      Description:

      TagSpecificationValue(s)
      user key

      User identification key. You are allowed to define one admin tenant user and set of tenant users.

      (admin/user1/user2)

      admin
      userName

      Username credentials for the tenant admin/tenant users.

      (admin/testuser11/testuser21)

      admin
      password

      Password credentials for the tenant admin/tenant users.

      (admin/testuser11/testuser21)

      admin

       

  7. Platform

    Objective: Allows to define cluster instance details to be used when performing platform test execution.

    You can define different product groups for the product category (E.g.: AS, ESB etc.) together with enable/disable clustering feature (true/ false).

    Note that default = “true”. This is not a compulsory tag to include. However, if you specify default = “true” it means that the mentioned product group is the default one for the entire platform, hence, at most there can be only one product group that carries default = “true” value even though you may include many product groups such as AS, ESB etc.  

     

    <productGroup name="AS" clusteringEnabled="true" default=”true”>
                <instance name="asstd001" type="standalone" nonBlockingTransportEnabled="false">
                    <hosts>
                        <host type="default">localhost</host>
                    </hosts>
                    <ports>
                        <port type="http">9763</port>
                        <port type="https">9443</port>
                    </ports>
                    <properties>
                        <property name="webContext">/</property>
                    </properties>
                </instance>
                <instance name="asm001" type="manager" nonBlockingTransportEnabled="false">
                    <hosts>
                        <host type="manager">localhost</host>
                    </hosts>
                    <ports>
                        <port type="http">9764</port>
                        <port type="https">9445</port>
                    </ports>
                    <properties>
                        <property name="webContext">/</property>
                    </properties>
                </instance>
    </productGroup>

    Description:

    TagSpecificationValue(s)
    instance nameYou can create many product group instances as much as you would like to. This tag carries the instance name.

    asstd001

    asm001

    type

    Type of the instance. Following are the instance types you can use: (worker/manager/lb/lb_worker/lb_manager/standalone/lb_worker_manager)

    standalone 
    nonBlockingTransportEnabledWhether the non blocking transport is enabled/disabled in the current instance (true|false)false
    host typeThe host node type

    default

    manager

    worker

    port typeDefine the port type(s) and port number(s)

    http/https/nhttps/nhttp

    9764/9445/9446/8280

    property name webContext

     

  8. Listener Extensions

    Objective: Allows to define listener extension settings. TAF execution flow of the tests are managed by the TestNg listeners. TAF defines several Manager classes to perform a specific set of tasks at each triggering state. The following describes each listener usage purpose.

    1. Platform Execution Manager

      - Server start/shutdown. Emma report generation. 
    2. Platform Suite Manager

      - Setting environment properties, perform user population. 
    3. Platform Annotation Transfer Manager

       - Annotation-Platform-user type based test selection.
    4. PlatformTestManager

       - Artifact Deployment & Cleanup tasks.
    5. PlatformReportManager

      - Generate TestNg reports, Sure-fire report, export data for Dashboard.
       
    <platformExecutionManager>
    
           <extentionClasses>
               <className>framework.test.module.testExtentionLogger</className>
     <className>org.wso2.carbon.automation.extentions.servers.wso2server.Wso2Server Extention</className>
           </extentionClasses>
    
    </platformExecutionManager>           
    
     <PlatformSuiteManager>
               <extentionClasses>
               </extentionClasses>
    </PlatformSuiteManager>
    
    <PlatformAnnotationTransferManager>
                <extentionClasses>
                </extentionClasses>
    </PlatformAnnotationTransferManager>
    
    <PlatformTestManager>
                <extentionClasses>
                </extentionClasses>
    </PlatformTestManager>
    
    <PlatformReportManager>
                <extentionClasses>
                </extentionClasses>
    </PlatformReportManager>

     

    Description:

    TagSpecificationValue(s)
    extentionClassesPluggable executable classes to be executed
    in the specific phase

    PlatformExecutionManager

    framework.test.module.testExtentionLogger

    org.wso2.carbon.automation.extentions.servers.wso2server.Wso2Server Extention

    PlatformSuiteManager

    -can remain empty if there are no pluggable classes to be executed in this phase

    PlatformAnnotationTransferManager


     

    PlatformTestManager


     

    PlatformReportManager