Plugins

From Autodrive
Jump to: navigation, search

This chapter describes existing plugins that implements functionality often needed or useful for a wider audience.

A plugin is an extension of the core driver functionality. This can also be expressed as an advanced command in some scripting language, but if often used or if the expressive power of Java is wanted, a plugin can be a better solution. Plugins can be used to extend the basic command set, if needed. Furthermore, it is a nice way to distribute functionality in a more or less well defined manor.

A plugin can be activated in the driver ant build.xml file by using the plugin name or names in a comma-separated list. This is done with the system property ad.plugin.list.

Connectivity

Connecivity is about connecting machines to each other over some network. This requires at lot of detail of sources, ports, NAT, destination etc. As it can be seen from the typical network figure below, the task is to validate some connection between source and target - i.e. login to the source machine and perform "telnet target port". Furthermore, access to the remote network should be handled from the origin machine through some jumpserver.

This plugin is written to support automated connectivity tests like depicted in the figure by supporting telnet, socks, and SSH functionality.

Typical network scenario in a connectivity universe

This is a very powerful plugin in conjuction with some configuration mangement database, which could be populated by using this plugin aswell. Needless to say, this applies especially to large distributed computer networks.

The plugin fits into the

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_Connectivity_Commands);
ENDSCRIPT

Further examples

Webservice

This plugin implements SOAP 1.1 Webservice calls with support for HTTP proxies, SOCKS proxies, basic authentication, OCES x509v3 signing and encryption, and SAML 1.1.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_Webservice_Commands);
ENDSCRIPT

Further examples

LDAP

This plugin provides logic for talking and manipulating LDAP databases.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_LDAP_Commands);
ENDSCRIPT

Further examples

Selenium

This plugin implements a wrapper for Selenium. It provides accessor methods to Webdriver and Selenium objects which can be accessed from advanced commands. The plugin itself provides additional functionality for screendumps when errors occur, which are inserted accordingly in the html report.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_Selenium_Commands);
ENDSCRIPT

Further examples

FTP

Plugin that supports FTP, SFTP, and FTPS.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_FTP_Commands);
ENDSCRIPT

Further examples

WLST

Embedded WebLogic Scripting Tool for introspection and manipulation of a weblogic server.

The common.xml file under the Driver folder needs to be updated with information about Weblogic binaries, e.g.:

<!-- Weblogic dependencies -->
  <property name="weblogic.home" location="${lib}"/>
  <property name="weblogic.home2" value="C:/Oracle/Middleware/wlserver_10.3" />
  <path id="weblogic.jar.path">
    <pathelement location="/home/Oracle/Middleware/wlserver_10.3/server/lib/weblogic.jar" />
    <pathelement location="/home/Oracle/Middleware/modules/com.oracle.cie.config-wls_7.1.0.0.jar" />
    <pathelement location="/home/Oracle/Middleware/modules/com.oracle.cie.comdev_6.3.0.0.jar" />
    <pathelement location="/home/Oracle/Middleware/oracle_common/modules/com.oracle.cie.config_7.1.0.0.jar" />
    <pathelement location="/home/Oracle/Middleware/modules/com.oracle.cie.config-wls-schema_10.3.4.0.jar" />
    <pathelement location="/home/Oracle/Middleware/modules/com.oracle.cie.wizard_6.1.0.0.jar" />
    <fileset dir="${weblogic.home2}/server/lib" erroronmissingdir="false" >
      <include name="weblogic.jar"/>
    </fileset>      
  </path>


This plugin requires access to weblogic binaries.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_WLST_Commands);
ENDSCRIPT

Further examples

MIS

Plugin that implements a declarative language Master Install Script (MIS) for deploying and configuring a Weblogic installation. MIS commands are implememted one-to-one as advanced commands. The MIS plugin handles parsing and mapping of MIS commands to Autodriver advanced commands.

This plugin requires access to weblogic binaries.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_MIS_Commands);
ENDSCRIPT

Further examples

SQL

Currently under development.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_SQL_Commands);
ENDSCRIPT

Further examples

Excel

This plugin has been written for automated testing of webservices. Its purpose is to clearly place the responsibility for writing testspecifications and separate this from automating the test, which requires technical knowledge. This way a team of automationspecialists can work on orchestrating the automated testsuites in a datadriven manner while businesspeople specify the testcases.

Currently, the plugin supports the process of testing webservices:

  1. Iteration 1
    1. Some webservice needs to be tested
    2. An excel book is created with request, response, and fault sheets
    3. Testanalyst specifies each testcase in one row in the request sheet
  2. Iteration 2
    1. Automation specialist runs the testsuite for the webservice and sends back the actual result sheet
    2. The Testanalyst verifies the result and moves the correct answers to the response sheet for each testcase

Now the webservice can be regression tested at will.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_Excel_Commands);
ENDSCRIPT

Further examples

WSDL

The WSDL plugin has been written to be able to generate request, response, and fault templates for webservices defined by some WSDL file.

The design goal has been to relay comments and constraints as specified in the xsd schema files and to process abstract WSDL files, which has not been bound. i.e. implemented. Furthermore, the plugin handles XmlSchemaAny types by taking hints towards what schemas to insert at some defined point.

In a corporate business, this plugin supports multiple groups working together and keeping the field descriptions intact from specification to testing, thus supporting the lifecycle of webservices.

Usage

/*
 * Accessing public methods on the plugin, see javadoc
 */
SCRIPT:javascript
  importPackage( Packages.dk.autodrive.base );
  importPackage( Packages.dk.autodrive.plugins );

  var f = ''+at.loadJS("stdfunc.js"); eval(f);
  theObj = getPlugin(Packages.dk.autodrive.plugins.AD_WSDL_Commands);
ENDSCRIPT

Further examples