Giter Site home page Giter Site logo

vulgarcoder / lazyman Goto Github PK

View Code? Open in Web Editor NEW

This project forked from easonhan007/lazyman

0.0 2.0 0.0 171 KB

A simple test from for selenium-webdriver watir-webdriver using page-object and rspec

License: MIT License

Ruby 99.40% Shell 0.60%

lazyman's Introduction

lazyman

A simple web automation test framework using selenium-webdriver,watir-webdriver,page-object and rspec.

The philosophy of lazyman is 'do less, gain more'.

Now lazyman only tested in windows with Ruby193, other platformes are going to be tested soon.

Install lazyman

Install lazyman from rubygems

gem install lazyman

Or clone from github, build the gem and install

If you have any issue when install lazyman, install the gems below:

gem install thor

Create a lazyman project

In windows, open command console and type just like below:

lazyman new your_project_name	

Run Examples

Lazyman contains some examples that explain how to use lazyman writing your own test cases.

By default, lazyman runs examples using chrome browser, so make sure you installed google chrome and according chrome driver

Using following command to make everything running.

cd your_project_name
lazyman go  

Lazyman go command supports all the rspec options and it is the recommend way.

You can find test report in app/reports folder. It is a html file with current time stamp.

Using Console

You can use eat console to debug your test in irb.

cd your_project_name
lazyman c

Lazyman will load all your pages, start irb and open browser which was defined in your config.yml.

Then you can use $navi variable the same way in your test file.

p = $navi.goto_baidu_page
p.keyword="watir-webdriver"
p.search_element.click

You can type everything just like you are write a text case.

Understand lazyman project structure

Lazyman project has a clean and simple structure.

  • app: holds your test codes;

  • config: where your config file placed;

  • app->pages: puts all your pages files here;

  • app->pages->components: sometimes,there are some html element that could be reused more than once, define a component, place the file here and you can include your components in your pages.

  • app->cases: holds your testcase files;

  • app->cases->shared: Image that, you are testing a system which need to login before any actions, so you want to define a login function which can be called from your cases. Define reused cases here.

  • app->reports: the fold holds your test reports.

  • app->matchers: defind your owner rspec matchers here.

Contributing to lazyman

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright

Copyright (c) 2013 easonhan. See LICENSE.txt for further details.

lazyman's People

Contributors

easonhan007 avatar rhapsodyn avatar vulgarcoder avatar watircn avatar

Watchers

 avatar  avatar

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.