2017 October Release

How to Run Tests From Command LinePermanent link for this heading

The Fabasoft app.test Console Player offers the possibility to start tests directly from the command line. Instead of starting the Fabasoft app.test Player in the Fabasoft app.test Studio you can execute tests by using apptest-consoleplayer.jar. This Java file is located in the installation folder of Fabasoft app.test and is used for starting the Fabasoft app.test Console Player.

First of all you need a configuration file where you define the credentials for running a test.

Afterwards you can use this configuration file for starting the Fabasoft app.test Console Player.

In the command line you can also overwrite values that have been set in the configuration file (or define all needed information directly in the command line without using a configuration file).

You can also save a configuration file with the preferences and properties set in the Fabasoft app.test Studio.

How to Create a Configuration File for the Fabasoft app.test Console PlayerPermanent link for this heading

In the configuration file you can define the properties for starting a test in the Fabasoft app.test Console Player. You can create your own configuration file (see “How to Create a Configuration File for the Fabasoft app.test Console Player”) or generate one from the Fabasoft app.test Studio as shown below.

In the Fabasoft app.test Studio you can save preferences and properties. You can also export the properties saved for a test file as a configuration file for the Fabasoft app.test Console Player.

Therefore, select the test file of which you want to create the configuration file in the "Projects" view, open the "File" menu and selecting "Save Configuration".

The configuration file is saved in the "Config Files" folder in the "Resources" folder of a project. Enter a name for the configuration file and click "Finish".

The configuration is saved and can then be used for starting the test with the Fabasoft app.test Console Player.

Note: You can change the configuration in the Fabasoft app.test Studio by opening it. Then you can either change directly the source code or use the "Properties" view for changing the values.

How to Start the Fabasoft app.test Console PlayerPermanent link for this heading

For starting the Fabasoft app.test Console Player you have to enter the following command into the command line:

java -jar "<installation path of Fabasoft app.test>/apptest-consoleplayer.jar" -config:"<path to configuration file>" [-verbose:true]

Beside defining the path to the Fabasoft app.test Console Player Java file, the following parameters can be set:

Parameter

Definition

config

Here you enter the path to the configuration file which specifies the settings for starting a test file.

verbose

By using the verbose parameter you can define if an output should be shown in the command line. Per default it is set to false. If you want to see an output on the console (which means all executed steps and their success are shown), you have to set the parameter to true.

Furthermore, you can overwrite the settings defined in the configuration file (see chapter “How to Overwrite Parameters when Starting the Fabasoft app.test Console Player”).

Example

Example

java -jar "C:\Program Files (x86)\Fabasoft\apptest\studio\apptest-consoleplayer.jar"
     -config:"C:\apptest\ConfigurationFile.ducx-config"
     -verbose:true

How to Overwrite Parameters when Starting the Fabasoft app.test Console PlayerPermanent link for this heading

When you start the Fabasoft app.test Console Player you can also overwrite the settings defined in the configuration file. You can overwrite the attributes by using the following Syntax

Syntax

-<element>.<attribute>:<value>
<element>.<attribute>="<value>"

This means that there is the possibility to define all needed information directly in the command line which means you could set the parameters for starting a test in the console instead of defining a configuration file. But when using a configuration file you have a better oversight of the values and you can reuse it (and just overwrite some parameters when starting a test).

Example

java -jar "C:\Program Files (x86)\Fabasoft\apptest\apptest-consoleplayer.jar"
     -verbose:true
     -projectpath:"D:\apptest-projects\Fabasoft Folio\\"
     -Run.execute:"{~projectpath~}Tests\WorkflowTest.ducx-test"
     -Run.address:"http://fscserver/fsc"
     -Run.clienttype:"HTML_MOZILLA : 3.0"
     -Run.scope:0004
     -Adaptor.port:4362
     -Reporting.reportpath:"D:\apptest\Reports\\"
     -Reporting.reportname:" {~testname~} - {~scope~}.ducx-rep"
     -Login.authentication:integrated

Following you can find a list of all elements and their attributes and how they can be overwritten directly in the command line:

  • Overwrite the projectpath
  • Overwrite attributes from the Run tag
  • Overwrite attributes from the ParameterTable tag
  • Overwrite attributes from the <Login tag
  • Overwrite attributes from the <Adaptor tag
  • Overwrite attributes from the <Agent tag
  • Overwrite attributes from the <Reporting tag
  • Overwrite attributes from the <Telemetry tag

Overwrite projectpathPermanent link for this heading

Usually the project path is set in the Config tag.

<Config projectpath="D:\apptest-projects\Fabasoft Folio\\" >
</Config>

-projectpath:"D:\apptest-projects\Fabasoft Folio\\"

Overwrite Run attributesPermanent link for this heading

In the Run tag you set the properties for running a test file.

<Run
   execute="{~projectpath~}Tests\WorkflowTest.ducx-test"
   webserver="fscserver"
   address="http://{~webserver~}/fsc"
   clienttype="HTML_MOZILLA : 3.5"
   scope="5"
   runs="2"
   sleep="500"
   onerror="continue"
   onerror.screenshot="true"
   onerror.htmldump="true"
   onerror.controldump="true"
   onerror.apptelemetryreport="true"
   onbreakpoint="continue"
   timeout="45000"
   sequencetimeout="150000"
   contexttimeout="300000"
   ontimeout="cancel"
   maxerrors.test="50"
   maxerrors.sequence="20"
   langpath="{~resources~}LanguageFiles\LANG_ENGLISH\"
/>

 
-Run.execute:"{~projectpath~}Tests\WorkflowTest.ducx-test"
-Run.webserver:fscserver
-Run.address:"http://{~webserver~}/fsc"
-Run.clienttype:"HTML_MOZILLA : 3.5"
-Run.scope:5
-Run.runs:2
-Run.sleep:500
-Run.onerror:continue
-Run.onerror.screenshot:true
-Run.onerror.htmldump:true
-Run.onerror.controldump:true
-Run.onerror.apptelemetryreport:true
-Run.onbreakpoint:cointinue
-Run.timeout:45000
-Run.sequencetimeout:150000
-Run.contexttimeout:300000
-Run.ontimeout:cancel
-Run.maxerrors.test:50
-Run.maxerrors.sequence:20
-Run.langpath:"{~resources~}LanguageFiles\LANG_ENGLISH\"
 

Overwrite ParameterTable attributesPermanent link for this heading

In the ParameterTable tag you define to use extern parameter tables.

In the command line you cannot set parameters directly but reference an existing parameter table file.

<ParameterTable
   filename="{~projectpath~}ParameterTables\Parameters.ducx-param"
/>

 
-ParameterTable.filename:"{~projectpath~}ParameterTables\Parameters.ducx-param"
 

Overwrite Login attributesPermanent link for this heading

In the Login tag you define the login credentials.

<Login
   authentication="basic"
   certificate="{~certificates~}david.porter.pfx"
   domain="fscdomain"
   username="david.porter"
   password="david"
/>

 
-Login.authentication:basic
-Login.certificate:"{~certificates~}david.porter.pfx"
-Login.domain:fscdomain
-Login.username:david.porter
-Login.password:david
 

Overwrite Adaptor attributesPermanent link for this heading

In the Adaptor tag you define the properties for the Fabasoft app.test Client Adaptor.

<Adaptor
   width="800"
   height="600"
   poshor="50"
   posver="50"
   port="4360"
/>

 
-Adaptor.width:800
-Adaptor.height:600
-Adaptor.poshor:50
-Adaptor.posver:50
-Adaptor.port:4360
 

Overwrite Agent attributesPermanent link for this heading

In the Agent tag you define if the Fabasoft app.test Agent should be used for distributed testing.

<Agent
   hostname="vistaclient"
   port="5024"
   transfer="true"
/>

 
-Agent.hostname:vistaclient
-Agent.port:5024
-Agent.transfer:true
 

Overwrite Reporting attributesPermanent link for this heading

In the Reporting tag you define the properties for creating a report.

<Reporting
   reportpath="{~projectpath~}Reports\"
   reportname="{~testname~} - {~timestamp~}.ducx-rep"
   envdatabase="SQL Server 2005"
   envbackend="RHEL 5.1"
   envconversion="Microsoft Windows Server 2003"
   envwebserver="Microsoft Windows Server 2008"
   envclient="Ubuntu 9.04"
   <Transformation
      stylesheet="{~projectpath~}ReportStyles\BIRTreport.rptdesign"
      result="{~projectpath~}Reports\BIRT\"
      parameter.CaptionFontSize="7"
   />
/>

 
-Reporting.reportpath:"{~projectpath~}Reports\\"
-Reporting.reportname:"{~testname~} - {~timestamp~}.ducx-rep"
-Reporting.envdatabase:"SQL Server 2005"
-Reporting.envbackend:"RHEL 5.1"
-Reporting.envconversion:"Microsoft Windows Server 2003"
-Reporting.envwebserver:"Microsoft Windows Server 2008"
-Reporting.envclient:"Ubuntu 9.04"
-Transformation.stylesheet:"{~projectpath~}ReportStyles\BIRTreport.rptdesign"
-Transformation.result:"{~projectpath~}Reports\BIRT\\"
-Transformation.parameter.CaptionFontSize:"7"
 

Overwrite Telemetry attributesPermanent link for this heading

In the Telemetry tag you define if app.strudl Software-Telemetry should be used.

<Telemetry
   active="true"
   user="anthony.brown"
   password="anthony"
   address="http://strudl.fabasoft.com"
   session="{~testname~}"
   target="Fabasoft Folio"
   targetinstance="1.1111"
   tier="Webservice"
   tierinstance="fsc"
   level="detail"
   filter="COO.1.1002.1.62"
/>

 
-Telemetry.active:true
-Telemetry.user:anthony.brown
-Telemetry.password:anthony
-Telemetry.address:"http://strudl.fabasoft.com"
-Telemetry.session:"{~testname~}"
-Telemetry.target:"Fabasoft Folio"
-Telemetry.targetinstance:"1.1111"
-Telemetry.tier:Webservice
-Telemetry.tierinstance:fsc
-Telemetry.level:detail
-Telemetry.filter:"COO.1.1002.1.62"