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

feat: IntegrationTests infrastructure (WPB-4329) #2120

Merged
merged 54 commits into from
Oct 9, 2023

Conversation

alexandreferris
Copy link
Contributor


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

What's new in this PR?

This is a follow-up on #2074 (as it had to be reverted due to HttpClientEngine not being visible in AR`) so I have added a wrapper class for it from Kalium side.

Issues

We did not have integration tests in our code base.

Causes (Optional)

It was never implemented

Solutions

Create new module tango-tests for integration tests.
Currently it consists of:

  • Tests (as a POC we only have PocIntegrationTest) which contains only 2 tests:

    • Getting ACME directories (while manipulating the network state (Not Connected, Connected with No Internet, Connected with Internet)
    • Login -> Register Client -> Logout flow
  • CommonResponses: where it acts as an object to hold common info for tests (such as BASE_URL, and some common DTOs for now)

  • Actions: Login/Client/ACME actions in order to provide all necessary requests/responses for specific flows so whenever we increase integration tests we don't need to copy/paste/duplicate code.

Current Issue:
util: this one we haven't managed to access the same files from network module so for now as a POC we only duplicated those classes into this new module, but our goal is to be able to access those Json mocks/values without having to duplicate them, or even have them somewhere it is easily accessible elsewhere apart from its own module.

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

How to Test

  • Tests should run successfully

Notes (Optional)

This is a POC to be presented in our collective, if you do have any feedback feel free to add it here and we can also discuss it later.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 9, 2023

Unit Test Results

   439 files  +1     439 suites  +1   3m 14s ⏱️ +54s
2 389 tests +2  2 285 ✔️ +2  104 💤 ±0  0 ±0 

Results for commit fc41570. ± Comparison against base commit 882fbf9.

♻️ This comment has been updated with latest results.

@datadog-wireapp
Copy link

datadog-wireapp bot commented Oct 9, 2023

Datadog Report

All test runs bd94242 🔗

2 Total Test Services: 0 Failed, 0 with New Flaky, 2 Passed

Test Services
Service Name Failed Known Flaky New Flaky Passed Skipped Wall Time Branch View
kalium-ios 0 0 0 2163 121 6m 10.07s Link
kalium-jvm 0 0 0 2285 104 14m 18s Link

@alexandreferris alexandreferris requested review from a team, typfel, gongracr, yamilmedina, MohamadJaara and mchenani and removed request for a team October 9, 2023 13:59
@alexandreferris alexandreferris added this pull request to the merge queue Oct 9, 2023
Merged via the queue into develop with commit ff0bd95 Oct 9, 2023
@alexandreferris alexandreferris deleted the feat/add_integration_tests_infrastructure branch October 9, 2023 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants