dimanche 21 octobre 2018

Writing tests for a basic jekyll site

I wanted to experiment on some UI testing on web, basically Jekyll, I found a blog here but my site won't build as it uses gulp to do so.

Configuration file: /Users/rohithazra/Work/zivost/zivost-com/_config.yml
Generating site: /Users/rohithazra/Work/zivost/zivost-com -> /Users/rohithazra/Work/zivost/zivost-com/_site
Capybara starting Puma...
* Version 3.12.0 , codename: Llamas in Pajamas
* Min threads: 0, max threads: 4
* Listening on tcp://127.0.0.1:56328
F

Failures:

  1) sample has the page title
     Failure/Error: visit '/'

     Selenium::WebDriver::Error::UnknownError:
       unknown error: unable to discover open pages
         (Driver info: chromedriver=2.0,platform=Mac OS X 10.14.0 x86_64)
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/response.rb:69:in `assert_ok'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/response.rb:32:in `initialize'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/http/common.rb:84:in `new'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/http/common.rb:84:in `create_response'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/http/default.rb:104:in `request'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/http/common.rb:62:in `call'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/bridge.rb:164:in `execute'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/bridge.rb:97:in `create_session'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/remote/bridge.rb:53:in `handshake'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/chrome/driver.rb:48:in `initialize'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/common/driver.rb:44:in `new'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver/common/driver.rb:44:in `for'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/selenium-webdriver-3.14.1/lib/selenium/webdriver.rb:86:in `for'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/capybara-3.9.0/lib/capybara/selenium/driver.rb:27:in `browser'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/capybara-3.9.0/lib/capybara/selenium/driver.rb:46:in `visit'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/capybara-3.9.0/lib/capybara/session.rb:265:in `visit'
     # /Users/rohithazra/.rvm/gems/ruby-2.5.1/gems/capybara-3.9.0/lib/capybara/dsl.rb:51:in `block (2 levels) in <module:DSL>'
     # ./spec/sample_spec.rb:3:in `block (2 levels) in <top (required)>'

Finished in 22.71 seconds (files took 3.81 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./spec/sample_spec.rb:2 # sample has the page title

I am unsure on how to approach this and it would be helpful if someone can point me in the right direction.

code repo - https://github.com/zivost/zivost-com .
I am writing the test code via the blog above.

Aucun commentaire:

Enregistrer un commentaire