Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Sharp 20 posts 110 karma points
    Jul 04, 2017 @ 23:11
    John Sharp
    0

    Unit testing

    Hi folks,

    I've been playing around with Umbraco 7.6.4 recently and it's looking really good. I thought I'd try doing a little bit of code and writing a unit test for it.

    I can't get my test to be seen by the Test Explorer though.

    I have this class:

    [TestClass]
    public class UnitTest1 : BaseRoutingTest
    {
        [TestMethod]
        public void TestMethod1()
        {
    
        }
    }
    

    When it's just "UnitTest1" I can see it in the Test Explorer. As soon as I get it to inherit from one of the Umbraco.Tests.TestHelpers classes and build the project the class disappears. I don't appear to be getting build errors so I'm not sure what would be going wrong.

    I'm building against the .Net 4.6 framework if that makes a difference.

    Any help is greatly appreciated, am I doing something wrong or is it my computer?

  • John Sharp 20 posts 110 karma points
    Jul 06, 2017 @ 07:12
    John Sharp
    0

    Hi again,

    I thought maybe I was doing something wrong so I thought I'd give a completely clean installation a try and see if that helps.

    I've create a brand new 7.6.3 installation from the NuGet package and created a tests project too. I've put the UnitTests assembly from NuGet in there. When I build I can see the test class in Test Explorer and changing the class to inherit from BaseWebTest makes the test class disappear from Test Explorer.

    Is there anything that I'm doing obviously wrong - I'm not seeing any obvious errors so it's really confusing!

    Arrgh!

Please Sign in or register to post replies

Write your reply to:

Draft