Test Preferences

Official Content
This documentation is valid for:

This section documents the test options that can be configured inside the GeneXus IDE, and the behavior of each one. 

Some test options are specific to an Environment, and others are set per Knowledge Base.

Environment Test Properties

You need to open the environment preferences to set Test properties on it:

EnvironmentTestOptions_2020106145226_1_png

General environment testing options

Generate Cove Coverage Information: {No, Yes}
When true, GeneXus generates source-level runtime code coverage information. When  Default: False

Run Tests After Build: Boolean
When true, after running a Build or Rebuild All operation in GeneXus IDE, this option will start running all test cases automatically.  Default: False

Web environment testing options

Base URL: String (for UI tests only)
Set the base URL to open when UI tests don't have a complete URL specified. Default: Environment's web root (set at first execution)

Screenshot saving mode: {Never, OnError, OnWarning, OnVerifyAndError, Always}
Allows setting the conditions when a screenshot is taken and saved during web UI tests execution. Default: OnError

  • Never: screenshots are never taken.
  • OnError: screenshots are taken only when a command fails.
  • OnWarning: screenshots are taken only when a command fails or has a warning state.
  • OnVerifyAndError: screenshots are taken only when a command fails or the command is a Verify command (regardless of whether it fails or not). "Always on errors and always on Verify commands".
  • Always: screenshots are taken for all commands (except for the CloseWindow command since screenshots are taken after the command is performed)

Html saving mode: {Never, OnError, OnWarning, OnVerifyAndError, Always}
Allows setting the conditions when the page's HTML is saved during web UI tests execution. Default: OnError
For descriptions about available options see the previous setting where those are explained.

File Upload Base Path: String (for UI tests only)
Allows setting a directory as a base path to locate all resources that will be used on FIleUpload commands. When running web tests, this property is combined with the FilePath parameter in FileUpload commands.

KB Version Test Properties

You need to open the KB Version properties and scroll down to Test group properties:

KBTestOptions_png

KB version general testing options

Version: String 
Read-only property that shows the GXtest Framework version. GXtest framework is Runner and external objects for UI automation (web and SD)

KB version web testing options

Default Browser: String (for web UI tests only)
The default browser when starting a UI test. If you don't explicitly define a browser type using SetBrowser command, this browser will be selected.  Default: Chrome

KB Version Unit Test Generation Properties

GXtest allows you to determine data, algorithm, and number of sets to be generated for unit tests. 

Algorithm { RandomCombination, CartesianProduct, Pairwise }

Allows choosing the algorithm used to combine input values for every parameter. This will be reflected in the amount and how exhaustive test cases will be. Default: Random combination.

Random combination: test cases are built using random values for each parameter

Cartesian product: all possible combinations between parameter values are made. The number of test cases will be the product of data values count for every parameter. For instance, if the object has 3 parameters and you input 5 values for each parameter, there will be 5*5*5 test cases: 125.

You can find information at Pairwise combination 

Parameter values { Autogenerated, Prompt }

This option allows to custom-select data used on test generation, either random (autogenerated) or user-specific (prompt). Default: Autogenerated.

Autogenerated: values sets are built using a mix of fixed and random values for every parameter depending on the parameter’s data type.

Prompt: Before creating the test, a window is prompted to the user, which enables the user to use specific data. Please refer to this article to understand how to generate different sets of data for tests.

Data sets count: Numeric (for Unit tests only)

Set how many data sets will be generated in the test DataProvider, after clicking the "Create Unit Test" option. For the Random Combination algorithm only.

Default: 5

Note: Also there are other settings (low level) that can be set via GXtest config file