guiomie
guiomie

Reputation: 5148

Unit test timeouts

I suspect this problem might be due to a bad configuration. The simplest unit test hangs also. Basically, whatever I put in my unit test does nothing, the test is launched and keeps loading until it reaches timeout. My initial test used a TransactionScope, DataContext and custom objects. I then simplified my unit test to the following, and it still hangs:

using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using ManifestService;
using System.Transactions;

namespace UnitTesting
{
    [TestClass]
    public class PackagerUnitTest
    {
        [TestMethod]
        public void Packager_CreatePackageType()
        {
            string expected = "test-package";
            Assert.AreEqual("test-package", expected);
        }
    }
}

Upvotes: 2

Views: 694

Answers (1)

guiomie
guiomie

Reputation: 5148

So, it was a configuration issue, at the visual studio level. Basically, you need Visual Studio 2010 SP1 if you want to run unit tests while having Visual Studio 2012 installed at the same time.

Thanks for the answer from this blog:

http://dorkasaurusrex.blogspot.ca/2012/11/visual-studio-2010-unit-test-hangs.html

SP1 download link:

http://www.microsoft.com/en-us/download/details.aspx?id=23691

Upvotes: 1

Related Questions