GithubHelp home page GithubHelp logo

irfanahmadin / allure-ruby-commons Goto Github PK

View Code? Open in Web Editor NEW

This project forked from allure-framework/allure-ruby-commons

0.0 1.0 0.0 29 KB

This is a helper library containing the basics for any ruby-based Allure adaptor

License: Other

Ruby 100.00%

allure-ruby-commons's Introduction

Allure Ruby Adaptor API

This is a helper library containing the basics for any ruby-based Allure adaptor. Using it you can easily implement the adaptor for your favourite ruby testing library or you can just create the report of any other kind using the basic Allure terms.

Setup

Add the dependency to your Gemfile

 gem 'allure-ruby-adaptor-api'

Advanced options

You can specify the directory where the Allure test results will appear. By default it would be 'gen/allure-results' within your current directory.

    AllureRubyAdaptorApi.configure do |c|
      c.output_dir = "/whatever/you/like"
    end

Usage examples

    builder = AllureRubyAdaptorApi::Builder
    builder.start_suite "some_suite", :severity => :normal
    builder.start_test "some_suite", "some_test", :feature => "Some feature", :severity => :critical
    builder.start_step "some_suite", "some_test", "first step"
    builder.add_attachment "some_suite", "some_test", :file => Tempfile.new("somefile")
    builder.stop_step "some_suite", "some_test", "first step"
    builder.start_step "some_suite", "some_test", "second step"
    builder.add_attachment "some_suite", "some_test", :step_id => "second step", :file => Tempfile.new("somefile")
    builder.stop_step "some_suite", "some_test", "second step"
    builder.start_step "some_suite", "some_test", "third step"
    builder.stop_step "some_suite", "some_test", "third step", :failed
    builder.stop_test "some_suite", "some_test", :status => :broken, :exception => Exception.new("some error")
    builder.stop_suite "some_suite"

    # This will generate the results within your output directory
    builder.build!

allure-ruby-commons's People

Contributors

anbotero avatar andrejska avatar jaysirju avatar maccracken avatar sharmarahul avatar smecsia avatar vania-pooh avatar xiaoxinghu avatar

Watchers

 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.