{"id":18084813,"url":"https://github.com/coderofsalvation/testosteron","last_synced_at":"2025-04-12T20:09:12.608Z","repository":{"id":9915674,"uuid":"11925419","full_name":"coderofsalvation/testosteron","owner":"coderofsalvation","description":"simple crosslanguage testing-utility using bash, crosslanguage bootstrapper for unittests","archived":false,"fork":false,"pushed_at":"2020-05-28T19:27:00.000Z","size":2350,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-27T19:33:22.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderofsalvation.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"custom":"https://gumroad.com/l/hGYGh"}},"created_at":"2013-08-06T14:02:02.000Z","updated_at":"2020-05-28T19:27:02.000Z","dependencies_parsed_at":"2022-09-16T21:02:06.817Z","dependency_job_id":null,"html_url":"https://github.com/coderofsalvation/testosteron","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Ftestosteron","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Ftestosteron/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Ftestosteron/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderofsalvation%2Ftestosteron/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderofsalvation","download_url":"https://codeload.github.com/coderofsalvation/testosteron/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142905,"owners_count":21054671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-31T15:08:18.032Z","updated_at":"2025-04-12T20:09:12.575Z","avatar_url":"https://github.com/coderofsalvation.png","language":"Shell","funding_links":["https://gumroad.com/l/hGYGh"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"doc/testosteron.gif\"/\u003e\u003cbr\u003e\n  https://github.com/coderofsalvation/testosteron\n\u003c/p\u003e\n\ntestosteron\n===========\n\ndeadsimple unit/box/regression-testing-tool using bash \u0026 shebang files with *any* programminglanguage.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"doc/testosteron.png\"/\u003e\u003c/p\u003e\n\nInstallation \n============\n\nusing git\n  \n    $ git clone https://github.com/coderofsalvation/testosteron \n    $ cd testosteron \n    $ ./testosteron rundir tests/white\n\nor using npm:\n\n    $ npm install testosteron\n    $ node_modules/.bin/testosteron rundir node_modules/testosteron/tests/white\n\nWhy\n===\nPHPUnit or whatever-cool-programminglanguage-Unit is great..but sometimes limiting.\nFor those who need to test on many levels quickly: testosteron is here, which bootstraps any testscript- or testframework.\nMost of the time developers know multiple programming languages, so testosteron allows testing in *any* programming language.\nTestscripts are very easy, they just pass or fail using exitcode 0 or more.\n\nHow\n===\nSupersimple, just shebang files and symbolic links.\nLets look at the tests:\n\n\u003cimg alt=\"\" src=\"doc/tests.png\"/\u003e\n\nNow, since we want to be flexible, we can define presets using symlinks\n\n\u003cimg alt=\"\" src=\"doc/presets.png\"/\u003e\n\nAfter that, just run 1 test:\n\n    ./testosteron run tests/white/10001-test.js \n\nOr for a whole dir with tests:\n\n    ./testosteron rundir tests/white \n\nOr a certain preset:\n\n    ./testosteron rundir presets/offline\n\nOr if you want your tests to fail after a certain executiontime:\n\n    PREFIX=\"timeout 1.3s\" ./testosteron rundir presets/stress\n\nInstallation\n============\nJust drop this repository in your webapplication rootdir, and you are ready to go write some testscripts:\n\n    git clone https://github.com/coderofsalvation/testosteron.git\n    cd testosteron \u0026\u0026 rm -rf doc\n\nWhat are these colornames?\n==========================\nGray 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)\nOptionally, make sure you have some cli-entrypoints in your webapplication, so you can easily access website/app configvariables within bash.\n\nNotable features\n================\nJust using a teaspoon of bash you can:\n\n* measure cpu,memory and i/o usage per test \n* compare with expected output (if a test like '10-foo.js' is accompanied with '10-foo.js.out')\n* be flexible when what to tests (presets)\n* its superportable: no frameworks/libs, just 1 file with 100% bash\n\nAdvanced Usage\n==============\nTestosteron 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)\n or [project-deploy-githook.bash](https://github.com/coderofsalvation/project-deploy-githook.bash)\nIf one pushes a new website to the server, testosteron runs all the tests, if something fails, deployment will halt.\nExample .ndg/hooks/test :\n\n    ./testosteron rundir presets/deployment || {\n      echo \"removing last commit since you did not pass testosteron..sorry\"\n      git reset --hard HEAD~1\n    }\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Ftestosteron","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderofsalvation%2Ftestosteron","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderofsalvation%2Ftestosteron/lists"}