reportportal / agent-ruby

Agent - Ruby Cucumber and RSpec formatters
Apache License 2.0
15 stars 43 forks source link

ReportPortal gem 0.7 fails with number of arguments errors #88

Closed sspieker-cc closed 4 years ago

sspieker-cc commented 4 years ago

I am running ReportPortal 5.0 in my environment and I am successfully using the Junit4 and JUnit5 agents with the server. However, the ruby agent is failing with an odd set of messages:

bundle exec cucumber -b --retry 1 --tags @mats --tags ~@future --tags ~@ready --tags ~@wip --tags ~@slow --tags ~@ultraslow --format junit --out test-report/junit --format html --out test-report/test_report.html -f ReportPortal::Cucumber::Formatter Deprecated: Found tags option '~@future'. Support for '~@tag' will be removed from the next release of Cucumber. Please use 'not @tag' instead. Deprecated: Found tags option '~@ready'. Support for '~@tag' will be removed from the next release of Cucumber. Please use 'not @tag' instead. Deprecated: Found tags option '~@wip'. Support for '~@tag' will be removed from the next release of Cucumber. Please use 'not @tag' instead. Deprecated: Found tags option '~@slow'. Support for '~@tag' will be removed from the next release of Cucumber. Please use 'not @tag' instead. Deprecated: Found tags option '~@ultraslow'. Support for '~@tag' will be removed from the next release of Cucumber. Please use 'not @tag' instead. "ReportPortal API returned " "Offending request method/URL: POST https://reportportal.cc.com/sspieker_personal/launch" "Offending request payload: {\"name\":\"ses-cucumber\",\"start_time\":1591218233070,\"tags\":[\"2id-tools\",\"cucumber\",\"integration_tests\",\"ruby\",\"acceptance_tests\",\"en_US.UTF-8\",\"cucumber-dev\",\"dev\",\"ses-cucumber-dev\"],\"description\":\"-b --retry 1 --tags @mats --tags ~@future --tags ~@ready --tags ~@wip --tags ~@slow --tags ~@ultraslow --format junit --out test-report/junit --format html --out test-report/test_report.html -f ReportPortal::Cucumber::Formatter\",\"mode\":\"DEFAULT\"}}" "Request to https://reportportal.cc.com/sspieker_personal/launch produced an exception: ArgumentError: wrong number of arguments (given 2, expected 0)" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:113:in return!'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:39:inblock in '" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:834:in process_result'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:743:inblock in transmit'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/net/http.rb:920:in start'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:727:intransmit'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:163:in execute'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:63:inexecute'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/resource.rb:69:in post'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:67:inblock in start_launch'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:198:in do_request'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:66:instart_launch'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/report.rb:58:in start_launch'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/report.rb:42:ininitialize'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/formatter.rb:32:in new'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/formatter.rb:32:inblock in initialize'" "ReportPortal API returned " "Offending request method/URL: POST https://reportportal.cc.com/sspieker_personal/launch" "Offending request payload: {\"name\":\"ses-cucumber\",\"start_time\":1591218233070,\"tags\":[\"2id-tools\",\"cucumber\",\"integration_tests\",\"ruby\",\"acceptance_tests\",\"en_US.UTF-8\",\"cucumber-dev\",\"dev\",\"ses-cucumber-dev\"],\"description\":\"-b --retry 1 --tags @mats --tags ~@future --tags ~@ready --tags ~@wip --tags ~@slow --tags ~@ultraslow --format junit --out test-report/junit --format html --out test-report/test_report.html -f ReportPortal::Cucumber::Formatter\",\"mode\":\"DEFAULT\"}}" "Request to https://reportportal.cc.com/sspieker_personal/launch produced an exception: ArgumentError: wrong number of arguments (given 2, expected 0)" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/abstract_response.rb:113:in return!'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:39:inblock in '" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:834:in process_result'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:743:inblock in transmit'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/2.6.0/net/http.rb:920:in start'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:727:intransmit'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:163:in execute'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/request.rb:63:inexecute'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/rest-client-2.1.0/lib/restclient/resource.rb:69:in post'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:67:inblock in start_launch'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:198:in do_request'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/reportportal.rb:66:instart_launch'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/report.rb:58:in start_launch'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/report.rb:42:ininitialize'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/formatter.rb:32:in new'" "/usr/local/Cellar/ruby/2.6.3/lib/ruby/gems/2.6.0/gems/reportportal-0.7/lib/report_portal/cucumber/formatter.rb:32:inblock in initialize'"


Ruby Agent Version: 0.7 Ruby Version 2.6.3 Cucumber Version: 3.2.1 OS: Mac OS 10.14.6 / 16GB Ram


report_portal.yml file contents:

uuid: 3092597a-75b4-4ae3-b40a-1def29732600 endpoint: "https://reportportal.cc.com" launch: "ses-cucumber" project: "sspieker_personal" tags: [2id-tools, cucumber, integration_tests, ruby, acceptance_tests, en_US.UTF-8, cucumber-dev, dev, ses-cucumber-dev]

ReportPortal Server Information: API Version: reportportal/service-api:5.0.0

Any assistance as to why this issue is occurring would be greatly appreciated.

sspieker-cc commented 4 years ago

I have attempted to use the same project against a docker-compose service with the same results. The docker-compose configuration is using the latest version of Report Portal GA - 5.2.0.

Could there possibly be an issue with my configuration vs. an actual issue with the ruby-agent?

sspieker-cc commented 4 years ago

This is a non-issue as the endpoint property was not set correctly - it had been missing the /api/v1 extension.