Skip to content

Add defaultsRelease variant tests run configuration#1074

Merged
tonidero merged 2 commits into
mainfrom
add-defaults-release-variant-test-run-configuration
Jun 22, 2023
Merged

Add defaultsRelease variant tests run configuration#1074
tonidero merged 2 commits into
mainfrom
add-defaults-release-variant-test-run-configuration

Conversation

@tonidero

@tonidero tonidero commented Jun 19, 2023

Copy link
Copy Markdown
Contributor

Description

This adds 2 new run configuration in Android studio to run the tests only in the defaultsDebug or defaultsRelease variant
image

The All tests run configuration run the same tests multiple times:

  • defaultsDebug
  • defaultsRelease
  • integrationTestDebug
  • integrationTestRelease

Many times, we don't really need to run the tests in all variants, this provides a way so tests are a bit faster to run locally when it's not needed to run in all variants.

@tonidero tonidero added the build label Jun 19, 2023
@tonidero tonidero marked this pull request as ready for review June 19, 2023 09:09
@tonidero tonidero requested a review from a team June 19, 2023 09:09
@codecov

codecov Bot commented Jun 19, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.76%. Comparing base (8ae7c65) to head (3ec93e9).
Report is 639 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1074   +/-   ##
=======================================
  Coverage   85.76%   85.76%           
=======================================
  Files         176      176           
  Lines        6265     6265           
  Branches      864      864           
=======================================
  Hits         5373     5373           
  Misses        557      557           
  Partials      335      335           

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

@NachoSoto

Copy link
Copy Markdown
Contributor

Can you clarify? Does "All Tests" run tests multiple times, one on each variant?

@tonidero

Copy link
Copy Markdown
Contributor Author

Can you clarify? Does "All Tests" run tests multiple times, one on each variant?

I updated the description but that's correct. The All Tests run configuration runs the same tests 4 times, one for each variant. This should save some time for the normal case.

@NachoSoto

Copy link
Copy Markdown
Contributor

Oh wow yeah that’s a lot. Did you make this for local runs or for CI? I wonder if locally we should default to running debug instead.
But either way I wonder if a name like “Debug tests” / “Release tests” would be more clear?

@tonidero

Copy link
Copy Markdown
Contributor Author

Did you make this for local runs or for CI?

The change in this PR only adds a configuration for when you run through Android Studio. In CI, we are currently running tests in the defaultsDebug and defaultsRelease variants in every commit.

But yeah, maybe making one each for debug and release makes sense, I will add one run configuration for debug as well 👍

@tonidero

Copy link
Copy Markdown
Contributor Author

Added both a debug and release run configuration for Android studio @NachoSoto

Comment thread .run/Debug tests.run.xml
</option>
<option name="taskNames">
<list>
<option value="testDefaultsDebugUnitTest" />

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the gradle task that gets executed, this is the same as executing ./gradlew testDefaultsDebugUnitTest in the terminal

@tonidero tonidero merged commit 333aba7 into main Jun 22, 2023
@tonidero tonidero deleted the add-defaults-release-variant-test-run-configuration branch June 22, 2023 14:36
tonidero pushed a commit that referenced this pull request Jun 23, 2023
**This is an automatic release.**

### Bugfixes
* Default customer info schema version to latest known by SDK (#1080)
via Toni Rico (@tonidero)
* Handle other diagnostics-related exceptions (#1076) via Toni Rico
(@tonidero)
* Return error in queryPurchases if error connecting to billing client
(#1072) via Toni Rico (@tonidero)
### Other Changes
* Fix offline entitlements integration tests (#1085) via Toni Rico
(@tonidero)
* Add defaultsRelease variant tests run configuration (#1074) via Toni
Rico (@tonidero)
* Compose sample app: move to gradle catalog (#1081) via Toni Rico
(@tonidero)
* Compose sample app: automate builds (#1082) via Toni Rico (@tonidero)
* Compose sample app (#1056) via Toni Rico (@tonidero)
* Migrate to Gradle version catalog (#1059) via Cesar de la Vega
(@vegaro)
* Trusted entitlements: Add logs with verification mode (#1067) via Toni
Rico (@tonidero)
* Sync pending purchases before getting customer info (#1073) via Toni
Rico (@tonidero)
* Refactor syncing pending transactions logic out of `Purchases` (#1058)
via Toni Rico (@tonidero)
* Refactor CustomerInfo listener and cache logic into
CustomerInfoUpdater (#1052) via Toni Rico (@tonidero)
* Trusted entitlements: Add integration tests (#1071) via Toni Rico
(@tonidero)
* Trusted entitlements: Add internal mechanism to force signing errors
for tests (#1070) via Toni Rico (@tonidero)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
@vegaro vegaro added pr:other and removed pr:build labels Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants