{"id":22704783,"url":"https://github.com/detro/phantomjs-jasminexml-example","last_synced_at":"2025-04-13T10:52:35.741Z","repository":{"id":56966183,"uuid":"1923833","full_name":"detro/phantomjs-jasminexml-example","owner":"detro","description":"PhantomJS - Jasmine XML - Example Project Layout","archived":false,"fork":false,"pushed_at":"2015-03-02T12:43:58.000Z","size":206,"stargazers_count":41,"open_issues_count":0,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-27T02:11:18.205Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":false,"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.markdown","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-06-20T14:08:31.000Z","updated_at":"2021-08-03T08:20:22.000Z","dependencies_parsed_at":"2022-08-21T11:20:24.259Z","dependency_job_id":null,"html_url":"https://github.com/detro/phantomjs-jasminexml-example","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/detro%2Fphantomjs-jasminexml-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fphantomjs-jasminexml-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fphantomjs-jasminexml-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/detro%2Fphantomjs-jasminexml-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/detro","download_url":"https://codeload.github.com/detro/phantomjs-jasminexml-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248702999,"owners_count":21148116,"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-10T09:07:47.189Z","updated_at":"2025-04-13T10:52:35.707Z","avatar_url":"https://github.com/detro.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"- - -\n# **WARNING - WARNING - WARNING**\nWhen I wrote this the intention was to release an example of integration between PhantomJS, Maven and Jasmine.\nI had no desire to maintain another project, and I find it surprising how many refer to this as one.\n\nUse this as inspiration, and then take off your way.\nI have closed the Issue Tracker.\n\n_P.S.: Yes, I should have probably released this as a Gist instead..._\n\n- - -\n\n# PhantomJS - Jasmine XML - Example Project Layout\n\n## Description\nThis is an example project layout, that realises JavaScript Unit Testing\nusing [Jasmine](https://github.com/pivotal/jasmine) on the top of\n[PhantomJS](https://github.com/ariya/phantomjs).\n\nIt is designed to be used _standalone_ or _within Maven_.\n\nShould work properly with **PhantomJS version `\u003e=2.2.0`**.\n\n## Use Standalone\n\n    $ phantomjs test/phantomjs_jasminexml_runner.js test/test_runner.html xml_output_dir/\n    \nThis will produce a set of XML outputs, one for every Jasmine Test Suite.\n\n## Use within Maven\nThe project _already_ provides a `pom.xml` that does the trick. So a simple:\n\n    $ mvn test\n\nor\n\n    $ mvn clean install\n\nwill launch the tests and, if they all pass, make the mvn build pass.\nIf any test fails, the mvn build fails.\n\n## Internals\nWell, explaining the internals of PhantomJS here is pointless, but to understand how\nthis works, you need to understand a simple idea: PhantomJS provides a main \"Javascript Context\"\nfrom within which, the user is able to _spawn_ a WebPage, effectively creating another \"Javascript Context\".\n\nThe new context has the following characteristics:\n\n* **isolated** - the page doesn't know anything about phantom and phantom API\n* **controllable** - the main phantom context provides API to control/influence the page context\n\n### So, how does it work?\nThe _magic_ is done by 2 scripts:\n\n    test/phantomjs_jasminexml_runner.js\n    test/lib/jasmine-reporters/jasmine.phantomjs-reporter.js\n\n`jasmine.phantomjs-reporter.js` is a _plugin_ for Jasmine that saves the result of the\ntests at the bottom of the webpage where the test runs.\n\n`phantomjs_jasminexml_runner.js` instead runs the show, launches the tests,\nextracts the result from the page, then saves it to the directory passed (see source).\n\n**Happy Testing ;-)**\n\n## Licensing: Public Domain\n\nThe code of this project is relased under [Public Domain](http://en.wikipedia.org/wiki/Public_domain) and as such you\nare not required to do anything but use and enjoy it.\n\nIf, out of good will, want to put somewhere in your work a reference to this project as \"inspiration\", please feel free.\nBut don't feel any obligation to do so.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetro%2Fphantomjs-jasminexml-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdetro%2Fphantomjs-jasminexml-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdetro%2Fphantomjs-jasminexml-example/lists"}