Skip to content

Commit

Permalink
adds legacy support documentation
Browse files Browse the repository at this point in the history
includes ignored tests in the printed output
  • Loading branch information
George Cook committed Jun 24, 2019
1 parent 464b9cf commit a1fc451
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 11 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Rooibos CHANGELOG

## 3.0.4 - legacy support!

### Added

- legacy support with rooibosC 3.0.9 or later

### Changed

### Deprecated

### Removed

### Fixed

- ignored tests are now reported

## 3.0.3 - out of beta - yay!

### Added
Expand Down
11 changes: 9 additions & 2 deletions dist/rooibosDist.brs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'/**
' * rooibos - simple, flexible, fun brihhtscript test framework for roku scenegraph apps
' * @version v3.0.1-beta
' * @version v3.0.4
' * @link https://github.com/georgejecook/rooibos#readme
' * @license MIT
' */
Expand Down Expand Up @@ -1776,10 +1776,17 @@ sub RBS_LOGGER_PrintStatistic(statObj as object)
end for
? ""
m.PrintEnd()
? "Total = "; RBS_CMN_AsString(statObj.Total); " ; Passed = "; statObj.Correct; " ; Failed = "; statObj.Fail; " ; Ignored = "; statObj.Ignored
ignoredInfo = RBSFM_getIgnoredTestInfo()
? "Total = "; RBS_CMN_AsString(statObj.Total); " ; Passed = "; statObj.Correct; " ; Failed = "; statObj.Fail; " ; Ignored = "; ignoredInfo.count
? " Time spent: "; statObj.Time; "ms"
? ""
? ""
if (ignoredInfo.count > 0)
? "IGNORED TESTS:"
for each ignoredItemName in ignoredInfo.items
print ignoredItemName
end for
end if
if (statObj.ignored > 0)
? "IGNORED TESTS:"
for each ignoredItemName in statObj.IgnoredTestNames
Expand Down
13 changes: 9 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ There are two ways to invoke RooibosC:
| `-s` | `--sourceFilePattern` | array of globs, specifying which files to include/exclude in code coverage. Relative to projectPath. Required if `-v` is set. |
| `-f` | `--showFailuresOnly` | Show results for failed tests, if any. If none fail, then all results are shown |
| `-F` | `--failFast` | Test execution will stop at the first failure |

| `-l` | `--legacySupport` | Flag indicating that rooibos should try to inlcude legacy roku unit tests |

### Configuring Rooibos's runtime behaviour

Expand Down Expand Up @@ -1010,13 +1010,18 @@ function ${prefix}__${testName}_${testCase}() as void
end function
```

## Backward compatability
## Backward compatibility

<a name="compatible-with-legacy-framework"></a>

Rooibos is no longer backward compatible with the [legacy framework](https://github.com/rokudev/unit-testing-framework/), since version 2.0.0.
Rooibos is nbackward compatible with the [legacy framework](https://github.com/rokudev/unit-testing-framework/), Use the `-l --legacySupport` flag with rooibosC to use this feature.

`'@Only`, `'@Ingore`, `'@Setup`, `'@TearDown` are all supported. Only and Ignore can be applied to a whole test suite, or individual test cases.

Your files required to follow the convention as laid out [here](https://github.com/rokudev/unit-testing-framework/blob/master/samples/SimpleTestApp/source/tests/Test__Main.brs)


It is recommended that you upgrade your legacy tests to the new syntax for maximum flexibility and comfort.
It is recommended that you upgrade your legacy tests to the new syntax for maximum flexibility, functionality and comfort.

## Generate code coverage

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rooibos",
"version": "3.0.3",
"version": "3.0.4",
"description": "simple, flexible, fun brihhtscript test framework for roku scenegraph apps",
"main": "index.js",
"directories": {
Expand Down
11 changes: 9 additions & 2 deletions samples/example/source/tests/rooibos/rooibosDist.brs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'/**
' * rooibos - simple, flexible, fun brihhtscript test framework for roku scenegraph apps
' * @version v3.0.1-beta
' * @version v3.0.4
' * @link https://github.com/georgejecook/rooibos#readme
' * @license MIT
' */
Expand Down Expand Up @@ -1776,10 +1776,17 @@ sub RBS_LOGGER_PrintStatistic(statObj as object)
end for
? ""
m.PrintEnd()
? "Total = "; RBS_CMN_AsString(statObj.Total); " ; Passed = "; statObj.Correct; " ; Failed = "; statObj.Fail; " ; Ignored = "; statObj.Ignored
ignoredInfo = RBSFM_getIgnoredTestInfo()
? "Total = "; RBS_CMN_AsString(statObj.Total); " ; Passed = "; statObj.Correct; " ; Failed = "; statObj.Fail; " ; Ignored = "; ignoredInfo.count
? " Time spent: "; statObj.Time; "ms"
? ""
? ""
if (ignoredInfo.count > 0)
? "IGNORED TESTS:"
for each ignoredItemName in ignoredInfo.items
print ignoredItemName
end for
end if
if (statObj.ignored > 0)
? "IGNORED TESTS:"
for each ignoredItemName in statObj.IgnoredTestNames
Expand Down
10 changes: 8 additions & 2 deletions src/Rooibos_TestLogger.brs
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,17 @@ sub RBS_LOGGER_PrintStatistic(statObj as object)

? ""
m.PrintEnd()

? "Total = "; RBS_CMN_AsString(statObj.Total); " ; Passed = "; statObj.Correct; " ; Failed = "; statObj.Fail; " ; Ignored = "; statObj.Ignored
ignoredInfo = RBSFM_getIgnoredTestInfo()
? "Total = "; RBS_CMN_AsString(statObj.Total); " ; Passed = "; statObj.Correct; " ; Failed = "; statObj.Fail; " ; Ignored = "; ignoredInfo.count
? " Time spent: "; statObj.Time; "ms"
? ""
? ""
if (ignoredInfo.count > 0)
? "IGNORED TESTS:"
for each ignoredItemName in ignoredInfo.items
print ignoredItemName
end for
end if

if (statObj.ignored > 0)
? "IGNORED TESTS:"
Expand Down

0 comments on commit a1fc451

Please sign in to comment.