|
| 1 | +--- |
| 2 | +title: Overview |
| 3 | +--- |
| 4 | + |
| 5 | +import { Aside, CardGrid, Card, Tabs, TabItem } from '@astrojs/starlight/components'; |
| 6 | + |
| 7 | +<img src="https://github.com/IBM/vscode-ibmi-testing/blob/main/icon.png?raw=true" align="right" width="256" height="256" /> |
| 8 | + |
| 9 | +<div style="display: flex; gap: 5px; align-items: center;"> |
| 10 | + <a href="https://marketplace.visualstudio.com/items?itemName=IBM.vscode-ibmi-testing"> |
| 11 | + <img src="https://img.shields.io/visual-studio-marketplace/v/IBM.vscode-ibmi-testing" alt="Version"/> |
| 12 | + </a> |
| 13 | + <a href="https://marketplace.visualstudio.com/items?itemName=IBM.vscode-ibmi-testing"> |
| 14 | + <img src="https://img.shields.io/visual-studio-marketplace/i/IBM.vscode-ibmi-testing" alt="Installs"/> |
| 15 | + </a> |
| 16 | +</div> |
| 17 | + |
| 18 | +The [IBM i Testing](https://marketplace.visualstudio.com/items?itemName=IBM.vscode-ibmi-testing) extension allows developers to run unit tests and generate code coverage results for RPG and COBOL programs on IBM i. Under the covers, this extension leverages the [RPGUnit](https://irpgunit.sourceforge.io/help) testing framework. |
| 19 | + |
| 20 | +* 👨💻 **Run Tests**: Visualize and run tests suites out of local files or source members. |
| 21 | +* ⚙️ **Configure Tests**: Configure parameters to compile (`RUCRTRPG`/`RUCRTCLB`) and run (`RUCALLTST`) tests. |
| 22 | +* 📋 **View Test Results**: View detailed test results along with inline failure/error messages. |
| 23 | +* 🎯 **Generate Code Coverage**: View line and procedure level code coverage results as an overlay in the editor. |
| 24 | + |
| 25 | +## Installation |
| 26 | + |
| 27 | +### 1. Extensions |
| 28 | + |
| 29 | +The following extensions can be installed from the Visual Studio Code Marketplace or Open VSX Registry: |
| 30 | + * [IBM i Testing](https://marketplace.visualstudio.com/items?itemName=IBM.vscode-ibmi-testing) (***Required***) |
| 31 | + * [Code for IBM i](https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.code-for-ibmi) (***Required***) |
| 32 | + * [RPGLE](https://marketplace.visualstudio.com/items?itemName=HalcyonTechLtd.vscode-rpgle) (***Required***) |
| 33 | + * [COBOL](https://marketplace.visualstudio.com/items?itemName=bitlang.cobol) (*Optional - Install if writing COBOL unit tests*) |
| 34 | + |
| 35 | +### 2. RPGUnit |
| 36 | + |
| 37 | +The `RPGUNIT` library must be be installed on your IBM i in order to leverage the framework and assertions that it provides. It can be installed easily via the extension using the steps below which is the recommended approach or manually using the instructions [here](https://irpgunit.sourceforge.io/help/). |
| 38 | + |
| 39 | +<Aside type="note"> |
| 40 | + By default, `RPGUNIT` is the name of the RPGUnit product library which will be installed on the host. This can be configured if necessary by going to the extension's settings and searching for the **Product Library** setting. |
| 41 | +  |
| 42 | +</Aside> |
| 43 | + |
| 44 | +To install the library via the extension, follow these steps: |
| 45 | + |
| 46 | +1. Connect to your IBM i system. |
| 47 | +2. Open the connection settings by hovering on the connection in the status bar and selecting **Settings**. |
| 48 | +  |
| 49 | +3. Navigate to the **Components** tab and select **Install component**. |
| 50 | +  |
| 51 | +4. Select *RPGUnit* from the list of available components to install and click **Ok**. |
| 52 | +  |
| 53 | +5. Select the GitHub release to install from. In most cases this will be the latest, but you can also select a specific version. More information on each release can be found on the [irpgunit GitHub Releases](https://github.com/tools-400/irpgunit/releases) page. |
| 54 | +  |
| 55 | +6. The extension will begin installing the `RPGUNIT` library on your IBM i system. You can monitor the installation progress in the **IBM i Testing** output channel. This will log all commands executed during the installation as well as any errors or warnings. You will see a notification once the installation is successful or fails. |
| 56 | +  |
| 57 | + |
| 58 | +### 3. CODECOV |
| 59 | + |
| 60 | +To generate code coverage results, the `CODECOV` command must be installed on your IBM i via PTF: |
| 61 | + * **V7R3**: PTF SI80728 |
| 62 | + * **V7R4**: PTF SI80737 & SI81204 |
| 63 | + * **V7R5**: PTF SI81216 & SI81217 |
0 commit comments