ci_reporter | popular test frameworks that allows you to generate XML | Unit Testing library

 by   ci-reporter Ruby Version: v2.1.0 License: MIT

kandi X-RAY | ci_reporter Summary

ci_reporter is a Ruby library typically used in Testing, Unit Testing applications. ci_reporter has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.
CI::Reporter is an add-on to Ruby testing frameworks like Test::Unit or RSpec that allows you to generate XML reports of your test runs. The resulting files can be read by a continuous integration system that understands Ant's JUnit report XML format, thus allowing your CI system to track test/spec successes and failures.
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        ci_reporter has a low active ecosystem.
                        summary
                        It has 341 star(s) with 111 fork(s). There are 12 watchers for this library.
                        summary
                        It had no major release in the last 6 months.
                        summary
                        There are 11 open issues and 76 have been closed. On average issues are closed in 558 days. There are no pull requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of ci_reporter is v2.1.0
                        ci_reporter Support
                          Best in #Unit Testing
                            Average in #Unit Testing
                            ci_reporter Support
                              Best in #Unit Testing
                                Average in #Unit Testing

                                  kandi-Quality Quality

                                    summary
                                    ci_reporter has 0 bugs and 7 code smells.
                                    ci_reporter Quality
                                      Best in #Unit Testing
                                        Average in #Unit Testing
                                        ci_reporter Quality
                                          Best in #Unit Testing
                                            Average in #Unit Testing

                                              kandi-Security Security

                                                summary
                                                ci_reporter has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                ci_reporter code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                ci_reporter Security
                                                  Best in #Unit Testing
                                                    Average in #Unit Testing
                                                    ci_reporter Security
                                                      Best in #Unit Testing
                                                        Average in #Unit Testing

                                                          kandi-License License

                                                            summary
                                                            ci_reporter is licensed under the MIT License. This license is Permissive.
                                                            summary
                                                            Permissive licenses have the least restrictions, and you can use them in most projects.
                                                            ci_reporter License
                                                              Best in #Unit Testing
                                                                Average in #Unit Testing
                                                                ci_reporter License
                                                                  Best in #Unit Testing
                                                                    Average in #Unit Testing

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        ci_reporter releases are not available. You will need to build from source code and install.
                                                                        summary
                                                                        Installation instructions, examples and code snippets are available.
                                                                        summary
                                                                        ci_reporter saves you 185 person hours of effort in developing the same functionality from scratch.
                                                                        summary
                                                                        It has 456 lines of code, 25 functions and 10 files.
                                                                        summary
                                                                        It has medium code complexity. Code complexity directly impacts maintainability of the code.
                                                                        ci_reporter Reuse
                                                                          Best in #Unit Testing
                                                                            Average in #Unit Testing
                                                                            ci_reporter Reuse
                                                                              Best in #Unit Testing
                                                                                Average in #Unit Testing
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
                                                                                  Currently covering the most popular Java, JavaScript and Python libraries. See a Sample Here
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  ci_reporter Key Features

                                                                                  CI::Reporter is an add-on to popular test frameworks that allows you to generate XML reports

                                                                                  ci_reporter Examples and Code Snippets

                                                                                  No Code Snippets are available at this moment for ci_reporter.
                                                                                  Community Discussions

                                                                                  Trending Discussions on ci_reporter

                                                                                  Setup to create junit xml reports for Jenkins from rails 6 default test runner?
                                                                                  chevron right
                                                                                  How to list ruby production only dependencies using Gemfile.lock and LockfileParser class
                                                                                  chevron right
                                                                                  Gem Install fails with UnsatisfiableDependencyError
                                                                                  chevron right

                                                                                  QUESTION

                                                                                  Setup to create junit xml reports for Jenkins from rails 6 default test runner?
                                                                                  Asked 2020-Nov-04 at 18:50

                                                                                  The ci_reporter_minitest gem was very helpful for this when the rake binary was the command to use to start the test runner. I want to use the rails binary vs the rake binary for rails 6.

                                                                                  I'm open to other solutions not using ci_reporter.

                                                                                  I'm failing to get the ci_reporter_minitest gem to work with the rails binary that kicks off running minitest for rails 6. Also, I haven't succeeded yet in finding any posts or questions referencing this problem.

                                                                                  I looked into just using the rake binary for the ci server, but didn't find a working approach there either.

                                                                                  Here's a config I tried that does run the ci:setup task (removing any previous test/report directory) and does run the tests, but doesn't generate the xml output. I did have this working fine with rails 4.2

                                                                                  #lib/tasks/test_tasks.rake
                                                                                  require 'ci/reporter/rake/minitest'
                                                                                  
                                                                                  task :minitest => 'ci:setup:minitest'
                                                                                  namespace :test do
                                                                                    task :something => 'test:prepare' do
                                                                                      $: << "test"
                                                                                      Rake::Task['ci:setup:minitest'].invoke
                                                                                      test_files=FileList['test/models/something.rb']
                                                                                      Rails::TestUnit::Runner.run(test_files)
                                                                                    end
                                                                                  end
                                                                                  
                                                                                  $> bundle exec rails test:something
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2020-Nov-03 at 00:26

                                                                                  I did have success switching to minitest-reporters gem.

                                                                                  Source https://stackoverflow.com/questions/64654526

                                                                                  QUESTION

                                                                                  How to list ruby production only dependencies using Gemfile.lock and LockfileParser class
                                                                                  Asked 2017-Jun-22 at 19:03

                                                                                  I have a tool that analyze some ruby projects having Gemfile and Gemfile.lock files. This tool given in input the path where ruby project is, list all its dependencies.

                                                                                  My problem is that I only need to print production dependencies excluding development and test. Today I find out that my code does not exclude them and I do not know how to modify it for my purpose. How I can remove development and test dependencies from the list?

                                                                                  Here a simplified version of the ruby code I use to list dependencies:

                                                                                  project_path = ARGV.map {|path| File.expand_path(path) }
                                                                                  
                                                                                  ENV['BUNDLE_GEMFILE'] = project_path+"/Gemfile"
                                                                                  
                                                                                  lockfile_path=project_path+"/Gemfile.lock"
                                                                                  
                                                                                  lockfile_contents = File.read(lockfile_path)
                                                                                  parser = Bundler::LockfileParser.new(lockfile_contents)
                                                                                  
                                                                                  lockfile_contents = File.read(lockfile_path)
                                                                                  parser = Bundler::LockfileParser.new(lockfile_contents)
                                                                                  
                                                                                  to_fetch = []
                                                                                  parser.specs.each do |spec|
                                                                                      gem_basename = "#{spec.name},#{spec.version}"
                                                                                      to_fetch << gem_basename
                                                                                  end
                                                                                  
                                                                                  to_fetch.uniq!
                                                                                  to_fetch.sort!
                                                                                  

                                                                                  The variable to_fetch contains the dependencies.

                                                                                  Here the Gemfile:

                                                                                  source "https://rubygems.org"
                                                                                  
                                                                                  gem "cf-message-bus", git: "https://github.com/cloudfoundry/cf-message-bus.git"
                                                                                  gem "vcap_common", git: "https://github.com/cloudfoundry/vcap-common.git"
                                                                                  gem "aws-sdk", '~> 2', require: false
                                                                                  gem "steno"
                                                                                  gem "httparty"
                                                                                  
                                                                                  group :test do
                                                                                      gem 'codeclimate-test-reporter', require: false
                                                                                      gem "rake"
                                                                                      gem "rspec"
                                                                                      gem "ci_reporter"
                                                                                      gem "timecop"
                                                                                      gem "webmock"
                                                                                  end
                                                                                  

                                                                                  Let me know if you need also the Gemfile.lock that is 149 lines long.

                                                                                  ANSWER

                                                                                  Answered 2017-Jun-21 at 21:05

                                                                                  How about this

                                                                                  require 'bundler'
                                                                                  
                                                                                  dependencies = Bundler::Definition.build('Gemfile','Gemfile.lock',nil).
                                                                                       dependencies.each_with_object(Hash.new { |h,k| h[k] = [] }) do |dep,obj| 
                                                                                         dep.groups.each do |g|
                                                                                           obj[g] << {name: dep.name,
                                                                                            required_version: dep.requirement.requirements.join,
                                                                                            actual_version: dep.to_spec.version.to_s
                                                                                            }
                                                                                         end
                                                                                  end
                                                                                  

                                                                                  This will group all the dependencies by their group and place them in Hashes containing their name, their required version and their specific version. For example:

                                                                                  {:default=>
                                                                                    [{:name=>"rake", :required_version=>"=11.3.0", :actual_version=>"11.3.0"},
                                                                                     {:name=>"rails", :required_version=>"=4.2.5.2", :actual_version=>"4.2.5.2"},
                                                                                     {:name=>"arel", :required_version=>"=6.0.3", :actual_version=>"6.0.3"},
                                                                                     {:name=>"activerecord",
                                                                                      :required_version=>"~>4.2.0",
                                                                                      :actual_version=>"4.2.8"},
                                                                                     {:name=>"activerecord-sqlserver-adapter",
                                                                                      :required_version=>"~>4.2.0",
                                                                                      :actual_version=>"4.2.18"},
                                                                                     {:name=>"tiny_tds", :required_version=>"~>0.7.0", :actual_version=>"0.7.0"}],
                                                                                   :doc=>
                                                                                    [{:name=>"sdoc", :required_version=>"~>0.4.0", :actual_version=>"0.4.2"}],
                                                                                   :development=>
                                                                                    [{:name=>"byebug", :required_version=>">=0", :actual_version=>"9.0.6"},
                                                                                     {:name=>"web-console",
                                                                                      :required_version=>"~>2.0",
                                                                                      :actual_version=>"2.3.0"},
                                                                                     {:name=>"capistrano",
                                                                                      :required_version=>"=3.7.2",
                                                                                      :actual_version=>"3.7.2"}],
                                                                                   :test=>
                                                                                    [{:name=>"byebug", :required_version=>">=0", :actual_version=>"9.0.6"}]}
                                                                                  

                                                                                  BTW :default is production (might need to expand further to handle dependencies of dependencies I will see what I can do)

                                                                                  Update 1: Similar formatting lists :runtime dependencies of dependencies (not uniq)

                                                                                    def dep_to_hash(dep)
                                                                                      {name: dep.name,
                                                                                        required_version: dep.requirement.requirements.join,
                                                                                        actual_version: dep.to_spec.version.to_s,
                                                                                        dependencies: dep.to_spec.dependencies.select {|d| d.type == :runtime}.each_with_object(Hash.new { |h,k| h[k] = [] }) do |dep2,obj|
                                                                                          obj[dep2.type] << dep_to_hash(dep2)
                                                                                        end
                                                                                        }
                                                                                    end
                                                                                  
                                                                                  
                                                                                    deps = Bundler::Definition.build('Gemfile','Gemfile.lock',nil).
                                                                                       dependencies.each_with_object(Hash.new { |h,k| h[k] = [] }) do |dep,obj| 
                                                                                         dep.groups.each do |g|
                                                                                           obj[g] << dep_to_hash(dep)
                                                                                         end
                                                                                    end
                                                                                  

                                                                                  Output snippet:

                                                                                   {:default=>
                                                                                    [{:name=>"rails",
                                                                                      :required_version=>"=4.2.5.2",
                                                                                      :actual_version=>"4.2.5.2",
                                                                                      :dependencies=>
                                                                                       {:runtime=>
                                                                                         [{:name=>"activesupport",
                                                                                           :required_version=>"=4.2.5.2",
                                                                                           :actual_version=>"4.2.5.2",
                                                                                           :dependencies=>
                                                                                            {:runtime=>
                                                                                              [{:name=>"i18n",
                                                                                                :required_version=>"~>0.7",
                                                                                                :actual_version=>"0.8.1",
                                                                                                :dependencies=>{}},
                                                                                               {:name=>"json",
                                                                                                :required_version=>">=1.7.7~>1.7",
                                                                                                :actual_version=>"1.8.6",
                                                                                                :dependencies=>{}},
                                                                                  

                                                                                  Update 2 (More like what you seem to be targeting now and is uniq by "group")

                                                                                      require 'bundler'
                                                                                      def add_to_dep(dep,top_level)
                                                                                        deps = dep.to_spec.dependencies.select {|d| d.type == :runtime}
                                                                                        deps.each do |dep|
                                                                                          add_to_dep(dep,top_level) 
                                                                                        end
                                                                                        # handle existing dependencies by using highest version
                                                                                        exists = top_level.grep(/#{dep.name}/)[0]
                                                                                        if exists
                                                                                          version = exists.split(',').last
                                                                                          new_version = dep.to_spec.version.to_s
                                                                                          if new_version > version
                                                                                            top_level.delete_at(top_level.index(exists))
                                                                                            top_level << "#{dep.name}, #{dep.to_spec.version}" 
                                                                                          end
                                                                                        else
                                                                                          top_level << "#{dep.name}, #{dep.to_spec.version}"
                                                                                        end  
                                                                                      end
                                                                                  
                                                                                  
                                                                                      deps = Bundler::Definition.build('Gemfile','Gemfile.lock',nil).
                                                                                         dependencies.each_with_object(Hash.new { |h,k| h[k] = [] }) do |dep,obj| 
                                                                                           dep.groups.each do |g|
                                                                                             add_to_dep(dep,obj[g])
                                                                                           end
                                                                                      end.each {|_k,v| v.sort!}
                                                                                  

                                                                                  Output Snippet:

                                                                                  {:default=>
                                                                                    ["actionmailer, 4.2.5.2",
                                                                                     "actionpack, 4.2.8",
                                                                                     "actionview, 4.2.8",
                                                                                     "activejob, 4.2.5.2",
                                                                                     "activemodel, 4.2.8",
                                                                                     "activerecord, 4.2.8",
                                                                                     "activerecord-sqlserver-adapter, 4.2.18",
                                                                                     "activesupport, 4.2.8",
                                                                                     "arel, 6.0.4",
                                                                                     "axlsx, 2.0.1",
                                                                                     "builder, 3.2.3",
                                                                                     "bundler, 1.14.6",
                                                                                     "coffee-rails, 4.1.1",
                                                                                     "coffee-script, 2.4.1",
                                                                                     "coffee-script-source, 1.12.2",
                                                                                     "concurrent-ruby, 1.0.5",
                                                                                     "erubis, 2.7.0",
                                                                                     "execjs, 2.7.0",
                                                                                     "globalid, 0.4.0",
                                                                                     "hash-deep-merge, 0.1.1",
                                                                                     "htmlentities, 4.3.4",
                                                                                     "i18n, 0.8.1",
                                                                                     "jbuilder, 2.6.2",
                                                                                     "jquery-rails, 4.2.2",
                                                                                     "jquery-ui-rails, 6.0.1",
                                                                                     "json, 1.8.6",
                                                                                     "lazy_high_charts, 1.5.6",
                                                                                     "loofah, 2.0.3",
                                                                                     "mail, 2.6.5",
                                                                                     "mime-types, 3.1",
                                                                                     "mime-types-data, 3.2016.0521",
                                                                                  

                                                                                  Source https://stackoverflow.com/questions/44681231

                                                                                  QUESTION

                                                                                  Gem Install fails with UnsatisfiableDependencyError
                                                                                  Asked 2017-Jan-04 at 17:30

                                                                                  I have a puppet module project that fails when trying to update Gems, although it works in some computers. The Gems are used for the spec tests of the module.

                                                                                  Here's the command I run and the output:

                                                                                  X:\puppet-module-rems>gem install -g Gemfile -f
                                                                                  ERROR:  While executing gem ... (Gem::UnsatisfiableDependencyError)
                                                                                      Unable to resolve dependency: user requested 'win32-service (= 0.8.7)'
                                                                                  

                                                                                  The gem that it's trying to install/update is already in the system:

                                                                                  X:\puppet-module-rems>gem list -l
                                                                                  
                                                                                  *** LOCAL GEMS ***
                                                                                  
                                                                                  ast (2.3.0)
                                                                                  bigdecimal (1.2.4)
                                                                                  builder (3.2.2)
                                                                                  bundler (1.13.0.rc.2)
                                                                                  childprocess (0.5.9)
                                                                                  ci_reporter (2.0.0)
                                                                                  ci_reporter_rspec (1.0.0)
                                                                                  deep_merge (1.0.1)
                                                                                  diff-lcs (1.2.5)
                                                                                  facter (2.4.6 x64-mingw32)
                                                                                  ffi (1.9.14 x64-mingw32, 1.9.6 x64-mingw32)
                                                                                  ffi-win32-extensions (1.0.3)
                                                                                  hiera (1.3.4)
                                                                                  hiera-eyaml (2.1.0)
                                                                                  highline (1.6.21)
                                                                                  io-console (0.4.3, 0.4.2)
                                                                                  json (1.8.1)
                                                                                  json_pure (2.0.2)
                                                                                  metaclass (0.0.4)
                                                                                  minitar (0.5.4)
                                                                                  minitest (4.7.5)
                                                                                  mocha (1.1.0)
                                                                                  multi_json (1.12.1)
                                                                                  multi_test (0.1.2)
                                                                                  parser (2.3.1.2)
                                                                                  powerpack (0.1.1)
                                                                                  psych (2.0.5)
                                                                                  ptools (1.3.3 universal-mingw32)
                                                                                  puppet (3.8.1 x64-mingw32)
                                                                                  puppet-lint (2.0.2)
                                                                                  puppet-syntax (2.1.0)
                                                                                  puppetlabs_spec_helper (1.1.1)
                                                                                  rainbow (2.1.0)
                                                                                  rake (10.1.0)
                                                                                  rdoc (4.1.0)
                                                                                  rspec (3.5.0, 3.5.0.beta2)
                                                                                  rspec-core (3.5.2, 3.5.0.beta2)
                                                                                  rspec-expectations (3.5.0, 3.5.0.beta2)
                                                                                  rspec-mocks (3.5.0, 3.5.0.beta2)
                                                                                  rspec-puppet (2.4.0, 2.3.2)
                                                                                  rspec-support (3.5.0, 3.5.0.beta2)
                                                                                  rubocop (0.42.0)
                                                                                  ruby-progressbar (1.8.1)
                                                                                  stomp (1.3.3)
                                                                                  sys-admin (1.6.4)
                                                                                  test-unit (2.5.5, 2.1.7.0, 2.1.6.0, 2.1.5.0)
                                                                                  thread_order (1.1.0)
                                                                                  trollop (2.1.2)
                                                                                  unicode-display_width (1.1.0)
                                                                                  win32-dir (0.4.9)
                                                                                  win32-eventlog (0.6.6, 0.6.2)
                                                                                  win32-file (0.8.1)
                                                                                  win32-file-stat (1.5.5)
                                                                                  win32-process (0.7.5, 0.7.4)
                                                                                  win32-security (0.2.5)
                                                                                  win32-service (0.8.7, 0.8.6)
                                                                                  

                                                                                  Here's the version of ruby I have:

                                                                                  X:\puppet-module-rems>ruby --version
                                                                                  ruby 2.1.7p400 (2015-08-18 revision 51632) [x64-mingw32]
                                                                                  

                                                                                  EDITED #1

                                                                                  Here's the content of the Gemfile:

                                                                                  source 'https://rubygems.org'
                                                                                  
                                                                                  puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" :    ['3.8.1']
                                                                                  gem 'puppet', puppetversion
                                                                                  gem 'puppetlabs_spec_helper', '= 1.1.1'
                                                                                  gem 'puppet-lint', '>= 0.3.2'
                                                                                  gem 'facter', '>= 1.7.0'
                                                                                  gem 'ci_reporter_rspec'
                                                                                  gem 'win32-service', '= 0.8.7'
                                                                                  gem 'rake', '= 10.1.0'
                                                                                  gem 'rspec-core', '= 3.5.2'
                                                                                  gem 'rspec-expectations', '= 3.5.0'
                                                                                  gem 'rspec-mocks', '= 3.5.0'
                                                                                  gem 'rspec-puppet', '= 2.4.0'
                                                                                  gem 'rspec-support', '= 3.5.0'
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2017-Jan-04 at 17:30

                                                                                  So, after further research, I found that the problem was not related to my code, files or configuration but with a problem with Rubygems.

                                                                                  Bottomline, I had to follow this link and manually update the certificate.

                                                                                  It looks like ruby wasn't able to connect to the server to check for dependencies of the gems I was requiring.

                                                                                  Source https://stackoverflow.com/questions/41453521

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install ci_reporter

                                                                                  Add the "Publish JUnit test result report" post-build step in the job configuration. Enter "test/reports/*.xml,spec/reports/*.xml" in the "Test report XMLs" field (adjust this to suit which tests you are running). Report files are written, by default, to the test/reports, features/reports or spec/reports subdirectory of your project. If you wish to customize the location, simply set the environment variable CI_REPORTS (either in the environment, on the Rake command line, or in your Rakefile) to the location where they should go.
                                                                                  Add the "Publish JUnit test result report" post-build step in the job configuration.
                                                                                  Enter "test/reports/*.xml,spec/reports/*.xml" in the "Test report XMLs" field (adjust this to suit which tests you are running)

                                                                                  Support

                                                                                  For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit
                                                                                  CLONE
                                                                                • HTTPS

                                                                                  https://github.com/ci-reporter/ci_reporter.git

                                                                                • CLI

                                                                                  gh repo clone ci-reporter/ci_reporter

                                                                                • sshUrl

                                                                                  git@github.com:ci-reporter/ci_reporter.git

                                                                                • Share this Page

                                                                                  share link

                                                                                  Explore Related Topics

                                                                                  Consider Popular Unit Testing Libraries

                                                                                  googletest

                                                                                  by google

                                                                                  mocha

                                                                                  by mochajs

                                                                                  enzyme

                                                                                  by enzymejs

                                                                                  ava

                                                                                  by avajs

                                                                                  phpunit

                                                                                  by sebastianbergmann

                                                                                  Try Top Libraries by ci-reporter

                                                                                  ci_reporter_rspec

                                                                                  by ci-reporterRuby

                                                                                  ci_reporter_minitest

                                                                                  by ci-reporterRuby

                                                                                  ci_reporter_test_unit

                                                                                  by ci-reporterRuby

                                                                                  ci_reporter_cucumber

                                                                                  by ci-reporterRuby

                                                                                  ci_reporter_spinach

                                                                                  by ci-reporterRuby

                                                                                  Compare Unit Testing Libraries with Highest Support

                                                                                  robolectric

                                                                                  by robolectric

                                                                                  mockito

                                                                                  by mockito

                                                                                  junit5

                                                                                  by junit-team

                                                                                  mocha

                                                                                  by mochajs

                                                                                  spock

                                                                                  by spockframework

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit