Unity 2018 Test Runner Broken?
I've been trying to create Editor mode tests using test runner, and have followed the Unity manual - but I've not been able to create a single test script, it's always greyed out.
All other online references I can find refer to out of date versions.
I've tried:
a totally empty project
new project with just an Editor folder, selected the folder
a new project, clicked "create test assembly folder", selected the that folder creates
a new project with Editor folder, created test assembly folder inside Editor folder.
Grinding my teeth.
What am I doing wrong? Would someone mind providing some step-by-step instructions on how this is supposed to work?
Answer by tikali23 · Jun 23, 2018 at 12:57 PM
I'm having the same problem. Can anybody help with this?
Answer by antonynasce · Jul 03, 2018 at 09:20 AM
Seeing the same issue in 2018.1.0f2 on Mac - is there a fix for this?
Answer by caroliengilbers · Dec 11, 2018 at 10:52 AM
I tried this with Unity 2018.1.3 (C#)
Create new empty project
Create a new folder 'Tests'
Create your own assembly definition file in the test folder.
Check Unity References > Test assemblies, and Include Platforms > Editor
Create a regular script and paste the following:
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
public class TestScript
{
[Test]
public void NewTestMethod()
{
return;
}
}
NewTestMethod should now show up in the Test Runner.
You can try if it works with only step 5 after clicking on the 'Create Test Assembly Folder' button in the Test Runner.
I Hope this helps some of you!
Your answer
Follow this Question
Related Questions
Call OnTriggerEnter2D from unit test 0 Answers
Unfortunately, (GameName) has stopped (report ,ok) 0 Answers
Unity Test Tools Not Working 0 Answers
Collision working once 3 Answers
3d Text update. How its work? 1 Answer