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 Introduction

Howitzer

A Ruby-based framework for acceptance testing of web applications.

The framework was built with modern patterns, techniques, and tools in automated testing in order to speed up tests development and simplify supporting.

Key Benefits

  • Independent of a web application technical stack, language and architecture.
  • Fast installation and configuration of the complete testing infrastructure (takes less than 5 minutes).
  • Elegant, intuitive and powerful Ruby language underneath.
  • Possibility to choose your favorite BDD tool (Cucumber, RSpec or Turnip).
  • Integration with SauceLabs, Testingbot, BrowserStack, CrossBrowserTesting, LambdaTest cloud services.
  • Integration with MailGun, Gmail, Mailtrap email services.
  • Easy tests support based on the best patterns, techniques, principles.
  • Ability to execute tests against to both browserless driver and actual browsers with no changes in your tests.

Documentation

Refer to the GETTING STARTED document to start working with Howitzer.

You can also find the Rdoc documentation on Rubygems.

Related Products

Requirements

  • Supported OS: Mac OS X, Linux, Windows
  • Ruby 2.6.8+
  • DevKit (For Windows only)
  • ChromeDriver (For chrome selenium browser, 2.29+ for headless mode)
  • GeckoDriver (For firefox selenium browser)
  • SafariDriver (For safari selenium browser)
  • Chrome v.59+ (For headless chrome support)
  • Firefox v.56+ (For headless firefox support)

Setup

To install, type

gem install howitzer

Usage

Browse to a desired directory where a new project will be created.

To generate the project with Cucumber, type:

howitzer new <PROJECT NAME> --cucumber

With Rspec:

howitzer new <PROJECT NAME> --rspec

With Turnip:

howitzer new <PROJECT NAME> --turnip

Configuration

Learn and specify correct default settings in the config/default.yml file. For more details, please refer to the original sexy_settings gem.

Test Implementation Workflow

  • Prepare BDD feature with scenarios
  • Mark feature/scenarios with priority tags.
  • Implement prerequisites generation (optional):
    • implement factories
    • implement models
  • Implement appropriate pages in the web/pages folder. For details, refer to Page Object Pattern.
  • Implement emails in emails folder (optional).
  • Implement scenarios:
    • For Cucumber:
      1. Read and learn Cucumber Best Practices
      2. Implement step definitions in the features/step_definitions folder.
    • For Rspec: Use DSL provided by Capybara to create descriptive acceptance tests.
    • For Turnip: Implement step definitions in the spec/steps folder.
  • Debug features against to desired drivers.
  • Enjoy it!

Rake Tasks

Rake was originally created to handle software build processes, but the combination of convenience and flexibility that it provides has made it the standard method of job automation for Ruby projects.

You can get a list of all available tasks by typing the following command:

rake -T

Upgrading Howitzer

Before attempting to upgrade an existing project, you should be sure you have a good reason to upgrade. You need to balance several factors: the need for new features, the increasing difficulty of finding support for old code, and your available time and skills, to name a few.

From version v1.1.0 howitzer provides howitzer update command. After updating the Howitzer version in the Gemfile, run following commands:

bundle update howitzer
bundle exec howitzer update

This will help you with the creation of new files and changes of old files in an interactive session.

Don't forget to review the difference, to see if there were any unexpected changes and merge them. It is easy if your project is under revision control systems like Git.

Additional Information

Contributing

Please see CONTRIBUTING.md.

howitzer was originally designed by Roman Parashchenko and is now maintained by StrongQA team. You can find list of contributors here open source community.

License

howitzer is Copyright © 2012-2021 Roman Parashchenko and StrongQA LLC. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About StrongQA

StrongQA

howitzer is maintained and funded by StrongQA, LLC. The names and logos for StrongQA are trademarks of StrongQA, LLC.

We love open source software! See our other projects or hire us to consult and develop testing solutions.

howitzer's People

Contributors

alexey-voronenko avatar alexspot avatar andrii-rymar avatar evgeniyvlb avatar fravit4 avatar futurecraft avatar github-actions[bot] avatar gitter-badger avatar greenhairedlime avatar knlynda avatar mako-max avatar mikhaillopandia avatar nataliia-salinko avatar petergoldstein avatar romikoops avatar sirnicholas avatar tmikriukov avatar trofymenko avatar vladlion77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

howitzer's Issues

[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.

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 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

[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!

Auto document code

Use auto documentation from rdoc_documentation branch and up to date it

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

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.