Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
2 captures
12 Jun 22 - 14 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
  • Help Room /
avatar image
1
Question by maxim-vr · Jan 13, 2018 at 02:55 PM · testc# dll

Assembly Definition Files with Test Runner

Hi,

We started using Unity 2017.3.0f3 that has new feature - Assembly Definition Files (AD). We added AD files to all our scripts files and this caused to disappearance of all unit tests in Test Runner (TR), it seems that TR does not support AD files or does not work with assemblies that are not default project assemblies. After removing AD files from script folders that contain unit test classes, TR started showing these unit tests.

Thanks!

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by HaraldNielsen · Jan 14, 2018 at 09:33 PM

Hi @maxim-vr We had a bug where certain assembly names where ignored up by the Test Runner. This is fixed and should be working in the next upcomming patch (2017.3.0p2). What where your asmdef name, then I can make sure it works

Comment
Add comment · Show 6 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image maxim-vr · Jan 14, 2018 at 11:02 PM 0
Share

Hi Narald, Thank you for help! One of our desired AD file names is "AD.Inception.Core.Tests.asmdef". BR, $$anonymous$$axim.

avatar image HaraldNielsen maxim-vr · Jan 15, 2018 at 09:01 AM 0
Share

@maxim-vr The error we had was assemblies containing '.' in the name. For getting this working now you could remove . in the asmdef name and the Test Runner should pick up that asmdef. Remeber its not only the asmdef filename but the name property in the asmdef inspector that sets what the compiled assembly are called. 2017.3.0p2 will contain a fix for this

avatar image maxim-vr HaraldNielsen · Jan 15, 2018 at 11:35 AM 0
Share

@HaraldNielsen Thank you for the tip. We tried rena$$anonymous$$g file to "AD_Inception_Core_Tests_Edit$$anonymous$$ode" that is placed in folder "Editor/Tests/Scripts". Now, Test Runner recognizes all unit tests in this folder, but shows them under "Play$$anonymous$$ode" tab. Tried giving AD name similar to file name (without dots ".") - did not help, still recognized as Play$$anonymous$$ode assembly.

Show more comments
avatar image unity_surviver · Feb 05, 2018 at 12:10 PM 0
Share

Hi @HaraldNielsen, we glad to hear that next patch will solve this issue. Our asmdef name is "AD.Inception.Core.Tests.asmdef". BTW on UWP\WSA asmdef won't work, we cannot compile our project without removing them.

avatar image
0

Answer by jnbt · Jan 18, 2018 at 11:07 AM

@HaraldNielsen We have the same problem. How do we use Assembly Definitions with EditMode unit tests?

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image HaraldNielsen · Jan 24, 2018 at 08:25 AM 0
Share

But 2017.3 should handle asmdef's correctly anyway. A fix are underway. Will let you guys know what patch it will be in

avatar image
0

Answer by mikael_kalms · Jan 24, 2018 at 07:25 AM

I experienced related problems, but not 100% sure if they are the exact same you have experienced: Even in a minimal example project, Unity would not find any EditMode tests which were inside an asmdef dll, Issue tracker link. Unity QA says that in 2018.1 it will be possible to mark asmdefs as "Test assemblies". This will exclude the assemblies from player builds - and perhaps also make the tests show up in the EditMode list of tests.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image HaraldNielsen · Jan 24, 2018 at 08:29 AM 0
Share

Its correct that 2018.1 will include the Test Assemblies flag in asmdef's. The issue here is that asmdef's where only picked up as playmode tests. Even though you marked them as Editor only. If they are still not showing try this: https://answers.unity.com/comments/1454775/view.html

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

128 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I get my camera to work? 0 Answers

Classes that inherit UIBehaviour in a DLL no longer visible in Unity editor. 2 Answers

Unity Test Runner --> unable to reference my code from the test 2 Answers

Collisions in Editor Test Runner 0 Answers

Particle emission error 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges