{"id":16549567,"url":"https://github.com/settinghead/widget-tester","last_synced_at":"2025-03-04T13:44:30.940Z","repository":{"id":18549949,"uuid":"21751373","full_name":"settinghead/widget-tester","owner":"settinghead","description":"Configuration, task \u0026 mocks related to widget testing.","archived":false,"fork":false,"pushed_at":"2014-12-11T21:04:57.000Z","size":335,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T17:14:48.343Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/settinghead.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":"2014-07-11T21:05:07.000Z","updated_at":"2021-06-30T18:04:27.000Z","dependencies_parsed_at":"2022-09-02T03:41:41.153Z","dependency_job_id":null,"html_url":"https://github.com/settinghead/widget-tester","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/settinghead%2Fwidget-tester","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settinghead%2Fwidget-tester/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settinghead%2Fwidget-tester/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/settinghead%2Fwidget-tester/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/settinghead","download_url":"https://codeload.github.com/settinghead/widget-tester/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241859392,"owners_count":20032314,"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-11T19:29:54.398Z","updated_at":"2025-03-04T13:44:30.913Z","avatar_url":"https://github.com/settinghead.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Widget Tester\n\n## Introduction\n\nConfiguration, tasks, and mocks to be used for widget testing.\n\n### Available Tasks\n\n- Simple static server\n- E2E Tests with protractor\n- Angular E2E tests\n- Angular Unit Tests with Karma \u0026 Mocha\n- Jenkins Metrics\n\nWidget Tester works in conjunction with [Rise Vision](http://www.risevision.com), the [digital signage management application](http://rva.risevision.com/) that runs on [Google Cloud](https://cloud.google.com).\n\nAt this time Chrome is the only browser that this project and Rise Vision supports.\n\n## Built With\n- NPM (node package manager)\n- Bower\n- Karma, Mocha, Chai, Chai-As-Promised \u0026 Sinon-Chai for testing\n\n## Development\n\n### Local Development Environment Setup and Installation\n* install the latest Node.js and NPM version\n\n* clone the repo using Git to your local:\n```bash\ngit clone https://github.com/Rise-Vision/widget-tester.git\n```\n\n* cd into the repo directory\n```bash\ncd widget-tester\n```\n\n* from the root of the repo run this command to install all npm dependencies\n```bash\nnpm install\n```\n\n* install Bower globally using the NPM install cmd:\n```bash\nnpm install -g bower\n```\n\n* run Bower install to install all bower dependencies:\n```bash\nbower install\n```\n\n### How to enable Jenkins CI to collect metrics for a repository\n\nYou will need to make sure the following requirements are fulfilled:\n\n1. ####Each of your test types must produce a report file as reports/*-xunit.xml\n  - File must be placed under ```/reports``` (which should also be git-ignored)\n  - Reports must have the suffix ```-xunit.xml```\n  - This can be easily accomplished if you use factory in this repo to create a test task, which will automatically generate the report file for you.\n\n    For instance,\n  ```javascript\n  var factory = require(\"widget-factory\").gulpTaskFactory;\n  gulp.task(\"test:e2e\", factory.testE2E());\n  ```\n  Will define a gulp task that runs tests under ```test/e2e/*.js``` with CasperJS.\n\n2. ####A gulp task must be present that collects metrics and produces a Java properties file as ```reports/metrics.json.properties```\n   - Again, the easiest way to accomplish is to use the task factory:\n   ```javascript\n   var factory = require(\"widget-factory\").gulpTaskFactory;\n   gulp.task(\"test:metrics\", factory.metrics());\n   ```\n3. ####Each Jenkins task for the repository must incorporate the metrics task at the end of the original test process\n   - If your repository uses NPM script, append ```gulp metrics; ``` to the end of your \"test\" task\n   - If you have a gulp task called ```test``` that runs all available types of tests, modify it to one similar to the following:\n\n   ```javascript\n   var runSequence = require(\"run-sequence\");\n   gulp.task(\"test\", function (cb) {\n     runSequence(\"test:unit:ng\",\n       \"test:e2e:server\", \"test:e2e\", \"test:e2e:ng\", \"test:e2e:server-close\",\n       \"test:metrics\", cb);\n   })\n\n   ```\n4. ####Your Jenkins task must use EnvInject plugin to inject ```reports/metrics.json.properties``` into the build context\n   1. In your task's config page, click \"Add Build Step\", then Inject Environment Variables\n   2. In the \"Inject Environment Variables\" block, enter ```reports/metrics.json.properties``` in the \"Properties File Path\" text box\n\n5. ###Your Jenkins task must add a note back to GitHub repo\n   1. Click \"Add post-build action\" =\u003e Git Publisher\n   2. Under \"Git Publisher\" block, click \"Add Note\"\n   3. Under the new note sub-block\n     - Set \"note to push\" to ```$CI_METRICS```\n     - Set \"target remote name\" to \"origin\" (or the one that matches your source code configuration. Click \"Advance\" button in your repository settings to see the name of your git remote)\n     - Set \"note's namespace\" to ```metrics-${GIT_BRANCH}-${BUILD_NUMBER}```\n\n### Dependencies\n* **Bower** - is used as a package manager for javascript libraries and frameworks. All third-party javascript frameworks and libraries are listed as dependencies in the bower.json file.\n* **NPM \u0026 Nodejs** - all the node dependencies are listed in the package.json file\n\n\n## Submitting Issues\nIf you encounter problems or find defects we really want to hear about them. If you could take the time to add them as issues to this Repository it would be most appreciated. When reporting issues please use the following format where applicable:\n\n**Reproduction Steps**\n\n1. did this\n2. then that\n3. followed by this (screenshots / video captures always help)\n\n**Expected Results**\n\nWhat you expected to happen.\n\n**Actual Results**\n\nWhat actually happened. (screenshots / video captures always help)\n\n## Contributing\nAll contributions are greatly appreciated and welcome! If you would first like to sound out your contribution ideas please post your thoughts to our [community](http://community.risevision.com), otherwise submit a pull request and we will do our best to incorporate it\n\n## Resources\nIf you have any questions or problems please don't hesitate to join our lively and responsive community at http://community.risevision.com.\n\nIf you are looking for user documentation on Rise Vision please see http://www.risevision.com/help/users/\n\nIf you would like more information on developing applications for Rise Vision please visit http://www.risevision.com/help/developers/.\n\n**Facilitator**\n\n[Stuart Lees](https://github.com/stulees \"Stuart Lees\")\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettinghead%2Fwidget-tester","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsettinghead%2Fwidget-tester","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsettinghead%2Fwidget-tester/lists"}