Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7918561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T15:33:07+00:00 2026-06-03T15:33:07+00:00

We have a suite of Selenium tests. I’d like to use SimpleCov to coverage

  • 0

We have a suite of Selenium tests. I’d like to use SimpleCov to coverage the server-side coverage of those tests. First off, is this a common approach? I haven’t been able to find anything on SimpleCov/Selenium. Maybe SimpleCov is usually used for unit/functional tests instead of integration?

Current Selenium setup requires booting up a rails server, than having a suite of Selenium tests hit it. I’d need SimpleCov to run on the rails server, then quit after the suite is done.

Any help greatly appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T15:33:08+00:00Added an answer on June 3, 2026 at 3:33 pm

    simplecov author here. Whenever you launch SimpleCov, it applies the coverage analysis to the currently running process. Therefore, you would need to launch SimpleCov inside your Rails server process. I would recommend adding the SimpleCov setup as a conditional to your Rails app’s config/boot.rb (at the very top), like so:

    # config/boot.rb
    if ENV["SELENIUM"]
      require 'simplecov'
      SimpleCov.start 'rails'
    end
    

    Before booting your Rails test server, set that environment variable. You should now receive a coverage report once the test server is shut down. Please check out the config options if you want to move it to another directory so it does not interfere with your regular (unit/functional) coverage report.

    I am not sure that boot.rb is the right place though. The fact is that SimpleCov needs to be loaded before anything else in your app is required or it won’t be able to track coverage for those files. You might need to experiment or have a look into the rails boot process to find that place, but as the Bundler setup is part of boot.rb (if I remember correctly…), putting the mentioned config above the Bundler.setup should be fine.

    Basically, with a similar setup you can even get code coverage for your local manual browser-based testing by launching simplecov in your server process, clicking around and exiting the server, if for example you want to know what part of your application a certain action really touches.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: We have web based product and a growing suite of automated Selenium tests
I have a test suite DLL written in C# that uses Selenium.This is then
I would like an automated web tests suite based on Selenium RC to take
I have a suite of Selenium tests (created using Java in Selenium RC 1.0.3)
We currently have a suite of integration tests that run via MbUnit test suites.
I have a test suite to perform smoke tests. I have all my script
I have a test suite to perform smoke tests. I have all my script
I'm using TestNG to run Selenium based tests in Java. I have a bunch
I have a the following selenium test suite inheriting from the same base class,
I have a test method created using Selenium, something similar to this: [TestFixture] public

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.