On this page, you can find some common errors related to GXtest objects and how you can fix them quickly.
Two main scenarios can cause this error. The more complex and difficult to solve can arise when multiple GeneXus installations are present on the same computer. You can confirm this by locating and opening the UITest object; its properties will display a warning icon next to the Module/Folder field. If that is not the case, try the next 2 solutions.
Solution 1: Force a rebuild of the UITest external object. This can be achieved by
a) modifying the object itself or
b) using the option Test -> Rebuild All Tests.
Solution 2: If you don't use UI Test objects, delete it.
If the object is corrupted, the best thing to do is fix the installation so it won´t happen again. Unfortunately, to fix the current KB would require advanced support from GeneXus to alter the KB DB tables in order to fix the object location.
To fix the installation, do the following:
-
Open the GeneXus.exe.config file, located in the GeneXus 16 installation directory (before upgrade 10) that is having the issue.
-
Add the following lines in the appSettings section:
<add key="UserAppDataPath" value="<GeneXusInstallationParentDir>\GX16uX_UserAppData" />
<add key="ProgramDataPath" value="<GeneXusInstallationParentDir>\GX16uX_ProgramData" />
We recommend using folder names that clearly indicate which specific version the UserAppData and ProgramData directories belong to.
-
Run
Genexus.exe /install
and wait for the process to complete.
For any new KBs created with that version of GeneXus, the UITest issue will no longer occur.
Technical explanation for this scenario: This occurs when multiple instances of GeneXus are installed. In versions of GeneXus 16u9 and earlier, GXtest installs the highest version of the module available.
Starting from version 16u10, the UITest object was moved inside the module, which causes the object’s location to change when the module is installed, leaving it undefined.
As a result, the object is not generated.
A possible cause of this error could be that a KB is being opened with an older version of GXtest.
Solution: Delete Runner object. When you execute a test, it will be created again but with the appropriate version.
These cases could be a typical error that some objects need to be rebuilt. Test objects are not built in a Rebuild All operation because they are not called by any Main object (except some user change it), so the option Rebuild All Tests forces to rebuild test objects and their references.
Solutions: there are two options:
a) Modify the object so is automatically rebuilt by GeneXus in the next execution
b) Run the option Test -> Rebuild All Tests.
In order for web UI tests to work properly, browsers must be opened by the CI server. That is because commands that involve focus over elements (like typing) cannot be performed in some browsers, depending on the particular case.
To achieve this Jenkins must be executed from the command line and not as a service.
If you already have it running as a service you can use the Jenkins.war file in your Jenkins installation folder as follows:
java -jar "C:\Program Files\Jenkins\Jenkins.war" --httpPort=8081
If you have some error like "session not created" or "this version is not compatible" check out the Web UI Tests Compatibility Issues
When you need to download a file in a user interface test executed on Internet Explorer, you will have to manage a download bar that appears in the browser. See the workaround to download a file on IE.