Skip to content

Commit 91fb321

Browse files
Add source member naming recommendation
Signed-off-by: Sanjula Ganepola <Sanjula.Ganepola@ibm.com>
1 parent f22acea commit 91fb321

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/content/docs/developing/testing/writing.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Listed below are some example test case names that follow this naming convention
2222
A test suite consists of one or more test cases in a file or source member. This test suite will be compiled into a service program in order to run the test cases. Although RPGUnit itself does not enforce an specific naming convention for test suites, the **IBM i Testing** extension does based on whether you are working on local files on your PC or source members on the IBM i.
2323

2424
* **Local Files**: The file name must end in `.test.rpgle`, `.test.sqlrpgle`, `.test.cblle`, or `.test.sqlcblle` in order to be detected by the extension. File names are also not restricted to 10 characters as the extension will use the same rules that Source Orbit uses to handle [long file names](https://ibm.github.io/sourceorbit/#/./pages/general/rules?id=long-file-names) when compiling the test. Noteably, since all files must include `.test`, the resulting object name will start with `T`. These files can also be put in any directory.
25-
* **Source Members**: Source members can be put in any source file, but it is recommended to store them in a source file named `QTESTSRC`. By default this is where the extension will look for test suites in your library list. You can configure the extension to search other source files by going to the extension's settings and searching for the **Test Source Files** setting.
25+
* **Source Members**: Source members can be named freely, but it is recommended to use some sort of prefix or suffix (ie. `T`, `_T`, `T_`, etc.) to avoid naming conflicts as the tests will be compiled into service programs. These source members can be put in any source file, but it is recommended to store them in a source file named `QTESTSRC`. By default this is where the extension will look for test suites in your library list. You can configure the extension to search other source files by going to the extension's settings and searching for the **Test Source Files** setting.
2626
![Test Source Files](Testing_TestSourceFiles.png)
2727

2828
Listed below are some example test suite names that follow this naming convention:
@@ -34,10 +34,10 @@ Listed below are some example test suite names that follow this naming conventio
3434
* `math.test.rpgle`
3535
* **Source Members**
3636
* `QTESTSRC` source file with members:
37-
* `EMPLOYEE.RPGLE`
37+
* `EMPLOYEET.RPGLE`
3838
* `DEPARTMENT.RPGLE`
39-
* `STRING.RPGLE`
40-
* `MATH.RPGLE`
39+
* `T_STRING.RPGLE`
40+
* `MATH_T.RPGLE`
4141

4242
## Generating Test Stubs
4343

0 commit comments

Comments
 (0)