{"id":15101715,"url":"https://github.com/pconley/shiken","last_synced_at":"2026-01-19T12:32:54.934Z","repository":{"id":56895345,"uuid":"116271671","full_name":"pconley/Shiken","owner":"pconley","description":"Shiken is a ruby gem wrapper for selenium designed to use with rspec.","archived":false,"fork":false,"pushed_at":"2018-04-09T01:49:30.000Z","size":170,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-05T11:14:01.069Z","etag":null,"topics":["rspec","ruby","selenium","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"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/pconley.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":"2018-01-04T14:49:28.000Z","updated_at":"2018-04-08T12:55:45.000Z","dependencies_parsed_at":"2022-08-21T01:20:57.456Z","dependency_job_id":null,"html_url":"https://github.com/pconley/Shiken","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/pconley%2FShiken","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pconley%2FShiken/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pconley%2FShiken/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pconley%2FShiken/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pconley","download_url":"https://codeload.github.com/pconley/Shiken/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247325696,"owners_count":20920714,"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":["rspec","ruby","selenium","test-automation"],"created_at":"2024-09-25T18:28:49.053Z","updated_at":"2026-01-19T12:32:54.925Z","avatar_url":"https://github.com/pconley.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shiken [試験] #\n\nShiken is a ruby gem that is a wrapper for selenium.  In my experience, many people write \"scripts\" using selenium - not \"tests\".  The difference being you can start a set of tests and walk away... then come back and find out what passed or failed.  Scripts are something you have to watch to see what is going on.  Using rspec is key to writing tests.\n\nThere are other similar frameworks... this is just my own way of digging into automation test and techniques (and ruby code for that matter).\n\nShiken is the Japanese word for test.\n\n### Project Design Philosopy ###\n\n* the test pyramid\n* rely on unit tests\n* but have sanity tests\n* test on production\n* use page oriented tests\n* good tests require programming\n* test clean up after themselves\n* you can run test individually\n\n### Contribution guidelines ###\n\n* there are currently no contributors... be the first!\n\n### Who do I talk to? ###\n\n* Pat Conley pconley312@gmail.com\n\n## About the gem\n\nThis site is for the developer that wants to look into the gem... not the tester who uses the gem. See the companion github page called ShikenExamples for stand alone examples of how to use of the gem with rspec.\n\n### gem basics\n```\ngem list           # see list of install\ngem cleanup xxx    # remove all old versions of the gem\ngem uninstall xxx  # choose which ones you want to remove\n```\n### dependencies\n\ncolorize (for pretty output)\n```\ngem install colorize\ngem install selenium-webdriver\n```\n\nI also added geckodriver to /usr/local/bin to get it working\n\n## Tester Notes\n\n```\nconfig.before :suite do |x|\n    SK::init()\n    # SK.driver.manage.window.maximize # for full size browser window\n    # SK::Trace.level = SK::Trace::WARN # DEBUG \u003e WARN \u003e ERROR \u003e QUIET\n  end\n   \n  config.after :suite do |x|\n    SK::quit()\n  end\n```\n\n## Build Notes\n\nI do not get back to this project but every few months, so here are some quick start notes to myself that the reader may find useful if you want to copy and adapt this code for your own use.  The real deatils for gem creation are at...\n\n[Gem Guide]: http://guides.rubygems.org/make-your-own-gem/ \"details on building gems\"\n\nClone me. \n\nMake your changes... update the unit tests!\n\nSeperately run each the unit tests.\n```\nrspec spec/api\t\t# sanity to see if installed\nrspec spec/google\t# can we create a simple session\nrspec spec/travel\t# full blown set of feature tests\n```\nChange the shiken.gemspec file to update the version. Note: be positioned in the top directory (where gemspec file lives).\n```\ngem build shiken.gemspec\n```\nThe new gemfile is now present in the same directory.  You can install from the current directory.\n```\nsudo gem install ./shiken-0.0.X.gem\n```\nYou can confirm what is installed... and there may be older versions\n```\ngem list | grep shiken\n```\nThe real developer (me) can then push the gem to the public repository.\n```\ngem push shiken-0.0.4.gem    # to push to rubygems.org\n```\n### A simple rspec example ###\nSo, what would a test look like using shiken?  This is an example from the travel project that uses the session and page objects to extract the test(s) from the (resuable) login/out steps and specific page elements.  This example has 4 independent tests... each wrapped in the start and stop of a session.\n\n```\nrequire 'spec_helper.rb'\n\ndescribe \"Agile Travel - Select Flight Page\" do\n\t\n\tbefore :each do\n\t\tTravelSession.start()\n\t\t$TravelFlightPage.goto\n    \texpect($TravelFlightPage).to be_present\n\tend\n  \n  \tafter :each do\n\t\tTravelSession.stop\n  \tend\n\t\n\tit \"has correct title\" do\n\t\texpect($TravelFlightPage.title).to eq(\"Agile Travel\")\n\tend\n  \n\tit \"has expected labels\" do\n\t\texpect($TravelFlightPage).to have_content(\"Select Flight\")\n\t\texpect($TravelFlightPage).to have_content(\"Trip type:\")\n\t\texpect($TravelFlightPage).to have_content(\"Departing: \")\n\tend\n\n\tit \"can fill two-way and get to passenger\" do\n\t\t$TravelFlightPage.fill_flight_return_details\n\t\texpect($TravelPassengerPage).to be_present\n  \tend\n  \n  \tit \"can fill one-way and get to passenger\" do\n\t\t$TravelFlightPage.fill_flight_oneway_details\n\t\texpect($TravelPassengerPage).to be_present\n  \tend\nend\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpconley%2Fshiken","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpconley%2Fshiken","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpconley%2Fshiken/lists"}