Tuesday, June 28, 2016

VSTS - Build and Deployment service blade is empty in the Azure portal

As mentioned in my blog post yesterday, you can buy extra private build slots through the Azure Portal. However when I tried to do this, the Build and Deployment service in the Azure portal refuses to load and remains empty. I got the problem no matter if I try Chrome, IE, Firefox.


Anyone with the same problem?

Monday, June 27, 2016

VSTS Build–Private Build slots; you only get one for free!

By default when you are using VSTS(aka Visual Studio Online), you get the following extra services as part of your subscription:

Build and Deployment: Use this task-based service to create, queue, and monitor cross-platform builds. Use Hosted Agents that Microsoft runs, or Private Agents that you run so that you can install custom software.

  • Build(XAML)/ Build and Deployment: Create build definitions  and run them in Visual Studio Team Services. Configure builds to run on demand at specific intervals, or for continuous integration (CI). Builds are charged per minute for the actual amount of computing time used to build your project.

  • Cloud-based Load Testing: Create load tests using Visual Studio Ultimate 2013, Visual Studio Enterprise 2015, or later. Run those tests in Visual Studio Team Services. Load tests are measured and billed in virtual user minutes: the number of virtual users multiplied by the number of minutes that you set up for the load test run.

Your Visual Studio Team Services account includes free amounts of these additional services:

  • Build (XAML) / Build and Deployment: combined 240 minutes (4 hours) per month

  • Cloud-based Load Testing: 20,000 virtual user minutes per month

With the new Build and Deployment you get 2 things:

  • One hosted build agent that runs on a build server provided by Microsoft
  • One private build agent that you can install on your own hardware(virtual or physical)

I wasn’t aware of the second thing, so I got into troubles when I tried to add a second private build agent and ended up with some weird errors. Luckily it is easy to buy extra private agents through the Azure Portal. Here are the steps you need to follow: https://www.visualstudio.com/docs/setup-admin/team-services/get-more-build-or-load-testing-vs#AzurePortal

Click Paid. Select total number of agents. Save your changes

Remark: The hosted XAML build service will be retired by September 2016.

Friday, June 24, 2016

Nice quote–The inevitability of design

A quote by Douglas Martin in his book ‘Book Design: A practical Introducation’ but also applicable to software development and software architecture:

“Questions about whether design is necessary or affordable are quite beside the point: design is inevitable. The alternative to good design is bad design, not no design at all.”

Douglas Martin

Thursday, June 23, 2016

TFS Build–How to set log verbosity

After helping a customer upgrade to TFS 2015, they switched there existing build templates to the latest TFS (XAML) build process template(TfvcTemplate.12.xaml).


However after doing that, they noticed that they could no longer change the log verbosity of the build.


Starting from TFS (XAML) Build 2013 this is no longer necessary as the build diagnostics is always switched on. The easiest way to see the diagnostics is to browse to the web portal, open a build result and click on the Diagnostics tab:


Wednesday, June 22, 2016

TFS Build: Running your JavaScript unit tests during build

To run our JavaScript unit tests(you have them right?) inside Visual Studio we are using Chutzpah. Chutpzah is a JavaScript test runner which enables you to run unit tests using QUnit, Jasmine, Mocha, CoffeeScript and TypeScript(!).

Chutzpah has a test adapter for the Visual Studio Unit Test Explorer which makes it possible to run your JavaScript unit tests among your other tests.

This week I spent some time in making these tests also work on the build server. Here are some of the lessons I learned among the way:

Tip 1  - Add the Chutzpah nuget package as a reference to your unit test project

Add the Chutzpah nuget package to the project that contains your JavaScript unit tests. This NuGet package contains all required DLL’s and tooling to be able to run your JavaScript tests. By using this approach you don’t need to install the Chutzpah test adapter on your build server or specify the location of your test adapter. The TFS Build testing tools will automatically detect the required DLL’s and load the test adapter for you.

Tip 2 – Start using a chutzpah.json file

Chutpzah uses a lot of defaults out-of-the-box. But you have the option to tweak and configure almost everything. The Chutzpah test runner will search for this configuration file in all your test directories and multiple config files can be used.

Here is the config file that we are using:

More information: https://github.com/mmanela/chutzpah/wiki/Chutzpah.json-Settings-File 

Tip 3 – Remember the ‘IsTestFrameworkFile’ configuration option

As you can see in the config file above, we are using Angular at the moment. However the first time when we tried to run it using the chutzpah.json file, we got the following error:

“ReferenceError: ‘module’ is undefined”

This was caused by the fact the Angular and Angular.mock file were not yet loaded. You can fix this by setting the “IsTestFrameworkFile” option to “True”. This ensures that the references will be placed directly after the test framework files (like Jasmine.js) in the test harness.

Tuesday, June 21, 2016

JavaScript: const vs let vs var

With the introduction of EcmaScript 6 (EcmaScript 2015), 2 new keywords(among a lot of other language features) are added:

  • const: creates a read-only reference to a value. It does not mean the value it holds is immutable, just that the variable identifier cannot be reassigned.
  • let: declares a block scope local variable

Although these 2 keywords seems simple, there is still some debate in the JavaScript community when to use ‘const’ vs ‘let’ vs ‘var’. Originally ‘let’ was stated as ‘the new var’, but others are promoting ‘const’ as the default.

Here are some general rules that I follow:

  • If a variable won’t be reassigned I use ‘const’
  • If a variable may be reassigned I use ‘let’
  • If someone points a gun at my head and I have no other choice, I use ‘var’ Winking smile

Monday, June 20, 2016

Power BI free e-book

Microsoft released a free ebook about Power BI:

imageGet started quickly with Microsoft Power BI! Experts Alberto Ferrari and Marco Russo will help you bring your data to life, transforming your company’s data into rich visuals for you to collect and organize, allowing you to focus on what matters most to you. Stay in the know, spot trends as they happen, and push your business to new limits.

This free ebook introduces Microsoft Power BI basics through a practical, scenario-based guided tour of the tool, showing you how to build analytical solutions using Power BI. Read the ebook to get an overview of Power BI, or dig deeper and follow along on your PC using the book’s examples.

Download PDF: https://aka.ms/IntroPowBI/StndPDF




More information: https://blogs.msdn.microsoft.com/microsoft_press/2016/06/16/free-ebook-introducing-microsoft-power-bi/