By Giles Davies, Visual Studio Technical Specialist at Microsoft
This is an updated version of the 6 differences between Visual Studio 2015 Enterprise and Visual Studio 2015 Professional article which now includes new functionality added in 2017.
Visual Studio 2017 Enterprise provides a wide range of functionality and therefore I’ll group the capabilities into five areas:
- Code quality
- Build and release
- Subscription benefits
Let’s take a look at what Enterprise provides in each of those areas, over and above what Professional offers. If you want to look for specifically what’s new in Enterprise in 2017 (i.e. not in 2015 Enterprise) then the short list is Live Unit Testing, Live Architectural Dependencies, Packages, Build and Release Pipelines, Xamarin and subscription benefits. These are all introduced below.
There are a range of tools to help developers write the highest quality code, and that build on the core unit testing capabilities in Professional:
IntelliTest was introduced in 2015 and analyses your source code and then creates unit tests to achieve 100% code coverage for each path through that code.
That means that you can get a lot more of your code covered by unit tests for less effort, helping you to add unit tests to code that doesn’t have any and making it easy to keep on top of creating unit tests for new code. It doesn’t mean that you’ll never write a unit test again, but I’d consider this a means of getting the core unit tests generated for you, allowing you to concentrate on specific tests and scenarios based on your domain knowledge.
You can tailor it to allow exceptions, override object creation and much more.
It will work with MS Test (including MS Test v2 now in Visual Studio 2017), NUnit, xUnit and any other testing framework that provides an adapter for use in Visual Studio. It is currently limited to C#.
Here’s a 35 min video walking through IntelliTest.
Live Unit Testing (new for 2017)
What’s the earliest point that your code can be tested with unit tests? How about as you’re typing? That’s what Live Unit Testing provides as well as line level coverage and test outcome all shown in the editor as you work. It also works whilst debugging.
Microsoft Fakes has been around for a while but it’s perhaps an overlooked Enterprise capability that allows you to isolate parts of your overall solution to help with unit testing. Fakes splits into:
- Stubs, which allow you to mock parts of your application (e.g. a component or service) to make unit testing easier or possible. Read more here.
- Shims, which allow you to divert calls outside your application to your own implementation. An example might be to shim system calls to get the date in order to test for specific scenarios (e.g. a leap year). Read more here.
Code Maps allows you to understand and explore your source code visually.
Why is that useful? It allows you to build your understanding of the relationships between different aspects of your code without needing to read the source. Code Maps allows you to drill from assemblies down to namespaces, classes, methods and down to the underlying source, as well as filter out those elements you’re not interested in, such as test code or system assemblies.
You can add your own annotations and groupings, rearrange the diagrams and share them with others, via email, saved as diagrams or directly within Visual Studio. A Professional user can view CodeMaps but not author them.
I see this as useful for people new to a project, or when you’re going to be making changes to code that you aren’t familiar with or perhaps can’t remember.
One often overlooked capability is that you can also debug using Code Maps and this can really help in not having to keep track in your head of where you are in the code base whilst debugging.
Live Architectural Dependencies (revised for 2017)
Architecture layer diagrams have been in Visual Studio for quite a while, but they’ve now been reengineered to take advantage of Roslyn and thereby make them much more effective. You now get live, as you type code, warnings and errors, allowing you to enforce architectural rules across your codebase.
Here’s how I think of the benefits; it’s quite possible to have code that compiles, passes unit tests, passes functional tests and is in use in production, but still exhibits poor architecture such as incorrect dependencies between components/tiers/services etc.. This can result in issues in the future. Live Architecture Dependency allows you to stop this happening at the earliest possible time: as the problematic code is being typed.
From a licensing perspective this requires an Enterprise license to author, but any edition to pick up and enforce the rules.
IntelliTrace is a historical or post-mortem debugging technology and essentially helps to address the “I can’t reproduce it” problems, typically across dev and test environments. It was introduced in 2010, so it’s not new, and can be used across dev, test and production environments.
A simple example of its use is:
A tester finds a bug in the test environment. The tester repros the bug with IntelliTrace collection enabled, and the bug raised then includes the IntelliTest log file. That log file includes the calls and events from the test environment.
The developer opens the bug and the IntellITrace log file in Visual Studio Enterprise, and can view the exceptions raised, and for each of those exceptions see the stack trace. The developer can choose to debug any of those exceptions, in which case Visual Studio will go into debug mode with the execution halted at the line of code that threw the chosen exception. The developer can then step both forward and backwards through the source code to understand what happened.
Key advantage – the developer doesn’t need to work out how to reproduce the conditions to replicate the bug in order to then start understanding how to fix it. IntelliTrace allows the developer to debug as if attached for debug, even though this takes place later and on a different environment. For a problem where it’s environment based (e.g. can repro in test but not in dev) this can save a lot of time.
This requires .NET 2.0 or higher C# or VB.NET and works in ASP.NET, Microsoft Azure, Windows Forms, WCF, WPF, Windows Workflow, SharePoint and 64-bit apps.
You don’t need Enterprise to collect IntelliTrace data, but you do need Enterprise to use it.
Build and Release (new for 2017)
Whilst the continuous integration and continuous deployment capabilities of Team Foundation Server and Visual Studio Team Services have been around prior to 2017, there are two related areas that Visual Studio 2017 Enterprise gives you access to without additional licensing:
Packages. Package management provides a private NuGet, NPM or Maven repository for publishing and sharing code. Read about package management. This has been added as an extension and requires additional licenses unless you have Enterprise, in which case it’s included.
Build and release pipelines. The way that build and release is licensed has changed to a model that licenses concurrency. You get one pipeline free, and if you want more than one build and/or release to be running at the same time then you need to purchase pipelines. Here’s a good explanation about pipelines but the key point here is that each Visual Studio 2017 Enterprise license gives you one extra pipeline for both TFS and VSTS.
To summarise simply, you get all the testing tools in Enterprise. In other words:
- Test case management
- Manual testing
- Exploratory testing
- Automated functional testing
- Load and performance testing
Enterprise provides test case management, manual and exploratory testing by including Microsoft Test Professional as part of the Enterprise edition. I won’t cover that now but you can find out more here.
What’s unique to Enterprise are automated functional testing and load and performance testing.
The Visual Studio automated functional testing tool is Coded UI. As the name suggests this creates automated tests (i.e. including automated verification) and records them as code – either C# or VB.NET. You can record them as you perform actions, or create tests by reusing test methods at a code level. You can also promote manual tests to create the automated test and then add verifications.
Coded UI allows you to build regression suites that drive the UI of the application under test (web and thick clients), and to run those regression tests remotely, such as on a test environment and even as part of the release management capability discussed above. Note that executing a CodedUI test remotely doesn’t require an Enterprise edition, so other users can run them.
For more info on CodedUI here are the docs.
Load and Performance Testing has been around for a long time in Visual Studio, and has evolved over the years. The core capabilities are the same; create a scenario that tests performance using a certain number of virtual users running a set of tests over a given time. You can factor in network conditions (e.g. 10% of the users are on a very poor network connection, what’s their experience?) and collect system performance counter information (CPU, memory, disk I/O and much more):
Here’s a walkthrough of creating and running a load test.
The latest changes have included the ability to choose to use Azure to generate the load i.e. you don’t need to find the hardware and set up the test rig. That’s without making any changes to the load test, just a radio button choice between the cloud and on-premise. Using the cloud means you can also choose where the load is coming from using the Azure data centers:
Xamarin (new in 2017)
Visual Studio 2017 (all editions) include the Xamarin development tools for creating native cross-platform mobile apps with C#. Visual Studio 2017 Enterprise adds some extra capabilities around Xamarin:
- Embedded Assemblies: protects embedded native code.
- Live Inspection (Preview). Allows you to programmatically interact with your live running app in real time on devices and emulators. This enables rapid design iteration and experimentation without needing to compile, build and deploy each time that changes are made.
- Xamarin Profiler (Preview). Profiler is a full-featured profiling tool made specifically for Xamarin apps, helping developers identify memory and performance problems.
- Xamarin Test Recorder. Record automated tests for your app.
- 25% discount off Xamarin Test Cloud: this allows you to deploy your app and run automated tests against a range of real devices (over 2500 phones and tablets currently).
Visual Studio Subscriptions (MSDN) (revised for 2017)
Last but not least are the extra benefits (over Professional) that you get from Enterprise in Visual Studio Subscriptions (what used to be called MSDN). I’d highlight:
- More Azure credit (currently £115 per month with Enterprise) so you can use more Azure services for free each month, such as running virtual machines.
- An unrestricted set (i.e. a full subscription) of Pluralsight courses for a year (rather then the curated list previously provided).
- Redgate ReadyRoll. This is an extension that provides continuous deployment support for your databases in VSTS.
- PowerBI Pro.
- Office 365 developer subscription for 25 users.
- Office Professional production license.
- Dev and Test downloads for SharePoint, Exchange, Dynamics, Office production use and PowerBI.
- 2 collections of 10 courses of Microsoft e-learning.
- 4 support incidents.
More details in the subscription editions overview.
Hopefully this gives you a flavour of the differences and if you’re in the position of either deciding which edition to get, or having become entitled to Enterprise from an upgrade, then you’ll have a better idea of the key additional capabilities.