{"id":20409084,"url":"https://github.com/tcorral/grunt-moonwalker","last_synced_at":"2025-03-05T02:41:45.928Z","repository":{"id":26479933,"uuid":"29931831","full_name":"tcorral/grunt-moonwalker","owner":"tcorral","description":"Grunt task to execute Selenium IDE (selenese) tests.","archived":false,"fork":false,"pushed_at":"2015-01-27T22:42:16.000Z","size":160,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-16T00:34:43.187Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/tcorral.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-27T19:51:49.000Z","updated_at":"2015-01-27T22:42:16.000Z","dependencies_parsed_at":"2022-07-25T15:32:10.230Z","dependency_job_id":null,"html_url":"https://github.com/tcorral/grunt-moonwalker","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/tcorral%2Fgrunt-moonwalker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcorral%2Fgrunt-moonwalker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcorral%2Fgrunt-moonwalker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcorral%2Fgrunt-moonwalker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcorral","download_url":"https://codeload.github.com/tcorral/grunt-moonwalker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241955038,"owners_count":20048405,"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-11-15T05:39:32.000Z","updated_at":"2025-03-05T02:41:45.905Z","avatar_url":"https://github.com/tcorral.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grunt-moonwalker\n\n\u003e Executes Selenium IDE (selenese) tests and get a report of the execution.\n\nThis tool needs a Selenium standalone or grid server to be executed.\n\n## Getting Started\nThis plugin requires Grunt `~0.4.1`\n\nIf you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:\n\n```shell\nnpm install grunt-moonwalker --save-dev\n```\n\nOnce the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:\n\n```js\ngrunt.loadNpmTasks('grunt-moonwalker');\n```\n\n## The \"moonwalker\" task\n\n### Overview\nIn your project's Gruntfile, add a section named `moonwalker` to the data object passed into `grunt.initConfig()`.\n\n```js\ngrunt.initConfig({\n  moonwalker: {\n    options: {\n      // Task-specific options go here.\n    },\n    your_target: {\n      // Target-specific file lists and/or options go here.\n    },\n  },\n})\n```\n\n### Options\n\n#### options.selenium\ntype: `Object`\nDefault value: `{ host: 'localhost', port: 4444 }`\n\nDetermine the host and port where the selenium server (standalone or grid) is reachable.\n\n#### options.desiredCapabilities\ntype: `Array`\nDefault value: `[ { browserName: 'firefox' } ]`\n\nDetermine the [desired capabilities](https://code.google.com/p/selenium/wiki/DesiredCapabilities) where the test will be executed.\n\n#### options.phantomjs\ntype: `Object`\nDefault value: `{ host: 'localhost', port: 8910 }`\n\nDetermine the host and port where the Ghostdriver is reachable.\n\n#### options.reporter\ntype: `Array||Function`\nDefault value: `console.log`\n\nDetermine the reporter to show the messages of execution. This version uses by default `console.log` but a junit reporter has been provided aswell.\nReporters could be a function or an array, where the first element of the array is the name of the reporter and the rest of elements are the arguments\nused by the reporter.\n\n#### options.saucelabs\ntype: `Object`\nDefault value: `{ host: 'ondemand.saucelabs.com', port: 80 }`\nRequires to define :\n - `accesskey`\n - `username`\n\nDetermine the connection data to access to your account of saucelabs. Is required to add the `accesskey` and `username`.\n\n### Usage Examples\n\n#### Default Config\nIn this example, the default config is used to execute the selenese test.\n\n```js\ngrunt.initConfig({\n  moonwalker: {\n    success: {\n      src: [\n        'path/to/the/selenese/test'\n      ]\n    }\n  }\n})\n```\n\nWhen this code is executed it will try to connect to a Selenium server in localhost port 4444 if the server is not reachable\nit will throw an error else it will execute the tests using Firefox so it's important to have Firefox installed aswell.\nWe encourage to use the [filter `isFile`](http://gruntjs.com/configuring-tasks) using wildcards.\nThis test will execute one test in one browser.\n\n#### Extended Config without junit report\nIn this example, we are adding more specific configuration to execute the selenese tests inside `seleneseTests` folder in two different browsers, Chrome and PhantomJS.\n\n```js\ngrunt.initConfig({\n  moonwalker: {\n    success: {\n      src: [\n        'path/to/the/seleneseTests/**'\n      ],\n      filter: 'isFile',\n      options: {\n        desiredCapabilities: [\n          {\n            browserName: 'chrome'\n          },\n          {\n            browserName: 'phantomjs'\n          }\n        ]\n      }\n    }\n  }\n})\n\nWhen this code is executed it will try to connect to a Selenium server in localhost port 4444 if the server is not reachable\nit will throw an error, it will also will try to connect to the GhostDriver in localhost port 8910 if GhostDriever is not reachable\nit will throw an error else it will execute the tests using Chrome and Phantomjs so it's important to have Chrome and Phantomjs installed aswell.\nWe use the [filter `isFile`](http://gruntjs.com/configuring-tasks) using wildcards to avoid iterate over folders.\nThis test will execute all the tests inside the folder in two browsers.\n\n#### Extended Config with junit report\nIn this example, we are adding more specific configuration to execute the selenese tests inside `seleneseTests` folder in two different browsers, Chrome and PhantomJS and get a junit compatible report.\n\n```js\ngrunt.initConfig({\n  moonwalker: {\n    success: {\n      src: [\n        'path/to/the/seleneseTests/**'\n      ],\n      filter: 'isFile',\n      options: {\n        desiredCapabilities: [\n          {\n            browserName: 'chrome'\n          },\n          {\n            browserName: 'phantomjs'\n          }\n        ],\n        reporter: ['junit', 'path/where/save/the/report.xml']\n      }\n    }\n  }\n})\n\nWhen this code is executed it will try to connect to a Selenium server in localhost port 4444 if the server is not reachable\nit will throw an error, it will also will try to connect to the GhostDriver in localhost port 8910 if GhostDriever is not reachable\nit will throw an error else it will execute the tests using Chrome and Phantomjs so it's important to have Chrome and Phantomjs installed aswell.\nWe use the [filter `isFile`](http://gruntjs.com/configuring-tasks) using wildcards to avoid iterate over folders.\nThe reporter will save all the information about the execution of tests in junit compatible report.\nThis test will execute all the tests inside the folder in two browsers and creates a junit xml compatible report.\n\n## Contributing\nIn lieu of a formal style guide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n\n* 0.0.1: First release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcorral%2Fgrunt-moonwalker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcorral%2Fgrunt-moonwalker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcorral%2Fgrunt-moonwalker/lists"}