Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

PlayMode Tests

Discussion in '5.6 Beta' started by Pixelstudio_nl, Feb 9, 2017.

  1. Pixelstudio_nl

    Pixelstudio_nl

    Joined:
    Jun 22, 2009
    Posts:
    179
    Hi all,
    I'm trying out the updated testrunner which now include PlayMode Tests.
    What i did is create a new Test

    Class with attribute : [UnityPlatform(TestPlatform.PlayMode)] and a function with attribute [UnityTest]
    I can run the test fine in the editor.
    However when i try to build i get an error:
    Assets/Scripts/Tests/NewPlayModeTestWithMethods.cs(1,19): error CS0234: The type or namespace name `TestTools' does not exist in the namespace `UnityEngine'. Are you missing an assembly reference?
    So i thought i'll move the script to an editor folder. thats solves the error on build but then my test is not available in the testrunner anymore.
    Am i'm doing something wrong?
     
  2. Tomek-Paszek

    Tomek-Paszek

    Unity Technologies

    Joined:
    Nov 13, 2012
    Posts:
    116
    What platform are you trying to build it for and which beta version are you on?
     
  3. Pixelstudio_nl

    Pixelstudio_nl

    Joined:
    Jun 22, 2009
    Posts:
    179
    Hi Tomek,

    I'm on Beta 5.6.0 B6
    Build target is WebGL
     
  4. Tomek-Paszek

    Tomek-Paszek

    Unity Technologies

    Joined:
    Nov 13, 2012
    Posts:
    116
    WebGL (and WRT) in this beta has no support. A limited support should be availble eventually