After click Run All nothing happend

Hi guys, (unity 5.6.2f1)
Thats my test code. When I clicked on Run All (in Integration test tool) nothing happend.
Do you know to help me someone please ?

using System;
using System.Collections.Generic;
using System.Threading;
using NUnit.Framework;
using UnityEngine;

    [TestFixture]
    public class ScoreTest
    {
        [Test]
        public void FailingTest(){
            Assert.AreEqual(1, 2);
        } 
    }

I have got Also this Error.

Assets/UnityTestTools/Examples/UnitTestExamples/Editor/SampleTests.cs(74,10): error CS0246: The type or namespace name ExpectedException could not be found. Are you missing an assembly reference?

I cant fix it

Hi Adrian,

Have you checked that:

  1. the script file is in a folder named “Editor” - [it doesn’t matter where Editor is in the assets]
  2. the script file name is the same as the public class declared [ie: ScoreTest]

The test wasn’t showing for me either, then I realized I had gotten confused between two script files:

  • ScoreMasterTest, which I placed in Editor folder and had not actually wrote any code in.
  • ScoreMaster which I had in my Scripts folder and had written the test code in.

After I moved my test code from ScoreMaster to ScoreMasterTest in Editor folder under assets, the test showed up in the window.

I was working in Unity 2017.1

Hope this was helpful!
Keep going! Good luck! :slight_smile:

Privacy & Terms