19.68. variantTest

Allows to create a PDF document containing a test analysis of an execution of a given variant or a given report. In case of errors, it shows the error details in the result.

For base reports, the report query is shown in the test results if the user has ''Administration'' and ''Report management'' generic permissions.

For reports using database bundles, the command also allow to specify which datasources should be tested. All datasources given in the command must be valid for the given report, i.e. it is not allowed to test a variant with a datasource not used in the corresponding report.

In order to select the reports and the datasources, you can use object resolver queries. Refer to Section 15.5. Object Resolver for more details on this. Note that the report queries must resolve to exactly one Report entity and the datasource queries to one or more DatasourceDefinitions.

Examples:

variantTest id:Report:123

The report or variant with ID 123 is being tested.

variantTest id:DatasourceDefinition:456 id:DatasourceDefinition:789 id:Report:123

The report or variant with ID 123 is being tested with datasources 456 and 789. Both datasources must be part of the datasource bundle the report uses.

variantTest "hql:from DatasourceDefinition where name='PROD'" id:Report:123

The report or variant with ID 123 is being tested with the datasource named PROD. This datasource must be part of the datasource bundle the report uses.

Use: variantTest [datasource] [datasource...] report