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

Commit d5bfcda

Browse files
authored
Update Run-MATLAB-Tests.md
update screenshots
1 parent 7bf98d0 commit d5bfcda

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

src/examples/Run-MATLAB-Tests.md

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,47 @@ Running the tests in this example requires you to interface Jenkins with MATLAB
2424
## Configure Jenkins Project to Run MATLAB Tests
2525
Create a new project and configure it by following these steps:
2626
1. In your Jenkins interface, select **New Item** on the left. A new page opens where you can choose the type of your project. Enter a project name, then click **Freestyle project**. To confirm your choices, click **OK**.
27+
28+
![create_project](https://user-images.githubusercontent.com/48831250/71735513-a7f47800-2e1c-11ea-878b-db53c059c4c7.png)
29+
2730
2. In the configuration window of your Jenkins project, navigate to the **Source Code Management** section and click **Git**. This option enables Jenkins to interface with a remote repository.
31+
32+
![git](https://user-images.githubusercontent.com/48831250/71736215-809eaa80-2e1e-11ea-9ff5-6eea39622d3e.png)
33+
2834
3. Navigate to the main page of the GitHub repository that hosts your tests. Click **Clone or download** and copy the web URL to your clipboard.
35+
36+
![clipboard](https://user-images.githubusercontent.com/48831250/71736069-1980f600-2e1e-11ea-9672-1af6c958d77d.png)
37+
2938
4. In the Jenkins interface, paste the URL into the **Repository URL** field of the **Source Code Management** section. (You also can specify the branch to build in the **Branch Specifier** field.)
39+
40+
![source_control](https://user-images.githubusercontent.com/48831250/71735877-965fa000-2e1d-11ea-95c4-8b9259308e75.png)
41+
3042
5. In the **Build** section of Jenkins, click **Add build step > Run MATLAB Tests**. A new window opens that enables you to configure the Jenkins plugin for MATLAB. Paste the full path to the MATLAB root folder into the **MATLAB root** field; choose the default Automatic test mode from the **Test mode** drop-down list; and select your desired test artifacts to be generated in the project workspace. (The build in this example is configured to generate Cobertura code coverage and JUnit test result reports.) For more information on how to configure the Jenkins plugin for MATLAB, see [Jenkins MATLAB Plugin](https://github.com/jenkinsci/matlab-plugin).
3143

32-
![configure_plugin](https://user-images.githubusercontent.com/48831250/71114689-5900de80-219e-11ea-8e1c-4f6914bdf893.png)
44+
![configure_plugin](https://user-images.githubusercontent.com/48831250/71737486-c741d400-2e21-11ea-9e1c-f7acb4fb822f.png)
3345

3446
6. In the **Post-build Actions** section of Jenkins, add two post-build actions to publish the Cobertura code coverage and JUnit test result reports that the build generates. For each report, provide the path to the report file. Jenkins stores the artifacts in the *matlabTestArtifacts* folder of the workspace.
3547

36-
![post-build](https://user-images.githubusercontent.com/48831250/71104139-534cce00-2189-11ea-9f59-1f4d9eee99f8.png)
48+
![post-build](https://user-images.githubusercontent.com/48831250/71736813-0c650680-2e20-11ea-8fa5-dee1bb6ddda0.png)
3749

3850
7. Click **Save** to save the project configuration settings. You can access and modify your settings at a later stage by selecting **Configure** in the project interface.
3951

4052
## Run Tests and Inspect Test Artifacts
4153
To build your Jenkins project and run the tests specified in the repository, click **Build Now** in the project interface, which displays the project name at the top-left of the page. Jenkins triggers a build, assigns it a number under **Build History**, and runs the build. If the build is successful, a blue circle icon appears next to the build number. If the build fails, Jenkins adds a red circle icon. In this example, the build passes because all of the tests specified in the *Times Table App* project pass.
4254

43-
![build_1](https://user-images.githubusercontent.com/48831250/71103438-221fce00-2188-11ea-8d17-3793b3964d04.png)
55+
![build_1](https://user-images.githubusercontent.com/48831250/71737052-9b721e80-2e20-11ea-9e1d-ed82e3f57484.png)
4456

4557
Navigate to the project workspace by clicking the **Workspace** icon in the project interface. You can view the generated test artifacts in the *matlabTestArtifacts* folder of the workspace.
4658

47-
![workspace](https://user-images.githubusercontent.com/48831250/71103834-ce61b480-2188-11ea-84a8-b2bfbea9b106.png)
59+
![workspace](https://user-images.githubusercontent.com/48831250/71737151-e68c3180-2e20-11ea-80d5-368deb6d3e1e.png)
4860

4961
Access the published Cobertura code coverage report by opening the *Coverage Report* link in the project interface.
5062

51-
![cobertura_report](https://user-images.githubusercontent.com/48831250/71103566-598e7a80-2188-11ea-9bc5-857420ca1fce.png)
63+
![cobertura_report](https://user-images.githubusercontent.com/48831250/71737280-3c60d980-2e21-11ea-8891-aff1b794243d.png)
5264

5365
To view the published JUnit test results, open the *Latest Test Result* link in the project interface. In the new page, open the link in the *All Tests* table. The table expands and lists information for each of the test classes within the *Times Table App* project.
5466

55-
![junit_report](https://user-images.githubusercontent.com/48831250/71103594-63b07900-2188-11ea-9fa4-253cba446de7.png)
67+
![junit_report](https://user-images.githubusercontent.com/48831250/71737382-7e8a1b00-2e21-11ea-8133-fe5b2f198bd9.png)
5668

5769

5870

0 commit comments

Comments
 (0)