allure-framework/allure-ruby

Mess in feature and story tags

Kerem356 opened this issue · 2 comments

Hi! I updated allure-rspec fron 0.8.0 -> 2.13.8.3 and found some strange behavior with tags. In particular feature and story tags.
Here code spec example for build report

describe 'Method', feature: '/some/method' do
  context 'GET', story: 'GET' do
    it 'should be success' do end
  end

  context 'POST', story: 'POST' do
    it 'should be success' do end
  end

  context 'PUT', story: 'PUT' do
    it 'should be success' do end
  end

  context 'DELETE', story: 'DELETE' do
    it 'should be success' do end
  end

  context 'PATCH', story: 'PATCH' do
    it 'should be success' do end
  end
end

On 0.8.0 version i got nice structure in Behavior section

image

But when i built report on last release version i found that structure is changed and started to look like this

image

Story has become a feature. Example name has become a story. Feature is go away :-)
Looks like a mess :-)

Or it's new cool allure ruby style?

I appreciate your reporting style. Feel free and keep using the 0.8.0 or better yet implement your own adapter to not get any mess in your reports ;)

As to how to get same result with this reporter. Tags with names story or feature have no special effect, just use native rspec structures like describe and context to group the tests.

So this:

describe '/some/method' do
  context 'GET' do
    it 'should be success' do end
  end

  context 'POST' do
    it 'should be success' do end
  end

  context 'PUT' do
    it 'should be success' do end
  end

  context 'DELETE' do
    it 'should be success' do end
  end

  context 'PATCH' do
    it 'should be success' do end
  end
end

will look like this under Suites tab:
image

which is exactly how rspec itself is reporting:

$ bundle exec rspec
/some/method
  GET
    should be success
  POST
    should be success
  PUT
    should be success
  DELETE
    should be success
  PATCH
    should be success

Finished in 0.01448 seconds (files took 0.38322 seconds to load)
5 examples, 0 failures

Hi, @andrcuns ! I understood your point and own adapter will be better solution for me. Thx for help! ✌️