{"id":13879136,"url":"https://github.com/lifull-dev/bucky-core","last_synced_at":"2025-10-07T06:02:18.050Z","repository":{"id":34534682,"uuid":"177981558","full_name":"lifull-dev/bucky-core","owner":"lifull-dev","description":"System testing framework for web application.","archived":false,"fork":false,"pushed_at":"2025-03-10T10:47:32.000Z","size":381,"stargazers_count":33,"open_issues_count":17,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-29T02:05:13.355Z","etag":null,"topics":["pageobject-generator","pageobject-pattern","ruby","ruby-gem","selenium-webdriver","test-unit","yaml"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lifull-dev.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-27T11:38:02.000Z","updated_at":"2025-03-10T10:47:36.000Z","dependencies_parsed_at":"2025-01-04T20:11:29.404Z","dependency_job_id":"9a7775c0-5d61-4eda-a44c-f7f5ef91bda8","html_url":"https://github.com/lifull-dev/bucky-core","commit_stats":{"total_commits":266,"total_committers":17,"mean_commits":"15.647058823529411","dds":0.7443609022556391,"last_synced_commit":"aa46f31a0cbf8e0f36639298d7b3c1a6ff9058e3"},"previous_names":[],"tags_count":49,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifull-dev%2Fbucky-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifull-dev%2Fbucky-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifull-dev%2Fbucky-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lifull-dev%2Fbucky-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lifull-dev","download_url":"https://codeload.github.com/lifull-dev/bucky-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247280270,"owners_count":20912967,"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":["pageobject-generator","pageobject-pattern","ruby","ruby-gem","selenium-webdriver","test-unit","yaml"],"created_at":"2024-08-06T08:02:10.914Z","updated_at":"2025-10-07T06:02:13.014Z","avatar_url":"https://github.com/lifull-dev.png","language":"Ruby","readme":"# Bucky-Core\n[![Gem Version](https://badge.fury.io/rb/bucky-core.svg)](https://badge.fury.io/rb/bucky-core) [![CircleCI](https://circleci.com/gh/lifull-dev/bucky-core/tree/master.svg?style=svg)](https://circleci.com/gh/lifull-dev/bucky-core/tree/master) [![Maintainability](https://api.codeclimate.com/v1/badges/adf9599d98a55ac87a2e/maintainability)](https://codeclimate.com/github/lifull-dev/bucky-core/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/adf9599d98a55ac87a2e/test_coverage)](https://codeclimate.com/github/lifull-dev/bucky-core/test_coverage)\n\n## Overview\nBucky-core can run test code which is written in YAML. End-to-End test (working with Selenium) and Linkstatus test (HTTP status check) are supported in default. Page object model pattern and page based element management is the main concept in Bucky-core.  You can create scenarios and execute it easily by using Bucky-core.\n\nWhen working with [Bucky-management](https://github.com/lifull-dev/bucky-management), Bucky-core can also record test results. You can make test results visualization by using Bucky-management.\n\n## Feature\n\n* Run tests in parallel\n* Re-run tests which failed last time\n* Support test code in YAML\n* Multiple browser supported (currently only Chrome is supported)\n* Customizable test categories\n  * [Default] E2E: E2E (End to End) tests\n  * [Default] Linkstatus: http status code check in web page\n* Making test report with [Bucky-management](https://github.com/lifull-dev/bucky-management)\n\n\n## Setup\n\nCheckout Hands-on in example to get a quick start.\n* [bucky-core/example/hands-on](https://github.com/lifull-dev/bucky-core/tree/master/example/hands-on)\n\n### Install\n```bash\ngem install bucky-core\n```\n\n### Implement test code\n* Use snake case for naming\n```bash\n# Make project directory\nbucky new {your_project_name}\n\n# Move into project directory\n# It's the working directory when execute Bucky command\ncd {your_project_name}\n\n# Make service directory\nbucky make service {your_service_name}\n\n# Make page object(.rb) and part(.yml) in device directory\n## PC\nbucky make page {page_name} --service {your_service_name} --device pc\n## Smart phone\nbucky make page {page_name} --service {your_service_name} --device sp\n## Tablet\nbucky make page {page_name} --service {your_service_name} --device tablet\n\n# Write your test code in following directory:\n# services/{your_service_name}/{device}/scenarios/e2e/\n# services/{your_service_name}/{device}/scenarios/linkstatus/\n\n# Some samples are at bottom of Usage\nvim services/first_serive/pc/scenarios/e2e/test_code.yml\n```\n\n### Set connecting information for database\n\n```bash\nexport BUCKY_DB_USERNAME=\"{your database username}\"\nexport BUCKY_DB_PASSWORD=\"{your database password}\"\nexport BUCKY_DB_HOSTNAME=\"{your database hostname}\"\nexport BUCKY_DB_NAME=\"{your database name}\"\n```\n\n## Usage\nYou can find some examples in here!\n* [bucky-core/example](https://github.com/lifull-dev/bucky-core/blob/master/example)\n\nYou should start Selenium Chrome driver first. And you can find how to start Selenium Chrome driver by Docker in [SeleniumHQ/docker-selenium](https://github.com/SeleniumHQ/docker-selenium).\n### Run test\n```bash\n# Condition filter using option\nbucky run --test_category e2e --device sp --priority high\nbucky run --test_category e2e --case login\nbucky run --test_category e2e -D tablet --priority high\nbucky run --test_category e2e -D pc --label foo,bar,baz --priority high\n# Run test in debug mode (It won't insert test result into DB)\nbucky run -t e2e -d\n# Use -r to run more times for flaky test\n# It will only run tests that failed in last count\nbucky run --test_category e2e --re_test_count 3\nbucky run -t linkstatus -s bukken_detail -D pc -r 3\n# Use environment variables in test\nENV_FOO=foo bucky run -t e2e -d\n\n# Options:\n    -d, --debug # Won't insert test result into DB\n    -t, --test_category TEST_CATEGORY\n    -s, --suite_name SUITE_NAME\n    -S, --service SERVICE\n    -c, --case CASE_NAME\n    -D, --device DEVICE\n    -p, --priority PRIORITY\n    -r, --re_test_count RE_TEST_COUNT # How many round you run tests\n    -l, --label LABEL_NAME\n    -m, --link_check_max_times MAX_TIMES # Works only with which category is linkstatus\n    -o, --out JSON_OUTPUT_FILE_PATH # Output summary report by json\n```\n\n### Rerun test\n```bash\n# Only work with saved test result\n# Rerun from job id\nbucky rerun -j 100\nbucky rerun -j 100 -r 3\n\n# Options:\n    -d, --debug # Won't insert test result into DB\n    -r, --re_test_count RE_TEST_COUNT # How many round you run tests\n    -j, --job_id JOB_ID\n```\n\n#### Sample E2E test_code.yml\n\n* You can use erb notation in test code\n* [Operation list](https://github.com/lifull-dev/bucky-core/blob/master/lib/bucky/test_equipment/user_operation/user_operation_helper.rb)\n* [Verification list](https://github.com/lifull-dev/bucky-core/blob/master/lib/bucky/test_equipment/verifications/e2e_verification.rb)\n\n```yaml\ndesc: suite description\ndevice: pc\nservice: service_name\npriority: high\ntest_category: e2e\nlabels: test_label_foo\nsetup_each: # These procedures will be executed before every case\n  procs:\n    - proc: login\n      exec:\n        operate: go\n        url: https://example.com/login\nteardown_each: # These procedures will be executed after every case\n  procs:\n    - proc: login\n      exec:\n        operate: go\n        url: https://example.com/logout\n\ncases:\n  - case_name: test_code_1 # Suite filename + number\n    func: inquire button\n    desc: case description\n    labels:\n      - test_label_bar\n      - test_label_baz\n    procs:\n      - proc: open page\n        exec:\n          operate: go\n          url: http://example.com/\n      - proc: open page\n        exec:\n          operate: go\n          url: \u003c%= ENV['BASE_FQDN'] %\u003e/results # Using erb notation to get environment variable\n      - proc: element click\n        exec:\n          operate: click\n          page: top\n          part: next_page\n        when: \u003c%= ENV['STAGE'] == development %\u003e # Executing this proc when this condition is true\n      - proc: one of elements click # Using xpaths\n        exec:\n          operate: click\n          page: next_page # This file is at services/service_name/pc/parts/next_page.yml\n          part:\n            locate: many_links #  many_links is a xpath that describe in services/service_name/pc/parts/next_page.yml\n            num: 0 # You can choose number of element when xpath have multiple elements\n      - proc: switch tab\n        exec:\n          operate: switch_next_window\n      - proc: select by drop down\n        exec:\n          operate: choose\n          page: input_page\n          part: age\n          text: 20\n      - proc: alert accept\n        exec:\n          operate: alert_accept\n      - exec:\n          operate: wait\n          sec: 2\n      - exec: # You can stop your test by using stop operator\n          operate: stop\n      - proc: check message\n        exec:\n          verify: assert_text\n          page: input_thanks\n          part: complete_message\n          expect: done\n      - proc: check message\n        exec:\n          verify: assert_contained_text\n          page: input_thanks\n          part: complete_message\n          expect: done\n```\n\n#### Sample linkstatus test_code.yml\n\n* Linkstatus will check every \\\u003ca\u003e tag's http response in url\n\n```yaml\ndesc: suite description\ndevice: pc\nservice: service_name\npriority: high\ntest_category: linkstatus\nexclude_urls:\n  - https://example.com/fuga/?hoge=1 # PERFECT MATCHING\n  - https://example.com/fuga/* # PARTIAL MATCHING\n  - /https://example.com/.*\\.html/ # REGULAR EXPRESSION MATCHING\ncases:\n  - case_name: test_code_1 # Suite filename + number\n    desc: status check for top page\n    urls:\n        - https://example.com/\n        - https://www.example.com/\n  - case_name: test_code_2\n    desc: status check for detail page\n    urls:\n        - https://example.com/detail/1\n        - \u003c%= ENV['BASE_FQDN'] %\u003e/detail/2 # Using erb notation to get environment variable\n```\n\n# Development\n\n## Development\nShould always execute bucky run with -d option\n```bash\ngit clone git@github.com:lifull-dev/bucky-core.git\ncd bucky-core\n# clone from some test code\ngit clone git@github.com:${sample_test_code_owner}/${sample_testcode}.git .sample\ndocker-compose -f docker-compose.dev.yml up --build -d\ndocker-compose -f docker-compose.dev.yml down\n```\n\n## Development with bucky-management\nYou should start bucky-management first.\n\n```bash\ngit clone git@github.com:lifull-dev/bucky-core.git\ncd bucky-core\ngit clone git@github.com:${sample_test_code_owner}/${sample_testcode}.git .sample\ndocker-compose -f docker-compose.dev-with-bm.yml up --build -d\ndocker-compose -f docker-compose.dev-with-bm.yml down\n```\n\n## Contributing\n\n* [Naoto Kishino](https://github.com/kishinao)\n* [Rikiya Hikimochi](https://github.com/hikimocr)\n* [Jye Ruey](https://github.com/rueyjye)\n* [Seiya Sato](https://github.com/satose)\n* [Hikaru Fukuzawa](https://github.com/FukuzawaHikaru)\n* [Naoki Nakano](https://github.com/NakanoNaoki)\n","funding_links":[],"categories":["Ruby"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifull-dev%2Fbucky-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flifull-dev%2Fbucky-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flifull-dev%2Fbucky-core/lists"}