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 Unity Test Framework support #1194

Merged
merged 3 commits into from
Aug 14, 2023

Conversation

kkopanski
Copy link
Contributor

@kkopanski kkopanski commented Jun 2, 2023

Rework of not working test running command line options.
AFAIK this never works on any Unity version.

Also added new TestPlatform support.

I confirm that the pull-request:

  • Follows the contribution guidelines
  • Is based on my own work
  • Is in compliance with my employer

@kkopanski kkopanski changed the title Fix Unity's commands for tests running. Previous ones was incorrect (… Fix Unity's commands for tests running. Jun 2, 2023
@chrisyarbrough
Copy link

chrisyarbrough commented Jun 2, 2023

Just to add some info:
In Unity 5.3, there were different CLI arguments, e.g. "runEditorTests". See: https://docs.unity3d.com/530/Documentation/Manual/CommandLineArguments.html

But @kkopanski has made the changes to work with the more recent Test Framework:
https://docs.unity3d.com/Packages/com.unity.test-framework@1.1/manual/reference-command-line.html

I personally don't care too much for legacy versions and it's probably best to align with the official support cycle of Unity.
https://unity.com/releases/editor/qa/lts-releases

So in this case, since the oldest LTS version is now 2021 it's fine.
The Test Framework added the new commandline arguments with 1.0: https://docs.unity3d.com/Packages/com.unity.test-framework@1.0/manual/reference-command-line.html

Which requires Unity 2019.2 or later, so it's been changed a long time now.

@kkopanski
Copy link
Contributor Author

@chrisyarbrough you are totally right.
I have totally missed the 5.3 and lower versions of Unity.

I will rework this code so older methods will just stay as is and add new ones.

We should also talk about marking things as deprecated if they are below Unity support cycle.
What do you think?

… This should help creating new task instead of adding everything in one uber-task.
@kkopanski
Copy link
Contributor Author

Just added new UnityProjectSettings class with all project-level settings.
This should help creating new task instead of adding everything in one uber-task.

This allows to add separate task UnityRunTests which implements new Unity Test Framework.
Everything should be back compatible now.

@kkopanski kkopanski changed the title Fix Unity's commands for tests running. Add Unity Test Framework support Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:tools issues in this area can easily be fixed in user code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants