Tweaking our Nancy unit tests to run in 5 minutes instead of 40

Our product has over 4300 tests. The server side UI tests are around 1500 in total but was causing the full test run to take 20 minutes. Recently adding only a handful of tests increased the total test run time to over 40 minutes. It turns out the useful Browser testing component from the Nancy framework was expensive to create for each of our 1500 server side UI unit tests. Changing our Browser and bootstrapper configuration to run once per suite rather than once per test, resulted in our total test time being reduced to just over 5 minutes! That saving was worth the trade-offs we had to make. Continue reading

Ext.NET Ajax Requests: MVC, Web API or ASHX?

When I wrote the book on Ext.NET 2, I often described using ASHX or MVC Controllers (amongst other techniques) for getting data from Ext.NET Stores via AJAX Proxies.

Recently, I’ve received a few questions — and wondered myself — whether to use Web API instead. It has a cleaner method signature, and is intended for this kind of scenario where you want to return data rather than HTML.

I finally got a moment to compare all three (for my scenario). Continue reading

Ext JS TabPanel plugin for draggable tabs

Ext JS 4 comes with a plugin for TabPanels to allow reordering tabs using drag and drop. There isn’t an equivalent for Ext JS 3, however.

I came across a useful extension of the Ext JS 3.x TabPanel to re-order tabs via drag and drop. It is implemented as a subclass of Ext.TabPanel, as Ext.ux.panel.DDTabPanel and a version of it includes a useful reorder event that is fired once a tab is dragged to a new position in the TabPanel.

I refactored it from a subclass of Ext.TabPanel to a plugin so the original functionality is unchanged. See a demo and get the code. Continue reading