I want to analyse the test coverage of our code , and therefore, installed the simplecov gem.
Our testing environement has 2 seperate project: REST API test (Java+Rest-Assured) and Web UI testing (Java-Selenium).
As you can see, we dont have unit testing inside the rails app, and we are testing using external projects.
I configured the simplecov gem as descriped in the tutorial and put this, in the rails script:
require 'simplecov'
SimpleCov.start 'rails'
puts "require simplecov"
When loading the app, I see the string I printed.
I ran both automation test projects, saw their printouts in the rails log, but I don't see any coverage of controllers/models, I see only small precentage of initializtion files of some gems and rails.
I searched the net, and tried putting the code phrase in boot.rb or even puma.rb and it returned the same results.
Any ideas?
EDIT
Nothing helped with all the comments, but I figured out something very interesting, in all cases, I only see the name of methods marked as tested, not the content (in controllers).
I tried to put the simplecov start phrase in both bin/rails, puma.rb, config.ru, environment.rb, all not given the desired results of code coverage.