To run tests from Jenkins, be aware of the following:

The Jenkins service must be running.

The user must have admin rights.

Use the mxvconsole command to execute MxVDev.

If the Jenkins service is not running under a user name, the /mxserve  or /additionalmxserve switch is required. The syntax is:

/mxserve <ServerName>:<PortNumber>

For example: /mxserve angus:1234

The server name is the same name used the MxV License Manager.

This option enables machine-independent testing. For more details, see MxVDev Command Line Interface.

This is an example of the Windows batch commands in Jenkins Job Configuration:

Jenkins-Build

In Jenkins Job Configuration, enter *.xml in the "Test report XMLs" field of Post-build Actions. If this field is not present, add the JUnit plug-in to Jenkins.

Jenkins-PostBuild

J Unit Test Results

To generate a J Unit results file, select the Generate J Unit File option in the Regression Test Wizard. By default, the J Unit file is stored in the Regression subfolder of the project folder. To use another folder, click the 3dots_button button and select the path. Note: You must have access rights to the selected folder.

By default, Jenkins looks for the JUnit file in the subfolder of the workspace associated with the job, for example:

C:\Program Files (x86)\Jenkins\workspace\Job 1

Jenkins-JUnitPath-marked

When the Regression Test is completed, the results are written to a J Unit file in the selected folder. The file name uses the format JUnit-YYYY-MM-DD-HH-MM-SS.xml. For example:

JUnit-2017-10-06-13-44-18.xml

Jenkins can use this file to display test results on the Jenkins Dashboard. For example:

Jenkins-results

To create a sample JUnit file, simply run a Regression Test and view the resulting file in your selected folder.

Equivalent Terminology

MxSuite

Jenkins

XML tag

Scenario

Class (tagged as Scn)

classname

testsuite

TestCase

Test

testcase

Regression Test

Package

testsuites

Troubleshooting

Error Message:

Unable to license client: Insufficient tokens in server pool

Corrective Action:

Be sure to use the /mxserve switch in the mxconsole command and select the server and port for your token pool.

Related Topics:

MxVDev Command Line Interface