Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coderofsalvation/testosteron
simple crosslanguage testing-utility using bash, crosslanguage bootstrapper for unittests
https://github.com/coderofsalvation/testosteron
Last synced: 12 days ago
JSON representation
simple crosslanguage testing-utility using bash, crosslanguage bootstrapper for unittests
- Host: GitHub
- URL: https://github.com/coderofsalvation/testosteron
- Owner: coderofsalvation
- License: mit
- Created: 2013-08-06T14:02:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T19:27:00.000Z (over 4 years ago)
- Last Synced: 2024-04-25T11:02:03.000Z (7 months ago)
- Language: Shell
- Homepage:
- Size: 2.24 MB
- Stars: 3
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
https://github.com/coderofsalvation/testosterontestosteron
===========deadsimple unit/box/regression-testing-tool using bash & shebang files with *any* programminglanguage.
Installation
============using git
$ git clone https://github.com/coderofsalvation/testosteron
$ cd testosteron
$ ./testosteron rundir tests/whiteor using npm:
$ npm install testosteron
$ node_modules/.bin/testosteron rundir node_modules/testosteron/tests/whiteWhy
===
PHPUnit or whatever-cool-programminglanguage-Unit is great..but sometimes limiting.
For those who need to test on many levels quickly: testosteron is here, which bootstraps any testscript- or testframework.
Most of the time developers know multiple programming languages, so testosteron allows testing in *any* programming language.
Testscripts are very easy, they just pass or fail using exitcode 0 or more.How
===
Supersimple, just shebang files and symbolic links.
Lets look at the tests:Now, since we want to be flexible, we can define presets using symlinks
After that, just run 1 test:
./testosteron run tests/white/10001-test.js
Or for a whole dir with tests:
./testosteron rundir tests/white
Or a certain preset:
./testosteron rundir presets/offline
Or if you want your tests to fail after a certain executiontime:
PREFIX="timeout 1.3s" ./testosteron rundir presets/stress
Installation
============
Just drop this repository in your webapplication rootdir, and you are ready to go write some testscripts:git clone https://github.com/coderofsalvation/testosteron.git
cd testosteron && rm -rf docWhat are these colornames?
==========================
Gray are [graybox test](http://en.wikipedia.org/wiki/Gray_box_testing), white are more detailed [whitebox tests](http://en.wikipedia.org/wiki/White-box_testing)
Optionally, make sure you have some cli-entrypoints in your webapplication, so you can easily access website/app configvariables within bash.Notable features
================
Just using a teaspoon of bash you can:* measure cpu,memory and i/o usage per test
* compare with expected output (if a test like '10-foo.js' is accompanied with '10-foo.js.out')
* be flexible when what to tests (presets)
* its superportable: no frameworks/libs, just 1 file with 100% bashAdvanced Usage
==============
Testosteron was made with autodeployment in mind, therefore it works great with GIThooks and/or [nodejs-deploy-githook.bash](https://github.com/coderofsalvation/nodejs-deploy-githook.bash)
or [project-deploy-githook.bash](https://github.com/coderofsalvation/project-deploy-githook.bash)
If one pushes a new website to the server, testosteron runs all the tests, if something fails, deployment will halt.
Example .ndg/hooks/test :./testosteron rundir presets/deployment || {
echo "removing last commit since you did not pass testosteron..sorry"
git reset --hard HEAD~1
}