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

Regression of unfound test assembly - 2019.3.0f3 - package 1.0.0-preview.3 #989

Closed
builder-main opened this issue Dec 29, 2019 · 14 comments
Closed

Comments

@builder-main
Copy link

builder-main commented Dec 29, 2019

I'm having an issue with the test assembly although I followed the guide in https://docs.unity3d.com/Packages/com.unity.inputsystem@1.0/manual/Testing.html, package does not show up in assembly explorer and references can't resolve. 2019.3.0f3 - package 1.0.0-preview.3

As a side note, the assembly is not present in Library\ScriptAssemblies.

using UnityEngine.InputSystem;

    [TestFixture]
    public class BindingInputTest : InputTestFixture

image

My test assembly configuration :

image

image

Originally posted by @MorphiksBuilder in #366 (comment)

Camarent pushed a commit to Camarent/Archero-Like-Game that referenced this issue Jan 14, 2020
Cannot properly do it because of regression bug: Unity-Technologies/InputSystem#989
I have to use workaround or wait until 2019.3 is released.
@MeikelLP
Copy link

MeikelLP commented Feb 5, 2020

Still broken in preview 4. This is bonkers even for a preview. Quality assurance is a big topic it seems.

@Rene-Damm
Copy link
Contributor

Rene-Damm commented Feb 6, 2020

Unfortunately, due to how this works now in the package manager, it now requires a workaround that isn't mentioned in the docs page.

Basically, in your Packages/manifest.json file, you need to add

"testables" : [ "com.unity.inputsystem" ]

in order for the test framework assembly to be included in test builds.

I'll see if we can find a better solution or at least make sure this bit gets included in the docs.

@Rene-Damm
Copy link
Contributor

Also just noticed that doing this now results in an integration test test from the input system showing up in user projects, too. It's the only test that gets added directly to the package ATM. Looking into it.

@MeikelLP
Copy link

@Rene-Damm your workaround testables does not work for me.

@Rene-Damm
Copy link
Contributor

@MeikelLP Could you provide some more details? What's the error? What exactly isn't working?

I've tried the setup with 1.0.0-preview.4 and after adding the snippet to Packages/manifest.json was able to set up a test assembly just fine. Other than having to modify the manifest in the first place, only wart was the input system injecting a test into the project.

@MeikelLP
Copy link

I get the exact same error as the OP
image

@Rene-Damm
Copy link
Contributor

Is the file in a separate test assembly that references the input system test framework assembly?

@MeikelLP
Copy link

it is yes. I'm working with several assembly definition files

@Rene-Damm
Copy link
Contributor

Please file a ticket with the Unity bug reporter. We'll have a look.

@MeikelLP
Copy link

So today on my personal machine I installed Unity 2019.3.1f1 and it seems to be fixed when setting the testables like @Rene-Damm said.

@jo3w4rd
Copy link
Collaborator

jo3w4rd commented Feb 19, 2020

Would this page have helped you with your problem if you had found it?
https://docs.unity3d.com/Manual/cus-tests.html

@MeikelLP
Copy link

@jo3w4rd I don't want to include the tests of a package. I want to use a class inside a package which wasn't possible without testables

@stefanunity
Copy link
Collaborator

Hello,

we're going to close all the github issues and will concentrate bug information in the Unity public issue tracker https://issuetracker.unity3d.com/product/unity/issues?project=116&status=1&unity_version=&view=hottest.

If you are still experienceing this issue in the latest package version please do file a bug report as described here https://unity3d.com/unity/qa/bug-reporting
For general feedback and discussions you can go to https://forum.unity.com/forums/new-input-system.103/

Thank you!

@builder-main
Copy link
Author

builder-main commented May 7, 2020

This issue is still alive for us, unity 2019.3.11f1 and the latest package 1.0.0. We're not creating a package, simply having an asmdef for our playmode tests.

We've added in the manifest : "testables" : [ "com.unity.inputsystem" ]

[EDIT] : We added the compile flag UNITY_INCLUDE_TESTS and it seems to work

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

No branches or pull requests

5 participants