Skip to content

Draft: Try coverband gem with Gitlab rails for mapping

Harsha Muralidhar requested to merge hm-coverband-for-mapping into master

What does this MR do and why?

Relates to: gitlab-org/quality/quality-engineering/team-tasks#2393

Trying out a POC to see if coverband gem could be used to map E2E test coverage.

How to test locally?

Pre-requisites: docker is installed, gdk is up and running

Steps to test the POC locally:

  1. Checkout this branch and start up gdk
  2. Run an example E2E spec
WEBDRIVER_HEADLESS=false GITLAB_ADMIN_PASSWORD="XXX" GITLAB_QA_ADMIN_ACCESS_TOKEN=XXX GITLAB_PASSWORD="XXX" QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=http://172.16.123.1:3000 bundle exec rspec  ./qa/specs/features/ee/browser_ui/10_govern/security_reports_spec.rb:233
  1. Look for Following coverage has been recorded: in the test logs (which should show a list of code paths)

Still to do:

  1. Get it working in CI (currently the pipeline is not working with this MR, need to figure out why)
  2. Very crude api code (need to do it properly)
  3. How to get the coverage for a full job and store it, perhaps as a hash map object (as job artefact? Upload to s3?)

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Edited by Harsha Muralidhar

Merge request reports