Skip to content

Commit

Permalink
Beta (#121)
Browse files Browse the repository at this point in the history
* first stab at moving over to ropm

* rewrite for rooibos v4

* groups are back

* refactoring to reflect new plugin-driven pattenr

* rename get all method

* tweaks running

* imports plugin code into main repo - the framework and plugin sitting in a tree t e s t i n g

* moves stub project to plugin tests

* more moving stuff about; fixing runtime problems after overhaul

* adds linting and testing setup. Thanks Bronley Plumb

* fixes annotation issues caused by reflection

* adds a bunch of tests for basic annotation, suite, group parsing

* fixes remaining group tag tests

* adds param parsing tests

* various fixes - expects can now do 15 args

* feat(logs): Adds settings for controlling log ouput width

* chore(build):Use correct bsc

* fix(assertions): Fix missing message

* feat(mocks): Can now include 15 params

* chore(tests): misc changes to tests project

* minor fixes

* minor fixes

* fixes various compiler issues

* updated documentation

* updateds to use sync api in bs

* fixes runtime crash

* tidies up project, and adds plugin tests

* finally fixes linting issue

* fixes missing roku-deploy

* adds missing nyc package

* add github workflow

* updated to latest bsc

* updated to latest bsc

* adds ability to inject main when none is present (to make it easier to test ropm modules)

* remove erroneous duplicate files that got in via a merge

* fix linting error

* linting fixes

* can filter the files to process for unit test searching

* imrpoves log output with better file links

* minor tweak to line numbers

* no longer have to type method names for tests - the annotation name is automatically used:

* fixes @ignore not working, and improves tag behaviour

* fixes tests

* some project tidying

* tidy up package, remove test project

* add support for catching crashes

* update package version

* fixes @Nocatch annottation

* fixes @Nocatch annottation again

* feat:adds crash resistence to suite functions like beforeEach and after, etc

* feat: improves handling of errors in assertions

* fix couple of minor issues in reporting

* version bounce

* version bounce

* fix: fixes crash in console report

* version bounce

* bunch of fixes

* bump to 4.1.1

* adds scripts for easy remote/local npm switching

* compile against latest bsc

* doc improvements

* update docs

* update docs

* adds setFields to mockNode

* doc update

* adds info on missing tags and options

* fixes issue that caused strange breakpoint behaviour on assertions

* more doc improvements

* fix(plugin): Update to bsc 37.4

* feat(TestSuite): Adds @noearlyexit annotation, to allow unit tests to run against the framework

* fix(plugin): Fixes node class generation

* fix(framework): Fixes framework tests

* fix(ConsoleTestReporter): Fixes issue that showed success/fail messages in reverse

* docs: Adds docs for @noEarlyExit

* version bump

* show crash count in output

* chore: indentation fix

* chore: ignore dist folder

* chore(build): adds launch tasks for tests in base project

* try to fix bsc-yml

* try to fix bsc-yml

* try to fix bsc-yml

* try to fix bsc-yml

* try to fix bsc-yml

* improves default config, ensures times are printed on tests
  • Loading branch information
georgejecook authored May 18, 2021
1 parent b9bac26 commit e8e5cea
Show file tree
Hide file tree
Showing 143 changed files with 14,694 additions and 22,485 deletions.
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,11 @@ rooibosDist.brs
yarn.lock
yarn-error.log
/outRun/
node_modules/
out
**/roku_modules/
package-lock.json

!.vscode
.vscode/.env
dist/
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"consoleOutput": "full",
"internalConsoleOptions": "neverOpen",
"preLaunchTask": "build-tests",
"envFile": "${workspaceFolder}/frameworkTests/.vscode/.env",
"envFile": "${workspaceFolder}/tests/.vscode/.env",
"host": "${env:ROKU_DEV_TARGET}",
"password": "${env:ROKU_DEVPASSWORD}",
"retainStagingFolder": true,
Expand All @@ -24,9 +24,9 @@
"!*.zip",
"!**/*.zip"
],
"rootDir": "${workspaceFolder}/frameworkTests/build",
"rootDir": "${workspaceFolder}/tests/build",
"sourceDirs": [
"${workspaceFolder}/frameworkTests/src",
"${workspaceFolder}/tests/src",
],
"enableDebuggerAutoRecovery": true,
"stopDebuggerOnAppExit": true,
Expand Down
20 changes: 10 additions & 10 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"jira-plugin.workingProject": "",
"workbench.colorCustomizations": {
"statusBar.background": "#551A8B",
"statusBar.debuggingBackground": "#551A8B",
"panelTitle.activeBorder": "#ff0000",
"activityBar.background": "#452613",
"titleBar.activeBackground": "#61351A",
"titleBar.activeForeground": "#FDFAF9"
}
{
"jira-plugin.workingProject": "",
"workbench.colorCustomizations": {
"statusBar.background": "#551A8B",
"statusBar.debuggingBackground": "#551A8B",
"panelTitle.activeBorder": "#ff0000",
"activityBar.background": "#143141",
"titleBar.activeBackground": "#1D445B",
"titleBar.activeForeground": "#F7FBFD"
}
}
18 changes: 0 additions & 18 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,6 @@
"kind": "test",
"isDefault": true
}
},
{
"label": "build-tests-with-coverage",
"type": "shell",
"command": "gulp build && cd frameworkTests && export TS_NODE_COMPILER_OPTIONS='{\"incremental\":true, \"allowJs\":false}' && export TS_NODE_TRANSPILE_ONLY=true && gulp prepareCodeCoverageTests",
"problemMatcher": [],
"presentation": {
"echo": true,
"reveal": "silent",
"focus": false,
"panel": "shared",
"showReuseMessage": false,
"clear": true
},
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
456 changes: 191 additions & 265 deletions CHANGELOG.md

Large diffs are not rendered by default.

25 changes: 6 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@
<img src="images/logo.png" alt="Rooibos test framework" width="200" height="200"/>
</p>
<h3 align="center">
Simple, mocha-inspired, flexible, fun Brightscript test framework for ROKU apps
Simple, mocha-and junit inspired, flexible, fun Brightscript test framework for ROKU apps
</h3>
<p align="center">
<img src="images/exampleImage.png" alt="Mocha test framework" />
</p>

[![Build Status](https://travis-ci.org/georgejecook/rooibos.svg?branch=master)](https://travis-ci.org/georgejecook/rooibos)
[![GitHub](https://img.shields.io/github/release/georgejecook/rooibos.svg?style=flat-square)](https://github.com/georgejecook/rooibos/releases)
[![GitHub](https://img.shields.io/github/release/georgejecook/rooibos.svg?style=flat-square)](https://github.com/georgejecook/rooibos/releases)

## Links
- **[Youtube training videos](https://www.youtube.com/playlist?list=PLJRLV4QDx83vsYMD9bIs-cjoDXmNmO8Jv)**
- **[Documentation](docs/index.md)**
- **[API Documentaiton](https://georgejecook.github.io/rooibos)**
- **[CHANGELOG](CHANGELOG.md)**
Expand All @@ -37,25 +36,13 @@ Also thanks to the guys who made and maintain [mochaJs](https://mochajs.org/), o
## FAQ
### Is Rooibos ready for production use?

Rooibos is the test framework used by several of my clients, running CI with over 3000 tests between them. It started life as rewrite of the official roku unit testing framework, which has been in circulation for several years.
Yes, it's been used in production by quite a few folks, I'll provide a list in due-course; but there are 1000's of tests in production in some very respectable companies.


### Is Rooibos actively maintained?

I am actively invovled in Rooibos's development, and add more features and fixes on a weekly basis. You can expect rapid responses to issues.
I love rooibos, and always keep it up to date. I use it all the time.

### Why did you not just merge back your changes to roku's unit testing framework
### Why 4.0.0?

1. It does rewrite quite a lot of the original unit test framework code, so I doubt that roku would've merged it all back any time soon
2. It's conceptually entirely different: e.g. using annotations instead of naming conventions and boiler-plate code, completely different test reporting output, assertions and test cases maintain their own state, runs in a scenegraph scene, to name but a few
3. It has many more features than the original framework, not limited to : node specific assertions, exact assertion line failure reporting, better error messaging, easier setup, groupings, only and ignore for tests, mocks and stubs, etc, etc
4. Being completely frank, I enjoy roku work and want to do more of it, so it's useful to me to own this project, rather than lose control and wait on other's to merge my changes. On that note, email me at george[AT]tantawowa.com, or pm me (georgejecook) on the roku slack group to discuss any roku development requirements
5. I poured a _lot_ of work into the project (> 100 hours and counting), and expect to continue to do so. If I own the project, then I can do what I want, when I want. That goes for you guys as well, so get in touch with feature requests and PR's :)

### Is Rooibos itself unit tested?

At this point, it's WIP. I keep adding tests as bugs come up, and will continue to improve the test coverage.

### Why 2.0.0?

The latest version of Rooibos introduces a preprocessor which is a requirement for running all tests. I thought that was a significant enough departure to warrant a whole version bump.
Rooibos now uses the excellent bsc compiler plugin mechanism to seamlessly integrate with the compiler and the vscode IDE extension. This is a breaking change - projects will require updates to work.
26 changes: 0 additions & 26 deletions ROADMAP.md

This file was deleted.

1 change: 0 additions & 1 deletion VERSION

This file was deleted.

Loading

0 comments on commit e8e5cea

Please sign in to comment.