Skip to main content

Home/ javascript/ Group items tagged unit

Rss Feed Group items tagged

vikas_jk

Useful Javascript Unit Testing Frameworks - QA With Experts - 0 views

  •  
    Javascript Unit testing frameworks list with it's features and which one you should use.
Javier Neira

HtmlUnit - Welcome to HtmlUnit - 2 views

  •  
    HtmlUnit is a "GUI-Less browser for Java programs". It models HTML documents and provides an API that allows you to invoke pages, fill out forms, click links, etc... just like you do in your "normal" browser. It has fairly good JavaScript support (which is constantly improving) and is able to work even with quite complex AJAX libraries, simulating either Firefox or Internet Explorer depending on the configuration you want to use. It is typically used for testing purposes or to retrieve information from web sites. HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes and is intended to be used within another testing framework such as JUnit or TestNG. Refer to the document "Getting Started with HtmlUnit" for an introduction. HtmlUnit is used as the underlying "browser" by different Open Source tools like Canoo WebTest, JWebUnit, WebDriver, JSFUnit, Celerity, ... HtmlUnit was originally written by Mike Bowler of Gargoyle Software and is released under the Apache 2 license. Since then, it has received many contributions from other developers, and would not be where it is today without their assistance.
Javier Neira

All about types in Javascript - The basics | united-coders.com - 0 views

  • This may lead to interesting results. When dealing with arrays, an array is converted to a string by converting the elements to string, seperating each element by a comma. [].toString();      // "" [2].toString();     // "2" [1,2,3].toString(); // "1,2,3"
Ivan Pavlov

joose-js - Google Code - 0 views

  • Joose is a self-hosting meta object system for JavaScript with support for classes, inheritance, mixins, traits, method modifiers and more. Joose makes object-oriented programming with JavaScript easy, declarative and very productive. The Joose meta-object system is multi-paradigm. It supports class-based and prototype-based programming styles as well as class-based inheritance and role-based extention. The Joose framework has been successfully used in multiple production systems for twelve months now and has been proven to be very stable. Joose is being tested using an automated unit-test suite that is being run in all major browsers (Firefox, IE, Safari, Opera and Chrome).
Javier Neira

Why REST ? | /var/log/mind - 0 views

  • ‘ls’ or ‘List Directory’
  • ‘cd’or ‘Change Directory’
  • ‘put’ or ‘Upload’
  • ...26 more annotations...
  • you soon realise that every file and directory is uniquely addressable by its fully qualified path (either absolute or relative) and you can refer to each file and directory by its path. You are also aware that a valid path will uniquely resolve to only one directory or file.
  • the server allows you to retrieve the list of subdirectories and files within your current directory. It always shows you the current state of that directory.
  • following elements
  • A shared understanding of where the files will be uploaded, how they will be uniquely named, their specific file extensions (optionally) and the specific format of the file eg.
  • daemon process on the central office computer (the FTP server) which regularly scans the directory, parses each file as it comes it, does the relevant processing on it, and generates the appropriate result files and places them in the appropriate directories using the shared understanding of the directory structure and the file naming convention to communicate back the results of the processing.
  • RPC allowed you to invoke remote procedures by supporting an ability to pass messages which included the message name and the values for all the parameters necessary to be supplied to the message. Unlike FTP which was meant to do data transfer across a network, RPC was geared to do things remotely.
  • FTP required understanding of very few basic verbs (ls, cd, get, put). Thus the training required to understand FTP semantics was far less than that for RPC. This was partially due to the fact that RPC had a programmatic interface.
  • Moreover each time, new procedures were added or parameters added, these required programmatic changes
  • HTTP protoco
  • Unlike FTP and email, this required the authors to understand a new language, but used a simple markup syntax to keep the learning curve to the minimum
  • get/view/download/save a document
  • Along with RPC, these were essentially different technical manifestations of Service Oriented Architecture (SOA) principles.
  • Many services were usually expected to “do something” though quite often some services would simply return the requested data. Usually but not necessarily the services were identified by using ‘verbs’.
  • allow us to use the web to ‘do something’
  • Resource and media types as the basic units
  • Unique resource identifiers
  • Each resource has often one default manually readable representation
  • Each resource representation optionally includes contextually relevant hyperlinks to other resources
  • REST encourages a uniform interface
  • GET, PUT, POST and DELETE
  • Default Rendering
  • a default HTML rendering capability
  • Aspects such as non maintenance of conversational state, greatly increase the scalability of REST applications even if they do incur a minor cost in efficiency (which can be due to repeated redundant communication of data elements, or additional processing requirements due to preclusion of conversation state).
  • is much easier to understand from a data perspective than an invoice processor API.
  • However the simpler, cleaner and minimalistic abstractions often are far more important than feature richness. A point I would want to make in favour of REST even as I admit that conventional SOA technologies are far more feature rich than REST.
  • REST encourages you to view and model your architecture as a set of resources rather than services.
Javier Neira

InfoQ: ECMAScript 5 released - 1 views

  • The introduction of strict mode aims to avoid common coding problems in ECMAScript applications. This is achieved with the presence of a lone string literal in a unit (script or function): "use strict;"
  • for either the entire script (if at the top of the script) or for a single function (if the first part of a function).
  • var i=3 is needed
  • ...10 more annotations...
  • and introducing new variables through eval cannot occu
  • delete cannot be used against arguments, functions or variables or other properties with the configurable flag set to false
  • with statements, often a source of errors, are no longer used and considered syntax errors
  • Functions can no longer have duplicate arguments with the same name Objects can no longer have duplicate properties with the same name
  • Access to the global object becomes a runtime error
  • A new JSON object with parse and stringify to support efficient generation of JSON data; like eval but without the security implications of being able to reduce code
  • Array now has standard functions, such as indexOf(), map(), filter(), and reduce()
  • Object now has seal()
  • and freeze()
  • Object.getPrototypeof() returns the prototype of the given object
Mr. DiGi

Google Code Blog: Introducing Closure Tools - 1 views

  • Closure Compiler is a JavaScript optimizer that compiles web apps down into compact, high-performance JavaScript code.
  • Closure Library is a broad, well-tested, modular, and cross-browser JavaScript library. Web developers can pull just what they need from a wide set of reusable UI widgets and controls, as well as lower-level utilities for the DOM, server communication, animation, data structures, unit testing, rich-text editing, and much, much more. (Seriously. Check the docs.)
  • Closure Templates grew out of a desire for web templates that are precompiled to efficient JavaScript.  Closure Templates have a simple syntax that is natural for programmers.
1 - 9 of 9
Showing 20 items per page