{"id":23129808,"url":"https://github.com/detro/jasmine-jsreporter","last_synced_at":"2025-08-17T06:32:49.060Z","repository":{"id":1984903,"uuid":"2916846","full_name":"detro/jasmine-jsreporter","owner":"detro","description":"Jasmine JS Reporter - The purpose of this reporter is to make it easier to extract informations about the executed Test Results, without having to parse the DOM. The results are just a plain JavaScript Object (aka JSON)..","archived":false,"fork":false,"pushed_at":"2014-07-27T10:47:57.000Z","size":398,"stargazers_count":19,"open_issues_count":0,"forks_count":19,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-11T19:51:36.647Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/detro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-12-05T14:03:57.000Z","updated_at":"2019-06-16T10:13:45.000Z","dependencies_parsed_at":"2022-09-09T11:52:07.165Z","dependency_job_id":null,"html_url":"https://github.com/detro/jasmine-jsreporter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fjasmine-jsreporter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fjasmine-jsreporter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fjasmine-jsreporter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fjasmine-jsreporter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/detro","download_url":"https://codeload.github.com/detro/jasmine-jsreporter/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230098721,"owners_count":18172741,"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-12-17T10:10:57.787Z","updated_at":"2024-12-17T10:10:58.469Z","avatar_url":"https://github.com/detro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jasmine JS-Reporter\n\nThis is a Jasmine Reporter, designed to simplify the extraction of test results from the Page.\nIt's tailored with _Test Reporting Automation_ in mind.\n\nIdeal scenario of use are:\n\n* Use Selenium Web Driver to extract the result out of the page\n* Use PhantomJS to do... well, the same as above\n* Every time you wish Jasmine produced a JSON to report about the tests\n\n## What does it do?\n\nThe Reporter awaits for all the Test to finish, than produces a report that can be retrieved with\n\n```javascript\nvar JSONReport = jasmine.getJSReport ();\n// or\nvar strJSONReport = jasmine.getJSReportAsString ();\n```\nand looks like the following:\n\n```JSON\n{\n    \"suites\": [\n        {\n            \"description\": \"Simple test that checks the obvious regarding Truthy-ness and Falsy-ness\",\n            \"durationSec\": 0.005,\n            \"specs\": [\n                {\n                    \"description\": \"should report that a number is truthy, if different than '0', falsy otherwise\",\n                    \"durationSec\": 0.004,\n                    \"passed\": true,\n                    \"skipped\": false,\n                    \"passedCount\": 3,\n                    \"failedCount\": 0,\n                    \"totalCount\": 3\n                },\n                // ... more specs here...\n            ],\n            \"suites\": [],\n            \"passed\": true\n        }\n    ],\n    \"durationSec\": 0.005,\n    \"passed\": true\n}\n```\n\nAfter that, you can just extract it from the page.\n\n## Usage\n\n1. Clone this repository, and include the reporter in your page running Jasmine tests:\n    * `\u003cscript src=\"path/to/jasmine-jsreporter.js\" type=\"text/javascript\"\u003e\u003c/script\u003e`\n2. Tell jasmine to use the reporter\n    * For Jasmine 1.x: `jasmine.getEnv().addReporter(new jasmine.JSReporter())`\n    * For Jasmine 2.0: `jasmine.getEnv().addReporter(new jasmine.JSReporter2())`\n3. Run your tests as normal\n4. Go to your browser console, via [WebInspector](http://trac.webkit.org/wiki/WebInspector), [Firebug](http://getfirebug.com/), etc.\n     On the console, type:\n     * `jasmine.getJSRepor t()`\n5. Check that you get an Object back (should look like the above one)\n6. You are done!\n\nNow you can setup your Test Infrastructure to _extract test results from the test page_, in the same way I just showed you.\n\n## Examples\n\nI have provided some usage examples:\n\n* `examples/`\n    * `phantomjs-javascript/`: Example use with PhantomJS [WORK IN PROGRESS]\n    * `selenium-java/`: Example use with Selenium in Java [WORK IN PROGRESS]\n    * `spec-runner/`: Example HTML page that uses Jasmine and JS-Reporter - open the WebInspector/Firebug\n\n## License\n\nThis code is release under BSD License.\n\n```ascii\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n\n  * Redistributions of source code must retain the above copyright\n    notice, this list of conditions and the following disclaimer.\n  * Redistributions in binary form must reproduce the above copyright\n    notice, this list of conditions and the following disclaimer in the\n    documentation and/or other materials provided with the distribution.\n  * Neither the name of the \u003corganization\u003e nor the\n    names of its contributors may be used to endorse or promote products\n    derived from this software without specific prior written permission.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\nARE DISCLAIMED. IN NO EVENT SHALL \u003cCOPYRIGHT HOLDER\u003e BE LIABLE FOR ANY\nDIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\nLOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\nON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\nTHIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n```\n\n_Would be nice if you mention the **Author** and/or it's **Public Repository** when using it._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetro%2Fjasmine-jsreporter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdetro%2Fjasmine-jsreporter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetro%2Fjasmine-jsreporter/lists"}