JavaScript is all around
If you're building complex SPAs (single page applications) with ASP.NET MVC, or native-like Apps for smartphones using frameworks like PhoneGap (yeah, yeah it's Cordova now, just that PhoneGap sounded much better) or alike, then JavaScript plays a big role in your day to day work. Not to mention Node.JS and Windows 8 Metro Style Applications...
The days where JavaScript has been used for small client-side manipulation, and jQuery alone was enough to overcome browser compatibility issues is long gone.
And with the boost of HTML5, and tremendous improvements in performance in modern web browsers, you can say what you want, but C# is not enough anymore.
That being said, how should we tackle complex projects where JavaScript lines of code are running high?
Unit Testing, in that sense, can help by keeping complex things more simple.
If you are an architect in a project, and you aim for quality, then you got to give your teams the right tools to come up with maintainable projects.
The days where JavaScript has been used for small client-side manipulation, and jQuery alone was enough to overcome browser compatibility issues is long gone.
And with the boost of HTML5, and tremendous improvements in performance in modern web browsers, you can say what you want, but C# is not enough anymore.
That being said, how should we tackle complex projects where JavaScript lines of code are running high?
Unit Testing, in that sense, can help by keeping complex things more simple.
If you are an architect in a project, and you aim for quality, then you got to give your teams the right tools to come up with maintainable projects.
Picking The Tools
When you go out there and pick your JavaScript libraries for your next project, and I must admit it becomes a very nontrivial task those days with libraries like jQueryMobile, Backbone.JS, KnockOut, AngularJS and many more..., then you should also take into account those libraries that will assist you and your team to write and run your unit tests in your development environment.
As a .Net architect, my main development environment is Visual Studio, so my goal was to come up with a set of libraries that will allow me and teams I work with to do unit testing in Visual Studio, pretty much in same way we've been doing it with other .Net Unit Testing libraries.
Let's set the expectations
What do we want to accomplish?
- Seamless integration with Visual Studio.
So we can run tests without leaving the IDE.
(In any case, this is the Post's title right?) - Headless testing.
Against multiple browsers at the same time if possible.
Later we will want to take it a step forward and automate it as part of CI (Continuous Integration), right? - Support for AMD (Asynchronous Module Definition) / Require.JS.
- Support for Async Tests.
- Documented libraries & Tools.
- Free Tools are preferred.
Libraries & Tools
Eventually I came up with the combination of the tools listed below:
- QUnit - Unit Testing Library.
- Sinon.JS - Mock Library.
- Sinon Adapter for QUnit - Seamless Sinon.JS integration for QUnit.
- JSTD (JS Test Driver) - Console Runner (Java).
- QUnit to JsTestDriver Adapter - Translates QUnit API to JS Test Driver.
I can definitely say I'm quite happy with this combination.
In following posts of this series I'm going to describe in details how to combine those tools to play together.
What tools/libraries do you use for Unit Testing Java Script in a Visual Studio/TFS development environment?
thanks for sharing information,nice article
ReplyDeleteAngularjs Training In Hyderabad
Unbelievable. This post is written so well and contains each & every aspect that one must have. Project Viewer 365 Enterprise Crack Key is also in same format. Try this one too.
ReplyDeleteçekmeköy alarko carrier klima servisi
ReplyDeletekartal samsung klima servisi
ümraniye samsung klima servisi
kartal mitsubishi klima servisi
ümraniye mitsubishi klima servisi
beykoz vestel klima servisi
üsküdar vestel klima servisi
maltepe arçelik klima servisi
kadıköy arçelik klima servisi
yurtdışı kargo
ReplyDeleteen son çıkan perde modelleri
nft nasıl alınır
minecraft premium
özel ambulans
lisans satın al
uc satın al
en son çıkan perde modelleri
Congratulations on your article, it was very helpful and successful. b9e5ed0164b3ad18998dbac7bfe1e062
ReplyDeletesms onay
website kurma
numara onay
Thank you for your explanation, very good content. 2ff5a0154a09568839fe284c8702170c
ReplyDeletealtın dedektörü
Good content. You write beautiful things.
ReplyDeletesportsbet
mrbahis
korsan taksi
vbet
taksi
hacklink
vbet
hacklink
sportsbet
elf bar
ReplyDeletebinance hesap açma
sms onay
KNEF
betmatik
ReplyDeletekralbet
betpark
tipobet
slot siteleri
kibris bahis siteleri
poker siteleri
bonus veren siteler
mobil ödeme bahis
İDJXWE
çekmeköy
ReplyDeletekepez
manavgat
milas
balıkesir
Z2LAA
bayrampaşa
ReplyDeletegüngören
hakkari
izmit
kumluca
JOFBY
salt likit
ReplyDeletesalt likit
Y6RL