Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit d39ab54

Browse files
authored
Update CONFIGDOC.md
1 parent d68ab28 commit d39ab54

File tree

1 file changed

+23
-34
lines changed

1 file changed

+23
-34
lines changed

CONFIGDOC.md

Lines changed: 23 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,49 @@
11
You can use the Jenkins™ plugin for MATLAB® in freestyle and multi-configuration projects. This guide demonstrates how to run MATLAB code on Jenkins, considering a Microsoft® Windows® platform.
22

3-
- [Build Step Overview](#build-step-overview)
3+
- [Plugin Build Steps](#plugin-build-steps)
44
- [Freestyle Project Setup](#freestyle-project-setup)
55
- [Multi-Configuration Project Setup](#multi-configuration-project-setup)
66

77

8-
## Build Step Overview
9-
The plugin provides you with the **Run MATLAB Tests** and **Run MATLAB Command** build steps. With the Jenkins plugin for MATLAB, you have the option to run your tests in
8+
## Plugin Build Steps
9+
When you set up the Build **section** of the project configuration window, the plugin provides you with the **Run MATLAB Tests** and **Run MATLAB Command** build steps.
1010

11-
either *automatic* or *custom* mode.
1211
### Run MATLAB Tests
13-
The automatic test mode uses a default setting to run tests written using the MATLAB Unit Testing Framework and/or Simulink Test. If your source code is organized as files and folders within a project, the plugin includes any test files in the project that have been tagged as **Test**. If your code does not leverage a project or uses a MATLAB release before R2019a, the plugin includes all tests in the current Jenkins workspace including the subfolders.
12+
This build step uses a default setting to run tests written using the MATLAB Unit Testing Framework and/or Simulink Test. If your source code is organized as files and folders within a MATLAB project, then the plugin includes any test files in the project that have been labeled as **Test**. If your code does not leverage a project or uses a MATLAB release before R2019a, the plugin includes all tests in the current Jenkins workspace including its subfolders.
1413

15-
If you use a source code management (SCM) system such as Git, then your job must include the appropriate SCM configuration to check out the code before it can invoke the MATLAB plugin. If you do not use any SCM systems to manage your code, then an additional build step is required to ensure that the code is available in the Jenkins workspace before the build starts **(What is this step?)**.
14+
If you use a source code management (SCM) system such as Git™, then your project must include the appropriate SCM configuration to check out the code before it can invoke the MATLAB plugin. If you do not use any SCM systems to manage your code, then an additional build step is required to ensure that the code is available in the Jenkins workspace before the build starts.
1615

17-
The automatic test execution feature of the plugin enables you to generate different types of test artifacts. To publish the test results, you can use these artifacts with other Jenkins plugins.
18-
The selected artifacts will be saved in the **matlabTestArtifacts** folder of the Jenkins workspace.
16+
The automatic test execution enables you to generate different types of test artifacts. To publish the test results, you can use these artifacts with other Jenkins plugins. The selected artifacts are saved in the **matlabTestArtifacts** folder of the Jenkins workspace. If you do not select any of the test artifact check boxes, the folder is not created. However, the tests still run and test failures fail the build.
1917

20-
The automatic test mode results in a MATLAB script file named **runMatlabTests.m** in the Jenkins workspace. The plugin uses this file to run the tests and generate the test artifacts. You can review the contents of the script to understand the testing workflow.
21-
**Note:** Producing a PDF test report is not currently supported on MacOS platforms.
18+
![run_matlab_tests](https://user-images.githubusercontent.com/48831250/76800820-d2629a00-67aa-11ea-9fa7-c466e8c17f27.png)
2219

23-
![run_matlab_tests_matrix](https://user-images.githubusercontent.com/48831250/76800820-d2629a00-67aa-11ea-9fa7-c466e8c17f27.png)
24-
25-
26-
If you do not select any of the test artifact check boxes, the **matlabTestArtifacts** folder is not created in the workspace. However, the tests still run and test failures fail the build.
27-
20+
The **Run MATLAB Tests** step produces a MATLAB script file named **runMatlabTests.m** in the Jenkins workspace. The plugin uses this file to run the tests and generate the test artifacts. You can review the contents of the script to understand the testing workflow.
21+
22+
**Note:** Producing a PDF test report is not currently supported on MacOS platforms.
2823

2924
### Run MATLAB Command
30-
The custom test mode option enables you to develop custom MATLAB commands for running tests.
31-
**Note:** If you need several MATLAB commands to run your tests, consider writing a MATLAB script or function as part of your repository and executing this script or function instead. Test artifacts are not autogenerated if you choose to run tests using custom MATLAB commands. You can generate your desired test artifacts by configuring the test runner in the script or function that you invoke from the **MATLAB command** box.
25+
The **Run MATLAB Command** build step enables you to specify custom MATLAB commands tailored to your specific needs. For example, you can use this build step to customize your test run.
3226

3327
If you specify more than one MATLAB command, use a comma or semicolon to separate the commands. The build fails if the execution of any command results in an error.
3428

3529
![run_matlab_commands](https://user-images.githubusercontent.com/48831250/76801842-d2fc3000-67ac-11ea-9174-0a6485595714.png)
3630

37-
38-
31+
If you need to specify several MATLAB commands, consider writing a MATLAB script or function as part of your repository and executing this script or function instead.
32+
33+
Test artifacts are not autogenerated if you choose to run tests using this build step. You can generate your desired test artifacts by configuring the test runner in the script or function that you invoke from the **Command** box.
34+
3935
## Freestyle Project Setup
40-
To configure the plugin for a freestyle project, select **Use MATLAB Version** from the **Build Environment** section of the project configuration window. Then, enter the value returned by the **matlabroot** function in the **MATLAB root** box. To run
36+
To configure the plugin for a freestyle project, follow these steps:
37+
38+
1) In the **Build Environment** section of the project configuration window, select **Use MATLAB Version**. Then, enter the value returned by the **matlabroot** function in the **MATLAB root** box.
39+
40+
![build_environment](https://user-images.githubusercontent.com/48831250/76796506-f53c8080-67a1-11ea-860f-0cca3748c723.png)
4141

4242
![build_environment](https://user-images.githubusercontent.com/48831250/76798534-23bc5a80-67a6-11ea-9a48-861cbbc7b0ba.png)
4343

44-
### Run MATLAB Tests
45-
To configure the Jenkins build so that MATLAB tests run automatically, follow these steps:
46-
47-
1) From the **Test mode** drop-down list, select the **Automatic** option (**Automatic** is the default testing mode).
48-
49-
2) Select your desired test artifacts.
50-
51-
### Run MATLAB Command
52-
To configure the Jenkins build so that you can customize the MATLAB test execution, follow these steps:
53-
54-
1) From the **Test mode** drop-down list, select the **Custom** option.
55-
56-
2) Enter your commands in the **MATLAB command** field.
57-
44+
2) Add the required build steps.
45+
* If you add the **Run MATLAB Tests** build step, select check boxes for the artifacts be generated in the project workspace.
46+
* If you add the **Run MATLAB Command** build step, enter your commands in the **Command** box.
5847

5948
## Multi-Configuration Project Setup
6049
In addition to freestyle projects, the Jenkins plugin for MATLAB supports [multi-configuration (matrix) projects](https://wiki.jenkins.io/display/JENKINS/Building+a+matrix+project). Multi-configuration projects are useful when builds include similar steps. For example:

0 commit comments

Comments
 (0)