Skip to content

Conversation

@rolandkakonyi
Copy link
Contributor

@rolandkakonyi rolandkakonyi commented Nov 24, 2023

Description

In order to enable writing integration tests, we need a framework that can run tests, that runs them on the native platform (unlike Jest), and has access to code-level components, such as Player.
After an initial investigation, I found https://github.com/pixielabs/cavy.

Note: I noticed there were no commits in the last ~2 years, BUT no other solution I found had the characteristics we needed. At the same time, I familiarized myself with their codebase, which isn't too complex, nor too big, therefore forking and fixing issues, or implementing features shouldn't be too hard.
(I already opened a PR for fixing a race condition)

Changes

Integrated Cavy into the integration test application and set it up with a basic setup that can be extended to have player integration tests.

Checklist

  • 🗒 CHANGELOG entry - not applicable, we should add a single entry once everything gets merged for integration testing

@rolandkakonyi rolandkakonyi self-assigned this Nov 24, 2023
Comment on lines +10 to +12
"pods": "yarn pods-install || yarn pods-update",
"pods-install": "yarn pod-install",
"pods-update": "pod update --silent"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These were moved here from the root package.json to separate concerns

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes here mirror the one from the example app

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has a very basic setup which gets modified for actual player testing in #332

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is a placeholder test to prove the framework works

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have to install yarn dependencies for the integration tests as well to allow typescript related validation.

@rolandkakonyi rolandkakonyi marked this pull request as ready for review November 27, 2023 08:22
Copy link
Contributor

@matamegger matamegger left a comment

Choose a reason for hiding this comment

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

Nice! Works well.
I just happen to have metro already running (for the example though), but the error already told me what went wrong.

Base automatically changed from player-testing/integration-test-app-setup to development December 13, 2023 07:37
@rolandkakonyi rolandkakonyi merged commit eb3fe01 into development Dec 13, 2023
@rolandkakonyi rolandkakonyi deleted the player-testing/cavy-setup branch December 13, 2023 07:37
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