From a1fc4515d7abc542f834d53f4260903c69b2ff74 Mon Sep 17 00:00:00 2001 From: George Cook Date: Sun, 23 Jun 2019 20:57:02 -0500 Subject: [PATCH] adds legacy support documentation includes ignored tests in the printed output --- CHANGELOG.md | 16 ++++++++++++++++ dist/rooibosDist.brs | 11 +++++++++-- docs/index.md | 13 +++++++++---- package.json | 2 +- .../example/source/tests/rooibos/rooibosDist.brs | 11 +++++++++-- src/Rooibos_TestLogger.brs | 10 ++++++++-- 6 files changed, 52 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0a3bdf08..93199037 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/dist/rooibosDist.brs b/dist/rooibosDist.brs index e137f17e..48a3bf0b 100644 --- a/dist/rooibosDist.brs +++ b/dist/rooibosDist.brs @@ -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 ' */ @@ -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 diff --git a/docs/index.md b/docs/index.md index bacab524..7e70f6d2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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 @@ -1010,13 +1010,18 @@ function ${prefix}__${testName}_${testCase}() as void end function ``` -## Backward compatability +## Backward compatibility -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 diff --git a/package.json b/package.json index 345c8611..3fac52b2 100644 --- a/package.json +++ b/package.json @@ -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": { diff --git a/samples/example/source/tests/rooibos/rooibosDist.brs b/samples/example/source/tests/rooibos/rooibosDist.brs index e137f17e..48a3bf0b 100644 --- a/samples/example/source/tests/rooibos/rooibosDist.brs +++ b/samples/example/source/tests/rooibos/rooibosDist.brs @@ -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 ' */ @@ -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 diff --git a/src/Rooibos_TestLogger.brs b/src/Rooibos_TestLogger.brs index b568a9a1..27c0a776 100644 --- a/src/Rooibos_TestLogger.brs +++ b/src/Rooibos_TestLogger.brs @@ -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:"