background preloader

CasperJS, a navigation scripting and testing utility for PhantomJS and SlimerJS

CasperJS, a navigation scripting and testing utility for PhantomJS and SlimerJS
Casper.js is released under the terms of the MIT license. Copyright (c) 2011-2013 Nicolas Perriault Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.

http://casperjs.org/

Related:  TESTS UNITAIRES et FONCTIONNELS

Karma - a Javascript Test Runner Karma - a Javascript Test Runner Michael G Bielski, Karma is a test runner for JavaScript that runs on Node.js. It is very well suited to testing AngularJS or any other JavaScript projects. Using Karma to run tests using one of many popular JavaScript testing suites (Jasmine, Mocha, QUnit, etc.) and have those tests executed not only in the browsers of your choice, but also on the platform of your choice (desktop, phone, tablet.) Continuos Integration (CI) for JavaScript – Jasmine and Teamcity Web applications are using more JavaScript than ever before. The following image (thanks to Gineer) shows the shift in the architecture types of web applications from simple thin clients to thicker clients driven by rich presentations and client logic. Since most of the newer web applications include business logic embedded into the client using JavaScript, we must put assurances to make sure the quality of the application is not compromised over time. In most cases, the JavaScript side of the applications goes untested or is not automated which is a bad idea. I have selected the following tools to be able to provide Continuous Integration to Rich Internet Applications: Jasmine is a testing framework for JavaScript.

Building a Text-Based UI with Backbone and Charm I am a little framework averse. When I write a program, I like to build from scratch as far as it is practical. Not using a framework gives me the feeling that I am so in control of my own destiny. But having said that, I will sometimes succumb to using a framework when it's very clear that the use of the framework will result in significantly less code, and/orsignificantly less complexity I recently rewrote a text-based user interface using Backbone, and as far as I know, that is a framework. Jasmine (JavaScript testing framework) Jasmine aims to be easy to read. A simple hello world test looks like the code below, where describe() describes a suite of tests and it() is an individual test specification. The name "it()" follows the idea of behavior-driven development and serves as the first word in the test name, which should be a complete sentence. Usage follows syntax similar to that of RSpec.

Organizing your application using Modules (require.js) - Backbone.js Tutorials Unfortunately Backbone.js does not tell you how to organize your code, leaving many developers in the dark regarding how to load scripts and lay out their development environments. This was quite a different decision to other JavaScript MVC frameworks who were more in favor of setting a development philosophy. Hopefully this tutorial will allow you to build a much more robust project with great separation of concerns between design and code. This tutorial will get you started on combining Backbone.js with AMD (Asynchronous Module Definitions). What is AMD?

NodeJS Console Object Debug Inspector - Thomas Hunter - Web Development Tutorials and Personal Opinions The NodeJS Console Object Debug Inspector, or simply node-codein, is a tool for providing a visual debugger of global node variables, as well as executing code inside of your running process. Think of it as a GUI REPL for a running node process. This GUI is run in a browser (it works best with Chrome, maybe only with Chrome). It provides expandable and collapsable nodes when dealing with hierarchal data, has syntax highlighting depending on the type of data involved. It will mirror your console.log() commands (they are shown in both the terminal as well as the GUI).

Learn how to use Gephi Welcome to Gephi! Gephi is an open-source software for visualizing and analysing large networks graphs. Gephi uses a 3D render engine to display graphs in real-time and speed up the exploration. You can use it to explore, analyse, spatialise, filter, cluterize, manipulate and export all types of graphs. Getting Started New to Gephi? Mocha (JavaScript framework) Mocha is a JavaScript test framework for Node.js programs, featuring browser support, asynchronous testing, test coverage reports, and use of any assertion library. Mocha can be used with most JavaScript assertion libraries, including: should.jsexpress.jschaibetter-assertunexpected $ npm install -g mocha $ mkdir test var assert = require("assert")describe('Foo', function(){ describe('#getBar(value)', function(){ it('should return 100 when value is negative') // placeholder it('should return 0 when value is positive', function(){ assert.equal(0, Foo.getBar(10)); }) })}) $ mocha . 1 test complete (1ms)

Continuous Integration for Javascript Jenkins is a CI tool that is often used for running tests and code analysis after every code push. There are a lot of benefits that we as a community are not taking advantage of for our web (CSS, JS, etc) code. In this article I’m going to walk you through setting up automated building and testing for a JavaScript project.

Danny Croft - Web Developer made in Wales but working in London  Unit testing can make your code less prone to bugs and gives you piece of mind that everything is working the way it should. Normally when I speak to other developers about work, we end up speaking about workflow, tools and release processes. I’m always surprised by the amount of front-end developers that don’t unit test their code. When asked why, they give the following answers: “I did have a look at Selenium, but it freaked me out. Getting it installed and ready to go looked a right pig!” JavaScript Guide The JavaScript Guide shows you how to use JavaScript and gives an overview of the language. If you need exhaustive information about a language feature, have a look at the JavaScript reference. This Guide is divided into the following chapters. Introduction Grammar and types Control flow and error handling

Related: