Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 /
avatar image
4
Question by jonathanpeppers · Apr 23, 2014 at 01:22 PM · testingintegrationtest

Unity Test Tools - Integration Test for existing scenes

We are wanting to use integration tests and load each level (scene) in our game to see if any errors occur. It seems like the built-in integration testing requires a new scene, so how would I set this up?

Is there a way to do this with Unity Test Tools?

Comment
Add comment · Show 8
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 Mike-Geig ♦♦ · Apr 24, 2014 at 03:00 PM 0
Share

Not sure what you are asking. Integration tools use a single, special, test scene. What are you trying to test?

avatar image jonathanpeppers · Apr 24, 2014 at 03:08 PM 0
Share

We just want to launch every level in our game with CI and fail if there are any exceptions in the log, etc. We feel like this would be helpful for catching mistakes. We are already running NUnit tests and some specific integration tests (but these are not in the same scene as a level).

avatar image Mike-Geig ♦♦ · Apr 24, 2014 at 03:25 PM 0
Share

There isn't a current functionality for that as far as I am aware. We will look into this.

avatar image jonathanpeppers · Apr 24, 2014 at 06:12 PM 0
Share

Thanks. Is there a way to launch a scene with the NUnit runner? Or is it so far removed from running the Unity engine that it wouldn't work?

avatar image jamiltron · May 01, 2014 at 05:51 PM 0
Share

Running a whole scene is somewhat out of the focus of NUnit. NUnit is intended for testing units of code. A whole scene is somewhat the domain of Integration Tests - as you are probably going to be testing how integrated particular concepts are within the scene itself.

Show more comments

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by dittytwo · Oct 02, 2015 at 11:57 AM

Hi there

ok first create a new integration test scene with a new empty object create one called level manager create a level manager script and load to the level manager that will load a new scene add a new integration test and add a test script that calls the level manager to load the scenes one by one reading the log for errors after each one.

would this not work... (I am not sure if your controlling test script would then be out of focus for the unite engine and therefore never finish but its worth a try.)

Comment
Add comment · Show 3 · 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 jonathanpeppers · Oct 02, 2015 at 01:09 PM 0
Share

So the last time I looked at this, as soon as a new scene was load (even loaded additive), the tests would all cancel and the integration test runner would completely reset.

There have been a lot of updates to Unity Test Tools since I tried this, though. This might be something that works now. I'll have to try it out when I have time.

avatar image jrodenburg_ncsoft · Feb 23, 2016 at 06:39 PM 0
Share

I am trying to do something similar with, 5.3.2 and up to date Test Tools. We have a main scene which has a lot of controllers that need to be all loaded up (and initialized) together in order to properly test some of the code. We load it up, and the test ends immediately.

In theory, I'd like to be able to call a loadscene (additive) and pop in everything that comes in our main scene, then act on that scene while it is loaded.

avatar image SupergonkDom · Sep 27, 2016 at 05:16 PM 0
Share

I've got past your problem by setting DontDestroyOnLoad on the TestComponent and TestRunner. This allows you to load scenes and operate tests on those scenes. It then loses the neat functionality of cleaning up the scenes after each test is performed.... And i've just noticed that the batch$$anonymous$$ode runner doesnt build the all the levels, only the ones specified in the cmd args. Feels like this system needs a bit more "real world" work.

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

27 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

Related Questions

Testing Network Code in Unity 4 Answers

Unity Test Runner - How do I create two game instances in a PlayMode test? 1 Answer

TeamCity XML Report Processing can not parse Unity 5.6 test results 3 Answers

Testing editor scripting 1 Answer

Unity Test Tools Integration Tests with Jenkins 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