Monday, May 13, 2013

Various tool and their benefits


JSHint - JSHint is a community-driven tool to detect errors and potential problems in JavaScript code and to enforce your team’s coding conventions.JSHint can be used in eclipse via it's eclipse plugin  as well as in qunit to develop test cases which will consider each validation failure as test case failure.

W3c Markup validator - This validator checks the markup validity  of Web documents in HTML, XHTML, SMIL, MathML, etc.
Stripe Generator -This is a tool to generate stripe images by few clicks, in few seconds. These images can be used as background of a web page. 
SpriteMe -Sprite me is a javascript utility, whcih can be executed from any browser. During execution, it scans all the background images in current page and suggest possible spriting. The suggestion also include the number of request reduction happening on sptiring implementation. We can export the final spriting image along with corresponding CSS to be used for applying spriting in the page, from this tool. 
Trang - Tool to generate xsd from xml file

Various techniques & their benefit


CSS Sprites:CSS sprites are a way to reduce the number of images by combining several images into one. This technique is useful in reducing the all images load time.
Regular Expression - Regular Expression - Regular expressions are a way to describe a set of strings based on common characteristics shared by each string in the set. They can be used to search, edit, or manipulate text and data. In java regular expression evaluation engine's evaluation process can be tweaked in any of three possible flavors using quantifiers ie Greedy, Reluctant & Possessive

Wednesday, May 8, 2013

Various frameworks and their purposes

DWR (Direct Web Remoting) -DWR is a Java library that enables Java on the server and JavaScript in a browser to interact and call each other as simply as possible.

Display tag -Display tag library can just... display tables! Give it a list of objects and it will handle column display, sorting, paging, cropping, grouping, exporting, smart linking and decoration of a table in a customizable XHTML style.

JQuery - jQuery is a fast, small, and feature-rich JavaScript library. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.

BlazeDS - BlazeDS is a server-based Java remoting and web messaging technology that allows you to connect to back-end distributed data and push data to Adobe Flex and Adobe Integrated Runtime (AIR) Rich Internet applications (RIA).

QUnit -QUnit is a powerful, easy-to-use JavaScript unit testing framework. It's used by the jQuery, jQuery UI and jQuery Mobile projects and is capable of testing any generic JavaScript code, including itself!

Junit - JUnit is a simple framework to write repeatable tests. It is an instance of the xUnit architecture for unit testing frameworks.

JUnitParamsIts a library, which acts as an extension to write parametric test cases in an easier fashion than conventional JUnit parametric test case writing and execution.It works on JUnit version greater than 4.6. Its change log and java doc can be accessed from  git and javadocslinks respectively.

Tuesday, May 7, 2013

Challenges while developing test for spring beans

Spring provides us options to test beans in application contexts using spring-test module. The detailed explanation of the way to use it can be accessed from the following link

I had maven based application. During the development and running of these test cases, I came accross few challenges. The key ones along with their resolutions are as mentioned below.

Issue - Compilation failure - SpringJUnit4ClassRunner.class and @ContextConfiguration not found
Solution - Included below mentioned maven dependency in the project and executed mvn eclipse:eclipse

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
            <version>3.1.2.RELEASE</version>
        </dependency>

Issue - IDE displying error - The type org.junit.runners.BlockJUnit4ClassRunner cannot be resolved. It is indirectly referenced from required .class files
Solution - BlockJUnit4ClassRunner was included in Junit4.5 so added below mentioned dependency of junit4.5 and executed mvn eclipse:eclipse

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.5</version>
        </dependency>