KarmaTestAdapter
KarmaTestAdapter copied to clipboard
Non-passing tests showing up as grayed out/not run when testing Jasmine in PhantomJS
Apologies for not having a screenshot at hand but the issue I've faced is fairly simple to describe. The extension installs without issue and integrates with Karma fine (as long as the karma.conf.js
is actually included in the .csproj
- which should probably be documented somewhere; different issue). When running jasmine tests in Chrome everything works seamlessly and great. However, when using PhantomJS to launch tests, anything that does not come back as a success gets grayed out by the test explorer, normally a symptom of a test not having been run. The icon stays as whatever it last was, i.e. if it's ever passed then it will stay with a Tick and just toggle on/off depending on whether it passes. This is semi useful but a test not reporting why it failed is incredibly limiting to the value added by a testing framework.
If I run karma start
from the command line everything appears to work fine. It reports failures and successes normally. Apologies I do not have the ability to take an exact output of this at present but can post it later if it would be beneficial.
Packages used to run phantomjs:
Karma regular:
karma
karma-jasmine
PhantomJS-specific:
karma-phantomjs-launcher
phantomjs-prebuilt
A few details about my System:
Operating System:
Windows 10 Enterprise
NodeJS:
v5.5.0
Output from Visual Studio:
Microsoft Visual Studio Enterprise 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.01038
Installed Version: Enterprise
Architecture and Modeling Tools 00322-80000-00000-AA858
Microsoft Architecture and Modeling Tools
UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.
Visual Basic 2015 00322-80000-00000-AA858
Microsoft Visual Basic 2015
Visual C# 2015 00322-80000-00000-AA858
Microsoft Visual C# 2015
Visual C++ 2015 00322-80000-00000-AA858
Microsoft Visual C++ 2015
Application Insights Tools for Visual Studio Package 1.0
Application Insights Tools for Visual Studio
ASP.NET and Web Tools 14.0.20626.0
ASP.NET and Web Tools
ASP.NET Web Frameworks and Tools 2013 5.2.30624.0
For additional information, visit http://www.asp.net/
Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
GenerateUnitTest 1.0
Generates unit test code for methods in classes under test.
Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services Tools
Microsoft Code Digger 0.9
Microsoft Code Digger
Microsoft Team Foundation Server 2015 Power Tools 14.0
Power Tools that extend the Team Foundation Server integration with Visual Studio.
Microsoft Visual Studio Process Editor 1.0
Process Editor for Microsoft Visual Studio Team Foundation Server
Microsoft.Pex.VisualStudio 1.0
Pex
NuGet Package Manager 3.0.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
PreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.
SQL Server Data Tools 14.0.50616.0
Microsoft SQL Server Data Tools
Visual Studio Tools for Universal Windows Apps 14.0.23121.00 D14OOB
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.
Web Essentials 2015 1.0.204
Adds many useful features to Visual Studio for web developers.
Same behaviour with Firefox
I have the same behavior as peabnuts123. When I specify PhantomJS and Chrome in karma.conf.js, I see the greyed out tests. But when I do "karma start" in a CMD window, the tests are run and pass. If I remove PhantomJS, they shows as run and succeeded in VS. I have VS2015 Update 1. I don't always get the greyed out behavior. I get it half the time and I had not been able to determine which type of tests it occurs with.
It seams that the problem is in JsTestAdapter. I managed to fix it locally under this post:
https://github.com/MortenHoustonLudvigsen/JsTestAdapter/issues/2