प्रारंभ करने में विफल रहा है, बस 2012 अपडेट 2 (http://www.microsoft.com/en-us/download/details.aspx?id=36833) स्थापित किया गया है, इसलिए मैं कुछ हार्ड टेस्ट कोड का परीक्षण करने के लिए बनाम नकली/शिम्स का उपयोग कर सकता हूं। नकली असेंबली बनाने पर सबकुछ ठीक से संकलित होता है और सभी संदर्भ यूनिट टेस्ट प्रोजेक्ट के भीतर अपेक्षित होते हैं। हालांकि किसी भी परीक्षा में निम्न कोड ...विजुअल स्टूडियो 2012 यूनिटटेस्ट इन्सोलेशन इंस्ट्रूमेंटेशन को
using (ShimsContext.Create())
{
//Doesn't matter whats in here
}
निम्नलिखित अपवाद फेंकता ...
Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException : UnitTestIsolation instrumentation failed to initialize. Please restart Visual Studio and rerun this test
स्टैक ट्रेस साथ
पूर्ण अपवाद ...
Test 'Abot.Tests.Unit.Core.HapHyperLinkParserTest.HyperLinkParserTest.GetLinks_AreaTags_ReturnsLinks' failed: Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationException : UnitTestIsolation instrumentation failed to initialize. Please restart Visual Studio and rerun this test
at Microsoft.QualityTools.Testing.Fakes.UnitTestIsolation.UnitTestIsolationRuntime.InitializeUnitTestIsolationInstrumentationProvider()
at Microsoft.QualityTools.Testing.Fakes.Shims.ShimRuntime.CreateContext()
at Microsoft.QualityTools.Testing.Fakes.ShimsContext.Create()
Core\HyperlinkParserTest.cs(59,0): at Abot.Tests.Unit.Core.HyperLinkParserTest.GetLinks_AreaTags_ReturnsLinks()
कुछ नोट चल ...
- मैं विजुअल स्टूडियो 2012 प्री का उपयोग कर रहा हूं mium
- .net 4.0
- मैं परीक्षण ढांचे
- testdriven.net प्लगइन और nunit जीयूआई लेकिन एक ही त्रुटि के माध्यम से परीक्षण चलाने की कोशिश की के लिए nunit उपयोग कर रहा हूँ समाधान लक्ष्य के सभी परियोजनाओं।
- को लक्षित .net 4.5 की कोशिश की और एक ही गलती
- मैं Typemock या Ncrunch नहीं उपयोग कर रहा हूँ मिल गया और वे वें
- यह एक से बंधे नहीं से
- मैं Moq उपयोग कर रहा हूँ स्थापित नहीं हैं लेकिन हटाया यह विशिष्ट परीक्षण, मैंने सत्यापित किया है कि यह विभिन्न परीक्षण फ़ाइलों में और दूसरे समाधान में भी विफल रहता है।
मुझे लगता है कि आपको vstest test runner का उपयोग करना है, वीएस2012 इसका उपयोग करता है, साथ ही साथ टीएफएस 2012 – Matthew
यह माइक्रोसॉफ्ट कनेक्ट पेज भी देखें: http://connect.microsoft.com/VisualStudio/feedback/details/785411/cannot- अपवाद को अनचेक करके डीबग-यूनिट-टेस्ट-इन-शिम्स-इन-बनाम2012-w-update2 – Monsignor