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

Make unit_tests be fast enough for rapid iteration #8690

Merged
merged 11 commits into from
Sep 16, 2024

Conversation

eivindjahren
Copy link
Contributor

@eivindjahren eivindjahren commented Sep 13, 2024

This PR separates tests into ui / integration / unit tests, inspired by the testing pyramid. The goal is to apply the definition of unit test that "It can be ran reliably and quickly when small changes are applied". In order to do so, the definition of integration tests becomes "unit tests that didn't quite make it" and kick out cli tests to live along side the more user interaction focused gui tests.

Note, after rearranging, the tests openPBS were unreliable when not separated into their own distgroup. We will have to create an issue for that.

  • PR title captures the intent of the changes, and is fitting for release notes.
  • Added appropriate release note label
  • Commit history is consistent and clean, in line with the contribution guidelines.
  • Make sure tests pass locally (after every commit!)

When applicable

  • When there are user facing changes: Updated documentation
  • New behavior or changes to existing untested code: Ensured that unit tests are added (See Ground Rules).
  • Large PR: Prepare changes in small commits for more convenient review
  • Bug fix: Add regression test for the bug
  • Bug fix: Create Backport PR to latest release

@eivindjahren eivindjahren force-pushed the testing_pyramid branch 2 times, most recently from 6ba71f0 to 875f571 Compare September 13, 2024 07:40
@eivindjahren eivindjahren changed the title Move cli tests to ui_tests/cli Make unit_tests be fast enough for rapid iteration Sep 13, 2024
@codecov-commenter
Copy link

codecov-commenter commented Sep 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.47%. Comparing base (dbf2ae6) to head (733b45a).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8690      +/-   ##
==========================================
+ Coverage   90.96%   91.47%   +0.50%     
==========================================
  Files         343      343              
  Lines       21306    21306              
==========================================
+ Hits        19381    19489     +108     
+ Misses       1925     1817     -108     
Flag Coverage Δ
cli-tests 38.76% <ø> (?)
gui-tests 72.28% <ø> (-3.93%) ⬇️
integration-tests ?
performance-tests 49.21% <ø> (?)
unit-tests 80.10% <ø> (+11.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@eivindjahren eivindjahren self-assigned this Sep 13, 2024
@eivindjahren eivindjahren force-pushed the testing_pyramid branch 12 times, most recently from 5c727be to b35ae5b Compare September 14, 2024 13:27
@eivindjahren eivindjahren added the release-notes:skip If there should be no mention of this in release notes label Sep 14, 2024
@eivindjahren eivindjahren force-pushed the testing_pyramid branch 2 times, most recently from d8f9b8c to 68465a2 Compare September 14, 2024 17:27
Copy link
Contributor

@andreas-el andreas-el left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked over this, and this makes sense to do. 👍

@eivindjahren eivindjahren merged commit 29a790f into equinor:main Sep 16, 2024
35 checks passed
@eivindjahren eivindjahren deleted the testing_pyramid branch September 16, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes:skip If there should be no mention of this in release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants