Skip to content

Commit

Permalink
Merge pull request #9 from OpenNTF/hotfix/cleanup
Browse files Browse the repository at this point in the history
Cleanup to remove bali name
  • Loading branch information
paulswithers committed May 18, 2023
2 parents dfda78b + 5d68b02 commit 325dc38
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 32 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ assignees: ''
A clear and concise description of what the bug is.

**Area Affected**
[ ] BaliTestRunner code
[ ] VoltScriptTesting code
[ ] Documentation
[ ] Samples

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ assignees: ''
**Additional assertions will be carefully vetted and may be refused. Simplicity is a major focus.**

**Area Affected**
[ ] BalitestRunner code
[ ] VoltScriptTesting code
[ ] Documentation
[ ] Samples

Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
# Bali Unit Testing Framework
# VoltScript Testing Framework

Bali Unit Testing Framework is a framework for testing code written using VoltScript, the evolution of LotusScript delivered as part of HCL Volt MX Go. The framework can also be used for LotusScript, with modifications (see below on new language functions used). There are deliberately no dependencies on any LSXs (e.g nlsxbe.dll). None should be added, it will make it dependent on a particular implementation. Create separate classes derived from BaliCustomTester to test individual LSXs or custom classes.
VoltScript Testing Framework is a framework for testing code written using VoltScript, the evolution of LotusScript delivered as part of HCL Volt MX Go. The framework can also be used for LotusScript, with modifications (see below on new language functions used). There are deliberately no dependencies on any LSXs (e.g nlsxbe.dll). None should be added, it will make it dependent on a particular implementation. Create separate classes derived from CustomTester to test individual LSXs or custom classes.

This fork is adapted to compile with LotusScript in Notes/Domino 12.0.x.

## Downloading

To download the code, go to [Releases](/releases). The script is in BaliTestRUnner.bss, in the Assets for each release. This can be copied into a Script Library in your NSF. This corresponds to [src/BaliTestRunner.bss](/src/BaliTestRunner.bss) at the time of the specific release.
To download the code, go to [Releases](/releases). The script is in VoltScriptTesting.bss, in the Assets for each release. This can be copied into a Script Library in your NSF. This corresponds to [src/VoltScriptTesting.bss](/src/VoltScriptTesting.bss) at the time of the specific release.

## Writing BaliUnit Tests
## Writing VoltScriptTesting Tests

See [Writing Units Tests](/docs/Writing-Unit-Tests/index.md).
See [Writing Units Tests](/docs/howto/writingtests.md).

## Core Functions Used

Obviously the code runs certain core language functions. These are documented in [Core Functions](/docs/CoreFunctions.md).

There are three new VoltScript language functions used - Try/Catch/Finally and GetThreadInfo(12) in BaliTestRunner.bss and ++/-- in SampleBeforeAfterTester.bss.
Obviously the code runs certain core language functions. These are documented in [Core Functions](/docs/references/CoreFunctions.md).

### Documentation

Expand Down
10 changes: 5 additions & 5 deletions SampleBeforeAfterTester.bss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
%END REM
Option Public
Option Declare
Use "./src/BaliTestRunner"
Use "./src/VoltScriptTesting"
Private a As Integer
Private b As Integer

Expand All @@ -37,10 +37,10 @@ Private b As Integer
See the License for the specific language governing permissions and limitations under the License
%END REM
%REM
BaliCustomBeforeAfter to set up integers before the start of the test,
CustomBeforeAfter to set up integers before the start of the test,
increment a before each test, increment b after each test and msgbox both after all tests
%END REM
Class IntegerIncrementBeforeAfter As AbstractBaliCustomBeforeAfter
Class IntegerIncrementBeforeAfter As AbstractCustomBeforeAfter

%REM
Sub beforeAll
Expand Down Expand Up @@ -101,7 +101,7 @@ End Class
Class CustomTesterOneLess
Description: Custom tester to test a > b
%END REM
Class CustomTesterGreaterThan As AbstractBaliCustomTester
Class CustomTesterGreaterThan As AbstractCustomTester

%REM
Function runTests
Expand Down Expand Up @@ -130,7 +130,7 @@ Sub Initialize

'Core tests

Dim testSuite As New BaliTestSuite(|Custom BeforeAfter Tester|)
Dim testSuite As New TestSuite(|Custom BeforeAfter Tester|)
Dim beforeAfter As New IntegerIncrementBeforeAfter

Call testSuite.addCustomBeforeAfter(beforeAfter)
Expand Down
12 changes: 6 additions & 6 deletions SampleCustomTester.bss
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
%END REM
Option Public
Option Declare
Use "./src/BaliTestRunner"
Use "./src/VoltScriptTesting"
%REM
Class DateTimeTester
Description: Example a custom tests class
%END REM
Private Class DateTimeTester As AbstractBaliCustomTester
Private Class DateTimeTester As AbstractCustomTester

%REM
Function runTests
Expand All @@ -39,7 +39,7 @@ Private Class DateTimeTester As AbstractBaliCustomTester

Me.testSuite.checkStarted

' No custom before/after code, so no need to call BaliUnit.beforeEach and BaliUnit.afterEach
' No custom before/after code, so no need to call TestSuite.beforeEach and TestSuite.afterEach

dateTime = CDat("01/30/2022")
print datatype(datetime)
Expand All @@ -51,7 +51,7 @@ Private Class DateTimeTester As AbstractBaliCustomTester

Call Me.testSuite.describe(|Check dateTime is before Now|).assertIsLessThan(Now(), CDbl(dateTime))

' Delete function of BaliUnit will run afterAll function
' Delete function of TestSuite will run afterAll function

End Function

Expand Down Expand Up @@ -98,10 +98,10 @@ errCatch:
End Class
Sub Initialize

Dim BaliTestSuite As New BaliTestSuite(|DateTime Tests|)
Dim testSuite As New TestSuite(|DateTime Tests|)
Dim DateTimeTester As New DateTimeTester

Call DateTimeTester.addTestSuite(BaliTestSuite).runTests()
Call DateTimeTester.addTestSuite(testSuite).runTests()

End Sub

Expand Down
10 changes: 5 additions & 5 deletions TestBootstrap.bss
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
%END REM
Option Public
Option Declare
Use "./src/BaliTestRunner"
Use "./src/VoltScriptTesting"
Sub Initialize
Dim testRunner As BaliTestRunner
Dim testRunner As TestRunner
Dim results As Integer

Set testRunner = New BaliTestRunner(|ENTER NAME|)
Set testRunner = New TestRunner(|ENTER NAME|)

' BEGIN CODE HERE
Call test(testRunner)
Expand All @@ -35,9 +35,9 @@ End Sub
Function **UPDATE NAME**
Description: unit tests for **ADD DESCRIPTION**
%END REM
Function test(testRunner As BaliTestRunner) As Boolean
Function test(testRunner As TestRunner) As Boolean

Dim testSuite As New BaliTestSuite(|**UPDATE NAME**|)
Dim testSuite As New TestSuite(|**UPDATE NAME**|)

Call testRunner.addTestSuite(testSuite)

Expand Down
8 changes: 4 additions & 4 deletions atlas.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"name": "Bali-Unit",
"displayName": "BaliUnit",
"description": "Bali Unit Testing",
"displayName": "VoltScriptTesting",
"description": "VoltScript Testing",
"library": "bali-unit",
"license": "Apache 2.0",
"version": "1.0.0",
"authors": [
"Paul Withers"
],
"publisher": "HCL America, Inc.",
"repo": "https://github01.hclpnp.com/hcl-janus/bali-unit.git",
"repo": "https://github.com/openntf/bali-unit.git",
"sourceDir": "src",
"testDir": "test",
"libsDir": "",
"lsxsDir": "",
"mainScripts": [
"BaliTestRunner.bss"
"VoltScriptTesting.bss"
],
"unitTestScripts": [
"BasicTester.bss"
Expand Down
4 changes: 2 additions & 2 deletions test/BasicTester.bss
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
%REM
Agent BasicTester
Created Mar 14, 2022 by Paul Withers/UK/PNPHCL
Description: Tests core functionality of a BaliUnit, no custom tester, no before/after code
Description: Tests core functionality of a TestSuite, no custom tester, no before/after code
%END REM
Option Public
Option Declare
Expand Down Expand Up @@ -217,7 +217,7 @@ Sub testVariants(runner As TestRunner)
End Sub
%REM
Sub testBooleansAndStrings
Description: Tests BaliUnit against booleans and strings
Description: Tests VoltScriptTesting against booleans and strings
%END REM
Sub testBooleansAndStrings(runner As TestRunner)
Dim testSuite As New TestSuite(|Boolean and String Tests|)
Expand Down

0 comments on commit 325dc38

Please sign in to comment.