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

Add end-to-end test framework inspired from iOS interactive tests #8110

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Mindfulplays
Copy link
Contributor

@Mindfulplays Mindfulplays commented Dec 20, 2023

This brings interactive tests from iOS and allows them to be run in any environment.
Specifically, given a set of Game classes under Tests/Interactive/Tests, we can run that Game instance in a test harness under DesktopGL (Mac/Windows)/iOS (Android coming next).

  • Lots of reshuffling from Tests/Interactive/iOS -> Common/Tests
    • Also added doc to run the tests in simulator/on-device.
  • New TestRunners (for now DesktopGL on Mac/Windows and iOS)- will add Android next
    • DesktopGL only allows running one test per run, due to STA/SDL Window event loop.
    • Perhaps consider NUnit test that launches the DesktopGL in a separate process with the correct command-line parameter?
  • Added doc in Tests/Interactive/README.md on how to run the test runners.
  • Allows 'automatic' running of InteractiveTests too (i.e. automatically run one test, allow test to signal 'finish' and exit)
    • i.e. provided a TestGame that implements Game and allows a test author to signal when the test is done. (i.e. either by clicking the Exit button or the test can run automatically, then signal Exit)

@Mindfulplays
Copy link
Contributor Author

@tomspilman @harry-cpp Please take a look

@Mindfulplays
Copy link
Contributor Author

Squashed commits and cleaned up comments/code etc. Tested on DesktopGL (mac/windows) + iOS

@Mindfulplays
Copy link
Contributor Author

This PR is now ready for you folks, please take a look.

I have more coming up that adds RenderTarget/etc tests to this and also adds WindowsDX/Android runners etc. it's been very useful to understand/verify behaviors as I have made Metal work using these tests in parallel.

Not sure how I magically summon reviewers but here we go: @SimonDarksideJ @harry-cpp @tomspilman :)
Thanks!

This brings interactive tests from iOS and allows them to be run in any environment.
Specifically, given a set of `Game` classes under `Tests/Interactive/Tests`, we can run that `Game` instance in a test harness under DesktopGL (Mac/Windows)/iOS (Android coming next).

- Lots of reshuffling from Tests/Interactive/iOS -> Common/Tests
  - Also added doc to run the tests in simulator/on-device.
- New TestRunners (for now DesktopGL on Mac/Windows and iOS)- will add Android next
  - DesktopGL only allows running one test per run, due to STA/SDL Window event loop.
- Added doc in Tests/Interactive/README.md on how to run the test runners.
@Mindfulplays
Copy link
Contributor Author

Could someone take a look? @mrhelmut

@Mindfulplays
Copy link
Contributor Author

I can resolve conflicts (mostly license/doc?) but could someone please take a look? This was super useful in testing out/verifying Metal, and hence I think for the proposed GDK/Vulkan/DX12 stuff it will be beneficial as well. @mrhelmut @harry-cpp

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.

None yet

1 participant