Table of contents

Contents



Official Content

Tests can be deployed, which means they can be included in Deployment Unit objects.

Rest Tests and Web UI Tests should not be deployed as long as you can access the URLs where your services and web application are published from the server executing the application pipelines. However, unit/integration tests are not executed through HTTP, so if you want to execute them against a deployed application, you must deploy the tests to the application server and run them there.

Test execution

Once you include the tests you want to run, test binaries, test runners, and their dependencies are included in the deployment artifact generated by GX. The file containing test execution settings is called GXtestExecutionData_Deploy.json, and it is built to execute all the tests and suites included in the Deployment Unit.

Depending on the generator used and target OS, you must execute a different command to run the tests:

.Net Framework:

Extract the contents of the GXtestDeploy.zip file and depending on the generated file:

GXtestRunner.exe GXtestExecutionData_Deploy.json

.Net

Extract the contents of the GXtestDeploy.zip file and depending on the generated file:

dotnet GXtestRunner.dll GXtestExecutionData_Deploy.json

Java

  • jar: navigate to the directory and execute:
        java -cp "*;classes/;modules/*" GXtestRunner GXtestExecutionData_Deploy.json
  • war: copy the contents in the base directory of your application and execute:
       java -cp "*;classes;lib/*" GXtestRunner GXtestExecutionData_Deploy.json

Test results

Once the execution finishes, a file called TestResults.xml will be placed in the same directory where the command was executed. That file can be retrieved from the pipeline and converted to JUnit or Allure formats using any form of file exchange you are familiar with.

Availability

This feature is available since GeneXus 18 Upgrade 3.

Last update: November 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant