Skip to content

Conversation

@ebihara99999
Copy link
Contributor

About the bugs

Running the tests by bundle exec shindo tests/requests/sqs and it shows two warnings.
First is

W, [2016-11-19T12:08:19.789039 #2878]  WARN -- :
This usage of the Code Climate Test Reporter is now deprecated. Since version
1.0, we now require you to run `SimpleCov` in your test/spec helper, and then
run the provided `codeclimate-test-reporter` binary separately to report your
results to Code Climate.

The second one is

SimpleCov failed to recognize the test framework and/or suite used. Please specify manually using SimpleCov.command_name 'Unit Tests'.

How to fix

The first warning

I follow the usage mentioned in ruby-test-reporter Upgrading from pre-1.0 Versions

I execute bundle exec shined tests/ again and confirm the warning doesn't show up.

The second warning

I add the line SimpleCov.command_name "Shindo" seeing simplecov giving test-suite-name.
I don't follow the way like 'test:units' mentioned in README.md, , referring to #guess in lib/simplecov/command_guesser.rb.
This is implemented like

def guess
  from_env || from_command_line_options || from_defined_constants
end

#from_command_line_options checks the path of test-suites and judges the test framework and returns nothing when the path doesn't match; #from_defined_constants checks a name of test frameworks and returns 'Unknown Test Framework' when the name doesn't match.
I think it's reasonable to pass 'Shindo' instead of a path.

I also confirm the warning doesn't show up.

Test

I run tests by bundle exec shindo tests/requests/sqs(I would like to add a feature to sqs).
All tests green and the two warnings don't show.

@geemus
Copy link
Member

geemus commented Nov 21, 2016

@ebihara99999 The 2nd fix looks good. For the first one, it would remove the warning, but I think it would also make it so codeclimate info would no longer be reported? Maybe I'm reading this incorrectly though.

@lanej are you using code climate stuff? I guess if not, losing it isn't as much an issue.

@lanej
Copy link
Member

lanej commented Nov 21, 2016

@geemus not currently using it and it would seem easy to work back in. So 👍

@ebihara99999
Copy link
Contributor Author

Thanks for reviewing.
I fail to report to code climate as @geemus said. The last commit is the fix.
I found the more detailed doc. See https://docs.codeclimate.com/v1.0/docs/travis-ci-ruby-test-coverage

@geemus
Copy link
Member

geemus commented Nov 22, 2016

Great, thanks!

@geemus geemus merged commit c4b619d into fog:master Nov 22, 2016
@ebihara99999 ebihara99999 deleted the fix_warnings_in_running_tests branch November 25, 2016 06:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants