{"id":17548794,"url":"https://github.com/lslezak/cucumber-yast","last_synced_at":"2025-03-29T06:30:28.046Z","repository":{"id":73224510,"uuid":"83281882","full_name":"lslezak/cucumber-yast","owner":"lslezak","description":"Experimental Cucumber Tests fo YaST and libyui","archived":false,"fork":false,"pushed_at":"2018-07-13T09:31:09.000Z","size":2421,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-03T19:13:58.530Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lslezak.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-02-27T07:35:50.000Z","updated_at":"2021-05-20T16:59:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"4df7350c-17ad-47f2-a59b-071428d7fcc2","html_url":"https://github.com/lslezak/cucumber-yast","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/lslezak%2Fcucumber-yast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fcucumber-yast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fcucumber-yast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lslezak%2Fcucumber-yast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lslezak","download_url":"https://codeload.github.com/lslezak/cucumber-yast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246149988,"owners_count":20731406,"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-21T02:44:01.385Z","updated_at":"2025-03-29T06:30:28.012Z","avatar_url":"https://github.com/lslezak.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Experimental Cucumber Tests for YaST\n\nHere are some experimental Cucumber tests for YaST or plain libyui applications.\n\n## :warning: Security :warning:\n\n*The libyui REST API currently does not implement any authentication, anybody\nwho can access the API port has full control of the running application. This is\nespecially critical for YaST which usually runs with the administrator (root)\npermissions!*\n\n## Installing libyui\n\nThese tests require experimental REST API support in the libyui library\nwhich is available in the `http_server` branches in [libyui Git repositories](\nhttps://github.com/libyui) or you can install the experimental RPM\npackages for the openSUSE Leap 15.0 distribution.\n\nRun as `root` user:\n\n```sh\nzypper ar -f https://download.opensuse.org/repositories/home:/lslezak:/libyui-rest-api/openSUSE_Leap_15.0/ libyui\nrpm --import https://build.opensuse.org/projects/home:lslezak:libyui-rest-api/public_key\nzypper dup --from libyui --allow-vendor-change\n```\n\n:warning: *Use at your risk! The packages are experimental and should not be used\nin production systems!* :fire:\n\nThen you can do a quick test to see if the REST API works, run any YaST module:\n\n```\nYUI_HTTP_PORT=14155 yast2 repositories\n```\n\nWhile the YaST is running you can dump the current dialog content in JSON\nformat using this command on the same machine:\n\n```sh\ncurl -i http://localhost:14155/dialog\n```\n\n## Installing Cucumber Ruby Gem\n\nCheckout this Git repository and install the needed Ruby gems using `bundler`\nlocally:\n\n```sh\ngit clone https://github.com/lslezak/cucumber-yast.git\ncd cucumber-yast\nbundle install --path ./.vendor/bundler\n```\n\n## Running the Tests\n\n### Testing Locally\n\n- Run the test (as root):\n  ```sh\n  bundle exec cucumber features/repository_add_new_repo.feature\n  ```\n\n  [![Add Repository Screencast](images/cucumber_add_repo_textmode.gif)](\n  https://raw.githubusercontent.com/lslezak/cucumber-yast/master/images/cucumber_add_repo_textmode.gif)\n\n### Testing a Remote Instance\n\nBecause the libyui REST API uses an HTTP server which can be accessed remotely\nthen it is easy to run the tests on a different machine. That means you can\neven test an YaST installation running in a virtual machine.\n\nTo allow remote access to the API you need to additionally set the variable\n`YUI_HTTP_REMOTE=1`, otherwise the API will be available only locally.\nYou might also need to open the used port in firewall.\n\n:warning: *For security reasons enable remote access only in a trusted network\nor in a testing machine, using a virtual machine is highly recommended.*\n\n\n### Testing the YaST Installer\n\nTo include the REST API support in the openSUSE Leap 15.0 installer boot the\ninstaller with these extra parameters:\n\n```sh\nYUI_HTTP_PORT=14155 YUI_HTTP_REMOTE=1 selfupdate=https://download.opensuse.org/repositories/home:/lslezak:/libyui-rest-api/openSUSE_Leap_15.0/\n```\n\nThis will update the YaST installer with the packages from the specified\nrepositories. You will need to import an unknown GPG key during the process.\n\nThen YaST restarts and the REST API should be available from outside.\n\n#### Steps\n\n- Start a patched openSUSE Leap 15.0 installer as described above\n- Run the test:\n  ```sh\n  bundle exec cucumber features/leap15_installation.feature\n  ```\n\n![Leap 15.0 Installation](images/cucumber_leap15_textmode_install.gif)\n\n\n### Testing a Plain libyui Application\n\nCucumber tests can be written also for any application which uses the libyui\nframework.\n\nThe [features/libyui_manywidgets.feature](features/libyui_manywidgets.feature)\ncontains a test for the [ManyWidgets.cc](\nhttps://github.com/libyui/libyui/blob/master/examples/ManyWidgets.cc) example.\n\nHow to start it (change the path to the example):\n\n```sh\nSTEP_DELAY=1 YUI_PREFERED_BACKEND=ncurses TEST_TARGET_COMMAND=\\\n\"xterm -geometry 80x30 -e libyui/libyui/build/examples/ManyWidgets\" \\\ncucumber -s features/libyui_manywidgets.feature 2\u003e /dev/null\n```\n\n[![Libyui ManyWidgets Example](images/cucumber_manywidgets_example_textmode.gif)](\nhttps://raw.githubusercontent.com/lslezak/cucumber-yast/master/images/cucumber_manywidgets_example_textmode.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flslezak%2Fcucumber-yast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flslezak%2Fcucumber-yast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flslezak%2Fcucumber-yast/lists"}