Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
0
Question by o_coulson · Aug 07, 2016 at 10:40 AM · unity 5crashingtesting

Unity Editor crashing when running unit tests

I'm starting to write some really basic tests in NUnit to familiarise myself with unit testing in unity and my first test script causes the Editor to crash (terminate with no error message/warning) if I run all the tests. There are only 2 tests currently and I can't see any syntax errors or suchlike (they compile in monodevelop).

Curiously if i run the first test, it runs and passes as expected but running the second (which is practically identical) after causes the crash also. In case it was an issue with the latter test, I switched the order of the two in the code, and the new first test runs and passes and the second test (or running all tests) still crashes unity.

I've included the code of my test script below. I feel like either i'm missing something obvious or there is some aspect to using NUnit in unity which I don't know about and is causing this issue.

To clarify, when i say running the tests, i mean in the editor using the Editor Test Runner. I am using Unity 5.3.4f1 on OSX El Capitan if that makes any difference.

 using UnityEngine;
 using System.Collections;
 using NUnit.Framework;
  
 [TestFixture]
 public class ReadJsonTest {
  
     private JsonDataHandler handler;
  
     [SetUp]
     public void Init ()
     {
         handler = new JsonDataHandler();
     }  
  
     [Test]
     public void TestDialogueJsonDataLoaded() {
         Assert.IsNotNull(handler.DialogueJsonData);
     }
  
     [Test]
     public void TestItemsJsonDataLoaded() {
         Assert.IsNotNull(handler.ItemsJsonData);
     }
 }
  
 
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

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by NoseKills · Aug 07, 2016 at 02:03 PM

If Unity crashes to desktop, it's a Unity bug. The best thing to do would be to make as small as possible a test project to reproduce the issue and report a bug with the test project attached.

I did so for a very similar issue. These issues might even have something in common.

Comment
Add comment · 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

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

99 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

Related Questions

Testing Duration With Unit Tests 0 Answers

Unet load testing 0 Answers

Unity crashes on startup - Unity 2018.3.6f1 (64-bit) - Solved 1 Answer

AnimatorControllerPlayable.cpp crashes at certain android devices(not all) 0 Answers

GameTestAutomationExample 1 Answer


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