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

refactor(tests): Use XCTestPlans for unit testing #1509

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

dpogue
Copy link
Member

@dpogue dpogue commented Nov 22, 2024

Platforms affected

iOS

Motivation and Context

This allows us to set up default behaviour of re-running tests up to 3 times if they fail, which should significantly cut down the number of failing builds in CI.

Description

Move from Xcode schemes to XCTestPlans.

I also opted to only keep the unit tests for the case where CordovaLib is consumed as a framework, since that's now the default behaviour for the template app (using Swift Packages) rather than a static library.

Also cleaned up the test app project naming and moved some boilerplate stuff over to Swift.

Testing

Tests pass locally and in CI.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change

This allows us to set up default behaviour of re-running tests up to 3
times if they fail, which should significantly cut down the number of
failing builds in CI.

I also opted to only keep the unit tests for the case where CordovaLib
is consumed as a framework, since that's now the default behaviour for
the template app (using Swift Packages) rather than a static library.

Also cleaned up the test app project naming and moved some boilerplate
stuff over to Swift.
@dpogue dpogue added this to the 8.0.0 milestone Nov 22, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.97%. Comparing base (c995cd2) to head (340437c).

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #1509       +/-   ##
===========================================
+ Coverage        0   80.97%   +80.97%     
===========================================
  Files           0       16       +16     
  Lines           0     1850     +1850     
===========================================
+ Hits            0     1498     +1498     
- Misses          0      352      +352     

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


🚨 Try these New Features:

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

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

LGTM

@dpogue dpogue merged commit 5013f7d into apache:master Nov 22, 2024
11 checks passed
@dpogue dpogue deleted the testplans branch November 22, 2024 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants