Skip to content

Commit

Permalink
Merge pull request #2 from OpenNTF/hotfix/docs
Browse files Browse the repository at this point in the history
Clarity on how to use and why content is outside NSF
  • Loading branch information
paulswithers committed Feb 1, 2023
2 parents 53cf02c + b39bee3 commit e770950
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/FAQs.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ hide:
---
# FAQs

## How do I use it in an NSF?

Copy the contents of BaliTestRunner.bss into a Script Library. Write an agent with `Use "BaliTestRunner"`.

## Where do I find the output?

The output will, by default, be in a "unit-test-reports" directory (defined by the `BASE_REPORT_LOC` constant in BaliTestRunner.bss) under the directory of the program running the tests.
Expand All @@ -19,6 +23,10 @@ If you wish to change the output directory for a single set of tests:
- If using a BaliTestRunner, call `BaliTestRunner.outputTo()`.
- If just using a BaliTestSuite independent of a test runner, call `BaliTestSuite.outputTo()`.

## Why is the content outside the NSF?

The output is part of your project reporting. Typically in software development, project reporting is not included in the binary deliverable, so it doesn't make sense to include it in the NSF being delivered to the customer or end user. HTML is also a more flexible medium for reproducing the kind of output and user experience familiar to developers who have used JUnit.

## "Error Path not Found on line 12" Error

This can be caused by permissions to the parent of the output directory. Ensure directory permissions allow "Modify" access for all relevant OS-level users and agent permissions are as required. Verify with `MkDir(CurDir & "/Foo/")`, which simulates the code being run. Alternatively, manually create the output directory.
Expand Down
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ There are deliberately no dependencies on any LotusScript Extensions (LSX, e.g n

Output can be set as either HTML files, XML files or both. HTML files are designed for your project reporting. The XML files are in standard JUnit format, which your build automation processes (e.g. Jenkins) can leverage to determine whether the build is successful or not.

## Using in an NSF

Copy the contents of BaliTestRunner.bss into a Script Library. Write an agent with `Use "BaliTestRunner"`.

## Using BaliUnit for Validation

The BaliTestSuite has a `suppressReport` boolean property, which can be used to prevent report output. The use case for this is to create a BaliTestSuite and use it to validate content within code, e.g. a JSON file. You can set `suppressReport = true`, then create your tests and check `testSuite.ranSuccessfully()` to verify all tests were successful.
Expand Down

0 comments on commit e770950

Please sign in to comment.