Menu

Configure JBehave Agent

PREREQUISITES:

  1. Activate Automation Integration
  2. Install and Register the Automation Host
  3. Install the JBehave Plugin

The Agent Configuration pop-up includes 3 steps:

  1. General Information
  2. Test Scripts
  3. Execution

General Information

  • Agent name: Define the agent's name. It is also the displayed name of the agent in qTest.
  • qTest project: It lists out all qTest projects which are accessible using the agent's credentials. Select one of the projects in your qTest application. An agent can work with only one qTest project.
  • Automation framework: The frameworks whose plugins have been installed will be listed out. Select your desired framework.

JBehave Agent - General Info

Test Scripts

  • Directory: Specify the home directory of your JBehave source code project
  • Story Root Directory: the configured directory where all JBehave stories
  • IMPORTANT: The Story Root Directory must be a local folder on your automation host and match with what is configured in your source code, for example:
    JBehave Agent - Story Root Dir
  • Scripting libs: Provide the paths to your project's dependencies. You can input more than one paths, separated by a comma
  • Include: You can use ANT Style Pattern Matcher to define the patterns of files which will be scan for tests. Use comma as separators between the patterns. It is the required information so that the agent can scan your coding directory for tests and automatically create Test Cases in qTest.
  • Exclude: You can optionally define patterns to excludes files from the scanning.
  • Scan jar files: If you select this checkbox, the agent will also scan files in jar files.

    HINT: ANT Style Pattern Matcher uses the following rules:

    • ? matches one character.
    • * matches zero or more characters.
    • ** matches zero or more 'directories' in a path.

JBehave Agent - Test Scripts

Execution

The JBehave Agent supports 3 execution modes to build and run your test projects (Command, Ant, Maven). Based on your selected mode, you will need to provide different information.

Execution w/ Maven

The automation agents support using Maven to build and run your coding projects.

  • Executable home: Input the path to your Maven home directory. This is where Maven is located.
    • Example: D:\Tools\apache-maven-3.3.9
  • Goal: input the goal defined in your POM file below to deploy your project
    • Example: integration-test
  • POM file: Provide the path to your POM file, which is located under the home directory of your test source code. Please note that this is the relative path under your scripting directory.
    • Example: pom.xml
  • Command arguments: Provide any additional arguments to execute the target.

JBehave Agent - Execution - Maven

Execution w/ Ant

The JBehave Agent supports Ant to build and run your coding projects.

  • Executable home: Input the home directory path where Ant is installed.
    • Example: D:\Tools\apache-ant-1.10.1
  • Target: Specify which target will be executed. This is the name of the target which has been defined in your build file.
    • Example: clean test
  • Build file: Provide the path to your build file in which the above target is defined. This file is located under the home directory defined in Test Script section of your test source code. The above target is defined in this file as the image below. 
    • Example: build.xml
  • Command arguments: Provide any additional arguments to execute the target.

 

JBehave Agent - Execution - Ant

Execution w/ Command

  • Executable home: Specify the path to the home directory of your program development environment. For example, if you are using JDK, input the folder where the JDK is installed.
    • Example: C:\Program Files\Java\jdk1.8.0_112
  • Command: the command to execute your scripts. If you are using other commands than java, please add a system variable on the automation host for your Executable home directory
    • Example: In case you are using Java, input java
  • Command arguments: Target directory where all built outputs are located. Provide any needed arguments.

The agent will use the above information to generate a full command to execute your scripts.

JBehave Agent - Execution - Command

Configure qTest Log Collector in your JBehave source code

You will need to add qTest Log Collector, which is a Story Reporter, to your JBehave project. It collects your JBehave test results and sends over to our JBehave agent.

  1. Download qTest Log Collector here. It is actually a jar file
  2. Add the downloaded jar file to your JBehave source code. There are various ways to configure Story Reporter in JBehave, the image below is just an example:
    JBehave Agent - Execution - LogCollector
Subscribe To Our Blog
Powered by Zendesk