Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rider Test runner ignores [Explicit] Attribute #1731

Closed
Strepto opened this issue Jul 2, 2020 · 1 comment
Closed

Rider Test runner ignores [Explicit] Attribute #1731

Strepto opened this issue Jul 2, 2020 · 1 comment
Assignees

Comments

@Strepto
Copy link

Strepto commented Jul 2, 2020

Environment Setup:

  • Unity 2019.4.1f1
  • Rider 2020.1.3
  • Unity Packages:
    • Unity Test Framework 1.1.14
    • Rider Editor 2.0.5 & 1.1.4

Expected: When running "All Tests" or a collection of tests, the explicit tests does not start.

Actual: When running "All Tests" or a collection of tests the explicit tests starts.

Running "All Tests" in Unity (Two Explicit tests are marked Inconclusive)
correctBehavior

Running "All Tests" in Rider (Two Explicit tests fail, as they were started and have Assert.Fail() in their code)
wrongBehavior

Test Class is the standard Unity Create new Test Class class. Where I duplicated the tests and marked them explicit and with Assert.Fail() to indicate that they actually run.

using System.Collections;
using NUnit.Framework;
using UnityEngine.TestTools;

namespace Tests
{
    public class NewTestScript
    {
        [Test]
        public void NewTestScriptSimplePasses()
        {
            Assert.Pass();
        }

        [UnityTest]
        public IEnumerator NewTestScriptWithEnumeratorPasses()
        {
            yield return null;
            Assert.Pass();
        }
        
        [Test]
        [Explicit]
        public void NewTestScriptSimplePassesExplicit()
        {
            Assert.Fail();
        }

        [UnityTest]
        [Explicit]
        public IEnumerator NewTestScriptWithEnumeratorPassesExplicit()
        {
            yield return null;
            Assert.Fail();
        }
    }
}

Thanks for a good tool for everything else. :D

@Strepto Strepto changed the title Rider Test runner ignores [Explicit] Rider Test runner ignores [Explicit] Attribute Jul 2, 2020
@van800 van800 self-assigned this Jul 2, 2020
@van800
Copy link
Contributor

van800 commented Aug 5, 2020

closed in favor of https://youtrack.jetbrains.com/issue/RIDER-48686

@van800 van800 closed this as completed Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants