Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Test coverage for integration tests #9706

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

alexgarel
Copy link
Member

This should bring coverage from the running backend server during integration tests.

@alexgarel alexgarel requested a review from a team as a code owner January 26, 2024 18:22
@github-actions github-actions bot added 🧽 Data quality https://wiki.openfoodfacts.org/Quality 🪶 Apache We use Apache as a server to run Open Food Facts 🐋 Docker https://docker-curriculum.com/ GitHub Actions Pull requests that update Github_actions code labels Jan 26, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 26, 2024

Codecov Report

Attention: 15 lines in your changes are missing coverage. Please review.

Comparison is base (55a9b22) 49.54% compared to head (265a2a2) 51.62%.

Files Patch % Lines
lib/ProductOpener/Web.pm 0.00% 12 Missing ⚠️
lib/ProductOpener/TestCover.pm 50.00% 1 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9706      +/-   ##
==========================================
+ Coverage   49.54%   51.62%   +2.08%     
==========================================
  Files          67       73       +6     
  Lines       20650    20802     +152     
  Branches     4980     4992      +12     
==========================================
+ Hits        10231    10739     +508     
+ Misses       9131     8701     -430     
- Partials     1288     1362      +74     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

docker/dev.yml Outdated Show resolved Hide resolved
@alexgarel
Copy link
Member Author

This works and it's an improvement.

The only thing is that there are no cgi in coverage report, I don't know why… yet.

@github-actions github-actions bot added 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies OCR 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🕹️ Gamification 🖼️ Images 🧪 tests ✏️ Editing - Auto Suggest Providing autosuggest for taxonomized fields. Mostly used in editing scenarii 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Recent changes Implemented by @hangy - https://world.openfoodfacts.org/cgi/recent_changes.pl?&page=1&page_size=25 👥 Users Minion 🔐 Auth 🔐 Password labels Jan 30, 2024
@github-actions github-actions bot added 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies OCR 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🧽 Data quality https://wiki.openfoodfacts.org/Quality 🕹️ Gamification 🖼️ Images ✏️ Editing - Auto Suggest Providing autosuggest for taxonomized fields. Mostly used in editing scenarii 🐋 Docker https://docker-curriculum.com/ 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Recent changes Implemented by @hangy - https://world.openfoodfacts.org/cgi/recent_changes.pl?&page=1&page_size=25 GitHub Actions Pull requests that update Github_actions code 👥 Users Web Minion 🔐 Auth 🔐 Password file import ingredients analysis multilingual products 👮 Moderation 🌐 Translations 🔎 Search labels Jan 30, 2024
@alexgarel alexgarel marked this pull request as draft January 31, 2024 08:41
@alexgarel
Copy link
Member Author

I though it was an easy one, but it's not !

The problem is that apache is running scripts independently in some way, but codecoverage initialize only once. Even forcing apache to only one process does not work.

I can force cgi scripts to report, but I end up with always 100% coverage, which is not true, and no info on branches, conditions, etc.

This thread has a link to a working coverage apache example, but it's using ApacheTest mechanism.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@github-actions github-actions bot added the 💥 Merge Conflicts 💥 Merge Conflicts label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪶 Apache We use Apache as a server to run Open Food Facts 🔐 Auth 🧽 Data quality https://wiki.openfoodfacts.org/Quality 🐋 Docker https://docker-curriculum.com/ ✏️ Editing - Auto Suggest Providing autosuggest for taxonomized fields. Mostly used in editing scenarii file import 🕹️ Gamification GitHub Actions Pull requests that update Github_actions code 🖼️ Images ingredients analysis 💥 Merge Conflicts 💥 Merge Conflicts Minion 👮 Moderation multilingual products OCR 📦 Packaging https://wiki.openfoodfacts.org/Category:Recycling 🔐 Password 🏭 Producers Platform https://wiki.openfoodfacts.org/Platform_for_producers Recent changes Implemented by @hangy - https://world.openfoodfacts.org/cgi/recent_changes.pl?&page=1&page_size=25 🔎 Search 🧬 Taxonomies https://wiki.openfoodfacts.org/Global_taxonomies 🧪 tests 🌐 Translations 👥 Users Web
Projects
Development

Successfully merging this pull request may close these issues.

2 participants