GithubHelp home page GithubHelp logo

strongqa / howitzer Goto Github PK

View Code? Open in Web Editor NEW
261.0 29.0 29.0 10.2 MB

A Ruby-based framework for acceptance testing

Home Page: https://howitzer-framework.io

License: MIT License

Ruby 89.91% HTML 0.47% Gherkin 9.35% Dockerfile 0.27%
howitzer cucumber bdd ruby

howitzer's Issues

Auto document code

Use auto documentation from rdoc_documentation branch and up to date it

[KA] Cover bin/howitzer.rb by tests

Remember, we should not generate real data here in execute_generator(options) method. Use Rspec Mock instead for RubiGen::Scripts::Generate.new.run method execution

Upgrade gems

cucumber 1.3.6 ⇢ 1.3.7
multi_json 1.7.9 ⇢ 1.8.0
poltergeist 1.3.0 ⇢ 1.4.0 ⇢ 1.4.1
rawler 0.1.7 ⇢ 0.1.8

Add check of ambiguous URL_PATTERN

Sometimes there can be case when current url page matches to more than one URL_PATTERN. It is good idea to implement validation like it is in Cucumber.

Auto document code

Use auto documentation from rdoc_documentation branch and up to date it

[KA] Cover generators/*.rb by tests

This issues assumes test coverage only *_generator.rb files, and correct copying appropriate files(compare template files with copied ones by bits). Please do not cover ruby code of template files by tests!

[Pages] Reimplement URL_PATTERN to general page validator

For now we use following:

class HomePage < WebPage
   URL_PATTERN = /#{Regexp.escape(settings.app_host)}\/?/
end

Where URL_PATTERN is used to make sure it's right opened page.

class WebPage
  def self.given
    new
  end

  def wait_for_url(expected_url, timeout=settings.timeout_small)
    end_time = ::Time.now + timeout
    until ::Time.now > end_time
      operator = expected_url.is_a?(Regexp) ? :=~ : :==
      return true if current_url.send(operator, expected_url).tap{|res| sleep 1 unless res}
    end
    log.error IncorrectPageError, "Current url: #{current_url}, expected:  #{expected_url}"
  end

  private
  def initialize
    wait_for_url(self.class::URL_PATTERN)
  end
end

Sometimes there are some kind of web sites, which use POST instead of GET. As result, all pages have "/" url. We have to implement general interface to validate page by different criteria. For instance, by Url, Title, element presence.

Auto document code

Use auto documentation from rdoc_documentation branch and up to date it

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.