Code Monkey home page Code Monkey logo

testrail-rspec's Issues

Use full_description instead of description to capture tags on context blocks

We are using shared_examples blocks which are difficult to tag because if we tag the inner examples, they will be marked multiple times and potentially on the wrong cases.

I think using full_description instead of description at update-testrails.rb#L25 will fix this issue because it will capture the tags on surrounding context blocks.

For example, given a set of TestRail cases

  • C1232: A regular user can log in
  • C1233: A regular user can log out
  • C1234: An admin user can log in
  • C1235: An admin user can log out

This rspec file is difficult to tag correctly.

shared_examples 'log in / log out' do
  it 'logs in'
  it 'logs out'
end

describe 'basic user stuff' do
  context 'A regular user can' do
    include_examples 'log in / log out'
  end

  context 'An admin user can' do
    include_examples 'log in / log out'
  end
end

With a little refactoring and my proposed change

shared_examples 'log in' do
  it 'logs in'
end

shared_examples 'log out' do
  it 'logs out'
end

describe 'basic user stuff' do
  context 'A regular user can' do
    context 'C1232' do
      include_examples 'log in'
    end

    context 'C1233' do
      include_examples 'log out'
    end
  end

  context 'An admin user can' do
    context 'C1234' do
      include_examples 'log in'
    end

    context 'C1235' do
      include_examples 'log out'
    end
  end
end

we can capture all of the functionality in the right cases.

upload_result error

I'm getting this error:

Failure/Error: TestrailRSpec::UpdateTestRails.new(scenario).upload_result
TypeError: no implicit conversion of String into Integer

Weird thing is the test-case I'm running passes when run without TestrailRspec, and shows up as passed in TestRail

Edit: I was able to get it working with rspec-retry, looks like it was only happening on first connection attempt, worked on subsequent attempts. It still happens pretty consistently on that first connection, though.

Dynamic test run name with timestamp

Hello,

I want to create the "test run" dynamically, I am able to do that as per your instruction but in my case, it always creates with a static name "master", could please help me create a test run with a customized name? like "Regression suite - 13/07/2021 min-hr"

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.